// File: /workspace/github_cpp_makefile_star2_O2/Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::serializer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::dump_escaped(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void dump_escaped(const string_t& s, const bool ensure_ascii)
    {
        std::uint32_t codepoint;
        std::uint8_t state = UTF8_ACCEPT;
        std::size_t bytes = 0;  // number of bytes written to string_buffer

        // number of bytes written at the point of the last valid byte
        std::size_t bytes_after_last_accept = 0;
        std::size_t undumped_chars = 0;

        for (std::size_t i = 0; i < s.size(); ++i)
        {
            const auto byte = static_cast<uint8_t>(s[i]);

            switch (decode(state, codepoint, byte))
            {
                case UTF8_ACCEPT:  // decode found a new code point
                {
                    switch (codepoint)
                    {
                        case 0x08: // backspace
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = 'b';
                            break;
                        }

                        case 0x09: // horizontal tab
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = 't';
                            break;
                        }

                        case 0x0A: // newline
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = 'n';
                            break;
                        }

                        case 0x0C: // formfeed
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = 'f';
                            break;
                        }

                        case 0x0D: // carriage return
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = 'r';
                            break;
                        }

                        case 0x22: // quotation mark
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = '\"';
                            break;
                        }

                        case 0x5C: // reverse solidus
                        {
                            string_buffer[bytes++] = '\\';
                            string_buffer[bytes++] = '\\';
                            break;
                        }

                        default:
                        {
                            // escape control characters (0x00..0x1F) or, if
                            // ensure_ascii parameter is used, non-ASCII characters
                            if ((codepoint <= 0x1F) or (ensure_ascii and (codepoint >= 0x7F)))
                            {
                                if (codepoint <= 0xFFFF)
                                {
                                    (std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x",
                                                    static_cast<std::uint16_t>(codepoint));
                                    bytes += 6;
                                }
                                else
                                {
                                    (std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x",
                                                    static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)),
                                                    static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu)));
                                    bytes += 12;
                                }
                            }
                            else
                            {
                                // copy byte to buffer (all previous bytes
                                // been copied have in default case above)
                                string_buffer[bytes++] = s[i];
                            }
                            break;
                        }
                    }

                    // write buffer and reset index; there must be 13 bytes
                    // left, as this is the maximal number of bytes to be
                    // written ("\uxxxx\uxxxx\0") for one code point
                    if (string_buffer.size() - bytes < 13)
                    {
                        o->write_characters(string_buffer.data(), bytes);
                        bytes = 0;
                    }

                    // remember the byte position of this accept
                    bytes_after_last_accept = bytes;
                    undumped_chars = 0;
                    break;
                }

                case UTF8_REJECT:  // decode found invalid UTF-8 byte
                {
                    switch (error_handler)
                    {
                        case error_handler_t::strict:
                        {
                            std::string sn(3, '\0');
                            (std::snprintf)(&sn[0], sn.size(), "%.2X", byte);
                            JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn));
                        }

                        case error_handler_t::ignore:
                        case error_handler_t::replace:
                        {
                            // in case we saw this character the first time, we
                            // would like to read it again, because the byte
                            // may be OK for itself, but just not OK for the
                            // previous sequence
                            if (undumped_chars > 0)
                            {
                                --i;
                            }

                            // reset length buffer to the last accepted index;
                            // thus removing/ignoring the invalid characters
                            bytes = bytes_after_last_accept;

                            if (error_handler == error_handler_t::replace)
                            {
                                // add a replacement character
                                if (ensure_ascii)
                                {
                                    string_buffer[bytes++] = '\\';
                                    string_buffer[bytes++] = 'u';
                                    string_buffer[bytes++] = 'f';
                                    string_buffer[bytes++] = 'f';
                                    string_buffer[bytes++] = 'f';
                                    string_buffer[bytes++] = 'd';
                                }
                                else
                                {
                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF');
                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF');
                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD');
                                }

                                // write buffer and reset index; there must be 13 bytes
                                // left, as this is the maximal number of bytes to be
                                // written ("\uxxxx\uxxxx\0") for one code point
                                if (string_buffer.size() - bytes < 13)
                                {
                                    o->write_characters(string_buffer.data(), bytes);
                                    bytes = 0;
                                }

                                bytes_after_last_accept = bytes;
                            }

                            undumped_chars = 0;

                            // continue processing the string
                            state = UTF8_ACCEPT;
                            break;
                        }

                        default:            // LCOV_EXCL_LINE
                            assert(false);  // LCOV_EXCL_LINE
                    }
                    break;
                }

                default:  // decode found yet incomplete multi-byte code point
                {
                    if (not ensure_ascii)
                    {
                        // code point will not be escaped - copy byte to buffer
                        string_buffer[bytes++] = s[i];
                    }
                    ++undumped_chars;
                    break;
                }
            }
        }

        // we finished processing the string
        if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT))
        {
            // write buffer
            if (bytes > 0)
            {
                o->write_characters(string_buffer.data(), bytes);
            }
        }
        else
        {
            // we finish reading, but do not accept: string was incomplete
            switch (error_handler)
            {
                case error_handler_t::strict:
                {
                    std::string sn(3, '\0');
                    (std::snprintf)(&sn[0], sn.size(), "%.2X", static_cast<std::uint8_t>(s.back()));
                    JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
                }

                case error_handler_t::ignore:
                {
                    // write all accepted bytes
                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
                    break;
                }

                case error_handler_t::replace:
                {
                    // write all accepted bytes
                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
                    // add a replacement character
                    if (ensure_ascii)
                    {
                        o->write_characters("\\ufffd", 6);
                    }
                    else
                    {
                        o->write_characters("\xEF\xBF\xBD", 3);
                    }
                    break;
                }

                default:            // LCOV_EXCL_LINE
                    assert(false);  // LCOV_EXCL_LINE
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, 0x14(%rsp)
movq %rsi, %rbx
leaq 0x7(%rsp), %rax
movb $0x0, (%rax)
movq %rdi, 0x18(%rsp)
leaq 0x5a(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq 0x8(%rbx), %r12
jae 0xa474
movq (%rbx), %rax
movzbl (%rax,%r12), %r15d
leaq 0x7(%rsp), %rdi
leaq 0x24(%rsp), %rsi
movl %r15d, %edx
callq 0xa942
cmpb $0x1, %al
je 0xa28b
movzbl %al, %eax
testl %eax, %eax
jne 0xa2d3
movl 0x24(%rsp), %r8d
leal -0x8(%r8), %eax
cmpl $0x5, %eax
ja 0xa2f5
leaq 0x28eaf(%rip), %rcx     # 0x33120
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rax
movw $0x625c, (%rax,%r13)    # imm = 0x625C
jmp 0xa3e7
movq 0x18(%rsp), %rdx
movl 0x280(%rdx), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0xa50d
cmpq $0x1, %r14
adcq $-0x1, %r12
cmpl $0x1, %eax
jne 0xa34a
cmpb $0x0, 0x14(%rsp)
je 0xa316
movq 0x8(%rsp), %rax
movl $0x6666755c, (%rax,%rbp) # imm = 0x6666755C
movw $0x6466, 0x4(%rax,%rbp) # imm = 0x6466
addq $0x6, %rbp
jmp 0xa32a
cmpb $0x0, 0x14(%rsp)
jne 0xa2ed
movq (%rbx), %rax
movb (%rax,%r12), %al
movq 0x8(%rsp), %rcx
movb %al, (%rcx,%r13)
incq %r13
incq %r14
jmp 0xa421
cmpl $0x22, %r8d
je 0xa3db
cmpl $0x5c, %r8d
jne 0xa354
movq 0x8(%rsp), %rax
movw $0x5c5c, (%rax,%r13)    # imm = 0x5C5C
jmp 0xa3e7
movq 0x8(%rsp), %rax
movw $0xbfef, (%rax,%rbp)    # imm = 0xBFEF
movb $-0x43, 0x2(%rax,%rbp)
addq $0x3, %rbp
leaq -0x1f4(%rbp), %rax
cmpq $0xc, %rax
ja 0xa34a
movq (%rdx), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq *0x8(%rax)
xorl %ebp, %ebp
movb $0x0, 0x7(%rsp)
jmp 0xa41b
cmpl $0x20, %r8d
setae %al
cmpl $0x7f, %r8d
setb %cl
movl 0x14(%rsp), %edx
xorb $0x1, %dl
orb %cl, %dl
testb %dl, %al
jne 0xa429
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %rdi
cmpl $0xffff, %r8d           # imm = 0xFFFF
ja 0xa43e
pushq $0x7
popq %rsi
leaq 0x295a7(%rip), %rdx     # 0x3393a
movl %r8d, %ecx
xorl %eax, %eax
callq 0x5630
addq $0x6, %r13
jmp 0xa3eb
movq 0x8(%rsp), %rax
movw $0x745c, (%rax,%r13)    # imm = 0x745C
jmp 0xa3e7
movq 0x8(%rsp), %rax
movw $0x6e5c, (%rax,%r13)    # imm = 0x6E5C
jmp 0xa3e7
movq 0x8(%rsp), %rax
movw $0x665c, (%rax,%r13)    # imm = 0x665C
jmp 0xa3e7
movq 0x8(%rsp), %rax
movw $0x725c, (%rax,%r13)    # imm = 0x725C
jmp 0xa3e7
movq 0x8(%rsp), %rax
movw $0x225c, (%rax,%r13)    # imm = 0x225C
addq $0x2, %r13
movq %r13, %rbp
leaq -0x1f4(%r13), %rax
cmpq $0xc, %rax
ja 0xa41b
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq *0x8(%rax)
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
jmp 0xa421
xorl %r14d, %r14d
movq %rbp, %r13
incq %r12
jmp 0xa229
movq (%rbx), %rax
movb (%rax,%r12), %al
movq 0x8(%rsp), %rcx
movb %al, (%rcx,%r13)
incq %r13
jmp 0xa3eb
movl %r8d, %eax
shrl $0xa, %eax
addl $0xd7c0, %eax           # imm = 0xD7C0
movzwl %ax, %ecx
andl $0x3ff, %r8d            # imm = 0x3FF
orl $0xdc00, %r8d           # imm = 0xDC00
pushq $0xd
popq %rsi
leaq 0x294d0(%rip), %rdx     # 0x33934
xorl %eax, %eax
callq 0x5630
addq $0xc, %r13
jmp 0xa3eb
cmpb $0x0, 0x7(%rsp)
jne 0xa4a8
testq %r13, %r13
je 0xa496
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq *0x8(%rax)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %r14
movl 0x280(%r14), %eax
cmpl $0x1, %eax
je 0xa4d2
cmpl $0x2, %eax
jne 0xa5fd
movq (%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
jmp 0xa493
movq (%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq *0x8(%rax)
movq (%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x14(%rsp)
je 0xa4ff
leaq 0x2951e(%rip), %rsi     # 0x33a19
pushq $0x6
jmp 0xa508
leaq 0x2951a(%rip), %rsi     # 0x33a20
pushq $0x3
popq %rdx
callq *%rax
jmp 0xa496
testl %eax, %eax
jne 0xa5de
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
callq 0x5490
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x29403(%rip), %rdx     # 0x33941
movl %r15d, %ecx
xorl %eax, %eax
callq 0x5630
pushq $0x20
popq %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0xaaa3
leaq 0x293df(%rip), %rsi     # 0x33946
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0xaa7f
leaq 0x29494(%rip), %rdx     # 0x33a14
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xaa60
leaq 0x48(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xaa41
movb $0x1, %bpl
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0xa98c
xorl %ebp, %ebp
leaq 0x453ce(%rip), %rsi     # 0x4f998
leaq 0x5397(%rip), %rdx      # 0xf968
movq %rbx, %rdi
callq 0x56c0
jmp 0xa68f
leaq 0x29338(%rip), %rdi     # 0x3391d
leaq 0x2920e(%rip), %rsi     # 0x337fa
leaq 0x29370(%rip), %rcx     # 0x33963
movl $0x3793, %edx           # imm = 0x3793
callq 0x52c0
testl %eax, %eax
jne 0xa68f
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
callq 0x5490
leaq 0x28(%rsp), %r14
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movzbl -0x1(%rax,%rcx), %ecx
leaq 0x29305(%rip), %rdx     # 0x33941
xorl %eax, %eax
callq 0x5630
pushq $0x20
popq %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x2939d(%rip), %rsi     # 0x339f2
leaq 0x48(%rsp), %rdi
movq %r14, %rdx
callq 0xaae5
movb $0x1, %bpl
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0xa98c
xorl %ebp, %ebp
leaq 0x45318(%rip), %rsi     # 0x4f998
leaq 0x52e1(%rip), %rdx      # 0xf968
movq %rbx, %rdi
callq 0x56c0
leaq 0x29287(%rip), %rdi     # 0x3391d
leaq 0x2915d(%rip), %rsi     # 0x337fa
leaq 0x292bf(%rip), %rcx     # 0x33963
movl $0x37d2, %edx           # imm = 0x37D2
callq 0x52c0
movq %rax, %r14
leaq 0x48(%rsp), %rdi
jmp 0xa700
jmp 0xa70c
jmp 0xa723
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5200
jmp 0xa6d1
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa8(%rsp), %rdi
callq 0x5200
jmp 0xa6e6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rdi
callq 0x5200
jmp 0xa6fb
movq %rax, %r14
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x5200
testb %bpl, %bpl
jne 0xa70f
jmp 0xa717
movq %rax, %r14
movq %rbx, %rdi
callq 0x5300
leaq 0x28(%rsp), %rdi
callq 0x5200
jmp 0xa726
movq %rax, %r14
movq %r14, %rdi
callq 0x56f0