// File: /workspace/github_cpp_makefile_star2_O2/SYZYGYfpga[P]syzygy-tools/include/json.hpp
// Function: nlohmann::detail::parser<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>>::parse_internal(bool, 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>&)
void parse_internal(bool keep, BasicJsonType& result)
    {
        // never parse after a parse error was detected
        assert(not errored);

        // start with a discarded value
        if (not result.is_discarded())
        {
            result.m_value.destroy(result.m_type);
            result.m_type = value_t::discarded;
        }

        switch (last_token)
        {
            case token_type::begin_object:
            {
                if (keep)
                {
                    if (callback)
                    {
                        keep = callback(depth++, parse_event_t::object_start, result);
                    }

                    if (not callback or keep)
                    {
                        // explicitly set result to object to cope with {}
                        result.m_type = value_t::object;
                        result.m_value = value_t::object;
                    }
                }

                // read next token
                get_token();

                // closing } -> we are done
                if (last_token == token_type::end_object)
                {
                    if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
                    {
                        result.m_value.destroy(result.m_type);
                        result.m_type = value_t::discarded;
                    }
                    break;
                }

                // parse values
                std::string key;
                BasicJsonType value;
                while (true)
                {
                    // store key
                    if (not expect(token_type::value_string))
                    {
                        return;
                    }
                    key = m_lexer.move_string();

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

                    // parse separator (:)
                    get_token();
                    if (not expect(token_type::name_separator))
                    {
                        return;
                    }

                    // parse and add value
                    get_token();
                    value.m_value.destroy(value.m_type);
                    value.m_type = value_t::discarded;
                    parse_internal(keep, value);

                    if (JSON_UNLIKELY(errored))
                    {
                        return;
                    }

                    if (keep and keep_tag and not value.is_discarded())
                    {
                        result.m_value.object->emplace(std::move(key), std::move(value));
                    }

                    // comma -> next value
                    get_token();
                    if (last_token == token_type::value_separator)
                    {
                        get_token();
                        continue;
                    }

                    // closing }
                    if (not expect(token_type::end_object))
                    {
                        return;
                    }
                    break;
                }

                if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
                {
                    result.m_value.destroy(result.m_type);
                    result.m_type = value_t::discarded;
                }
                break;
            }

            case token_type::begin_array:
            {
                if (keep)
                {
                    if (callback)
                    {
                        keep = callback(depth++, parse_event_t::array_start, result);
                    }

                    if (not callback or keep)
                    {
                        // explicitly set result to array to cope with []
                        result.m_type = value_t::array;
                        result.m_value = value_t::array;
                    }
                }

                // read next token
                get_token();

                // closing ] -> we are done
                if (last_token == token_type::end_array)
                {
                    if (callback and not callback(--depth, parse_event_t::array_end, result))
                    {
                        result.m_value.destroy(result.m_type);
                        result.m_type = value_t::discarded;
                    }
                    break;
                }

                // parse values
                BasicJsonType value;
                while (true)
                {
                    // parse value
                    value.m_value.destroy(value.m_type);
                    value.m_type = value_t::discarded;
                    parse_internal(keep, value);

                    if (JSON_UNLIKELY(errored))
                    {
                        return;
                    }

                    if (keep and not value.is_discarded())
                    {
                        result.m_value.array->push_back(std::move(value));
                    }

                    // comma -> next value
                    get_token();
                    if (last_token == token_type::value_separator)
                    {
                        get_token();
                        continue;
                    }

                    // closing ]
                    if (not expect(token_type::end_array))
                    {
                        return;
                    }
                    break;
                }

                if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
                {
                    result.m_value.destroy(result.m_type);
                    result.m_type = value_t::discarded;
                }
                break;
            }

            case token_type::literal_null:
            {
                result.m_type = value_t::null;
                break;
            }

            case token_type::value_string:
            {
                result.m_type = value_t::string;
                result.m_value = m_lexer.move_string();
                break;
            }

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

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

            case token_type::value_unsigned:
            {
                result.m_type = value_t::number_unsigned;
                result.m_value = m_lexer.get_number_unsigned();
                break;
            }

            case token_type::value_integer:
            {
                result.m_type = value_t::number_integer;
                result.m_value = m_lexer.get_number_integer();
                break;
            }

            case token_type::value_float:
            {
                result.m_type = value_t::number_float;
                result.m_value = m_lexer.get_number_float();

                // throw in case of infinity or NAN
                if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float)))
                {
                    if (allow_exceptions)
                    {
                        JSON_THROW(out_of_range::create(406, "number overflow parsing '" +
                                                        m_lexer.get_token_string() + "'"));
                    }
                    expect(token_type::uninitialized);
                }
                break;
            }

            case token_type::parse_error:
            {
                // using "uninitialized" to avoid "expected" message
                if (not expect(token_type::uninitialized))
                {
                    return;
                }
                break; // LCOV_EXCL_LINE
            }

            default:
            {
                // the last token was unexpected; we expected a value
                if (not expect(token_type::literal_or_value))
                {
                    return;
                }
                break; // LCOV_EXCL_LINE
            }
        }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpb $0x1, 0xb0(%rdi)
je 0x52fb
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movb (%rdx), %al
cmpb $0x8, %al
je 0x4dc6
leaq 0x8(%r14), %rdi
movzbl %al, %esi
callq 0x4084
movb $0x8, (%r14)
movl 0x28(%rbx), %eax
decl %eax
cmpl $0xd, %eax
ja 0x4eab
leaq 0x3249(%rip), %rcx      # 0x8024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x4, (%r14)
movq $0x1, 0x8(%r14)
jmp 0x52b8
movb $0x0, (%r14)
jmp 0x52b8
movb $0x5, (%r14)
movq 0x90(%rbx), %rax
jmp 0x4eee
movb $0x4, (%r14)
andq $0x0, 0x8(%r14)
jmp 0x52b8
movb $0x7, (%r14)
movq 0xa0(%rbx), %xmm0
movq %xmm0, %rax
movq %xmm0, 0x8(%r14)
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x52b8
cmpb $0x1, 0xb8(%rbx)
je 0x531a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5420
jmp 0x52b8
testb %bpl, %bpl
je 0x4f4d
cmpq $0x0, 0x18(%rbx)
je 0x4f58
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, (%rbx)
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x5fa2
movl %eax, %ebp
testb %al, %al
jne 0x4f5b
cmpq $0x0, 0x18(%rbx)
jne 0x4f68
jmp 0x4f5b
pushq $0x10
popq %rsi
movq %rbx, %rdi
jmp 0x4efc
movb $0x3, (%r14)
leaq 0x68(%rbx), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x32c0
movq %r15, %rdi
callq 0x6688
movq %rax, 0x8(%r14)
leaq 0x10(%rsp), %rdi
callq 0x3120
jmp 0x52b8
movb $0x6, (%r14)
movq 0x98(%rbx), %rax
movq %rax, 0x8(%r14)
jmp 0x52b8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5420
testb %al, %al
jne 0x52b8
jmp 0x52e0
testb %bpl, %bpl
je 0x4f51
cmpq $0x0, 0x18(%rbx)
je 0x5081
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, (%rbx)
xorl %edx, %edx
movq %r14, %rcx
callq 0x5fa2
movl %eax, %ebp
testb %al, %al
jne 0x5084
cmpq $0x0, 0x18(%rbx)
jne 0x5091
jmp 0x5084
xorl %ebp, %ebp
jmp 0x4f68
xorl %ebp, %ebp
jmp 0x5091
movb $0x1, %bpl
movb $0x2, (%r14)
callq 0x42d0
movq %rax, 0x8(%r14)
movq %rbx, %rdi
callq 0x4d78
cmpl $0xa, 0x28(%rbx)
jne 0x4f92
cmpq $0x0, 0x18(%rbx)
je 0x52b8
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
decl %esi
movl %esi, (%rbx)
pushq $0x3
jmp 0x50bf
leaq 0x10(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x3bda
leaq 0x18(%rsp), %r13
leaq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
movzbl %bpl, %r15d
movzbl 0x10(%rsp), %esi
movq %r13, %rdi
callq 0x4084
movb $0x8, 0x10(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x4d8a
cmpb $0x0, 0xb0(%rbx)
jne 0x52f2
testb %bpl, %bpl
je 0x4ffc
cmpb $0x8, 0x10(%rsp)
je 0x4ffc
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x64d8
movq %rbx, %rdi
callq 0x4d78
cmpl $0xd, 0x28(%rbx)
jne 0x5014
movq %rbx, %rdi
callq 0x4d78
jmp 0x4fb3
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x5420
movl %eax, %ecx
andb %bpl, %cl
cmpb $0x1, %cl
jne 0x5061
pushq $0x2
popq %r15
cmpq $0x0, 0x18(%rbx)
je 0x5068
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
decl %esi
movl %esi, (%rbx)
pushq $0x3
popq %rdx
movq %r14, %rcx
callq 0x5fa2
testb %al, %al
jne 0x5068
movzbl (%r14), %esi
movq 0x8(%rsp), %rdi
callq 0x4084
movb $0x8, (%r14)
jmp 0x5068
movzbl %al, %r15d
incl %r15d
leaq 0x10(%rsp), %rdi
callq 0x3fb4
cmpl $0x1, %r15d
jne 0x52b8
jmp 0x52e0
movb $0x1, %bpl
movb $0x1, (%r14)
callq 0x427c
movq %rax, 0x8(%r14)
movq %rbx, %rdi
callq 0x4d78
cmpl $0xb, 0x28(%rbx)
jne 0x50e6
testb %bpl, %bpl
je 0x52b8
cmpq $0x0, 0x18(%rbx)
je 0x52b8
leaq 0x8(%rbx), %rdi
movl (%rbx), %esi
decl %esi
movl %esi, (%rbx)
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x5fa2
testb %al, %al
jne 0x52b8
leaq 0x8(%r14), %rdi
movzbl (%r14), %esi
callq 0x4084
movb $0x8, (%r14)
jmp 0x52b8
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x3bda
leaq 0x68(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x38(%rsp)
movl %ebp, %r13d
xorb $0x1, %r13b
leaq 0x8(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %r15
movzbl %bpl, %eax
movl %eax, 0x34(%rsp)
movq %rbx, %rdi
pushq $0x4
popq %rsi
callq 0x5420
testb %al, %al
je 0x529d
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x32c0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x32b0
movq %r15, %rdi
callq 0x3120
movb $0x1, %r12b
testb %bpl, %bpl
je 0x51b0
cmpq $0x0, 0x18(%rbx)
je 0x51ad
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x5fc6
movl (%rbx), %esi
movq 0x38(%rsp), %rdi
pushq $0x4
popq %rdx
movq %r15, %rcx
callq 0x5fa2
movl %eax, %r12d
movq %r15, %rdi
callq 0x3fb4
xorb $0x1, %r12b
jmp 0x51b0
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x4d78
movq %rbx, %rdi
pushq $0xc
popq %rsi
callq 0x5420
testb %al, %al
je 0x529d
movq %rbx, %rdi
callq 0x4d78
movzbl 0x48(%rsp), %esi
leaq 0x50(%rsp), %rdi
callq 0x4084
movb $0x8, 0x48(%rsp)
movq %rbx, %rdi
movl 0x34(%rsp), %esi
leaq 0x48(%rsp), %rdx
callq 0x4d8a
cmpb $0x0, 0xb0(%rbx)
jne 0x529d
orb %r13b, %r12b
jne 0x5228
cmpb $0x8, 0x48(%rsp)
je 0x5228
movq 0x40(%rsp), %rax
movq (%rax), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x6296
movq %rbx, %rdi
callq 0x4d78
cmpl $0xd, 0x28(%rbx)
jne 0x5243
movq %rbx, %rdi
callq 0x4d78
jmp 0x5139
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0x5420
movl %eax, %ecx
andb %bpl, %cl
cmpb $0x1, %cl
jne 0x5294
pushq $0x2
popq %rax
movl %eax, 0x4(%rsp)
cmpq $0x0, 0x18(%rbx)
je 0x529d
movl (%rbx), %esi
decl %esi
movl %esi, (%rbx)
pushq $0x1
popq %rdx
movq 0x38(%rsp), %rdi
movq %r14, %rcx
callq 0x5fa2
testb %al, %al
jne 0x529d
movzbl (%r14), %esi
movq 0x40(%rsp), %rdi
callq 0x4084
movb $0x8, (%r14)
jmp 0x529d
movzbl %al, %eax
incl %eax
movl %eax, 0x4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x3fb4
leaq 0x10(%rsp), %rdi
callq 0x3120
cmpl $0x1, 0x4(%rsp)
je 0x52e0
testb %bpl, %bpl
je 0x52e0
cmpq $0x0, 0x18(%rbx)
je 0x52e0
movl (%rbx), %esi
addq $0x8, %rbx
pushq $0x5
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x5fa2
testb %al, %al
jne 0x52e0
movb $0x8, (%r14)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r15
jmp 0x5068
leaq 0x3de3(%rip), %rdi      # 0x90e5
leaq 0x3365(%rip), %rsi      # 0x866e
leaq 0x3de1(%rip), %rcx      # 0x90f1
movl $0xbb3, %edx            # imm = 0xBB3
callq 0x3190
addq $0x30, %rbx
pushq $0x20
popq %rdi
callq 0x3130
movq %rax, %r14
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x60ba
leaq 0x3e3a(%rip), %rsi      # 0x9177
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x6095
leaq 0x3e6c(%rip), %rdx      # 0x91bf
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x45aa
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl $0x196, %esi            # imm = 0x196
callq 0x5fe0
xorl %ebp, %ebp
leaq 0x8970(%rip), %rsi      # 0xdcf0
leaq 0x1a97(%rip), %rdx      # 0x6e1e
movq %r14, %rdi
callq 0x33b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3120
jmp 0x53a4
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x3120
jmp 0x53b6
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x48(%rsp), %rdi
callq 0x3120
testb %bpl, %bpl
jne 0x53ca
jmp 0x5418
movq %rax, %rbx
movq %r14, %rdi
callq 0x31c0
jmp 0x5418
jmp 0x53f2
jmp 0x53f2
jmp 0x540b
movq %rax, %rbx
jmp 0x53ff
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3fb4
jmp 0x53f5
jmp 0x53f2
jmp 0x53f2
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3fb4
leaq 0x10(%rsp), %rdi
callq 0x3120
jmp 0x5418
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3fb4
movq %rbx, %rdi
callq 0x33d0