// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb8, %rsp
movl %edx, %r9d
movq %rsi, %rbx
movq %rdi, %r8
cmpq $0x0, 0x8(%rsi)
je 0xb8a3
leaq 0x5a(%r8), %rax
movq %rax, 0x8(%rsp)
leaq 0x35667(%rip), %rdi     # 0x40c84
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %eax, %eax
xorl %edx, %edx
xorl %r14d, %r14d
movq %r8, 0x10(%rsp)
movl %r9d, 0x4(%rsp)
movq (%rbx), %rcx
movzbl (%rcx,%r15), %ebp
movzbl (%rbp,%rdi), %ecx
testb %r14b, %r14b
je 0xb654
movl %ebp, %esi
andl $0x3f, %esi
shll $0x6, %r13d
orl %esi, %r13d
jmp 0xb660
movl $0xff, %r13d
shrl %cl, %r13d
andl %ebp, %r13d
movzbl %r14b, %esi
shll $0x4, %esi
movl %ecx, %ecx
addq %rsi, %rcx
movzbl 0x100(%rcx,%rdi), %r14d
cmpl $0x1, %r14d
je 0xb6a6
testl %r14d, %r14d
jne 0xb6e6
leal -0x8(%r13), %eax
cmpl $0x5, %eax
ja 0xb6fb
leaq 0x31a88(%rip), %rcx     # 0x3d118
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movw $0x625c, 0x5a(%r8,%r12) # imm = 0x625C
jmp 0xb7e9
movl 0x280(%r8), %ecx
leal -0x1(%rcx), %esi
cmpl $0x2, %esi
jae 0xb905
cmpq $0x1, %rax
adcq $-0x1, %r15
cmpl $0x1, %ecx
jne 0xb75e
testb %r9b, %r9b
je 0xb718
movl $0x6666755c, 0x5a(%r8,%rdx) # imm = 0x6666755C
movw $0x6466, 0x5e(%r8,%rdx) # imm = 0x6466
addq $0x6, %rdx
jmp 0xb72a
testb %r9b, %r9b
jne 0xb6f3
movb %bpl, 0x5a(%r8,%r12)
incq %r12
incq %rax
jmp 0xb82a
cmpl $0x22, %r13d
je 0xb7e1
cmpl $0x5c, %r13d
jne 0xb766
movw $0x5c5c, 0x5a(%r8,%r12) # imm = 0x5C5C
jmp 0xb7e9
movw $0xbfef, 0x5a(%r8,%rdx) # imm = 0xBFEF
movb $-0x43, 0x5c(%r8,%rdx)
addq $0x3, %rdx
leaq -0x1f4(%rdx), %rax
cmpq $0xc, %rax
ja 0xb75e
movq (%r8), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
callq *0x8(%rax)
leaq 0x35538(%rip), %rdi     # 0x40c84
movl 0x4(%rsp), %r9d
movq 0x10(%rsp), %r8
xorl %r14d, %r14d
jmp 0xb81c
xorl %r14d, %r14d
jmp 0xb825
cmpl $0x20, %r13d
setae %al
cmpl $0x7f, %r13d
setb %cl
movl %r9d, %edx
xorb $0x1, %dl
orb %cl, %dl
testb %dl, %al
jne 0xb839
cmpl $0xffff, %r13d          # imm = 0xFFFF
ja 0xb843
movq 0x8(%rsp), %rax
leaq (%rax,%r12), %rdi
movl $0x7, %esi
leaq 0x32197(%rip), %rdx     # 0x3d93d
movl %r13d, %ecx
xorl %eax, %eax
callq 0x5610
addq $0x6, %r12
jmp 0xb882
movw $0x745c, 0x5a(%r8,%r12) # imm = 0x745C
jmp 0xb7e9
movw $0x6e5c, 0x5a(%r8,%r12) # imm = 0x6E5C
jmp 0xb7e9
movw $0x665c, 0x5a(%r8,%r12) # imm = 0x665C
jmp 0xb7e9
movw $0x725c, 0x5a(%r8,%r12) # imm = 0x725C
jmp 0xb7e9
movw $0x225c, 0x5a(%r8,%r12) # imm = 0x225C
addq $0x2, %r12
movq %r12, %rdx
leaq -0x1f4(%rdx), %rax
cmpq $0xc, %rax
ja 0xb825
movq (%r8), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rsi
callq *0x8(%rax)
leaq 0x35472(%rip), %rdi     # 0x40c84
movl 0x4(%rsp), %r9d
movq 0x10(%rsp), %r8
xorl %edx, %edx
xorl %eax, %eax
xorl %r12d, %r12d
jmp 0xb82a
xorl %eax, %eax
movq %rdx, %r12
incq %r15
cmpq 0x8(%rbx), %r15
jb 0xb634
jmp 0xb89b
movb %bpl, 0x5a(%r8,%r12)
incq %r12
jmp 0xb7ed
movq 0x8(%rsp), %rax
leaq (%rax,%r12), %rdi
movl %r13d, %eax
shrl $0xa, %eax
addl $0xd7c0, %eax           # imm = 0xD7C0
movzwl %ax, %ecx
movl %r13d, %r8d
andl $0x3ff, %r8d            # imm = 0x3FF
orl $0xdc00, %r8d           # imm = 0xDC00
movl $0xd, %esi
leaq 0x320c0(%rip), %rdx     # 0x3d937
xorl %eax, %eax
callq 0x5610
addq $0xc, %r12
movq %r12, %rdx
movq 0x10(%rsp), %r8
movl 0x4(%rsp), %r9d
leaq 0x353ee(%rip), %rdi     # 0x40c84
jmp 0xb7f0
testb %r14b, %r14b
sete %al
jmp 0xb8aa
movb $0x1, %al
xorl %edx, %edx
xorl %r12d, %r12d
testb %al, %al
je 0xb8da
testq %r12, %r12
je 0xb8f3
movq (%r8), %rdi
addq $0x5a, %r8
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %r8, %rsi
movq %r12, %rdx
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movzbl %r9b, %eax
movq %r8, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x58f9
testb $0x1, %al
jne 0xba33
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ecx, %ecx
jne 0xb9aa
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x18(%rsp), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5460
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x3200b(%rip), %rdx     # 0x3d944
movl %ebp, %ecx
xorl %eax, %eax
callq 0x5610
movl $0x20, %edi
callq 0x5210
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0xc15e
leaq 0x31fe6(%rip), %rsi     # 0x3d949
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0xc0ee
leaq 0x3209b(%rip), %rsi     # 0x3da17
leaq 0x98(%rsp), %rdi
callq 0x5780
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xb9c9
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0xb9d6
leaq 0x31f6f(%rip), %rdi     # 0x3d920
leaq 0x31e45(%rip), %rsi     # 0x3d7fd
leaq 0x31fa7(%rip), %rcx     # 0x3d966
movl $0x3793, %edx           # imm = 0x3793
callq 0x5280
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
movq 0x8(%rax), %rdx
leaq 0x58(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0xc094
movb $0x1, %bpl
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0xbf2e
xorl %ebp, %ebp
leaq 0x47e19(%rip), %rsi     # 0x53838
leaq 0x63e6(%rip), %rdx      # 0x11e0c
movq %rbx, %rdi
callq 0x56b0
jmp 0xbac1
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x18(%rsp), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5460
leaq 0x18(%rsp), %r14
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movzbl -0x1(%rax,%rcx), %ecx
leaq 0x31ed8(%rip), %rdx     # 0x3d944
xorl %eax, %eax
callq 0x5610
movl $0x20, %edi
callq 0x5210
movq %rax, %rbx
leaq 0x31f6e(%rip), %rsi     # 0x3d9f5
leaq 0x38(%rsp), %rdi
movq %r14, %rdx
callq 0xc1ee
movb $0x1, %bpl
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0xbf2e
xorl %ebp, %ebp
leaq 0x47d86(%rip), %rsi     # 0x53838
leaq 0x6353(%rip), %rdx      # 0x11e0c
movq %rbx, %rdi
callq 0x56b0
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbae7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbae7
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbaf4
movq %rbx, %rdi
callq 0x52d0
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
jne 0xbbba
jmp 0xbbcc
jmp 0xbbc9
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbb32
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbb32
movq %rax, %r14
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0xbb51
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbb51
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbb7a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbb7a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbba3
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbba3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbbb0
movq %rbx, %rdi
callq 0x52d0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0xbbcc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0xbbcc
movq %rax, %r14
movq %r14, %rdi
callq 0x56e0