// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/Reflection/JSON.cpp
// Function: parse(Tokenizer&)
SharedObject parse(Tokenizer& tk) {
    auto token = tk.getToken();
    if (token == Tokenizer::symbol('{')) {
        auto obj = std::unordered_map<std::string, JSON>();
        token = tk.getToken();
        while (token != Tokenizer::symbol('}')) {
            auto key = token.second;
            token = tk.getToken();
            tk.expectSymbol(token, ":");
            obj[(std::string)key] = JSON{parse(tk)};
            token = tk.getToken();
            if (token != Tokenizer::symbol(',')) {
                tk.expectSymbol(token, "}");
                continue;
            }
            token = tk.getToken();
        }
        return SharedObject::New<decltype(obj)>(obj);
    } else if (token == Tokenizer::symbol('[')) {
        auto vec = std::vector<JSON>();
        token = tk.getToken();
        while (token != Tokenizer::symbol(']')) {
            tk.backToken(token);
            vec.push_back(JSON{parse(tk)});
            token = tk.getToken();
            if (token != Tokenizer::symbol(',')) {
                tk.expectSymbol(token, "]");
                continue;
            }
            token = tk.getToken();
        }
        return SharedObject::New<decltype(vec)>(vec);
    } else if (token.first == TypeID::get<int>()) {
        return SharedObject::New<int>(ConvertTo<int>(token.second));
    } else if (token.first == TypeID::get<float>()) {
        return SharedObject::New<float>(ConvertTo<float>(token.second));
    } else if (token.first == TypeID::get<std::string>()) {
        return SharedObject::New<std::string>(token.second);
    } else {
        std::cerr << "Error when parsing JSON: unknown token: type = " << token.first.getName() << ", content = " << token.second << std::endl;
    }
    return SharedObject::Null;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %r14
movq %rdi, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6594c
leaq 0x8(%rsp), %rdi
pushq $0x7b
popq %rsi
callq 0x65cee
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x65cb7
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %bl, %bl
je 0x1ab8f
leaq 0xc0(%rsp), %rax
andq $0x0, -0x10(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6594c
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
leaq 0x280(%rsp), %rbx
leaq 0x1a8(%rsp), %rbp
movq %r12, %rdi
pushq $0x7d
popq %rsi
callq 0x65cee
movq %r15, %rdi
movq %r12, %rsi
callq 0x65cb7
movl %eax, %r13d
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %r13b, %r13b
jne 0x1ad48
leaq 0x108(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x2b71e
movq %r12, %rdi
movq %r14, %rsi
callq 0x6594c
movq %r15, %rdi
movq %r12, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
leaq 0x208(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x65e2a
movq %r14, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
leaq 0x7b287(%rip), %rcx     # 0x95cfd
callq 0x65d80
leaq 0x228(%rsp), %rdi
callq 0x209be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a93c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x171ac
movq %rbp, %rdi
leaq 0x108(%rsp), %rsi
callq 0x2b71e
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
callq 0x678f6
movq %rax, %rdi
movq %r12, %rsi
callq 0x208e6
movq %rbp, %rdi
callq 0x209be
movq %r12, %rdi
callq 0x19b6c
movq %rbx, %rdi
callq 0x19b6c
movq %r12, %rdi
movq %r14, %rsi
callq 0x6594c
movq %r15, %rdi
movq %r12, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
movq %r12, %rdi
pushq $0x2c
popq %rsi
callq 0x65cee
movq %r15, %rdi
movq %r12, %rsi
callq 0x65cb7
movl %eax, %r13d
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %r13b, %r13b
je 0x1ab46
movq %r12, %rdi
movq %r14, %rsi
callq 0x6594c
movq %r15, %rdi
movq %r12, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
jmp 0x1ab78
leaq 0x168(%rsp), %rdi
movq %r15, %rsi
callq 0x65e2a
movq %r14, %rdi
leaq 0x168(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x7c579(%rip), %rcx     # 0x970e4
callq 0x65d80
leaq 0x188(%rsp), %rdi
callq 0x209be
leaq 0x108(%rsp), %rdi
callq 0x209be
jmp 0x1a9f5
leaq 0x8(%rsp), %rdi
pushq $0x5b
popq %rsi
callq 0x65cee
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x65cb7
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %bl, %bl
je 0x1ad6b
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
andq $0x0, 0xa0(%rsp)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6594c
leaq 0x50(%rsp), %rbx
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
leaq 0x10(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x1c8(%rsp), %rbp
leaq 0x248(%rsp), %r12
movq %r15, %rdi
pushq $0x5d
popq %rsi
callq 0x65cee
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65cb7
movl %eax, %r13d
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %r13b, %r13b
jne 0x1adc1
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x65e2a
movq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0x66726
leaq 0x1e8(%rsp), %rdi
callq 0x209be
movq %r12, %rdi
movq %r14, %rsi
callq 0x1a93c
movq %r15, %rdi
movq %r12, %rsi
callq 0x171ac
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x6807c
movq %r15, %rdi
callq 0x19b6c
movq %r12, %rdi
callq 0x19b6c
movq %r15, %rdi
movq %r14, %rsi
callq 0x6594c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
movq %r15, %rdi
pushq $0x2c
popq %rsi
callq 0x65cee
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65cb7
movl %eax, %r13d
leaq 0x28(%rsp), %rdi
callq 0x209be
testb %r13b, %r13b
je 0x1ad0c
movq %r15, %rdi
movq %r14, %rsi
callq 0x6594c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65d5c
leaq 0x28(%rsp), %rdi
callq 0x209be
jmp 0x1ac18
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x65e2a
movq %r14, %rdi
leaq 0x128(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x7bc82(%rip), %rcx     # 0x969b3
callq 0x65d80
leaq 0x148(%rsp), %rdi
callq 0x209be
jmp 0x1ac18
leaq 0x90(%rsp), %rsi
movq (%rsp), %rdi
callq 0x65e46
leaq 0x90(%rsp), %rdi
callq 0x66652
jmp 0x1ae3c
leaq 0x8(%rsp), %rdi
callq 0x22a52
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ba12
testb %al, %al
je 0x1ade1
leaq 0x70(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x2b71e
leaq 0xe8(%rsp), %rdi
callq 0x66059
leaq 0x8(%rsp), %rsi
movl %eax, (%rsi)
movq (%rsp), %rdi
callq 0x65fb4
leaq 0xe8(%rsp), %rdi
jmp 0x1ae37
leaq 0x90(%rsp), %rsi
movq (%rsp), %rdi
callq 0x65eec
leaq 0x90(%rsp), %rdi
callq 0x65f92
jmp 0x1ae3c
leaq 0x8(%rsp), %rdi
callq 0x40692
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ba12
testb %al, %al
je 0x1ae5c
leaq 0x70(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2b71e
leaq 0xc8(%rsp), %rdi
callq 0x6615f
leaq 0x8(%rsp), %rsi
movss %xmm0, (%rsi)
movq (%rsp), %rdi
callq 0x660ba
leaq 0xc8(%rsp), %rdi
callq 0x209be
leaq 0x70(%rsp), %rdi
callq 0x209be
movq (%rsp), %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
callq 0x2140e
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ba12
testb %al, %al
je 0x1ae89
leaq 0x70(%rsp), %rsi
movq (%rsp), %rdi
callq 0x661ca
jmp 0x1ae3c
movq 0xeb160(%rip), %rdi     # 0x105ff0
leaq 0x7c2df(%rip), %rsi     # 0x97176
callq 0x11340
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1b9ce
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113b0
leaq 0x7c2e8(%rip), %rsi     # 0x971a6
movq %rax, %rdi
callq 0x11340
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x11320
movq %rax, %rdi
callq 0x111b0
leaq 0xeb496(%rip), %rsi     # 0x106378
movq (%rsp), %rdi
callq 0x171ac
jmp 0x1ae3c
jmp 0x1af40
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
jmp 0x1af36
jmp 0x1af40
jmp 0x1af40
jmp 0x1afb3
jmp 0x1af40
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
jmp 0x1af36
jmp 0x1af40
jmp 0x1afb3
jmp 0x1b021
jmp 0x1af40
jmp 0x1af2e
jmp 0x1af40
jmp 0x1b021
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x209be
jmp 0x1b04d
movq %rax, %r14
jmp 0x1b04d
movq %rax, %r14
leaq 0x148(%rsp), %rdi
jmp 0x1afac
jmp 0x1afb3
movq %rax, %r14
leaq 0x188(%rsp), %rdi
jmp 0x1b018
jmp 0x1b030
movq %rax, %r14
leaq 0x1e8(%rsp), %rdi
jmp 0x1afac
jmp 0x1afb3
movq %rax, %r14
jmp 0x1af8d
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x19b6c
leaq 0x248(%rsp), %rdi
callq 0x19b6c
jmp 0x1afb6
jmp 0x1afb3
jmp 0x1afb3
jmp 0x1afa4
jmp 0x1afb3
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x209be
jmp 0x1afb6
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x65f92
jmp 0x1b04d
movq %rax, %r14
leaq 0x228(%rsp), %rdi
jmp 0x1b018
jmp 0x1b030
movq %rax, %r14
jmp 0x1affb
movq %rax, %r14
jmp 0x1aff1
movq %rax, %r14
leaq 0x1a8(%rsp), %rdi
callq 0x209be
leaq 0x8(%rsp), %rdi
callq 0x19b6c
leaq 0x280(%rsp), %rdi
callq 0x19b6c
jmp 0x1b033
jmp 0x1b030
jmp 0x1b030
jmp 0x1b021
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x209be
jmp 0x1b033
jmp 0x1b030
movq %rax, %r14
jmp 0x1b040
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x1b03b
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x209be
leaq 0x90(%rsp), %rdi
callq 0x66652
leaq 0x70(%rsp), %rdi
callq 0x209be
movq %r14, %rdi
callq 0x11570
nop