// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: dtoa_emit_digits
static int dtoa_emit_digits(char* digits, int ndigits, char* dest, int K, bool neg)
    {
        int exp, idx, cent;
        char sign;
        exp = dtoa_absv(K + ndigits - 1);

        /* write plain integer */
        if ((K >= 0) && (exp < (ndigits + 7)))
        {
            memcpy(dest, digits, ndigits);
            memset(dest + ndigits, '0', K);
            dest[ndigits + K] = '.';
            dest[ndigits + K + 1] = '0';
            return(ndigits + K + 2);
        }

        /* write decimal w/o scientific notation */
        if ((K < 0) && (K > -7 || exp < 4))
        {
            int offset;
            offset = ndigits - dtoa_absv(K);
            /* fp < 1.0 -> write leading zero */
            if (offset <= 0)
            {
                offset = -offset;
                dest[0] = '0';
                dest[1] = '.';
                memset(dest + 2, '0', offset);
                memcpy(dest + offset + 2, digits, ndigits);
                return(ndigits + 2 + offset);
                /* fp > 1.0 */
            }
            else
            {
                memcpy(dest, digits, offset);
                dest[offset] = '.';
                memcpy(dest + offset + 1, digits + offset, ndigits - offset);
                return(ndigits + 1);
            }
        }

        /* write decimal w/ scientific notation */
        ndigits = dtoa_minv(ndigits, 18 - neg);
        idx = 0;
        dest[idx++] = digits[0];
        if (ndigits > 1)
        {
            dest[idx++] = '.';
            memcpy(dest + idx, digits + 1, ndigits - 1);
            idx += ndigits - 1;
        }
        dest[idx++] = 'e';
        sign = K + ndigits - 1 < 0 ? '-' : '+';
        dest[idx++] = sign;
        cent = 0;
        if (exp > 99)
        {
            cent = exp / 100;
            dest[idx++] = cent + '0';
            exp -= cent * 100;
        }
        if (exp > 9)
        {
            int dec;
            dec = exp / 10;
            dest[idx++] = dec + '0';
            exp -= dec * 10;
        }
        else
        {
            if (cent)
                dest[idx++] = '0';
        }
        dest[idx++] = exp % 10 + '0';
        return(idx);
    }

// Assembly:
subq $0x58, %rsp
movb %r8b, %al
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
andb $0x1, %al
movb %al, 0x33(%rsp)
movl 0x34(%rsp), %eax
addl 0x44(%rsp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jge 0xc79a4
movl 0x34(%rsp), %ecx
addl 0x44(%rsp), %ecx
subl $0x1, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
jmp 0xc79b3
movl 0x34(%rsp), %eax
addl 0x44(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x34(%rsp)
jl 0xc7a40
movl 0x2c(%rsp), %eax
movl 0x44(%rsp), %ecx
addl $0x7, %ecx
cmpl %ecx, %eax
jge 0xc7a40
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movslq 0x44(%rsp), %rdx
callq 0x93e0
movq 0x38(%rsp), %rdi
movslq 0x44(%rsp), %rax
addq %rax, %rdi
movslq 0x34(%rsp), %rdx
movl $0x30, %esi
callq 0x9270
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq 0x38(%rsp), %rax
movl 0x44(%rsp), %ecx
addl 0x34(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movl 0x44(%rsp), %eax
addl 0x34(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x54(%rsp)
jmp 0xc7d53
cmpl $0x0, 0x34(%rsp)
jge 0xc7b5c
cmpl $-0x7, 0x34(%rsp)
jg 0xc7a5d
cmpl $0x4, 0x2c(%rsp)
jge 0xc7b5c
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x34(%rsp)
jge 0xc7a78
xorl %eax, %eax
subl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xc7a80
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %eax
movl 0xc(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jg 0xc7afc
xorl %eax, %eax
subl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rax
movb $0x30, (%rax)
movq 0x38(%rsp), %rax
movb $0x2e, 0x1(%rax)
movq 0x38(%rsp), %rdi
addq $0x2, %rdi
movslq 0x1c(%rsp), %rdx
movl $0x30, %esi
callq 0x9270
movq 0x38(%rsp), %rdi
movslq 0x1c(%rsp), %rax
addq %rax, %rdi
addq $0x2, %rdi
movq 0x48(%rsp), %rsi
movslq 0x44(%rsp), %rdx
callq 0x93e0
movl 0x44(%rsp), %eax
addl $0x2, %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xc7d53
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movslq 0x1c(%rsp), %rdx
callq 0x93e0
movq 0x38(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movb $0x2e, (%rax,%rcx)
movq 0x38(%rsp), %rdi
movslq 0x1c(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
movq 0x48(%rsp), %rsi
movslq 0x1c(%rsp), %rax
addq %rax, %rsi
movl 0x44(%rsp), %eax
subl 0x1c(%rsp), %eax
movslq %eax, %rdx
callq 0x93e0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0xc7d53
movl 0x44(%rsp), %eax
movb 0x33(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %edx
movl $0x12, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0xc7b7f
movl 0x44(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0xc7b93
movb 0x33(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movl $0x12, %eax
subl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x44(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x48(%rsp), %rax
movb (%rax), %dl
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
cmpl $0x1, 0x44(%rsp)
jle 0xc7c16
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x28(%rsp)
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq 0x38(%rsp), %rdi
movslq 0x28(%rsp), %rax
addq %rax, %rdi
movq 0x48(%rsp), %rsi
addq $0x1, %rsi
movl 0x44(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x93e0
movl 0x44(%rsp), %eax
subl $0x1, %eax
addl 0x28(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x28(%rsp)
movslq %ecx, %rcx
movb $0x65, (%rax,%rcx)
movl 0x34(%rsp), %edx
addl 0x44(%rsp), %edx
subl $0x1, %edx
movl $0x2b, %eax
movl $0x2d, %ecx
cmpl $0x0, %edx
cmovll %ecx, %eax
movb %al, 0x23(%rsp)
movb 0x23(%rsp), %dl
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl $0x0, 0x24(%rsp)
cmpl $0x63, 0x2c(%rsp)
jle 0xc7cb9
movl 0x2c(%rsp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
imull $0x64, 0x24(%rsp), %ecx
movl 0x2c(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x2c(%rsp)
cmpl $0x9, 0x2c(%rsp)
jle 0xc7d02
movl 0x2c(%rsp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
imull $0xa, 0x18(%rsp), %ecx
movl 0x2c(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x2c(%rsp)
jmp 0xc7d24
cmpl $0x0, 0x24(%rsp)
je 0xc7d22
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x28(%rsp)
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
jmp 0xc7d24
movl 0x2c(%rsp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movq 0x38(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x28(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl 0x28(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)