// File: /workspace/github_cpp_makefile_star2_O3/Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
inline char* format_buffer(char* buf, int len, int decimal_exponent,
                           int min_exp, int max_exp)
{
    assert(min_exp < 0);
    assert(max_exp > 0);

    const int k = len;
    const int n = len + decimal_exponent;

    // v = buf * 10^(n-k)
    // k is the length of the buffer (number of decimal digits)
    // n is the position of the decimal point relative to the start of the buffer.

    if (k <= n and n <= max_exp)
    {
        // digits[000]
        // len <= max_exp + 2

        std::memset(buf + k, '0', static_cast<size_t>(n - k));
        // Make it look like a floating-point number (#362, #378)
        buf[n + 0] = '.';
        buf[n + 1] = '0';
        return buf + (n + 2);
    }

    if (0 < n and n <= max_exp)
    {
        // dig.its
        // len <= max_digits10 + 1

        assert(k > n);

        std::memmove(buf + (n + 1), buf + n, static_cast<size_t>(k - n));
        buf[n] = '.';
        return buf + (k + 1);
    }

    if (min_exp < n and n <= 0)
    {
        // 0.[000]digits
        // len <= 2 + (-min_exp - 1) + max_digits10

        std::memmove(buf + (2 + -n), buf, static_cast<size_t>(k));
        buf[0] = '0';
        buf[1] = '.';
        std::memset(buf + 2, '0', static_cast<size_t>(-n));
        return buf + (2 + (-n) + k);
    }

    if (k == 1)
    {
        // dE+123
        // len <= 1 + 5

        buf += 1;
    }
    else
    {
        // d.igitsE+123
        // len <= max_digits10 + 1 + 5

        std::memmove(buf + 2, buf + 1, static_cast<size_t>(k - 1));
        buf[1] = '.';
        buf += 1 + k;
    }

    *buf++ = 'e';
    return append_exponent(buf, n - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0xc730
testl %r8d, %r8d
jle 0xc74f
movl %esi, %r15d
movq %rdi, %rbx
leal (%rdx,%r15), %r14d
testl %edx, %edx
sets %al
cmpl %r8d, %r14d
setg %sil
orb %al, %sil
je 0xc5df
cmpl %r8d, %r14d
setg %al
testl %r14d, %r14d
setle %sil
orb %al, %sil
je 0xc606
testl %r14d, %r14d
setg %al
cmpl %ecx, %r14d
setle %cl
orb %al, %cl
jne 0xc63c
movl $0x2, %r12d
subl %r14d, %r12d
negl %r14d
leaq (%rbx,%r12), %rdi
movslq %r15d, %rdx
movq %rbx, %rsi
callq 0x5630
movw $0x2e30, (%rbx)         # imm = 0x2E30
leaq 0x2(%rbx), %rdi
movl $0x30, %esi
movq %r14, %rdx
callq 0x5240
addl %r15d, %r12d
movslq %r12d, %rax
addq %rbx, %rax
jmp 0xc724
movslq %r15d, %rdi
addq %rbx, %rdi
movl %edx, %edx
movl $0x30, %esi
callq 0x5240
movslq %r14d, %rax
addq %rbx, %rax
addq $0x2, %rax
movw $0x302e, -0x2(%rax)     # imm = 0x302E
jmp 0xc724
testl %edx, %edx
jns 0xc76e
movl %r14d, %eax
leaq (%rbx,%rax), %rsi
leaq (%rbx,%rax), %r14
incq %r14
negl %edx
movslq %edx, %rdx
movq %r14, %rdi
callq 0x5630
movb $0x2e, -0x1(%r14)
movslq %r15d, %rax
addq %rbx, %rax
incq %rax
jmp 0xc724
cmpl $0x1, %r15d
je 0xc660
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rsi
leal -0x1(%r15), %eax
movslq %eax, %rdx
callq 0x5630
movb $0x2e, 0x1(%rbx)
movslq %r15d, %rax
addq %rax, %rbx
movb $0x65, 0x1(%rbx)
cmpl $0xfffffc19, %r14d      # imm = 0xFFFFFC19
jle 0xc78d
cmpl $0x3e9, %r14d           # imm = 0x3E9
jge 0xc7ac
leaq 0x2(%rbx), %rax
leal -0x1(%r14), %edx
testl %r14d, %r14d
setle %sil
addb %sil, %sil
addb $0x2b, %sil
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
movb %sil, 0x2(%rbx)
cmpl $0x9, %ecx
ja 0xc6ae
movb $0x30, 0x3(%rbx)
addq $0x4, %rbx
jmp 0xc6d4
cmpl $0x63, %ecx
ja 0xc6db
movzbl %cl, %ecx
imull $0xcd, %ecx, %edx
shrl $0xb, %edx
movl %edx, %esi
orb $0x30, %sil
movb %sil, 0x3(%rbx)
addq $0x4, %rbx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subb %dl, %cl
movl $0x3, %edx
jmp 0xc71c
movl $0xffff, %edx           # imm = 0xFFFF
movl %ecx, %esi
andl %edx, %esi
shrl $0x2, %esi
imull $0x147b, %esi, %esi     # imm = 0x147B
shrl $0x11, %esi
leal 0x30(%rsi), %edi
movb %dil, 0x3(%rbx)
imull $0x64, %esi, %esi
subl %esi, %ecx
imull $0x67, %ecx, %esi
andl %edx, %esi
shrl $0xa, %esi
movl %esi, %edx
orb $0x30, %dl
movb %dl, 0x4(%rbx)
addq $0x5, %rbx
addl %esi, %esi
leal (%rsi,%rsi,4), %edx
subb %dl, %cl
movl $0x4, %edx
addq %rdx, %rax
orb $0x30, %cl
movb %cl, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x30ab0(%rip), %rdi     # 0x3d1e7
leaq 0x300bc(%rip), %rsi     # 0x3c7fa
leaq 0x30aae(%rip), %rcx     # 0x3d1f3
movl $0x353b, %edx           # imm = 0x353B
callq 0x5280
leaq 0x30aea(%rip), %rdi     # 0x3d240
leaq 0x3009d(%rip), %rsi     # 0x3c7fa
leaq 0x30a8f(%rip), %rcx     # 0x3d1f3
movl $0x353c, %edx           # imm = 0x353C
callq 0x5280
leaq 0x30ad7(%rip), %rdi     # 0x3d24c
leaq 0x3007e(%rip), %rsi     # 0x3c7fa
leaq 0x30a70(%rip), %rcx     # 0x3d1f3
movl $0x3556, %edx           # imm = 0x3556
callq 0x5280
leaq 0x30abe(%rip), %rdi     # 0x3d252
leaq 0x3005f(%rip), %rsi     # 0x3c7fa
leaq 0x30aba(%rip), %rcx     # 0x3d25c
movl $0x3506, %edx           # imm = 0x3506
callq 0x5280
leaq 0x30ae9(%rip), %rdi     # 0x3d29c
leaq 0x30040(%rip), %rsi     # 0x3c7fa
leaq 0x30a9b(%rip), %rcx     # 0x3d25c
movl $0x3507, %edx           # imm = 0x3507
callq 0x5280