
const
  X: qword = $4BB9C2F48D723EA6; // 5456606779136949926

(* ====== excerpt from "flt_core.inc::gen_digits_64" ====== *)
var
  temp: qword;
  splitl, splitm, splith: dword;
begin
    // Split X into 3 unsigned 32-bit integers; lower two should be less than 10 digits long
(* <<skipped codepath>>
    if ( x < 1000000000 ) then
    begin
        splith := 0;
        splitm := 0;
        splitl := x;
    end
    else
    begin
*)
        temp := x div 1000000000;

writeln('1: ',temp); // should print "5456606779", which is 0x00000001453D363B

        splitl := x - temp * 1000000000;

writeln('2: ',splitl); // should print "136949926", which is 0x0829B0A6

(* <<skipped codepath>>
        if ( temp < 1000000000 ) then
        begin
            splith := 0;
            splitm := temp;
        end
        else
        begin
*)
            splith := temp div 1000000000;

writeln('3: ',splith); // should print "5"

            splitm := lo( temp ) - splith * 1000000000;
            // expected to be evaluated as 32-bit expression since "lo( temp )" should be dword

writeln('4: ',splitm); // should print "456606779", which is 0x1B37443B
            // BUG: it turns out to be = 871191099 [0x33ED523B]

(*
        end;
    end;
*)
end.
