// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/jnum.c
// Function: ldouble_format
static inline char* ldouble_format(char *buffer, int32_t num_digits, int32_t vnum_digits, int32_t decimal_point)
{
    switch (decimal_point) {
    case -6: case -5: case -4: case -3: case -2: case -1: case 0:
         /* 0.[000]digits */
        memmove(buffer + 2 - decimal_point, buffer + 1, vnum_digits);
        memset(buffer, '0', 2 - decimal_point);
        buffer[1] = '.';
        buffer += 2 - decimal_point + vnum_digits;
        break;

    case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:
    case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
        if (decimal_point < vnum_digits) {
            /* dig.its */
            memmove(buffer, buffer + 1, decimal_point);
            buffer[decimal_point] = '.';
            buffer += vnum_digits + 1;
        } else {
            /* digits[000] */
            if (decimal_point > num_digits) {
                memmove(buffer, buffer + 1, num_digits);
                memset(buffer + num_digits, '0', decimal_point - num_digits);
            } else {
                memmove(buffer, buffer + 1, decimal_point);
            }
            buffer += decimal_point;
            memcpy(buffer, ".0", 2);
            buffer += 2;
        }
        break;

    default:
        buffer[0] = buffer[1];
        ++buffer;
        if (vnum_digits != 1) {
            /* d.igitsE+123 */
            *buffer = '.';
            buffer += vnum_digits;
        } else {
            /* dE+123 */
        }
        *buffer++ = 'e';
        buffer += fill_exponent(decimal_point - 1, buffer);
        break;
    }

    *buffer = '\0';
    return buffer;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, (%rsp)
addl $0x6, %eax
subl $0x7, %eax
jb 0xd905
jmp 0xd8f6
movl (%rsp), %eax
decl %eax
subl $0x11, %eax
jb 0xd974
jmp 0xda51
movq 0x10(%rsp), %rdi
addq $0x2, %rdi
movslq 0x4(%rsp), %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
addq $0x1, %rsi
movslq 0x8(%rsp), %rdx
callq 0x1190
movq 0x10(%rsp), %rdi
movl $0x2, %eax
subl 0x4(%rsp), %eax
movslq %eax, %rdx
movl $0x30, %esi
callq 0x10f0
movq 0x10(%rsp), %rax
movb $0x2e, 0x1(%rax)
movl $0x2, %ecx
subl 0x4(%rsp), %ecx
addl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0xdacc
movl 0x4(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0xd9c0
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x1, %rsi
movslq 0x4(%rsp), %rdx
callq 0x1190
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movb $0x2e, (%rax,%rcx)
movl 0x8(%rsp), %ecx
addl $0x1, %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0xda4f
movl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jle 0xda06
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x1, %rsi
movslq 0xc(%rsp), %rdx
callq 0x1190
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rax
addq %rax, %rdi
movl 0x4(%rsp), %eax
subl 0xc(%rsp), %eax
movslq %eax, %rdx
movl $0x30, %esi
callq 0x10f0
jmp 0xda1e
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x1, %rsi
movslq 0x4(%rsp), %rdx
callq 0x1190
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movw 0x3623(%rip), %cx       # 0x11061
movw %cx, (%rax)
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
jmp 0xdacc
movq 0x10(%rsp), %rax
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movb %cl, (%rax)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
cmpl $0x1, 0x8(%rsp)
je 0xda93
movq 0x10(%rsp), %rax
movb $0x2e, (%rax)
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0xda95
jmp 0xda95
movq 0x10(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rsp)
movb $0x65, (%rax)
movl 0x4(%rsp), %edi
subl $0x1, %edi
movq 0x10(%rsp), %rsi
callq 0xf180
movl %eax, %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nop