// File: /workspace/github_cpp_makefile_star2_O2/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 0xb2ef
testl %r8d, %r8d
jle 0xb30e
movl %esi, %r14d
movq %rdi, %rbx
leal (%rdx,%r14), %r15d
testl %edx, %edx
sets %al
cmpl %r8d, %r15d
setg %sil
orb %al, %sil
je 0xb24b
cmpl %r8d, %r15d
setg %al
testl %r15d, %r15d
setle %sil
orb %al, %sil
je 0xb26d
testl %r15d, %r15d
setg %al
cmpl %ecx, %r15d
setle %cl
orb %al, %cl
jne 0xb2aa
pushq $0x2
popq %r12
subl %r15d, %r12d
negl %r15d
leaq (%rbx,%r12), %rdi
movslq %r14d, %rdx
movq %rbx, %rsi
callq 0x5660
movw $0x2e30, (%rbx)         # imm = 0x2E30
leaq 0x2(%rbx), %rdi
pushq $0x30
popq %rsi
movq %r15, %rdx
callq 0x5270
addl %r14d, %r12d
movslq %r12d, %rax
addq %rbx, %rax
jmp 0xb29e
movslq %r14d, %rdi
addq %rbx, %rdi
movl %edx, %edx
pushq $0x30
popq %rsi
callq 0x5270
movslq %r15d, %rax
addq %rbx, %rax
addq $0x2, %rax
movw $0x302e, -0x2(%rax)     # imm = 0x302E
jmp 0xb29e
testl %edx, %edx
jns 0xb32d
movl %r15d, %eax
leaq (%rbx,%rax), %rsi
leaq (%rbx,%rax), %r15
incq %r15
negl %edx
movslq %edx, %rdx
movq %r15, %rdi
callq 0x5660
movb $0x2e, -0x1(%r15)
movslq %r14d, %rax
addq %rbx, %rax
incq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x1, %r14d
je 0xb2ce
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rsi
leal -0x1(%r14), %eax
movslq %eax, %rdx
callq 0x5660
movb $0x2e, 0x1(%rbx)
movslq %r14d, %rax
addq %rax, %rbx
movb $0x65, 0x1(%rbx)
addq $0x2, %rbx
decl %r15d
movq %rbx, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbc6c
leaq 0x28fbd(%rip), %rdi     # 0x342b3
leaq 0x284fd(%rip), %rsi     # 0x337fa
leaq 0x28fbb(%rip), %rcx     # 0x342bf
movl $0x353b, %edx           # imm = 0x353B
callq 0x52c0
leaq 0x28ff7(%rip), %rdi     # 0x3430c
leaq 0x284de(%rip), %rsi     # 0x337fa
leaq 0x28f9c(%rip), %rcx     # 0x342bf
movl $0x353c, %edx           # imm = 0x353C
callq 0x52c0
leaq 0x28fe4(%rip), %rdi     # 0x34318
leaq 0x284bf(%rip), %rsi     # 0x337fa
leaq 0x28f7d(%rip), %rcx     # 0x342bf
movl $0x3556, %edx           # imm = 0x3556
callq 0x52c0