// File: /workspace/github_cpp_makefile_star2_O2/Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::dtoa_impl::boundaries nlohmann::detail::dtoa_impl::compute_boundaries<double>(double)
boundaries compute_boundaries(FloatType value)
{
    assert(std::isfinite(value));
    assert(value > 0);

    // Convert the IEEE representation into a diyfp.
    //
    // If v is denormal:
    //      value = 0.F * 2^(1 - bias) = (          F) * 2^(1 - bias - (p-1))
    // If v is normalized:
    //      value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1))

    static_assert(std::numeric_limits<FloatType>::is_iec559,
                  "internal error: dtoa_short requires an IEEE-754 floating-point implementation");

    constexpr int      kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit)
    constexpr int      kBias      = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1);
    constexpr int      kMinExp    = 1 - kBias;
    constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1)

    using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type;

    const std::uint64_t bits = reinterpret_bits<bits_type>(value);
    const std::uint64_t E = bits >> (kPrecision - 1);
    const std::uint64_t F = bits & (kHiddenBit - 1);

    const bool is_denormal = E == 0;
    const diyfp v = is_denormal
                    ? diyfp(F, kMinExp)
                    : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);

    // Compute the boundaries m- and m+ of the floating-point value
    // v = f * 2^e.
    //
    // Determine v- and v+, the floating-point predecessor and successor if v,
    // respectively.
    //
    //      v- = v - 2^e        if f != 2^(p-1) or e == e_min                (A)
    //         = v - 2^(e-1)    if f == 2^(p-1) and e > e_min                (B)
    //
    //      v+ = v + 2^e
    //
    // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_
    // between m- and m+ round to v, regardless of how the input rounding
    // algorithm breaks ties.
    //
    //      ---+-------------+-------------+-------------+-------------+---  (A)
    //         v-            m-            v             m+            v+
    //
    //      -----------------+------+------+-------------+-------------+---  (B)
    //                       v-     m-     v             m+            v+

    const bool lower_boundary_is_closer = F == 0 and E > 1;
    const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);
    const diyfp m_minus = lower_boundary_is_closer
                          ? diyfp(4 * v.f - 1, v.e - 2)  // (B)
                          : diyfp(2 * v.f - 1, v.e - 1); // (A)

    // Determine the normalized w+ = m+.
    const diyfp w_plus = diyfp::normalize(m_plus);

    // Determine w- = m- such that e_(w-) = e_(w+).
    const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e);

    return {diyfp::normalize(v), w_minus, w_plus};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %xmm0, %rax
movq %rax, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
cmpq %rdx, %rcx
jge 0xb457
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xb476
movq %rdi, %rbx
movabsq $0x10000000000000, %rcx # imm = 0x10000000000000
decq %rcx
andq %rax, %rcx
movq %rax, %rdx
shrq $0x34, %rdx
movq %rcx, %r14
btsq $0x34, %r14
leal -0x433(%rdx), %esi
testq %rdx, %rdx
cmoveq %rcx, %r14
movl $0xfffffbce, %r15d      # imm = 0xFFFFFBCE
cmovnel %esi, %r15d
testq %rcx, %rcx
sete %cl
shrq $0x35, %rax
setne %al
leal -0x1(%r15), %esi
addl $0xfffffbcb, %edx       # imm = 0xFFFFFBCB
testb %cl, %al
cmovel %esi, %edx
leaq -0x1(%r14,%r14), %rax
movabsq $0x3fffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFF
cmoveq %rax, %rcx
leaq 0x8(%rsp), %r12
movq %rcx, (%r12)
movl %edx, 0x8(%r12)
leaq 0x1(,%r14,2), %rdi
callq 0xb5c4
movq %rax, (%rsp)
movl %edx, %ebp
movq %r12, %rdi
movl %edx, %esi
callq 0xb5fa
movq %rax, %r12
movl %edx, %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0xb5c4
movq %rax, (%rbx)
movl %edx, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movl %r13d, 0x18(%rbx)
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x287fd(%rip), %rdi     # 0x33c5b
leaq 0x28395(%rip), %rsi     # 0x337fa
leaq 0x289c8(%rip), %rcx     # 0x33e34
movl $0x3221, %edx           # imm = 0x3221
callq 0x52c0
leaq 0x289ad(%rip), %rdi     # 0x33e2a
leaq 0x28376(%rip), %rsi     # 0x337fa
leaq 0x289a9(%rip), %rcx     # 0x33e34
movl $0x3222, %edx           # imm = 0x3222
callq 0x52c0