// File: /workspace/github_cpp_makefile_star2_O3/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>::parser::parse_internal(bool)
basic_json parse_internal(bool keep)
        {
            auto result = basic_json(value_t::discarded);

            switch (last_token)
            {
                case lexer::token_type::begin_object:
                {
                    if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
                    {
                        // explicitly set result to object to cope with {}
                        result.m_type = value_t::object;
                        result.m_value = json_value(value_t::object);
                    }

                    // read next token
                    get_token();

                    // closing } -> we are done
                    if (last_token == lexer::token_type::end_object)
                    {
                        get_token();
                        if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
                        {
                            result = basic_json(value_t::discarded);
                        }
                        return result;
                    }

                    // no comma is expected here
                    unexpect(lexer::token_type::value_separator);

                    // otherwise: parse key-value pairs
                    do
                    {
                        // ugly, but could be fixed with loop reorganization
                        if (last_token == lexer::token_type::value_separator)
                        {
                            get_token();
                        }

                        // store key
                        expect(lexer::token_type::value_string);
                        const auto key = m_lexer.get_string();

                        bool keep_tag = false;
                        if (keep)
                        {
                            if (callback)
                            {
                                basic_json k(key);
                                keep_tag = callback(depth, parse_event_t::key, k);
                            }
                            else
                            {
                                keep_tag = true;
                            }
                        }

                        // parse separator (:)
                        get_token();
                        expect(lexer::token_type::name_separator);

                        // parse and add value
                        get_token();
                        auto value = parse_internal(keep);
                        if (keep and keep_tag and not value.is_discarded())
                        {
                            result[key] = std::move(value);
                        }
                    }
                    while (last_token == lexer::token_type::value_separator);

                    // closing }
                    expect(lexer::token_type::end_object);
                    get_token();
                    if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
                    {
                        result = basic_json(value_t::discarded);
                    }

                    return result;
                }

                case lexer::token_type::begin_array:
                {
                    if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
                    {
                        // explicitly set result to object to cope with []
                        result.m_type = value_t::array;
                        result.m_value = json_value(value_t::array);
                    }

                    // read next token
                    get_token();

                    // closing ] -> we are done
                    if (last_token == lexer::token_type::end_array)
                    {
                        get_token();
                        if (callback and not callback(--depth, parse_event_t::array_end, result))
                        {
                            result = basic_json(value_t::discarded);
                        }
                        return result;
                    }

                    // no comma is expected here
                    unexpect(lexer::token_type::value_separator);

                    // otherwise: parse values
                    do
                    {
                        // ugly, but could be fixed with loop reorganization
                        if (last_token == lexer::token_type::value_separator)
                        {
                            get_token();
                        }

                        // parse value
                        auto value = parse_internal(keep);
                        if (keep and not value.is_discarded())
                        {
                            result.push_back(std::move(value));
                        }
                    }
                    while (last_token == lexer::token_type::value_separator);

                    // closing ]
                    expect(lexer::token_type::end_array);
                    get_token();
                    if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
                    {
                        result = basic_json(value_t::discarded);
                    }

                    return result;
                }

                case lexer::token_type::literal_null:
                {
                    get_token();
                    result.m_type = value_t::null;
                    break;
                }

                case lexer::token_type::value_string:
                {
                    const auto s = m_lexer.get_string();
                    get_token();
                    result = basic_json(s);
                    break;
                }

                case lexer::token_type::literal_true:
                {
                    get_token();
                    result.m_type = value_t::boolean;
                    result.m_value = true;
                    break;
                }

                case lexer::token_type::literal_false:
                {
                    get_token();
                    result.m_type = value_t::boolean;
                    result.m_value = false;
                    break;
                }

                case lexer::token_type::value_number:
                {
                    result.m_value = m_lexer.get_number();

                    // NAN is returned if token could not be translated
                    // completely
                    if (std::isnan(result.m_value.number_float))
                    {
                        throw std::invalid_argument(std::string("parse error - ") +
                                                    m_lexer.get_token() + " is not a number");
                    }

                    get_token();

                    // check if conversion loses precision (special case -0.0 always loses precision)
                    const auto int_val = static_cast<number_integer_t>(result.m_value.number_float);
                    if (result.m_value.number_float == static_cast<number_float_t>(int_val) and
                            result.m_value.number_integer != json_value(-0.0f).number_integer)
                    {
                        // we would not lose precision -> return int
                        result.m_type = value_t::number_integer;
                        result.m_value = int_val;
                    }
                    else
                    {
                        // we would lose precision -> return float
                        result.m_type = value_t::number_float;
                    }
                    break;
                }

                default:
                {
                    // the last token was unexpected
                    unexpect(last_token);
                }
            }

            if (keep and callback and not callback(depth, parse_event_t::value, result))
            {
                result = basic_json(value_t::discarded);
            }
            return result;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movb $0x7, (%rdi)
movq %rsi, %r14
movl %edx, %ebp
movq %rdi, %rbx
movl 0x28(%rsi), %esi
leal -0x1(%rsi), %eax
cmpl $0x6, %eax
ja 0x258e4
leaq 0x17822(%rip), %rcx     # 0x3d000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30(%r14), %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movb $0x4, (%rbx)
movq $0x1, 0x8(%rbx)
jmp 0x25af9
leaq 0x30(%r14), %r12
movq %r12, %rdi
callq 0x23360
vucomisd %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rbx)
jp 0x25b57
movq %r12, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
vmovsd 0x8(%rbx), %xmm0
vcvttsd2si %xmm0, %rax
vmovq %xmm0, %rcx
vcvtsi2sd %rax, %xmm1, %xmm1
vucomisd %xmm0, %xmm1
setp %dl
setne %sil
orb %dl, %sil
negq %rcx
seto %cl
orb %sil, %cl
je 0x25af2
movb $0x6, (%rbx)
jmp 0x25af9
leaq 0x30(%r14), %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movb $0x0, (%rbx)
jmp 0x25af9
leaq 0x30(%r14), %r15
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x22210
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movb $0x3, 0x98(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x234c0
movb (%rbx), %cl
movb $0x3, (%rbx)
leaq 0x98(%rsp), %rdi
movq 0x8(%rbx), %rdx
movq %rax, 0x8(%rbx)
movb %cl, (%rdi)
movq %rdx, 0x8(%rdi)
callq 0x21a10
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25af9
callq 0x22130
jmp 0x25af9
movq %r14, %rdi
callq 0x233a0
jmp 0x25af9
leaq 0x30(%r14), %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movb $0x4, (%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x25af9
testb %bpl, %bpl
je 0x259e1
cmpq $0x0, 0x18(%r14)
je 0x25949
movl (%r14), %eax
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rsi
leaq 0x8(%r14), %rdi
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movl %eax, (%rsi)
movb $0x2, (%rdx)
movq %rbx, %rcx
callq *0x20(%r14)
testb %al, %al
je 0x259e1
movb $0x2, (%rbx)
movl $0x18, %edi
callq 0x22250
vxorpd %xmm0, %xmm0, %xmm0
movb $0x1, %bpl
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
vmovupd %xmm0, (%rax)
jmp 0x259e3
testb %bpl, %bpl
je 0x25a4f
cmpq $0x0, 0x18(%r14)
je 0x259aa
movl (%r14), %eax
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rsi
leaq 0x8(%r14), %rdi
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movl %eax, (%rsi)
movb $0x0, (%rdx)
movq %rbx, %rcx
callq *0x20(%r14)
testb %al, %al
je 0x25a4f
movb $0x1, (%rbx)
movl $0x30, %edi
callq 0x22250
movq %rax, %rcx
vxorpd %xmm0, %xmm0, %xmm0
movb $0x1, %r12b
addq $0x8, %rcx
xorl %edx, %edx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rbx)
vmovupd %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
jmp 0x25a52
xorl %ebp, %ebp
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpl $0x8, %eax
jne 0x25ab8
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpq $0x0, 0x18(%r14)
je 0x25b42
movl (%r14), %eax
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x8(%r14), %rdi
decl %eax
movl %eax, (%r14)
movl %eax, (%rsi)
movb $0x3, (%rdx)
movq %rbx, %rcx
callq *0x20(%r14)
testb %al, %al
jne 0x25b42
movb (%rbx), %al
movb $0x7, (%rbx)
leaq 0xc8(%rsp), %rdi
jmp 0x25b33
xorl %r12d, %r12d
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpl $0x9, %eax
jne 0x25ad5
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpq $0x0, 0x18(%r14)
setne %al
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x25b42
movl (%r14), %esi
leaq 0x8(%r14), %rdi
decl %esi
movl %esi, (%r14)
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22d60
testb %al, %al
jne 0x25b42
movb (%rbx), %al
movb $0x7, (%rbx)
leaq 0xe8(%rsp), %rdi
jmp 0x25b33
movl $0xb, %esi
movq %r14, %rdi
callq 0x233a0
cmpl $0xb, 0x28(%r14)
je 0x25ea1
jmp 0x25ead
movl $0xb, %esi
movq %r14, %rdi
callq 0x233a0
cmpl $0xb, 0x28(%r14)
je 0x25cb6
jmp 0x25cc2
movb $0x5, (%rbx)
movq %rax, 0x8(%rbx)
testb %bpl, %bpl
je 0x25b42
cmpq $0x0, 0x18(%r14)
je 0x25b42
movl (%r14), %eax
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rsi
leaq 0x8(%r14), %rdi
movb $0x5, (%rdx)
movl %eax, (%rsi)
movq %rbx, %rcx
callq *0x20(%r14)
testb %al, %al
jne 0x25b42
movb (%rbx), %al
leaq 0xa8(%rsp), %rdi
movb $0x7, (%rbx)
movq 0x8(%rbx), %rcx
movb %al, (%rdi)
movq %rcx, 0x8(%rdi)
callq 0x21a10
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x217b0
leaq 0x68(%rsp), %r13
movq %rax, %r15
movq %r13, -0x10(%r13)
leaq 0x179d9(%rip), %rsi     # 0x3d54d
leaq 0x179e0(%rip), %rdx     # 0x3d55b
leaq 0x58(%rsp), %rdi
callq 0x215e0
leaq 0x78(%rsp), %r14
movq %r12, %rsi
movq %r14, %rdi
callq 0x229e0
leaq 0x28(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %r14, %rdx
callq 0x21ee0
leaq 0x179ae(%rip), %rsi     # 0x3d55c
leaq 0x28(%rsp), %rdi
callq 0x233c0
leaq 0x18(%rsp), %r12
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, -0x10(%r12)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x25bdd
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r12)
jmp 0x25bea
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movb $0x1, %bpl
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
callq 0x23100
xorl %ebp, %ebp
movq 0x2736e(%rip), %rsi     # 0x4cf88
movq 0x27317(%rip), %rdx     # 0x4cf38
movq %r15, %rdi
callq 0x23090
movq 0x8(%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
je 0x25c43
callq 0x22130
jmp 0x25c43
movq %rax, %r14
movb $0x1, %bpl
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25c5e
callq 0x22130
jmp 0x25c5e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25c74
callq 0x22130
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x25c83
callq 0x22130
testb %bpl, %bpl
jne 0x25c9a
jmp 0x25f60
jmp 0x25f5d
jmp 0x25f5d
movq %rax, %r14
movq %r15, %rdi
callq 0x21c50
jmp 0x25f60
jmp 0x25e82
jmp 0x25f5d
jmp 0x25f5d
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movl $0x4, %esi
movq %r14, %rdi
callq 0x21980
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x22210
xorl %ebp, %ebp
testb %r12b, %r12b
je 0x25d3b
cmpq $0x0, 0x18(%r14)
movb $0x1, %bpl
je 0x25d3b
movb $0x3, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x234c0
movq %rax, 0x30(%rsp)
movl (%r14), %eax
movb $0x4, 0x78(%rsp)
movl %eax, 0x58(%rsp)
cmpq $0x0, 0x18(%r14)
je 0x25e56
leaq 0x8(%r14), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x78(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq *0x20(%r14)
leaq 0x28(%rsp), %rdi
movl %eax, %ebp
callq 0x21a10
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movl $0xa, %esi
movq %r14, %rdi
callq 0x21980
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movzbl %r12b, %edx
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x224d0
andb %r12b, %bpl
cmpb $0x1, %bpl
jne 0x25dcd
movb 0x28(%rsp), %al
cmpb $0x7, %al
je 0x25dcd
movq 0x30(%rsp), %rcx
movb %al, 0x48(%rsp)
movb $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rcx, 0x50(%rsp)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x224a0
leaq 0x48(%rsp), %rdi
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x21a10
leaq 0x28(%rsp), %rdi
callq 0x21a10
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25dea
callq 0x22130
cmpl $0xb, 0x28(%r14)
je 0x25cb6
movl $0x9, %esi
movq %r14, %rdi
callq 0x21980
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpq $0x0, 0x18(%r14)
setne %al
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x25b42
movl (%r14), %esi
leaq 0x8(%r14), %rdi
decl %esi
movl %esi, (%r14)
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22d60
testb %al, %al
jne 0x25b42
movb (%rbx), %al
movb $0x7, (%rbx)
leaq 0xd8(%rsp), %rdi
jmp 0x25b33
callq 0x21570
leaq 0x48(%rsp), %rdi
movq %rax, %r14
callq 0x21a10
jmp 0x25e6f
jmp 0x25e82
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x21a10
jmp 0x25e85
jmp 0x25f5d
jmp 0x25e82
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25f60
callq 0x22130
jmp 0x25f60
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
movzbl %bpl, %edx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x224d0
cmpb $0x7, 0x8(%rsp)
setne %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x25eda
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21fc0
leaq 0x8(%rsp), %rdi
callq 0x21a10
cmpl $0xb, 0x28(%r14)
je 0x25ea1
movl $0x8, %esi
movq %r14, %rdi
callq 0x21980
movq %r15, %rdi
callq 0x22c50
movl %eax, 0x28(%r14)
cmpq $0x0, 0x18(%r14)
setne %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x25b42
movl (%r14), %esi
leaq 0x8(%r14), %rdi
decl %esi
movl %esi, (%r14)
movl $0x3, %edx
movq %rbx, %rcx
callq 0x22d60
testb %al, %al
jne 0x25b42
movb (%rbx), %al
movb $0x7, (%rbx)
leaq 0xb8(%rsp), %rdi
jmp 0x25b33
leaq 0x8(%rsp), %rdi
movq %rax, %r14
callq 0x21a10
jmp 0x25f60
jmp 0x25f5d
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a10
movq %r14, %rdi
callq 0x23160