// File: alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::lexer::get_string() const
string_t get_string() const
        {
            string_t result;
            result.reserve(static_cast<size_t>(m_cursor - m_start - 2));

            // iterate the result between the quotes
            for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
            {
                // process escaped characters
                if (*i == '\\')
                {
                    // read next character
                    ++i;

                    switch (*i)
                    {
                        // the default escapes
                        case 't':
                        {
                            result += "\t";
                            break;
                        }
                        case 'b':
                        {
                            result += "\b";
                            break;
                        }
                        case 'f':
                        {
                            result += "\f";
                            break;
                        }
                        case 'n':
                        {
                            result += "\n";
                            break;
                        }
                        case 'r':
                        {
                            result += "\r";
                            break;
                        }
                        case '\\':
                        {
                            result += "\\";
                            break;
                        }
                        case '/':
                        {
                            result += "/";
                            break;
                        }
                        case '"':
                        {
                            result += "\"";
                            break;
                        }

                        // unicode
                        case 'u':
                        {
                            // get code xxxx from uxxxx
                            auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
                                                          4).c_str(), nullptr, 16);

                            // check if codepoint is a high surrogate
                            if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
                            {
                                // make sure there is a subsequent unicode
                                if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
                                {
                                    throw std::invalid_argument("missing low surrogate");
                                }

                                // get code yyyy from uxxxx\uyyyy
                                auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
                                                               (i + 7), 4).c_str(), nullptr, 16);
                                result += to_unicode(codepoint, codepoint2);
                                // skip the next 10 characters (xxxx\uyyyy)
                                i += 10;
                            }
                            else
                            {
                                // add unicode character(s)
                                result += to_unicode(codepoint);
                                // skip the next four characters (xxxx)
                                i += 4;
                            }
                            break;
                        }
                    }
                }
                else
                {
                    // all other characters are just copied to the end of the
                    // string
                    result.append(1, static_cast<typename string_t::value_type>(*i));
                }
            }

            return result;
        }

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x60(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x58(%rsp)
movb $0x0, 0x127(%rsp)
callq 0x959e0
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rdi
movq 0x30(%rcx), %rax
movq 0x40(%rcx), %rsi
subq %rax, %rsi
addq $-0x2, %rsi
callq 0x96d70
jmp 0x9f00e
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
movq 0x58(%rsp), %rcx
movq 0x108(%rsp), %rax
movq 0x40(%rcx), %rcx
addq $-0x1, %rcx
cmpq %rcx, %rax
jae 0x9f4c0
movq 0x108(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x9f487
movq 0x108(%rsp), %rax
incq %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rax
movzbl (%rax), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, 0x48(%rsp)
subl $0x53, %eax
ja 0x9f485
movq 0x48(%rsp), %rax
leaq 0x44fca(%rip), %rcx     # 0xe405c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x9f4e9
movq 0x60(%rsp), %rdi
leaq 0x451ad(%rip), %rsi     # 0xe426d
callq 0x92d80
jmp 0x9f0c7
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x4568b(%rip), %rsi     # 0xe4763
callq 0x92d80
jmp 0x9f0df
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x45675(%rip), %rsi     # 0xe4765
callq 0x92d80
jmp 0x9f0f7
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x47bb5(%rip), %rsi     # 0xe6cbd
callq 0x92d80
jmp 0x9f10f
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x45647(%rip), %rsi     # 0xe4767
callq 0x92d80
jmp 0x9f127
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x45631(%rip), %rsi     # 0xe4769
callq 0x92d80
jmp 0x9f13f
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x47129(%rip), %rsi     # 0xe6279
callq 0x92d80
jmp 0x9f157
jmp 0x9f485
movq 0x60(%rsp), %rdi
leaq 0x474b0(%rip), %rsi     # 0xe6618
callq 0x92d80
jmp 0x9f16f
jmp 0x9f485
movq 0x108(%rsp), %rax
incq %rax
movq %rax, 0x38(%rsp)
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x98200
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rcx
leaq 0xe0(%rsp), %rdi
movl $0x4, %edx
callq 0x93ee0
jmp 0x9f1b4
leaq 0xe0(%rsp), %rdi
callq 0x8f110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x8ea10
movq %rax, 0x30(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x99830
leaq 0xdf(%rsp), %rdi
callq 0x938a0
movq 0x30(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpq $0xd800, 0x100(%rsp) # imm = 0xD800
jb 0x9f41a
cmpq $0xdbff, 0x100(%rsp) # imm = 0xDBFF
ja 0x9f41a
movq 0x58(%rsp), %rcx
movq 0x108(%rsp), %rax
addq $0x6, %rax
cmpq 0x48(%rcx), %rax
jae 0x9f25f
movq 0x108(%rsp), %rax
movzbl 0x5(%rax), %eax
cmpl $0x5c, %eax
jne 0x9f25f
movq 0x108(%rsp), %rax
movzbl 0x6(%rax), %eax
cmpl $0x75, %eax
je 0x9f2e8
movl $0x10, %edi
callq 0x8f970
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
leaq 0x454f0(%rip), %rsi     # 0xe476b
callq 0x98eb0
jmp 0x9f282
movq 0x28(%rsp), %rdi
movq 0x66cca(%rip), %rsi     # 0x105f58
movq 0x66c63(%rip), %rdx     # 0x105ef8
callq 0x97c60
jmp 0x9f500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xdf(%rsp), %rdi
callq 0x938a0
jmp 0x9f4e9
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x911a0
jmp 0x9f4e9
movq 0x108(%rsp), %rax
addq $0x7, %rax
movq %rax, 0x18(%rsp)
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x98200
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0xb0(%rsp), %rdi
movl $0x4, %edx
callq 0x93ee0
jmp 0x9f329
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8f110
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x8ea10
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x99830
leaq 0xaf(%rsp), %rdi
callq 0x938a0
movq 0x10(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x100(%rsp), %rsi
movq 0xd0(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0x90470
jmp 0x9f394
movq 0x60(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x94d40
jmp 0x9f3a8
leaq 0x88(%rsp), %rdi
callq 0x99830
movq 0x108(%rsp), %rax
addq $0xa, %rax
movq %rax, 0x108(%rsp)
jmp 0x9f483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0x938a0
jmp 0x9f4e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x99830
jmp 0x9f4e9
movq 0x100(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x68(%rsp), %rdi
callq 0x90470
jmp 0x9f432
movq 0x60(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x94d40
jmp 0x9f443
leaq 0x68(%rsp), %rdi
callq 0x99830
movq 0x108(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x108(%rsp)
jmp 0x9f483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x99830
jmp 0x9f4e9
jmp 0x9f485
jmp 0x9f4a5
movq 0x60(%rsp), %rdi
movq 0x108(%rsp), %rax
movsbl (%rax), %edx
movl $0x1, %esi
callq 0x93880
jmp 0x9f4a3
jmp 0x9f4a5
jmp 0x9f4a7
movq 0x108(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
jmp 0x9f023
movb $0x1, 0x127(%rsp)
testb $0x1, 0x127(%rsp)
jne 0x9f4dc
movq 0x60(%rsp), %rdi
callq 0x99830
movq 0x50(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
movq 0x60(%rsp), %rdi
callq 0x99830
movq 0x118(%rsp), %rdi
callq 0x981c0