// File: /workspace/github_cpp_makefile_star2_O1/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 0xcaea
testl %r8d, %r8d
jle 0xcb09
movl %esi, %r15d
movq %rdi, %rbx
leal (%rdx,%r15), %r14d
testl %edx, %edx
sets %al
cmpl %r8d, %r14d
setg %sil
orb %al, %sil
je 0xc9b1
cmpl %r8d, %r14d
setg %al
testl %r14d, %r14d
setle %sil
orb %al, %sil
je 0xc9d8
cmpl %ecx, %r14d
setle %al
testl %r14d, %r14d
setg %cl
orb %al, %cl
jne 0xca0e
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 0xcade
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 0xcade
testl %edx, %edx
jns 0xcb28
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 0xcade
cmpl $0x1, %r15d
je 0xca32
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 0xcb47
cmpl $0x3e9, %r14d           # imm = 0x3E9
jge 0xcb66
leal -0x1(%r14), %ecx
testl %r14d, %r14d
setle %dl
addb %dl, %dl
addb $0x2b, %dl
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movb %dl, 0x2(%rbx)
cmpl $0x9, %eax
ja 0xca74
movb $0x30, 0x3(%rbx)
jmp 0xca97
movl %eax, %ecx
cmpl $0x63, %eax
ja 0xcaa2
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
movl %edx, %ecx
orb $0x30, %cl
movb %cl, 0x3(%rbx)
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subl %ecx, %eax
orb $0x30, %al
movb %al, 0x4(%rbx)
addq $0x5, %rbx
jmp 0xcadb
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
leal 0x30(%rcx), %edx
movb %dl, 0x3(%rbx)
imull $0x64, %ecx, %ecx
subl %ecx, %eax
imulq $0x1999999a, %rax, %rcx # imm = 0x1999999A
shrq $0x20, %rcx
movl %ecx, %edx
orb $0x30, %dl
movb %dl, 0x4(%rbx)
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
orb $0x30, %al
movb %al, 0x5(%rbx)
addq $0x6, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x316f9(%rip), %rdi     # 0x3e1ea
leaq 0x30d05(%rip), %rsi     # 0x3d7fd
leaq 0x316f7(%rip), %rcx     # 0x3e1f6
movl $0x353b, %edx           # imm = 0x353B
callq 0x5280
leaq 0x31733(%rip), %rdi     # 0x3e243
leaq 0x30ce6(%rip), %rsi     # 0x3d7fd
leaq 0x316d8(%rip), %rcx     # 0x3e1f6
movl $0x353c, %edx           # imm = 0x353C
callq 0x5280
leaq 0x31720(%rip), %rdi     # 0x3e24f
leaq 0x30cc7(%rip), %rsi     # 0x3d7fd
leaq 0x316b9(%rip), %rcx     # 0x3e1f6
movl $0x3556, %edx           # imm = 0x3556
callq 0x5280
leaq 0x31707(%rip), %rdi     # 0x3e255
leaq 0x30ca8(%rip), %rsi     # 0x3d7fd
leaq 0x31703(%rip), %rcx     # 0x3e25f
movl $0x3506, %edx           # imm = 0x3506
callq 0x5280
leaq 0x31732(%rip), %rdi     # 0x3e29f
leaq 0x30c89(%rip), %rsi     # 0x3d7fd
leaq 0x316e4(%rip), %rcx     # 0x3e25f
movl $0x3507, %edx           # imm = 0x3507
callq 0x5280