// File: sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_call_func[abi:cxx11](pl0_ast_call_func const*)
pair<Value *, string> pl0_tac_call_func(pl0_ast_call_func const *stmt) {
    cout << __func__;
    // a single identifier can be a function id or just simple variable. STRATEGY: choose the nested one.
    string fid = stmt->fn->id;
    if (!stmt->args || stmt->args->args.empty()) {
        int d1 = valtb.depth(fid), d2 = vartb.depth(fid), d3 = functb.depth(fid);
        if (d1 > d2 && d1 > d3) {
            constant val; valtb.find(fid, true, val);
            return make_pair(new Value(val.val, val.dt), "integer");
        }
        if (d2 > d3) {
            variable var; vartb.find(fid, true, var);
            if (var.len != -1) {
                pl0_ast_error(stmt->loc, string("use an array ") + "\"" + var.name + "\"" + " as a factor.");
            }
            return make_pair(new Value(var.name, var.dt), var.type);
        }
    }
    if (!functb.find(fid, true)) {
        pl0_ast_error(stmt->loc, string("use of undeclared identifier ") + "\"" + fid + "\"");
    }
    std::vector<std::pair<Value *, std::string>> args;
    if (stmt->args) {
        for (auto argexpr: stmt->args->args) {
            auto arg = pl0_tac_expr(argexpr->arg);
            args.emplace(args.begin(), arg);
        }
    }
    func fn;
    functb.find(fid, true, fn);
    std::vector<std::pair<Value *, bool>> pushes; // <Value * val, bool is_ref>
    if (args.size() != fn.param_t.size()) {
        pl0_ast_error(stmt->args->loc, string("unmatched number of parameters and arguments."));
    }
    else {
        size_t len = args.size();
        for (size_t i = 0; i < args.size(); ++i) {
            bool is_ref = fn.param_t[len-1-i].length() > 4 && fn.param_t[len-1-i].substr(0, 4) == "ref_";
            // if (args[i].second != (is_ref ? fn.param_t[len-1-i].substr(4) : fn.param_t[len-1-i])) {
            //     pl0_ast_error(stmt->args->args[i]->loc, string("unmatched type of parameter and argument."));
            // }
            if (is_ref) {
                if (args[i].first->t == Value::TYPE::IMM || (args[i].first->sv.back() != '#' && args[i].first->sv.front() == '~')) {
                    pl0_ast_error(stmt->args->args[i]->loc, string("use constant or expression as reference value."));
                }
                pushes.emplace_back(make_pair(args[i].first, true));
            }
            else {
                pushes.emplace_back(make_pair(args[i].first, false));
            }
        }
    }
    string retval = irb.makeret();
    irb.emit("call", new Value(fn.name, "string"), pushes, new Value(retval, fn.rettype));
    irb.emit("label", new Value(irb.makelabel(), "integer"), new Value("allsuffix", "string"));
    return make_pair(new Value(retval, fn.rettype), fn.rettype);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x790, %rsp            # imm = 0x790
movq %rdi, -0x680(%rbp)
movq %rdi, %rax
movq %rax, -0x678(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xa2a6d(%rip), %rdi     # 0x15efd8
leaq 0x356bd(%rip), %rsi     # 0xf1c2f
callq 0x5330
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
leaq -0x30(%rbp), %rdi
callq 0x5150
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xbc5b1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
callq 0xc0a30
testb $0x1, %al
jne 0xbc5b1
jmp 0xbcae8
leaq 0xa4190(%rip), %rdi     # 0x160748
leaq -0x30(%rbp), %rsi
callq 0xc04e0
movl %eax, -0x684(%rbp)
jmp 0xbc5c9
movl -0x684(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq 0xa413f(%rip), %rdi     # 0x160718
leaq -0x30(%rbp), %rsi
callq 0xbf460
movl %eax, -0x688(%rbp)
jmp 0xbc5ea
movl -0x688(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq 0xa41ae(%rip), %rdi     # 0x1607a8
leaq -0x30(%rbp), %rsi
callq 0xbf2b0
movl %eax, -0x68c(%rbp)
jmp 0xbc60b
movl -0x68c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x48(%rbp), %eax
jle 0xbc7ac
movl -0x34(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jle 0xbc7ac
leaq -0x98(%rbp), %rdi
callq 0xc0410
jmp 0xbc63a
leaq 0xa4107(%rip), %rdi     # 0x160748
leaq -0x30(%rbp), %rsi
movl $0x1, %edx
leaq -0x98(%rbp), %rcx
callq 0xc0690
jmp 0xbc658
movl $0x48, %edi
callq 0x5340
movq %rax, -0x698(%rbp)
jmp 0xbc66b
movb $0x1, -0xd1(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x69c(%rbp)
leaq -0x70(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x5150
jmp 0xbc68d
movl -0x69c(%rbp), %esi
movq -0x698(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0xbdfe0
jmp 0xbc6a8
movq -0x698(%rbp), %rax
movb $0x0, -0xd1(%rbp)
movq %rax, -0xb0(%rbp)
leaq 0x32b83(%rip), %rsi     # 0xef247
leaq -0xb0(%rbp), %rdi
callq 0xc0850
movq %rdx, -0x6b0(%rbp)
movq %rax, -0x6a8(%rbp)
jmp 0xbc6e0
movq -0x680(%rbp), %rdi
movq -0x6b0(%rbp), %rax
movq -0x6a8(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movq %rax, -0xa0(%rbp)
leaq -0xa8(%rbp), %rsi
callq 0xc0a70
jmp 0xbc711
leaq -0xd0(%rbp), %rdi
callq 0x5200
movl $0x1, -0xd8(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xbe980
jmp 0xbd9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd9ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc79b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc77d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5200
testb $0x1, -0xd1(%rbp)
jne 0xbc788
jmp 0xbc799
movq -0x698(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbc79b
leaq -0x98(%rbp), %rdi
callq 0xbe980
jmp 0xbd9ec
movl -0x48(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jle 0xbcae6
leaq -0x140(%rbp), %rdi
callq 0xbf1b0
jmp 0xbc7c6
leaq 0xa3f4b(%rip), %rdi     # 0x160718
leaq -0x30(%rbp), %rsi
movl $0x1, %edx
leaq -0x140(%rbp), %rcx
callq 0xbf8a0
jmp 0xbc7e4
cmpl $-0x1, -0xe0(%rbp)
je 0xbc9b3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x148(%rbp)
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x6b8(%rbp)
callq 0x55d0
movq -0x6b8(%rbp), %rdx
leaq 0x34b68(%rip), %rsi     # 0xf1388
leaq -0x1e8(%rbp), %rdi
callq 0x19840
jmp 0xbc82e
leaq 0x34ee6(%rip), %rdx     # 0xf171b
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x1a380
jmp 0xbc84a
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x1a4d0
jmp 0xbc866
leaq 0x34eae(%rip), %rdx     # 0xf171b
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x1a380
jmp 0xbc882
leaq 0x34a95(%rip), %rdx     # 0xf131e
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x1a380
jmp 0xbc89e
movq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0xae910
jmp 0xbc8b3
leaq -0x168(%rbp), %rdi
callq 0x5200
leaq -0x188(%rbp), %rdi
callq 0x5200
leaq -0x1a8(%rbp), %rdi
callq 0x5200
leaq -0x1c8(%rbp), %rdi
callq 0x5200
leaq -0x1e8(%rbp), %rdi
callq 0x5200
leaq -0x1e9(%rbp), %rdi
callq 0x53c0
jmp 0xbc9b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc9a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc996
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc98a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc97e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc972
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x5200
leaq -0x188(%rbp), %rdi
callq 0x5200
leaq -0x1a8(%rbp), %rdi
callq 0x5200
leaq -0x1c8(%rbp), %rdi
callq 0x5200
leaq -0x1e8(%rbp), %rdi
callq 0x5200
leaq -0x1e9(%rbp), %rdi
callq 0x53c0
jmp 0xbcad5
movl $0x48, %edi
callq 0x5340
movq %rax, -0x6c0(%rbp)
jmp 0xbc9c6
movb $0x1, -0x239(%rbp)
leaq -0x218(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x5150
jmp 0xbc9e2
leaq -0x120(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x5150
jmp 0xbc9f7
movq -0x6c0(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0xbeae0
jmp 0xbca13
movq -0x680(%rbp), %rdi
movq -0x6c0(%rbp), %rax
movb $0x0, -0x239(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x100(%rbp), %rdx
leaq -0x1f8(%rbp), %rsi
callq 0xc08d0
jmp 0xbca44
leaq -0x238(%rbp), %rdi
callq 0x5200
leaq -0x218(%rbp), %rdi
callq 0x5200
movl $0x1, -0xd8(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xbeaa0
jmp 0xbd9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcab7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcaab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x5200
leaq -0x218(%rbp), %rdi
callq 0x5200
testb $0x1, -0x239(%rbp)
jne 0xbcac2
jmp 0xbcad3
movq -0x6c0(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbcad5
leaq -0x140(%rbp), %rdi
callq 0xbeaa0
jmp 0xbd9ec
jmp 0xbcae8
leaq 0xa3cb9(%rip), %rdi     # 0x1607a8
leaq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0xbed20
movb %al, -0x6c1(%rbp)
jmp 0xbcb05
movb -0x6c1(%rbp), %al
testb $0x1, %al
jne 0xbcc7e
jmp 0xbcb15
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x248(%rbp)
leaq -0x2c9(%rbp), %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x55d0
movq -0x6d0(%rbp), %rdx
leaq 0x3461f(%rip), %rsi     # 0xf1163
leaq -0x2c8(%rbp), %rdi
callq 0x19840
jmp 0xbcb52
leaq 0x34bc2(%rip), %rdx     # 0xf171b
leaq -0x2a8(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x1a380
jmp 0xbcb6e
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x1a4d0
jmp 0xbcb87
leaq 0x34b8d(%rip), %rdx     # 0xf171b
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x1a380
jmp 0xbcba3
movq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0xae910
jmp 0xbcbb8
leaq -0x268(%rbp), %rdi
callq 0x5200
leaq -0x288(%rbp), %rdi
callq 0x5200
leaq -0x2a8(%rbp), %rdi
callq 0x5200
leaq -0x2c8(%rbp), %rdi
callq 0x5200
leaq -0x2c9(%rbp), %rdi
callq 0x53c0
jmp 0xbcc7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcc6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcc61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcc55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcc49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5200
leaq -0x288(%rbp), %rdi
callq 0x5200
leaq -0x2a8(%rbp), %rdi
callq 0x5200
leaq -0x2c8(%rbp), %rdi
callq 0x5200
leaq -0x2c9(%rbp), %rdi
callq 0x53c0
jmp 0xbd9ec
leaq -0x2e8(%rbp), %rdi
callq 0xbfca0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xbcdc8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x8, %rax
movq %rax, -0x2f0(%rbp)
movq -0x2f0(%rbp), %rdi
callq 0x7db00
movq %rax, -0x2f8(%rbp)
movq -0x2f0(%rbp), %rdi
callq 0x7f5a0
movq %rax, -0x300(%rbp)
leaq -0x2f8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0xbfcc0
testb $0x1, %al
jne 0xbccee
jmp 0xbcdc6
leaq -0x2f8(%rbp), %rdi
callq 0x7fe10
movq (%rax), %rax
movq %rax, -0x308(%rbp)
movq -0x308(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x330(%rbp), %rdi
callq 0xba600
jmp 0xbcd1d
leaq -0x2e8(%rbp), %rdi
movq %rdi, -0x6e0(%rbp)
callq 0xbfd40
movq %rax, -0x340(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0xbfd70
movq -0x6e0(%rbp), %rdi
movq -0x338(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0xc0af0
movq %rax, -0x6d8(%rbp)
jmp 0xbcd6d
movq -0x6d8(%rbp), %rax
movq %rax, -0x348(%rbp)
leaq -0x330(%rbp), %rdi
callq 0xbf290
leaq -0x2f8(%rbp), %rdi
callq 0xbfdb0
jmp 0xbccd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd9c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x330(%rbp), %rdi
callq 0xbf290
jmp 0xbd9c5
jmp 0xbcdc8
leaq -0x3a0(%rbp), %rdi
callq 0xbf610
jmp 0xbcdd6
leaq 0xa39cb(%rip), %rdi     # 0x1607a8
leaq -0x30(%rbp), %rsi
movl $0x1, %edx
leaq -0x3a0(%rbp), %rcx
callq 0xbf6e0
jmp 0xbcdf4
leaq -0x3b8(%rbp), %rdi
callq 0xc0010
leaq -0x2e8(%rbp), %rdi
callq 0xc0030
movq %rax, -0x6e8(%rbp)
leaq -0x3a0(%rbp), %rdi
addq $0x40, %rdi
callq 0xa3e70
movq %rax, %rcx
movq -0x6e8(%rbp), %rax
cmpq %rcx, %rax
je 0xbcef1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x3c0(%rbp)
leaq -0x3e1(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x55d0
movq -0x6f0(%rbp), %rdx
leaq 0x343a8(%rip), %rsi     # 0xf1211
leaq -0x3e0(%rbp), %rdi
callq 0x19840
jmp 0xbce77
movq -0x3c0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0xae910
jmp 0xbce8c
leaq -0x3e0(%rbp), %rdi
callq 0x5200
leaq -0x3e1(%rbp), %rdi
callq 0x53c0
jmp 0xbd2ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd9b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbcee0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x5200
leaq -0x3e1(%rbp), %rdi
callq 0x53c0
jmp 0xbd9ad
leaq -0x2e8(%rbp), %rdi
callq 0xc0030
movq %rax, -0x3f0(%rbp)
movq $0x0, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rax
movq %rax, -0x6f8(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0xc0030
movq %rax, %rcx
movq -0x6f8(%rbp), %rax
cmpq %rcx, %rax
jae 0xbd2ac
leaq -0x3a0(%rbp), %rdi
addq $0x40, %rdi
movq -0x3f0(%rbp), %rsi
subq $0x1, %rsi
subq -0x3f8(%rbp), %rsi
callq 0xc0060
movq %rax, %rdi
callq 0x54e0
movq %rax, %rcx
movb $0x0, -0x421(%rbp)
xorl %eax, %eax
cmpq $0x4, %rcx
movb %al, -0x6f9(%rbp)
jbe 0xbcfe8
leaq -0x360(%rbp), %rdi
movq -0x3f0(%rbp), %rax
movq -0x3f8(%rbp), %rsi
notq %rsi
addq %rax, %rsi
callq 0xc0060
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x420(%rbp), %rdi
movl $0x4, %ecx
callq 0x5380
jmp 0xbcfb8
movb $0x1, -0x421(%rbp)
leaq 0x34137(%rip), %rsi     # 0xf10fd
leaq -0x420(%rbp), %rdi
callq 0x2a580
movb %al, -0x6fa(%rbp)
jmp 0xbcfda
movb -0x6fa(%rbp), %al
movb %al, -0x6f9(%rbp)
jmp 0xbcfe8
movb -0x6f9(%rbp), %al
movb %al, -0x6fb(%rbp)
testb $0x1, -0x421(%rbp)
jne 0xbcfff
jmp 0xbd00b
leaq -0x420(%rbp), %rdi
callq 0x5200
movb -0x6fb(%rbp), %al
andb $0x1, %al
movb %al, -0x3f9(%rbp)
testb $0x1, -0x3f9(%rbp)
je 0xbd210
movq -0x3f8(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
callq 0xc0080
movq (%rax), %rax
cmpl $0x0, (%rax)
je 0xbd097
movq -0x3f8(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
callq 0xc0080
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x5270
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0xbd18a
movq -0x3f8(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
callq 0xc0080
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x50d0
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0xbd18a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rdi
movq -0x3f8(%rbp), %rsi
callq 0xc00a0
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x430(%rbp)
leaq -0x451(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x55d0
movq -0x708(%rbp), %rdx
leaq 0x34162(%rip), %rsi     # 0xf123f
leaq -0x450(%rbp), %rdi
callq 0x19840
jmp 0xbd0eb
movq -0x430(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0xae910
jmp 0xbd100
leaq -0x450(%rbp), %rdi
callq 0x5200
leaq -0x451(%rbp), %rdi
callq 0x53c0
jmp 0xbd18a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd9ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x421(%rbp)
jne 0xbd142
jmp 0xbd14e
leaq -0x420(%rbp), %rdi
callq 0x5200
jmp 0xbd9ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x5200
leaq -0x451(%rbp), %rdi
callq 0x53c0
jmp 0xbd9ad
movq -0x3f8(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
callq 0xc0080
movq %rax, %rdi
movb $0x1, -0x469(%rbp)
leaq -0x469(%rbp), %rsi
callq 0xc0140
movb %dl, -0x711(%rbp)
movq %rax, -0x710(%rbp)
jmp 0xbd1c2
movb -0x711(%rbp), %al
movq -0x710(%rbp), %rcx
movq %rcx, -0x480(%rbp)
movb %al, -0x478(%rbp)
movb -0x478(%rbp), %al
movb %al, -0x460(%rbp)
movq -0x480(%rbp), %rax
movq %rax, -0x468(%rbp)
leaq -0x3b8(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0xc00c0
jmp 0xbd20b
jmp 0xbd293
movq -0x3f8(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
callq 0xc0080
movq %rax, %rdi
movb $0x0, -0x491(%rbp)
leaq -0x491(%rbp), %rsi
callq 0xc0140
movb %dl, -0x721(%rbp)
movq %rax, -0x720(%rbp)
jmp 0xbd248
movb -0x721(%rbp), %al
movq -0x720(%rbp), %rcx
movq %rcx, -0x4a8(%rbp)
movb %al, -0x4a0(%rbp)
movb -0x4a0(%rbp), %al
movb %al, -0x488(%rbp)
movq -0x4a8(%rbp), %rax
movq %rax, -0x490(%rbp)
leaq -0x3b8(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0xc00c0
jmp 0xbd291
jmp 0xbd293
jmp 0xbd295
movq -0x3f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x3f8(%rbp)
jmp 0xbcf0f
jmp 0xbd2ae
leaq 0xa341b(%rip), %rsi     # 0x1606d0
leaq -0x4c8(%rbp), %rdi
callq 0xa0280
jmp 0xbd2c3
leaq -0x4e9(%rbp), %rdi
movq %rdi, -0x730(%rbp)
callq 0x55d0
movq -0x730(%rbp), %rdx
leaq 0x32ec7(%rip), %rsi     # 0xf01ab
leaq -0x4e8(%rbp), %rdi
callq 0x19840
jmp 0xbd2f2
movl $0x48, %edi
callq 0x5340
movq %rax, -0x738(%rbp)
jmp 0xbd305
movb $0x1, -0x532(%rbp)
leaq -0x510(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x5150
jmp 0xbd321
leaq -0x531(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x55d0
movq -0x740(%rbp), %rdx
leaq 0x3465e(%rip), %rsi     # 0xf19a0
leaq -0x530(%rbp), %rdi
callq 0x19840
jmp 0xbd350
movq -0x738(%rbp), %rdi
leaq -0x510(%rbp), %rsi
leaq -0x530(%rbp), %rdx
callq 0xbeae0
jmp 0xbd36c
movb $0x0, -0x532(%rbp)
movl $0x48, %edi
callq 0x5340
movq %rax, -0x748(%rbp)
jmp 0xbd386
movb $0x1, -0x579(%rbp)
leaq -0x558(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x5150
jmp 0xbd3a2
leaq -0x380(%rbp), %rsi
leaq -0x578(%rbp), %rdi
callq 0x5150
jmp 0xbd3b7
movq -0x748(%rbp), %rdi
leaq -0x558(%rbp), %rsi
leaq -0x578(%rbp), %rdx
callq 0xbeae0
jmp 0xbd3d3
movq -0x748(%rbp), %r8
movq -0x738(%rbp), %rdx
movb $0x0, -0x579(%rbp)
leaq 0xa32e1(%rip), %rdi     # 0x1606d0
leaq -0x4e8(%rbp), %rsi
leaq -0x3b8(%rbp), %rcx
callq 0xc0170
jmp 0xbd404
leaq -0x578(%rbp), %rdi
callq 0x5200
leaq -0x558(%rbp), %rdi
callq 0x5200
leaq -0x530(%rbp), %rdi
callq 0x5200
leaq -0x531(%rbp), %rdi
callq 0x53c0
leaq -0x510(%rbp), %rdi
callq 0x5200
leaq -0x4e8(%rbp), %rdi
callq 0x5200
leaq -0x4e9(%rbp), %rdi
callq 0x53c0
leaq -0x5a1(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x55d0
movq -0x750(%rbp), %rdx
leaq 0x33df5(%rip), %rsi     # 0xf126e
leaq -0x5a0(%rbp), %rdi
callq 0x19840
jmp 0xbd487
movl $0x48, %edi
callq 0x5340
movq %rax, -0x758(%rbp)
jmp 0xbd49a
movb $0x1, -0x5ca(%rbp)
leaq 0xa3228(%rip), %rdi     # 0x1606d0
callq 0xa01e0
movl %eax, -0x75c(%rbp)
jmp 0xbd4b5
leaq -0x5c9(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x55d0
movq -0x768(%rbp), %rdx
leaq 0x31d71(%rip), %rsi     # 0xef247
leaq -0x5c8(%rbp), %rdi
callq 0x19840
jmp 0xbd4e4
movl -0x75c(%rbp), %esi
movq -0x758(%rbp), %rdi
leaq -0x5c8(%rbp), %rdx
callq 0xbdfe0
jmp 0xbd4ff
movb $0x0, -0x5ca(%rbp)
movl $0x48, %edi
callq 0x5340
movq %rax, -0x770(%rbp)
jmp 0xbd519
movb $0x1, -0x61a(%rbp)
leaq -0x5f1(%rbp), %rdi
movq %rdi, -0x778(%rbp)
callq 0x55d0
movq -0x778(%rbp), %rdx
leaq 0x33d33(%rip), %rsi     # 0xf1274
leaq -0x5f0(%rbp), %rdi
callq 0x19840
jmp 0xbd54f
leaq -0x619(%rbp), %rdi
movq %rdi, -0x780(%rbp)
callq 0x55d0
movq -0x780(%rbp), %rdx
leaq 0x34430(%rip), %rsi     # 0xf19a0
leaq -0x618(%rbp), %rdi
callq 0x19840
jmp 0xbd57e
movq -0x770(%rbp), %rdi
leaq -0x5f0(%rbp), %rsi
leaq -0x618(%rbp), %rdx
callq 0xbeae0
jmp 0xbd59a
movq -0x770(%rbp), %rcx
movq -0x758(%rbp), %rdx
movb $0x0, -0x61a(%rbp)
leaq 0xa311a(%rip), %rdi     # 0x1606d0
xorl %eax, %eax
movl %eax, %r8d
leaq -0x5a0(%rbp), %rsi
callq 0xbdf00
jmp 0xbd5c9
leaq -0x618(%rbp), %rdi
callq 0x5200
leaq -0x619(%rbp), %rdi
callq 0x53c0
leaq -0x5f0(%rbp), %rdi
callq 0x5200
leaq -0x5f1(%rbp), %rdi
callq 0x53c0
leaq -0x5c8(%rbp), %rdi
callq 0x5200
leaq -0x5c9(%rbp), %rdi
callq 0x53c0
leaq -0x5a0(%rbp), %rdi
callq 0x5200
leaq -0x5a1(%rbp), %rdi
callq 0x53c0
movl $0x48, %edi
callq 0x5340
movq %rax, -0x788(%rbp)
jmp 0xbd63c
movb $0x1, -0x669(%rbp)
leaq -0x648(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x5150
jmp 0xbd658
leaq -0x380(%rbp), %rsi
leaq -0x668(%rbp), %rdi
callq 0x5150
jmp 0xbd66d
movq -0x788(%rbp), %rdi
leaq -0x648(%rbp), %rsi
leaq -0x668(%rbp), %rdx
callq 0xbeae0
jmp 0xbd689
movq -0x680(%rbp), %rdi
movq -0x788(%rbp), %rax
movb $0x0, -0x669(%rbp)
movq %rax, -0x628(%rbp)
leaq -0x380(%rbp), %rdx
leaq -0x628(%rbp), %rsi
callq 0xc08d0
jmp 0xbd6ba
leaq -0x668(%rbp), %rdi
callq 0x5200
leaq -0x648(%rbp), %rdi
callq 0x5200
movl $0x1, -0xd8(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x5200
leaq -0x3b8(%rbp), %rdi
callq 0xa4700
leaq -0x3a0(%rbp), %rdi
callq 0xbeff0
leaq -0x2e8(%rbp), %rdi
callq 0xc0250
jmp 0xbd9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd80c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd7e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd7ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd7be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd7a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd794
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x578(%rbp), %rdi
callq 0x5200
leaq -0x558(%rbp), %rdi
callq 0x5200
testb $0x1, -0x579(%rbp)
jne 0xbd7ab
jmp 0xbd7bc
movq -0x748(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbd7be
leaq -0x530(%rbp), %rdi
callq 0x5200
leaq -0x531(%rbp), %rdi
callq 0x53c0
leaq -0x510(%rbp), %rdi
callq 0x5200
testb $0x1, -0x532(%rbp)
jne 0xbd7ed
jmp 0xbd7fe
movq -0x738(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbd800
leaq -0x4e8(%rbp), %rdi
callq 0x5200
leaq -0x4e9(%rbp), %rdi
callq 0x53c0
jmp 0xbd9a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd91b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd8fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd8f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd8e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd8bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd8a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x5200
leaq -0x619(%rbp), %rdi
callq 0x53c0
leaq -0x5f0(%rbp), %rdi
callq 0x5200
leaq -0x5f1(%rbp), %rdi
callq 0x53c0
testb $0x1, -0x61a(%rbp)
jne 0xbd8d2
jmp 0xbd8e3
movq -0x770(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbd8e5
leaq -0x5c8(%rbp), %rdi
callq 0x5200
leaq -0x5c9(%rbp), %rdi
callq 0x53c0
testb $0x1, -0x5ca(%rbp)
jne 0xbd908
jmp 0xbd919
movq -0x758(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbd91b
leaq -0x5a0(%rbp), %rdi
callq 0x5200
leaq -0x5a1(%rbp), %rdi
callq 0x53c0
jmp 0xbd9a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd9a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd977
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x668(%rbp), %rdi
callq 0x5200
leaq -0x648(%rbp), %rdi
callq 0x5200
testb $0x1, -0x669(%rbp)
jne 0xbd98e
jmp 0xbd99f
movq -0x788(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xbd9a1
leaq -0x4c8(%rbp), %rdi
callq 0x5200
leaq -0x3b8(%rbp), %rdi
callq 0xa4700
leaq -0x3a0(%rbp), %rdi
callq 0xbeff0
leaq -0x2e8(%rbp), %rdi
callq 0xc0250
jmp 0xbd9ec
leaq -0x30(%rbp), %rdi
callq 0x5200
movq -0x678(%rbp), %rax
addq $0x790, %rsp            # imm = 0x790
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x5200
movq -0x40(%rbp), %rdi
callq 0x55b0
nop