// File: mattn[P]wandbox-run/./json.hpp
// Function: 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>::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)) != 0)))
                    {
                        // 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 == 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)) != 0)))
                    {
                        // explicitly set result to object 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 == 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_unsigned:
                case lexer::token_type::value_integer:
                case lexer::token_type::value_float:
                {
                    m_lexer.get_number(result, last_token);
                    get_token();
                    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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x158(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x150(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x148(%rbp)
movb $0x0, -0x12(%rbp)
movl $0x8, %esi
callq 0x1b050
movq -0x148(%rbp), %rax
movl 0x28(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x140(%rbp)
subl $0x8, %eax
ja 0x1908e
movq -0x140(%rbp), %rax
leaq 0xbb7c4(%rip), %rcx     # 0xd4004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, -0x11(%rbp)
je 0x188e9
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18869
jmp 0x188ad
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
movl %esi, %edx
incl %edx
movl %edx, (%rax)
xorl %edx, %edx
callq 0x1b0c0
movb %al, -0x159(%rbp)
jmp 0x18895
movb -0x159(%rbp), %al
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x11(%rbp)
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x188e9
movq -0x158(%rbp), %rax
movb $0x1, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x1b110
jmp 0x188c7
movq -0x158(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x188e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x19151
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x188f7
movq -0x148(%rbp), %rax
cmpl $0xb, 0x28(%rax)
jne 0x189a4
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18916
testb $0x1, -0x11(%rbp)
je 0x18994
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18932
jmp 0x18994
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
decl %esi
movl %esi, (%rax)
movl $0x1, %edx
callq 0x1b0c0
movb %al, -0x15a(%rbp)
jmp 0x1895f
movb -0x15a(%rbp), %al
testb $0x1, %al
jne 0x18994
jmp 0x1896b
leaq -0x40(%rbp), %rdi
movl $0x8, %esi
callq 0x1b050
jmp 0x1897b
movq -0x158(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x17740
leaq -0x40(%rbp), %rdi
callq 0x177b0
movb $0x1, -0x12(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x1912f
movq -0x148(%rbp), %rdi
movl $0xd, %esi
callq 0x1b230
jmp 0x189b7
jmp 0x189b9
movq -0x148(%rbp), %rax
cmpl $0xd, 0x28(%rax)
jne 0x189d6
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x189d4
jmp 0x189d6
movq -0x148(%rbp), %rdi
movl $0x4, %esi
callq 0x19260
jmp 0x189e9
movq -0x148(%rbp), %rsi
addq $0x30, %rsi
leaq -0x68(%rbp), %rdi
callq 0x1b470
jmp 0x189ff
movb $0x0, -0x69(%rbp)
testb $0x1, -0x11(%rbp)
je 0x18a9f
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18a23
jmp 0x18a99
leaq -0x80(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1ba60
jmp 0x18a32
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
movl $0x4, %edx
leaq -0x80(%rbp), %rcx
callq 0x1b0c0
movb %al, -0x15b(%rbp)
jmp 0x18a58
movb -0x15b(%rbp), %al
andb $0x1, %al
movb %al, -0x69(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x177b0
jmp 0x18a9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x18c58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x177b0
jmp 0x18c58
movb $0x1, -0x69(%rbp)
jmp 0x18a9f
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18aad
movq -0x148(%rbp), %rdi
movl $0xc, %esi
callq 0x19260
jmp 0x18ac0
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18ace
movq -0x148(%rbp), %rsi
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
leaq -0x90(%rbp), %rdi
callq 0x187d0
jmp 0x18aea
testb $0x1, -0x11(%rbp)
je 0x18b84
testb $0x1, -0x69(%rbp)
je 0x18b84
leaq -0x90(%rbp), %rdi
callq 0x19530
testb $0x1, %al
jne 0x18b84
leaq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x19550
movq -0x158(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1bab0
movq %rax, -0x168(%rbp)
jmp 0x18b3a
movq -0x168(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x17740
leaq -0xa0(%rbp), %rdi
callq 0x177b0
jmp 0x18b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x177b0
leaq -0x90(%rbp), %rdi
callq 0x177b0
jmp 0x18c58
leaq -0x90(%rbp), %rdi
callq 0x177b0
leaq -0x68(%rbp), %rdi
callq 0xa23d0
movq -0x148(%rbp), %rax
cmpl $0xd, 0x28(%rax)
je 0x189b9
movq -0x148(%rbp), %rdi
movl $0xb, %esi
callq 0x19260
jmp 0x18bbd
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18bcb
testb $0x1, -0x11(%rbp)
je 0x18c66
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18beb
jmp 0x18c66
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
decl %esi
movl %esi, (%rax)
movl $0x1, %edx
callq 0x1b0c0
movb %al, -0x169(%rbp)
jmp 0x18c18
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x18c66
jmp 0x18c24
leaq -0xb0(%rbp), %rdi
movl $0x8, %esi
callq 0x1b050
jmp 0x18c37
movq -0x158(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x17740
leaq -0xb0(%rbp), %rdi
callq 0x177b0
jmp 0x18c66
leaq -0x68(%rbp), %rdi
callq 0xa23d0
jmp 0x19151
movb $0x1, -0x12(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x1912f
testb $0x1, -0x11(%rbp)
je 0x18d0c
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18c96
jmp 0x18cdd
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
movl %esi, %edx
incl %edx
movl %edx, (%rax)
movl $0x2, %edx
callq 0x1b0c0
movb %al, -0x16a(%rbp)
jmp 0x18cc5
movb -0x16a(%rbp), %al
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x11(%rbp)
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x18d0c
movq -0x158(%rbp), %rax
movb $0x2, (%rax)
leaq -0xb8(%rbp), %rdi
movl $0x2, %esi
callq 0x1b110
jmp 0x18cfa
movq -0x158(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18d1a
movq -0x148(%rbp), %rax
cmpl $0xa, 0x28(%rax)
jne 0x18dca
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18d39
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18d4f
jmp 0x18dba
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
decl %esi
movl %esi, (%rax)
movl $0x3, %edx
callq 0x1b0c0
movb %al, -0x16b(%rbp)
jmp 0x18d7c
movb -0x16b(%rbp), %al
testb $0x1, %al
jne 0x18dba
jmp 0x18d88
leaq -0xc8(%rbp), %rdi
movl $0x8, %esi
callq 0x1b050
jmp 0x18d9b
movq -0x158(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x17740
leaq -0xc8(%rbp), %rdi
callq 0x177b0
movb $0x1, -0x12(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x1912f
movq -0x148(%rbp), %rdi
movl $0xd, %esi
callq 0x1b230
jmp 0x18ddd
jmp 0x18ddf
movq -0x148(%rbp), %rax
cmpl $0xd, 0x28(%rax)
jne 0x18dfc
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18dfa
jmp 0x18dfc
movq -0x148(%rbp), %rsi
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
leaq -0xd8(%rbp), %rdi
callq 0x187d0
jmp 0x18e18
testb $0x1, -0x11(%rbp)
je 0x18e62
leaq -0xd8(%rbp), %rdi
callq 0x19530
testb $0x1, %al
jne 0x18e62
movq -0x158(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x1bbd0
jmp 0x18e43
jmp 0x18e62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x177b0
jmp 0x19151
leaq -0xd8(%rbp), %rdi
callq 0x177b0
movq -0x148(%rbp), %rax
cmpl $0xd, 0x28(%rax)
je 0x18ddf
movq -0x148(%rbp), %rdi
movl $0xa, %esi
callq 0x19260
jmp 0x18e92
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18ea0
testb $0x1, -0x11(%rbp)
je 0x18f2b
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x18ec0
jmp 0x18f2b
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
decl %esi
movl %esi, (%rax)
movl $0x3, %edx
callq 0x1b0c0
movb %al, -0x16c(%rbp)
jmp 0x18eed
movb -0x16c(%rbp), %al
testb $0x1, %al
jne 0x18f2b
jmp 0x18ef9
leaq -0xe8(%rbp), %rdi
movl $0x8, %esi
callq 0x1b050
jmp 0x18f0c
movq -0x158(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x17740
leaq -0xe8(%rbp), %rdi
callq 0x177b0
movb $0x1, -0x12(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x1912f
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18f49
movq -0x158(%rbp), %rax
movb $0x0, (%rax)
jmp 0x190a1
movq -0x148(%rbp), %rsi
addq $0x30, %rsi
leaq -0x108(%rbp), %rdi
callq 0x1b470
jmp 0x18f71
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18f7f
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x1ba60
jmp 0x18f94
movq -0x158(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x17740
leaq -0x118(%rbp), %rdi
callq 0x177b0
movl $0x2, -0x44(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xa23d0
jmp 0x190a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xa23d0
jmp 0x19151
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x18ff6
movq -0x158(%rbp), %rax
movb $0x4, (%rax)
leaq -0x120(%rbp), %rdi
movl $0x1, %esi
callq 0x1bd20
movq -0x158(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x190a1
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x19033
movq -0x158(%rbp), %rax
movb $0x4, (%rax)
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x1bd20
movq -0x158(%rbp), %rax
movq -0x128(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x190a1
movq -0x158(%rbp), %rsi
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movl 0x28(%rax), %edx
callq 0x1bd40
jmp 0x1907e
movq -0x148(%rbp), %rdi
callq 0x187a0
jmp 0x1908c
jmp 0x190a1
movq -0x148(%rbp), %rdi
movl 0x28(%rdi), %esi
callq 0x1b230
jmp 0x1909f
jmp 0x190a1
testb $0x1, -0x11(%rbp)
je 0x19124
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
callq 0x1b090
testb $0x1, %al
jne 0x190bd
jmp 0x19124
movq -0x158(%rbp), %rcx
movq -0x148(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movl (%rax), %esi
movl $0x5, %edx
callq 0x1b0c0
movb %al, -0x16d(%rbp)
jmp 0x190e6
movb -0x16d(%rbp), %al
testb $0x1, %al
jne 0x19124
jmp 0x190f2
leaq -0x138(%rbp), %rdi
movl $0x8, %esi
callq 0x1b050
jmp 0x19105
movq -0x158(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x17740
leaq -0x138(%rbp), %rdi
callq 0x177b0
movb $0x1, -0x12(%rbp)
movl $0x1, -0x44(%rbp)
testb $0x1, -0x12(%rbp)
jne 0x19141
movq -0x158(%rbp), %rdi
callq 0x177b0
movq -0x150(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x158(%rbp), %rdi
callq 0x177b0
movq -0x20(%rbp), %rdi
callq 0xd1250
nopw %cs:(%rax,%rax)