// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: dtoa_generate_digits
static int dtoa_generate_digits(dtoa_Fp* fp, dtoa_Fp* upper, dtoa_Fp* lower, char* digits, int* K)
    {
        uint64_t part1, part2, wfrac, delta;
        uint64_t *divp, *unit;
        int idx, kappa;
        dtoa_Fp one;

        wfrac = upper->frac - fp->frac;
        delta = upper->frac - lower->frac;
        one.frac = 1ULL << -upper->exp;
        one.exp  = upper->exp;
        part1 = upper->frac >> -one.exp;
        part2 = upper->frac & (one.frac - 1);
        idx = 0;
        kappa = 10;

        /* 1000000000 */
        for (divp = dtoa_tens + 10; kappa > 0; divp++)
        {
            uint64_t tmp, div;
            unsigned digit;
            div = *divp;
            digit = part1 / div;
            if (digit || idx)
                digits[idx++] = digit + '0';
            part1 -= digit * div;
            kappa--;
            tmp = (part1 << -one.exp) + part2;
            if (tmp <= delta)
            {
                *K += kappa;
                dtoa_round_digit(digits, idx, delta, tmp, div << -one.exp, wfrac);
                return(idx);
            }
        }

        /* 10 */
        unit = dtoa_tens + 18;
        while(true)
        {
            unsigned digit;
            part2 *= 10;
            delta *= 10;
            kappa--;
            digit = part2 >> -one.exp;
            if (digit || idx)
                digits[idx++] = digit + '0';
            part2 &= one.frac - 1;
            if (part2 < delta)
            {
                *K += kappa;
                dtoa_round_digit(digits, idx, delta, part2, one.frac, wfrac * *unit);
                return(idx);
            }
            unit--;
        }
    }

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x88(%rsp), %rcx
subq (%rcx), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x78(%rsp), %rcx
subq (%rcx), %rax
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rcx
xorl %eax, %eax
subl 0x8(%rcx), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x28(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
xorl %ecx, %ecx
subl 0x28(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x34(%rsp)
movl $0xa, 0x30(%rsp)
leaq 0x14d80c(%rip), %rax    # 0x215a20
addq $0x50, %rax
movq %rax, 0x40(%rsp)
cmpl $0x0, 0x30(%rsp)
jle 0xc8329
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x10(%rsp)
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0xc8255
cmpl $0x0, 0x34(%rsp)
je 0xc8276
movl 0xc(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq 0x70(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x34(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
movl %eax, %ecx
imulq 0x10(%rsp), %rcx
movq 0x60(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x60(%rsp)
movl 0x30(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rsp)
movq 0x60(%rsp), %rax
xorl %ecx, %ecx
subl 0x28(%rsp), %ecx
movl %ecx, %ecx
shlq %cl, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0xc8314
movl 0x30(%rsp), %ecx
movq 0x68(%rsp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq 0x70(%rsp), %rdi
movl 0x34(%rsp), %esi
movq 0x48(%rsp), %rdx
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %r8
xorl %eax, %eax
subl 0x28(%rsp), %eax
movl %eax, %eax
movl %eax, %ecx
shlq %cl, %r8
movq (%rsp), %rcx
movq 0x50(%rsp), %r9
callq 0xc8430
movl 0x34(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0xc8416
jmp 0xc8316
movq 0x40(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
jmp 0xc821d
leaq 0x14d6f0(%rip), %rax    # 0x215a20
addq $0x90, %rax
movq %rax, 0x38(%rsp)
imulq $0xa, 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
imulq $0xa, 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x30(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rsp)
movq 0x58(%rsp), %rax
xorl %ecx, %ecx
subl 0x28(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0xc837e
cmpl $0x0, 0x34(%rsp)
je 0xc839f
movl 0x8(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq 0x70(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x34(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
subq $0x1, %rax
andq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0xc8403
movl 0x30(%rsp), %ecx
movq 0x68(%rsp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq 0x70(%rsp), %rdi
movl 0x34(%rsp), %esi
movq 0x48(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x20(%rsp), %r8
movq 0x50(%rsp), %r9
movq 0x38(%rsp), %rax
imulq (%rax), %r9
callq 0xc8430
movl 0x34(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0xc8416
movq 0x38(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x38(%rsp)
jmp 0xc833b
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)