// File: JameyWoo[P]csmile/cgen.cpp
// Function: cGen[abi:cxx11](TreeNode*)
string cGen(TreeNode* root) {
    if (root == NULL) return "";
    emitComment(root->nodekind);
    TreeNode* p1, *p2, *p3;
    if ("FunDecl" == root->nodekind) {
        p1 = root->child[2];
        p2 = root->child[3];
        // TODO: 添加函数参数的中间代码
        cGen(p2);
        cGen(root->sibling);
    } else if ("Compound" == root->nodekind) {
        p1 = root->child[0];
        p2 = root->child[1];
        cGen(p1);
        cGen(p2);
    } else if ("LocVarDecl" == root->nodekind) {
        // cGen(root->child[1]);
        cGen(root->sibling);
    } else if ("Assign" == root->nodekind) {
        int addr = st_lookup(root->child[0]->name);
        if (addr != -1) {
            string left = getR();
            emit("LD " + left + ", " + to_string(symtabs[root->child[0]->name].addr) + "\n");
            string reg = cGen(root->child[1]);
            // int right_addr = st_lookup(root->child[1]->name); 
            emit("[" + left + "]" + " = " + reg + "\n");
        } else {
            error("no such a id");
        }
        cGen(root->sibling);
    } else if ("Selection" == root->nodekind) {
        string cond = root->child[0]->name;  // 条件
        string l1 = getL(), l2 = getL();
        emit("if " + cGen(root->child[0]));
        emit(" goto ");
        emit(l1 + "\n");
        emit("goto ");
        emit(l2 + "\n");
        emit(l1 + ":\n");
        cGen(root->child[1]);
        emit(l2 + ":\n");
        cGen(root->sibling);  // * 这句一定要加
    } else if ("Iteration" == root->nodekind) {
        string l1 = getL(), l2 = getL();
        emit(l1 + ":\n");
        emit("if " + cGen(root->child[0]));
        emit(" goto ");
        emit(l2 + "\n");
        cGen(root->child[1]);
        emit(l2 + ":\n");
    } else if ("CompareOp" == root->nodekind) {
        // 比较操作符, 作为
        string reg1 = getR(), reg2 = cGen(root->child[0]), reg3 = cGen(root->child[1]);
        emit(reg1 + " = " + reg2 + " " + root->op + " " + reg3 + "\n");
        return reg1;
    } else if ("PMOp" == root->nodekind || "MDOp" == root->nodekind) {
        string reg1 = getR(), reg2 = cGen(root->child[0]), reg3 = cGen(root->child[1]);
        emit(reg1 + " = " + reg2 + " + " + reg3 + "\n");
        return reg1;
    } else if ("Id" == root->nodekind) {
        if (st_lookup(root->name) != -1) {
            string reg = getR();
            emit("LD " + reg + ", [" + to_string(symtabs[root->name].addr) + "]\n");
            return reg;
        } else {
            error("no such a id !!!");
            return "";
        }
    } else if ("Const" == root->nodekind) {
        string reg = getR();
        emit("LD " + reg + " " + to_string(root->val) + "\n");
        return reg;
    }
    return "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa00, %rsp            # imm = 0xA00
movq %rdi, -0x980(%rbp)
movq %rdi, %rax
movq %rax, -0x978(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x15cef
leaq -0x11(%rbp), %rdi
movq %rdi, -0x988(%rbp)
callq 0x3480
movq -0x980(%rbp), %rdi
movq -0x988(%rbp), %rdx
leaq 0xb9d5(%rip), %rsi      # 0x21695
callq 0x4ef0
jmp 0x15cc7
leaq -0x11(%rbp), %rdi
callq 0x32d0
jmp 0x17466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x32d0
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x990(%rbp)
callq 0x3120
movq -0x990(%rbp), %rdi
callq 0x17700
jmp 0x15d15
leaq -0x48(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xb508(%rip), %rdi      # 0x21235
callq 0x175b0
testb $0x1, %al
jne 0x15d38
jmp 0x15da5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x15c70
leaq -0x80(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x15c70
leaq -0xa0(%rbp), %rdi
callq 0x34e8
jmp 0x1740f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xb46e(%rip), %rdi      # 0x21222
callq 0x175b0
testb $0x1, %al
jne 0x15dbf
jmp 0x15e13
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x15c70
leaq -0xc0(%rbp), %rdi
callq 0x34e8
movq -0x58(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x15c70
leaq -0xe0(%rbp), %rdi
callq 0x34e8
jmp 0x1740d
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xb394(%rip), %rdi      # 0x211b6
callq 0x175b0
testb $0x1, %al
jne 0x15e2d
jmp 0x15e52
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x100(%rbp), %rdi
callq 0x15c70
leaq -0x100(%rbp), %rdi
callq 0x34e8
jmp 0x1740b
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xb3cd(%rip), %rdi      # 0x2122e
callq 0x175b0
testb $0x1, %al
jne 0x15e6f
jmp 0x162ee
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0xc0, %rsi
leaq -0x128(%rbp), %rdi
movq %rdi, -0x9a0(%rbp)
callq 0x3120
movq -0x9a0(%rbp), %rdi
callq 0x108f0
movl %eax, -0x994(%rbp)
jmp 0x15ea4
leaq -0x128(%rbp), %rdi
callq 0x34e8
movl -0x994(%rbp), %eax
movl %eax, -0x104(%rbp)
cmpl $-0x1, -0x104(%rbp)
je 0x1623b
leaq -0x148(%rbp), %rdi
movq %rdi, -0x9a8(%rbp)
callq 0x15bf0
movq -0x9a8(%rbp), %rdx
leaq 0xb720(%rip), %rsi      # 0x2160a
leaq -0x1c8(%rbp), %rdi
callq 0x10740
jmp 0x15ef8
leaq 0xb898(%rip), %rdx      # 0x21797
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xf3c0
jmp 0x15f14
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0xc0, %rsi
leaq 0x18b2f(%rip), %rdi     # 0x2ea58
callq 0x11210
movq %rax, -0x9b0(%rbp)
jmp 0x15f37
movq -0x9b0(%rbp), %rax
movl 0x20(%rax), %esi
leaq -0x1e8(%rbp), %rdi
callq 0xf460
jmp 0x15f4f
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0x175e0
jmp 0x15f6b
leaq 0xb3ed(%rip), %rdx      # 0x2135f
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xf3c0
jmp 0x15f87
leaq -0x168(%rbp), %rdi
callq 0x17750
jmp 0x15f95
leaq -0x168(%rbp), %rdi
callq 0x34e8
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x1e8(%rbp), %rdi
callq 0x34e8
leaq -0x1a8(%rbp), %rdi
callq 0x34e8
leaq -0x1c8(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x208(%rbp), %rdi
callq 0x15c70
jmp 0x15fe7
leaq 0xb644(%rip), %rsi      # 0x21632
leaq -0x2a8(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x10740
jmp 0x16003
leaq 0xb604(%rip), %rdx      # 0x2160e
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0xf3c0
jmp 0x1601f
leaq 0xb5ea(%rip), %rdx      # 0x21610
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0xf3c0
jmp 0x1603b
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x208(%rbp), %rdx
callq 0x176b0
jmp 0x16057
leaq 0xb301(%rip), %rdx      # 0x2135f
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xf3c0
jmp 0x16073
leaq -0x228(%rbp), %rdi
callq 0x17750
jmp 0x16081
leaq -0x228(%rbp), %rdi
callq 0x34e8
leaq -0x248(%rbp), %rdi
callq 0x34e8
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x288(%rbp), %rdi
callq 0x34e8
leaq -0x2a8(%rbp), %rdi
callq 0x34e8
leaq -0x208(%rbp), %rdi
callq 0x34e8
leaq -0x148(%rbp), %rdi
callq 0x34e8
jmp 0x162c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1622a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1617c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16170
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16164
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x34e8
leaq -0x188(%rbp), %rdi
callq 0x34e8
leaq -0x1e8(%rbp), %rdi
callq 0x34e8
leaq -0x1a8(%rbp), %rdi
callq 0x34e8
leaq -0x1c8(%rbp), %rdi
callq 0x34e8
jmp 0x1622a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1621e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16212
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16206
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x161fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x161ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x34e8
leaq -0x248(%rbp), %rdi
callq 0x34e8
leaq -0x268(%rbp), %rdi
callq 0x34e8
leaq -0x288(%rbp), %rdi
callq 0x34e8
leaq -0x2a8(%rbp), %rdi
callq 0x34e8
leaq -0x208(%rbp), %rdi
callq 0x34e8
leaq -0x148(%rbp), %rdi
callq 0x34e8
jmp 0x17476
leaq -0x2c9(%rbp), %rdi
movq %rdi, -0x9b8(%rbp)
callq 0x3480
movq -0x9b8(%rbp), %rdx
leaq 0xb3b8(%rip), %rsi      # 0x21614
leaq -0x2c8(%rbp), %rdi
callq 0x4ef0
jmp 0x1626a
leaq -0x2c8(%rbp), %rdi
callq 0x11010
jmp 0x16278
leaq -0x2c8(%rbp), %rdi
callq 0x34e8
leaq -0x2c9(%rbp), %rdi
callq 0x32d0
jmp 0x162c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x162b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x34e8
leaq -0x2c9(%rbp), %rdi
callq 0x32d0
jmp 0x17476
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x2f0(%rbp), %rdi
callq 0x15c70
leaq -0x2f0(%rbp), %rdi
callq 0x34e8
jmp 0x17409
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xaec4(%rip), %rdi      # 0x211c1
callq 0x175b0
testb $0x1, %al
jne 0x1630b
jmp 0x166ee
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0xc0, %rsi
leaq -0x310(%rbp), %rdi
callq 0x3120
leaq -0x330(%rbp), %rdi
callq 0x15b70
jmp 0x16333
leaq -0x350(%rbp), %rdi
callq 0x15b70
jmp 0x16341
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x390(%rbp), %rdi
callq 0x15c70
jmp 0x16356
leaq 0xb2c4(%rip), %rsi      # 0x21621
leaq -0x370(%rbp), %rdi
leaq -0x390(%rbp), %rdx
callq 0xf410
jmp 0x16372
leaq -0x370(%rbp), %rdi
callq 0x17750
jmp 0x16380
leaq -0x370(%rbp), %rdi
callq 0x34e8
leaq -0x390(%rbp), %rdi
callq 0x34e8
leaq -0x3b1(%rbp), %rdi
movq %rdi, -0x9c0(%rbp)
callq 0x3480
movq -0x9c0(%rbp), %rdx
leaq 0xb26c(%rip), %rsi      # 0x21625
leaq -0x3b0(%rbp), %rdi
callq 0x4ef0
jmp 0x163c7
leaq -0x3b0(%rbp), %rdi
callq 0x17750
jmp 0x163d5
leaq -0x3b0(%rbp), %rdi
callq 0x34e8
leaq -0x3b1(%rbp), %rdi
callq 0x32d0
leaq 0xaf6b(%rip), %rdx      # 0x2135f
leaq -0x3d8(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0xdc30
jmp 0x16409
leaq -0x3d8(%rbp), %rdi
callq 0x17750
jmp 0x16417
leaq -0x3d8(%rbp), %rdi
callq 0x34e8
leaq -0x3f9(%rbp), %rdi
movq %rdi, -0x9c8(%rbp)
callq 0x3480
movq -0x9c8(%rbp), %rdx
leaq 0xb1e2(%rip), %rsi      # 0x21626
leaq -0x3f8(%rbp), %rdi
callq 0x4ef0
jmp 0x16452
leaq -0x3f8(%rbp), %rdi
callq 0x17750
jmp 0x16460
leaq -0x3f8(%rbp), %rdi
callq 0x34e8
leaq -0x3f9(%rbp), %rdi
callq 0x32d0
leaq 0xaee0(%rip), %rdx      # 0x2135f
leaq -0x420(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0xdc30
jmp 0x16494
leaq -0x420(%rbp), %rdi
callq 0x17750
jmp 0x164a2
leaq -0x420(%rbp), %rdi
callq 0x34e8
leaq 0xae33(%rip), %rdx      # 0x212e8
leaq -0x440(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0xdc30
jmp 0x164ca
leaq -0x440(%rbp), %rdi
callq 0x17750
jmp 0x164d8
leaq -0x440(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x460(%rbp), %rdi
callq 0x15c70
jmp 0x164fa
leaq -0x460(%rbp), %rdi
callq 0x34e8
leaq 0xaddb(%rip), %rdx      # 0x212e8
leaq -0x480(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0xdc30
jmp 0x16522
leaq -0x480(%rbp), %rdi
callq 0x17750
jmp 0x16530
leaq -0x480(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x4a0(%rbp), %rdi
callq 0x15c70
jmp 0x16552
leaq -0x4a0(%rbp), %rdi
callq 0x34e8
leaq -0x350(%rbp), %rdi
callq 0x34e8
leaq -0x330(%rbp), %rdi
callq 0x34e8
leaq -0x310(%rbp), %rdi
callq 0x34e8
jmp 0x17407
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x166dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x166d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x165e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x370(%rbp), %rdi
callq 0x34e8
leaq -0x390(%rbp), %rdi
callq 0x34e8
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16617
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x34e8
leaq -0x3b1(%rbp), %rdi
callq 0x32d0
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x34e8
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1666b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x34e8
leaq -0x3f9(%rbp), %rdi
callq 0x32d0
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x34e8
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x34e8
jmp 0x166c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x480(%rbp), %rdi
callq 0x34e8
leaq -0x350(%rbp), %rdi
callq 0x34e8
leaq -0x330(%rbp), %rdi
callq 0x34e8
leaq -0x310(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xaace(%rip), %rdi      # 0x211cb
callq 0x175b0
testb $0x1, %al
jne 0x1670b
jmp 0x169a8
leaq -0x4c0(%rbp), %rdi
callq 0x15b70
leaq -0x4e0(%rbp), %rdi
callq 0x15b70
jmp 0x16725
leaq 0xabbc(%rip), %rdx      # 0x212e8
leaq -0x500(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0xdc30
jmp 0x16741
leaq -0x500(%rbp), %rdi
callq 0x17750
jmp 0x1674f
leaq -0x500(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x540(%rbp), %rdi
callq 0x15c70
jmp 0x16770
leaq 0xaeaa(%rip), %rsi      # 0x21621
leaq -0x520(%rbp), %rdi
leaq -0x540(%rbp), %rdx
callq 0xf410
jmp 0x1678c
leaq -0x520(%rbp), %rdi
callq 0x17750
jmp 0x1679a
leaq -0x520(%rbp), %rdi
callq 0x34e8
leaq -0x540(%rbp), %rdi
callq 0x34e8
leaq -0x561(%rbp), %rdi
movq %rdi, -0x9d0(%rbp)
callq 0x3480
movq -0x9d0(%rbp), %rdx
leaq 0xae52(%rip), %rsi      # 0x21625
leaq -0x560(%rbp), %rdi
callq 0x4ef0
jmp 0x167e1
leaq -0x560(%rbp), %rdi
callq 0x17750
jmp 0x167ef
leaq -0x560(%rbp), %rdi
callq 0x34e8
leaq -0x561(%rbp), %rdi
callq 0x32d0
leaq 0xab51(%rip), %rdx      # 0x2135f
leaq -0x588(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0xdc30
jmp 0x16823
leaq -0x588(%rbp), %rdi
callq 0x17750
jmp 0x16831
leaq -0x588(%rbp), %rdi
callq 0x34e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x5a8(%rbp), %rdi
callq 0x15c70
jmp 0x16853
leaq -0x5a8(%rbp), %rdi
callq 0x34e8
leaq 0xaa82(%rip), %rdx      # 0x212e8
leaq -0x5c8(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0xdc30
jmp 0x1687b
leaq -0x5c8(%rbp), %rdi
callq 0x17750
jmp 0x16889
leaq -0x5c8(%rbp), %rdi
callq 0x34e8
leaq -0x4e0(%rbp), %rdi
callq 0x34e8
leaq -0x4c0(%rbp), %rdi
callq 0x34e8
jmp 0x17405
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1698b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x34e8
jmp 0x1698b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16917
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x520(%rbp), %rdi
callq 0x34e8
leaq -0x540(%rbp), %rdi
callq 0x34e8
jmp 0x1698b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1694b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x34e8
leaq -0x561(%rbp), %rdi
callq 0x32d0
jmp 0x1698b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x34e8
jmp 0x1698b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x5c8(%rbp), %rdi
callq 0x34e8
leaq -0x4e0(%rbp), %rdi
callq 0x34e8
leaq -0x4c0(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xa6da(%rip), %rdi      # 0x21091
callq 0x175b0
testb $0x1, %al
jne 0x169c5
jmp 0x16c87
movq -0x980(%rbp), %rdi
movb $0x0, -0x5c9(%rbp)
callq 0x15bf0
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x5f0(%rbp), %rdi
callq 0x15c70
jmp 0x169ed
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x610(%rbp), %rdi
callq 0x15c70
jmp 0x16a03
movq -0x980(%rbp), %rsi
leaq 0xabff(%rip), %rdx      # 0x21610
leaq -0x6f0(%rbp), %rdi
callq 0xdc30
jmp 0x16a1f
leaq -0x6d0(%rbp), %rdi
leaq -0x6f0(%rbp), %rsi
leaq -0x5f0(%rbp), %rdx
callq 0x176b0
jmp 0x16a3b
leaq 0xa88f(%rip), %rdx      # 0x212d1
leaq -0x6b0(%rbp), %rdi
leaq -0x6d0(%rbp), %rsi
callq 0xf3c0
jmp 0x16a57
movq -0x10(%rbp), %rdx
addq $0x98, %rdx
leaq -0x690(%rbp), %rdi
leaq -0x6b0(%rbp), %rsi
callq 0x176b0
jmp 0x16a77
leaq 0xa853(%rip), %rdx      # 0x212d1
leaq -0x670(%rbp), %rdi
leaq -0x690(%rbp), %rsi
callq 0xf3c0
jmp 0x16a93
leaq -0x650(%rbp), %rdi
leaq -0x670(%rbp), %rsi
leaq -0x610(%rbp), %rdx
callq 0x176b0
jmp 0x16aaf
leaq 0xa8a9(%rip), %rdx      # 0x2135f
leaq -0x630(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0xf3c0
jmp 0x16acb
leaq -0x630(%rbp), %rdi
callq 0x17750
jmp 0x16ad9
leaq -0x630(%rbp), %rdi
callq 0x34e8
leaq -0x650(%rbp), %rdi
callq 0x34e8
leaq -0x670(%rbp), %rdi
callq 0x34e8
leaq -0x690(%rbp), %rdi
callq 0x34e8
leaq -0x6b0(%rbp), %rdi
callq 0x34e8
leaq -0x6d0(%rbp), %rdi
callq 0x34e8
leaq -0x6f0(%rbp), %rdi
callq 0x34e8
movb $0x1, -0x5c9(%rbp)
leaq -0x610(%rbp), %rdi
callq 0x34e8
leaq -0x5f0(%rbp), %rdi
callq 0x34e8
testb $0x1, -0x5c9(%rbp)
jne 0x16c71
jmp 0x16c65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16c03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x34e8
leaq -0x650(%rbp), %rdi
callq 0x34e8
leaq -0x670(%rbp), %rdi
callq 0x34e8
leaq -0x690(%rbp), %rdi
callq 0x34e8
leaq -0x6b0(%rbp), %rdi
callq 0x34e8
leaq -0x6d0(%rbp), %rdi
callq 0x34e8
leaq -0x6f0(%rbp), %rdi
callq 0x34e8
leaq -0x610(%rbp), %rdi
callq 0x34e8
leaq -0x5f0(%rbp), %rdi
callq 0x34e8
jmp 0x16c76
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17466
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xa55e(%rip), %rdi      # 0x211f4
callq 0x175b0
testb $0x1, %al
jne 0x16cbc
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xa541(%rip), %rdi      # 0x211ef
callq 0x175b0
testb $0x1, %al
jne 0x16cbc
jmp 0x16ef0
movq -0x980(%rbp), %rdi
movb $0x0, -0x6f1(%rbp)
callq 0x15bf0
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x718(%rbp), %rdi
callq 0x15c70
jmp 0x16ce4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x738(%rbp), %rdi
callq 0x15c70
jmp 0x16cfa
movq -0x980(%rbp), %rsi
leaq 0xa908(%rip), %rdx      # 0x21610
leaq -0x7d8(%rbp), %rdi
callq 0xdc30
jmp 0x16d16
leaq -0x7b8(%rbp), %rdi
leaq -0x7d8(%rbp), %rsi
leaq -0x718(%rbp), %rdx
callq 0x176b0
jmp 0x16d32
leaq 0xa8f3(%rip), %rdx      # 0x2162c
leaq -0x798(%rbp), %rdi
leaq -0x7b8(%rbp), %rsi
callq 0xf3c0
jmp 0x16d4e
leaq -0x778(%rbp), %rdi
leaq -0x798(%rbp), %rsi
leaq -0x738(%rbp), %rdx
callq 0x176b0
jmp 0x16d6a
leaq 0xa5ee(%rip), %rdx      # 0x2135f
leaq -0x758(%rbp), %rdi
leaq -0x778(%rbp), %rsi
callq 0xf3c0
jmp 0x16d86
leaq -0x758(%rbp), %rdi
callq 0x17750
jmp 0x16d94
leaq -0x758(%rbp), %rdi
callq 0x34e8
leaq -0x778(%rbp), %rdi
callq 0x34e8
leaq -0x798(%rbp), %rdi
callq 0x34e8
leaq -0x7b8(%rbp), %rdi
callq 0x34e8
leaq -0x7d8(%rbp), %rdi
callq 0x34e8
movb $0x1, -0x6f1(%rbp)
leaq -0x738(%rbp), %rdi
callq 0x34e8
leaq -0x718(%rbp), %rdi
callq 0x34e8
testb $0x1, -0x6f1(%rbp)
jne 0x16eda
jmp 0x16ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16edf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16ec0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16eb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16ea8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16e9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16e90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x16e84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x758(%rbp), %rdi
callq 0x34e8
leaq -0x778(%rbp), %rdi
callq 0x34e8
leaq -0x798(%rbp), %rdi
callq 0x34e8
leaq -0x7b8(%rbp), %rdi
callq 0x34e8
leaq -0x7d8(%rbp), %rdi
callq 0x34e8
leaq -0x738(%rbp), %rdi
callq 0x34e8
leaq -0x718(%rbp), %rdi
callq 0x34e8
jmp 0x16edf
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17466
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0xa2ad(%rip), %rdi      # 0x211ac
callq 0x175b0
testb $0x1, %al
jne 0x16f0d
jmp 0x17233
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x7f8(%rbp), %rdi
movq %rdi, -0x9e0(%rbp)
callq 0x3120
movq -0x9e0(%rbp), %rdi
callq 0x108f0
movl %eax, -0x9d4(%rbp)
jmp 0x16f3f
leaq -0x7f8(%rbp), %rdi
callq 0x34e8
movl -0x9d4(%rbp), %eax
cmpl $-0x1, %eax
je 0x1714a
movq -0x980(%rbp), %rdi
movb $0x0, -0x7f9(%rbp)
callq 0x15bf0
movq -0x980(%rbp), %rdx
leaq 0xa68f(%rip), %rsi      # 0x2160a
leaq -0x880(%rbp), %rdi
callq 0x10740
jmp 0x16f89
leaq 0xa6a0(%rip), %rdx      # 0x21630
leaq -0x860(%rbp), %rdi
leaq -0x880(%rbp), %rsi
callq 0xf3c0
jmp 0x16fa5
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq 0x17aa1(%rip), %rdi     # 0x2ea58
callq 0x11210
movq %rax, -0x9e8(%rbp)
jmp 0x16fc5
movq -0x9e8(%rbp), %rax
movl 0x20(%rax), %esi
leaq -0x8a0(%rbp), %rdi
callq 0xf460
jmp 0x16fdd
leaq -0x840(%rbp), %rdi
leaq -0x860(%rbp), %rsi
leaq -0x8a0(%rbp), %rdx
callq 0x175e0
jmp 0x16ff9
leaq 0xa2d7(%rip), %rdx      # 0x212d7
leaq -0x820(%rbp), %rdi
leaq -0x840(%rbp), %rsi
callq 0xf3c0
jmp 0x17015
leaq -0x820(%rbp), %rdi
callq 0x17750
jmp 0x17023
leaq -0x820(%rbp), %rdi
callq 0x34e8
leaq -0x840(%rbp), %rdi
callq 0x34e8
leaq -0x8a0(%rbp), %rdi
callq 0x34e8
leaq -0x860(%rbp), %rdi
callq 0x34e8
leaq -0x880(%rbp), %rdi
callq 0x34e8
movb $0x1, -0x7f9(%rbp)
testb $0x1, -0x7f9(%rbp)
jne 0x17134
jmp 0x17128
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7f8(%rbp), %rdi
callq 0x34e8
jmp 0x17476
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x17139
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1711a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1710e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x17102
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x170f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x820(%rbp), %rdi
callq 0x34e8
leaq -0x840(%rbp), %rdi
callq 0x34e8
leaq -0x8a0(%rbp), %rdi
callq 0x34e8
leaq -0x860(%rbp), %rdi
callq 0x34e8
leaq -0x880(%rbp), %rdi
callq 0x34e8
jmp 0x17139
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17466
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17476
leaq -0x8c1(%rbp), %rdi
movq %rdi, -0x9f0(%rbp)
callq 0x3480
movq -0x9f0(%rbp), %rdx
leaq 0xa4c9(%rip), %rsi      # 0x21634
leaq -0x8c0(%rbp), %rdi
callq 0x4ef0
jmp 0x17179
leaq -0x8c0(%rbp), %rdi
callq 0x11010
jmp 0x17187
leaq -0x8c0(%rbp), %rdi
callq 0x34e8
leaq -0x8c1(%rbp), %rdi
callq 0x32d0
leaq -0x8c2(%rbp), %rdi
movq %rdi, -0x9f8(%rbp)
callq 0x3480
movq -0x980(%rbp), %rdi
movq -0x9f8(%rbp), %rdx
leaq 0xa4ce(%rip), %rsi      # 0x21695
callq 0x4ef0
jmp 0x171ce
leaq -0x8c2(%rbp), %rdi
callq 0x32d0
jmp 0x17466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x17205
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x8c0(%rbp), %rdi
callq 0x34e8
leaq -0x8c1(%rbp), %rdi
callq 0x32d0
jmp 0x17476
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x8c2(%rbp), %rdi
callq 0x32d0
jmp 0x17476
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq 0x9fa7(%rip), %rdi      # 0x211e9
callq 0x175b0
testb $0x1, %al
jne 0x17250
jmp 0x173fd
movq -0x980(%rbp), %rdi
movb $0x0, -0x8c3(%rbp)
callq 0x15bf0
movq -0x980(%rbp), %rdx
leaq 0xa399(%rip), %rsi      # 0x2160a
leaq -0x948(%rbp), %rdi
callq 0x10740
jmp 0x1727f
leaq 0xa04b(%rip), %rdx      # 0x212d1
leaq -0x928(%rbp), %rdi
leaq -0x948(%rbp), %rsi
callq 0xf3c0
jmp 0x1729b
movq -0x10(%rbp), %rax
movl 0xb8(%rax), %esi
leaq -0x968(%rbp), %rdi
callq 0xf460
jmp 0x172b3
leaq -0x908(%rbp), %rdi
leaq -0x928(%rbp), %rsi
leaq -0x968(%rbp), %rdx
callq 0x175e0
jmp 0x172cf
leaq 0xa089(%rip), %rdx      # 0x2135f
leaq -0x8e8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0xf3c0
jmp 0x172eb
leaq -0x8e8(%rbp), %rdi
callq 0x17750
jmp 0x172f9
leaq -0x8e8(%rbp), %rdi
callq 0x34e8
leaq -0x908(%rbp), %rdi
callq 0x34e8
leaq -0x968(%rbp), %rdi
callq 0x34e8
leaq -0x928(%rbp), %rdi
callq 0x34e8
leaq -0x948(%rbp), %rdi
callq 0x34e8
movb $0x1, -0x8c3(%rbp)
testb $0x1, -0x8c3(%rbp)
jne 0x173ed
jmp 0x173e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x173ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x173d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x173c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x173bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x173af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x8e8(%rbp), %rdi
callq 0x34e8
leaq -0x908(%rbp), %rdi
callq 0x34e8
leaq -0x968(%rbp), %rdi
callq 0x34e8
leaq -0x928(%rbp), %rdi
callq 0x34e8
leaq -0x948(%rbp), %rdi
callq 0x34e8
jmp 0x173ef
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17466
movq -0x980(%rbp), %rdi
callq 0x34e8
jmp 0x17476
jmp 0x173ff
jmp 0x17401
jmp 0x17403
jmp 0x17405
jmp 0x17407
jmp 0x17409
jmp 0x1740b
jmp 0x1740d
jmp 0x1740f
leaq -0x969(%rbp), %rdi
movq %rdi, -0xa00(%rbp)
callq 0x3480
movq -0x980(%rbp), %rdi
movq -0xa00(%rbp), %rdx
leaq 0xa25e(%rip), %rsi      # 0x21695
callq 0x4ef0
jmp 0x1743e
leaq -0x969(%rbp), %rdi
callq 0x32d0
jmp 0x17466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x969(%rbp), %rdi
callq 0x32d0
jmp 0x17476
movq -0x978(%rbp), %rax
addq $0xa00, %rsp            # imm = 0xA00
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3470
nop