// File: pfnet-research[P]pml/src/parser.cpp
// Function: next_token(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
token_t next_token(std::string const& input, size_t pos) {
    using kind_t = token_t::kind_t;

    pos = skip_spaces(input, pos);

    if (pos >= input.size()) {
        return token_t {
            token_t::kind_t::Eof, pos, ""
        };
    }

    if (std::isdigit(input[pos]) || (input[pos] == '-' && std::isdigit(input[pos+1]))) {
        size_t len = 1;
        while (std::isdigit(input[pos + len]) && pos + len < input.size())
            ++len;
        return token_t {
            kind_t::Int, pos, input.substr(pos, len)
        };
    }

    std::unordered_map<std::string, kind_t> string_token = {
        {"->", kind_t::Arrow},
        {"=>", kind_t::FatArrow},
        {"==", kind_t::DoubleEq},
        {"!=", kind_t::Neq},
        {"<=", kind_t::Leq},
        {">=", kind_t::Geq},
        {"\\/", kind_t::Or},
        {"/\\", kind_t::And}
    };
    for (auto const& pair : string_token) {
        if (pair.first == input.substr(pos, pair.first.size()))
            return token_t {pair.second, pos, pair.first};
    }

    std::unordered_map<char, token_t::kind_t> char_token = {
        {'=', kind_t::Eq},
        {'+', kind_t::Plus},
        {'-', kind_t::Minus},
        {'*', kind_t::Star},
        {'/', kind_t::Slash},
        {',', kind_t::Comma},
        {'&', kind_t::Amp},
        {'\\', kind_t::BackSlash},
        {'|', kind_t::Bar},
        {':', kind_t::Colon},
        {'{', kind_t::LBrace},
        {'}', kind_t::RBrace},
        {'(', kind_t::LParen},
        {')', kind_t::RParen}
    };
    auto found_ch = char_token.find(input[pos]);
    if (found_ch != char_token.end()) {
        return token_t {
            found_ch->second, pos, std::string{found_ch->first}
        };
    }

    size_t len = ident_len(input, pos);
    if (len != 0) {
        std::unordered_map<std::string, token_t::kind_t> keywords = {
            {"let", kind_t::Let},
            {"letfun", kind_t::LetFun},
            {"in", kind_t::In},
            {"if", kind_t::If},
            {"else", kind_t::Else},
            {"then", kind_t::Then},
            {"rand", kind_t::Rand},
            {"true", kind_t::True},
            {"false", kind_t::False},
            {"Prob", kind_t::Prob},
            {"not", kind_t::Not},
            {"dummy", kind_t::Dummy}
        };
        std::string lexime = input.substr(pos, len);
        auto found_keyword = keywords.find(lexime);
        if (found_keyword != keywords.end()) {
            return token_t { found_keyword->second, pos, lexime };
        } else {
            return token_t { kind_t::Ident, pos,  lexime};
        }
    }

    throw std::runtime_error{"unknown token at " + std::to_string(pos) + " : " + input.substr(pos, 5) + ".."};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7b0, %rsp            # imm = 0x7B0
movq %rdi, -0x6a0(%rbp)
movq %rdi, %rax
movq %rax, -0x698(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x35440
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x690(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa280
movq %rax, %rcx
movq -0x690(%rbp), %rax
cmpq %rcx, %rax
jb 0x35680
movq -0x6a0(%rbp), %rax
movl $0x25, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x10, %rax
movq %rax, -0x6b0(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x6a8(%rbp)
callq 0xa660
movq -0x6b0(%rbp), %rdi
movq -0x6a8(%rbp), %rdx
leaq 0x66284(%rip), %rsi     # 0x9b8d5
callq 0x1dd10
jmp 0x35658
leaq -0x19(%rbp), %rdi
callq 0xa420
jmp 0x364b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0xa420
jmp 0x364c3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa450
movsbl (%rax), %edi
callq 0xa350
cmpl $0x0, %eax
jne 0x356d5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa450
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3577c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
callq 0xa450
movsbl (%rax), %edi
callq 0xa350
cmpl $0x0, %eax
je 0x3577c
movq $0x1, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x38(%rbp), %rsi
callq 0xa450
movsbl (%rax), %edi
callq 0xa350
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6b1(%rbp)
je 0x35733
movq -0x18(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x6c0(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa280
movq %rax, %rcx
movq -0x6c0(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x6b1(%rbp)
movb -0x6b1(%rbp), %al
testb $0x1, %al
jne 0x3573f
jmp 0x3574d
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x356dd
movq -0x6a0(%rbp), %rdi
movl $0x7, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0xa3f0
jmp 0x364b3
leaq -0x1c0(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0xb, -0x1cc(%rbp)
leaq 0x6727f(%rip), %rsi     # 0x9ca1a
leaq -0x1cc(%rbp), %rdx
callq 0x3fce0
jmp 0x357a9
leaq -0x198(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0xc, -0x1d0(%rbp)
leaq 0x66e44(%rip), %rsi     # 0x9c60c
leaq -0x1d0(%rbp), %rdx
callq 0x3fce0
jmp 0x357d6
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x13, -0x1d4(%rbp)
leaq 0x67237(%rip), %rsi     # 0x9ca2c
leaq -0x1d4(%rbp), %rdx
callq 0x3fce0
jmp 0x35803
leaq -0x148(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x14, -0x1d8(%rbp)
leaq 0x66de6(%rip), %rsi     # 0x9c608
leaq -0x1d8(%rbp), %rdx
callq 0x3fce0
jmp 0x35830
leaq -0x120(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x16, -0x1dc(%rbp)
leaq 0x6641c(%rip), %rsi     # 0x9bc6b
leaq -0x1dc(%rbp), %rdx
callq 0x3fce0
jmp 0x3585d
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x17, -0x1e0(%rbp)
leaq 0x663f2(%rip), %rsi     # 0x9bc6e
leaq -0x1e0(%rbp), %rdx
callq 0x3fce0
jmp 0x3588a
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x21, -0x1e4(%rbp)
leaq 0x67174(%rip), %rsi     # 0x9ca1d
leaq -0x1e4(%rbp), %rdx
callq 0x3fce0
jmp 0x358b7
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x22, -0x1e8(%rbp)
leaq 0x6714a(%rip), %rsi     # 0x9ca20
leaq -0x1e8(%rbp), %rdx
callq 0x3fce0
jmp 0x358e4
leaq -0x1c0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x8, -0x78(%rbp)
leaq -0x1eb(%rbp), %rdi
movq %rdi, -0x6c8(%rbp)
callq 0x3fd80
movq -0x6c8(%rbp), %rcx
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %ecx
leaq -0x70(%rbp), %rdi
leaq -0x1e9(%rbp), %r8
leaq -0x1ea(%rbp), %r9
callq 0x3fda0
jmp 0x3593c
leaq -0x1eb(%rbp), %rdi
callq 0x3fe00
leaq -0x1c0(%rbp), %rax
movq %rax, -0x6d8(%rbp)
addq $0x140, %rax            # imm = 0x140
movq %rax, -0x6d0(%rbp)
movq -0x6d0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x6e0(%rbp)
callq 0x3fd60
movq -0x6d8(%rbp), %rcx
movq -0x6e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x6d0(%rbp)
jne 0x35963
leaq -0x70(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x3fe20
movq %rax, -0x200(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x3fe50
movq %rax, -0x208(%rbp)
leaq -0x200(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x3fe80
testb $0x1, %al
jne 0x359e1
jmp 0x35b95
leaq -0x200(%rbp), %rdi
callq 0x3feb0
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rdi
movq %rdi, -0x6f8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x6f0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x6e8(%rbp)
callq 0xa280
movq -0x6f0(%rbp), %rsi
movq -0x6e8(%rbp), %rdx
movq %rax, %rcx
leaq -0x230(%rbp), %rdi
callq 0xa3f0
jmp 0x35a3c
movq -0x6f8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0xf040
movb %al, -0x6f9(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xa240
movb -0x6f9(%rbp), %al
testb $0x1, %al
jne 0x35a70
jmp 0x35b82
movq -0x6a0(%rbp), %rdi
movq -0x210(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
movq -0x210(%rbp), %rsi
callq 0xa190
jmp 0x35a9d
movl $0x1, -0x234(%rbp)
jmp 0x3649d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movq -0x1c8(%rbp), %rax
leaq -0x1c0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x708(%rbp)
je 0x35b03
movq -0x708(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x710(%rbp)
callq 0x3fd60
movq -0x710(%rbp), %rax
leaq -0x1c0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x708(%rbp)
jne 0x35ad2
jmp 0x364c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1eb(%rbp), %rdi
callq 0x3fe00
leaq -0x1c0(%rbp), %rax
movq %rax, -0x720(%rbp)
addq $0x140, %rax            # imm = 0x140
movq %rax, -0x718(%rbp)
movq -0x718(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x728(%rbp)
callq 0x3fd60
movq -0x720(%rbp), %rcx
movq -0x728(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x718(%rbp)
jne 0x35b3b
jmp 0x364c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x364a8
jmp 0x35b84
leaq -0x200(%rbp), %rdi
callq 0x3fee0
jmp 0x359c5
movups 0x66e48(%rip), %xmm0    # 0x9c9e4
movaps %xmm0, -0x290(%rbp)
movups 0x66e2a(%rip), %xmm0    # 0x9c9d4
movaps %xmm0, -0x2a0(%rbp)
movups 0x66e0c(%rip), %xmm0    # 0x9c9c4
movaps %xmm0, -0x2b0(%rbp)
movups 0x66dee(%rip), %xmm0    # 0x9c9b4
movaps %xmm0, -0x2c0(%rbp)
movups 0x66dd0(%rip), %xmm0    # 0x9c9a4
movaps %xmm0, -0x2d0(%rbp)
movups 0x66db2(%rip), %xmm0    # 0x9c994
movaps %xmm0, -0x2e0(%rbp)
movups 0x66d94(%rip), %xmm0    # 0x9c984
movaps %xmm0, -0x2f0(%rbp)
leaq -0x2f0(%rbp), %rax
movq %rax, -0x280(%rbp)
movq $0xe, -0x278(%rbp)
leaq -0x2f3(%rbp), %rdi
movq %rdi, -0x730(%rbp)
callq 0x3ff10
movq -0x730(%rbp), %rcx
movq -0x280(%rbp), %rsi
movq -0x278(%rbp), %rdx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %ecx
leaq -0x270(%rbp), %rdi
leaq -0x2f1(%rbp), %r8
leaq -0x2f2(%rbp), %r9
callq 0x3ff30
jmp 0x35c5e
leaq -0x2f3(%rbp), %rdi
callq 0x3ff90
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa450
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3ffb0
movq %rax, -0x738(%rbp)
jmp 0x35c8f
movq -0x738(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x40010
movq %rax, -0x308(%rbp)
leaq -0x300(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x3ffe0
testb $0x1, %al
jne 0x35ccc
jmp 0x35dca
leaq -0x300(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x40040
movq -0x750(%rbp), %rdi
movq %rax, %rcx
movq -0x6a0(%rbp), %rax
movl 0x4(%rcx), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x10, %rax
movq %rax, -0x748(%rbp)
callq 0x40040
movb (%rax), %al
movb %al, -0x319(%rbp)
leaq -0x319(%rbp), %rax
movq %rax, -0x318(%rbp)
movq $0x1, -0x310(%rbp)
leaq -0x31a(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0xa660
movq -0x748(%rbp), %rdi
movq -0x740(%rbp), %rcx
movq -0x318(%rbp), %rsi
movq -0x310(%rbp), %rdx
callq 0xa480
jmp 0x35d64
leaq -0x31a(%rbp), %rdi
callq 0xa420
movl $0x1, -0x234(%rbp)
jmp 0x36481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2f3(%rbp), %rdi
callq 0x3ff90
jmp 0x364a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3648f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x31a(%rbp), %rdi
callq 0xa420
jmp 0x3648f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x354c0
movq %rax, -0x328(%rbp)
cmpq $0x0, -0x328(%rbp)
je 0x362ca
leaq -0x550(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x0, -0x55c(%rbp)
leaq 0x6a0be(%rip), %rsi     # 0x9fec9
leaq -0x55c(%rbp), %rdx
callq 0x40070
jmp 0x35e19
leaq -0x528(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x1, -0x560(%rbp)
leaq 0x66bc0(%rip), %rsi     # 0x9c9f8
leaq -0x560(%rbp), %rdx
callq 0x400f0
jmp 0x35e46
leaq -0x500(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x2, -0x564(%rbp)
leaq 0x66b9a(%rip), %rsi     # 0x9c9ff
leaq -0x564(%rbp), %rdx
callq 0x3fce0
jmp 0x35e73
leaq -0x4d8(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x3, -0x568(%rbp)
leaq 0x66b70(%rip), %rsi     # 0x9ca02
leaq -0x568(%rbp), %rdx
callq 0x3fce0
jmp 0x35ea0
leaq -0x4b0(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x4, -0x56c(%rbp)
leaq 0x66b4b(%rip), %rsi     # 0x9ca0a
leaq -0x56c(%rbp), %rdx
callq 0x40170
jmp 0x35ecd
leaq -0x488(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x5, -0x570(%rbp)
leaq 0x66b19(%rip), %rsi     # 0x9ca05
leaq -0x570(%rbp), %rdx
callq 0x40170
jmp 0x35efa
leaq -0x460(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x6, -0x574(%rbp)
leaq 0x69fc0(%rip), %rsi     # 0x9fed9
leaq -0x574(%rbp), %rdx
callq 0x40170
jmp 0x35f27
leaq -0x438(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x8, -0x578(%rbp)
leaq 0x6c1fa(%rip), %rsi     # 0xa2140
leaq -0x578(%rbp), %rdx
callq 0x40170
jmp 0x35f54
leaq -0x410(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x9, -0x57c(%rbp)
leaq 0x69d34(%rip), %rsi     # 0x9fca7
leaq -0x57c(%rbp), %rdx
callq 0x401f0
jmp 0x35f81
leaq -0x3e8(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x23, -0x580(%rbp)
leaq 0x66a83(%rip), %rsi     # 0x9ca23
leaq -0x580(%rbp), %rdx
callq 0x40170
jmp 0x35fae
leaq -0x3c0(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x24, -0x584(%rbp)
leaq 0x66a5b(%rip), %rsi     # 0x9ca28
leaq -0x584(%rbp), %rdx
callq 0x40070
jmp 0x35fdb
leaq -0x398(%rbp), %rdi
movq %rdi, -0x558(%rbp)
movl $0x26, -0x588(%rbp)
leaq 0x66a44(%rip), %rsi     # 0x9ca3e
leaq -0x588(%rbp), %rdx
callq 0x401f0
jmp 0x36008
leaq -0x550(%rbp), %rax
movq %rax, -0x370(%rbp)
movq $0xc, -0x368(%rbp)
leaq -0x58b(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x3fd80
movq -0x758(%rbp), %rcx
movq -0x370(%rbp), %rsi
movq -0x368(%rbp), %rdx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %ecx
leaq -0x360(%rbp), %rdi
leaq -0x589(%rbp), %r8
leaq -0x58a(%rbp), %r9
callq 0x3fda0
jmp 0x3606f
leaq -0x58b(%rbp), %rdi
callq 0x3fe00
leaq -0x550(%rbp), %rax
movq %rax, -0x768(%rbp)
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, -0x760(%rbp)
movq -0x760(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x770(%rbp)
callq 0x3fd60
movq -0x768(%rbp), %rcx
movq -0x770(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x760(%rbp)
jne 0x36096
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x328(%rbp), %rcx
leaq -0x5b0(%rbp), %rdi
callq 0xa3f0
jmp 0x360e4
leaq -0x360(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x40270
movq %rax, -0x778(%rbp)
jmp 0x36100
movq -0x778(%rbp), %rax
movq %rax, -0x5b8(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x3fe50
movq %rax, -0x5c0(%rbp)
leaq -0x5b8(%rbp), %rdi
leaq -0x5c0(%rbp), %rsi
callq 0x3fe80
testb $0x1, %al
jne 0x3613d
jmp 0x3626b
leaq -0x5b8(%rbp), %rdi
callq 0x402a0
movq -0x6a0(%rbp), %rdi
movl 0x20(%rax), %eax
movl %eax, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
leaq -0x5b0(%rbp), %rsi
callq 0xa190
jmp 0x3616f
movl $0x1, -0x234(%rbp)
jmp 0x3629c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movq -0x558(%rbp), %rax
leaq -0x550(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x780(%rbp)
je 0x361d5
movq -0x780(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x788(%rbp)
callq 0x3fd60
movq -0x788(%rbp), %rax
leaq -0x550(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x780(%rbp)
jne 0x361a4
jmp 0x3648f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x58b(%rbp), %rdi
callq 0x3fe00
leaq -0x550(%rbp), %rax
movq %rax, -0x798(%rbp)
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, -0x790(%rbp)
movq -0x790(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x7a0(%rbp)
callq 0x3fd60
movq -0x798(%rbp), %rcx
movq -0x7a0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x790(%rbp)
jne 0x3620d
jmp 0x3648f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x362b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x5b0(%rbp), %rdi
callq 0xa240
jmp 0x362b9
movq -0x6a0(%rbp), %rdi
movl $0xa, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
leaq -0x5b0(%rbp), %rsi
callq 0xa190
jmp 0x36292
movl $0x1, -0x234(%rbp)
leaq -0x5b0(%rbp), %rdi
callq 0xa240
leaq -0x360(%rbp), %rdi
callq 0x402d0
jmp 0x36481
leaq -0x360(%rbp), %rdi
callq 0x402d0
jmp 0x3648f
movb $0x1, -0x681(%rbp)
movl $0x10, %edi
callq 0xa1d0
movq %rax, -0x7a8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x660(%rbp), %rdi
callq 0x402f0
jmp 0x362f4
leaq 0x66749(%rip), %rsi     # 0x9ca44
leaq -0x640(%rbp), %rdi
leaq -0x660(%rbp), %rdx
callq 0x12fb0
jmp 0x36310
leaq 0x66071(%rip), %rdx     # 0x9c388
leaq -0x620(%rbp), %rdi
leaq -0x640(%rbp), %rsi
callq 0x1ddc0
jmp 0x3632c
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x680(%rbp), %rdi
movl $0x5, %ecx
callq 0xa3f0
jmp 0x36347
leaq -0x600(%rbp), %rdi
leaq -0x620(%rbp), %rsi
leaq -0x680(%rbp), %rdx
callq 0x1de10
jmp 0x36363
leaq 0x6649b(%rip), %rdx     # 0x9c805
leaq -0x5e0(%rbp), %rdi
leaq -0x600(%rbp), %rsi
callq 0x1ddc0
jmp 0x3637f
movq -0x7a8(%rbp), %rdi
leaq -0x5e0(%rbp), %rsi
callq 0xa5f0
jmp 0x36394
movq -0x7a8(%rbp), %rdi
movb $0x0, -0x681(%rbp)
movq 0xb0c47(%rip), %rsi     # 0xe6ff0
movq 0xb0bd0(%rip), %rdx     # 0xe6f80
callq 0xa610
jmp 0x364cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36468
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3645c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36450
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36444
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36438
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3642c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x5e0(%rbp), %rdi
callq 0xa240
leaq -0x600(%rbp), %rdi
callq 0xa240
leaq -0x680(%rbp), %rdi
callq 0xa240
leaq -0x620(%rbp), %rdi
callq 0xa240
leaq -0x640(%rbp), %rdi
callq 0xa240
leaq -0x660(%rbp), %rdi
callq 0xa240
testb $0x1, -0x681(%rbp)
jne 0x36473
jmp 0x3647f
movq -0x7a8(%rbp), %rdi
callq 0xa2c0
jmp 0x3648f
leaq -0x270(%rbp), %rdi
callq 0x403d0
jmp 0x3649d
leaq -0x270(%rbp), %rdi
callq 0x403d0
jmp 0x364a8
leaq -0x70(%rbp), %rdi
callq 0x402d0
jmp 0x364b3
leaq -0x70(%rbp), %rdi
callq 0x402d0
jmp 0x364c3
movq -0x698(%rbp), %rax
addq $0x7b0, %rsp            # imm = 0x7B0
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0xa650
nopl (%rax)