// File: martinda3[P]Compiler/src/JVM/JVMgenerateExpression.cpp
// Function: toyc::JVMgenerateExpression::genExpression(toyc::ASexpression*, toyc::JVMtargetCode*)
void JVMgenerateExpression::genExpression(ASexpression *ast, JVMtargetCode *tc) {
        TCtoken *check1;
        std::string cleanup, idd;
        ASsimpleExpr *se;
        enum exprType etype = ast->getType();
        if (etype == EXPRexpr) {
            ASexpr *be = dynamic_cast<ASexpr *>(ast);

            ASoperator *temp = be->getOper();
            TCtoken *op = temp->getExpr();

            if (op->getTokenType() == DIVOP) {
                genExpression(be->getOp2(), tc);
                genExpression(be->getOp1(), tc);
            } else { genExpression(be->getOp1(), tc); }

            if (op->getTokenType() == ASSIGNOP) {
                se = dynamic_cast<ASsimpleExpr *>(be->getOp2());
                check1 = dynamic_cast<TCtoken *>(se->getExpr());
                JVMgenUtils::gen_ISTORE(*symTable->getSym(symTable->find(check1->getLexeme())), tc);
            }
            else {
                if (op->getTokenType() != DIVOP) { genExpression(be->getOp2(), tc); }
                switch (op->getTokenType()) {
                    case ADDOP:     JVMgenUtils::gen_ADDOP(*op, tc);    break;  // Untested
                    case MULOP:  /*JVMgenUtils::gen_MULOP(*op, tc);*/   break;  // Modulous
                    case MULTI:     JVMgenUtils::gen_MULOP(*op, tc);    break;  // multi
                    case DIVOP:     JVMgenUtils::gen_MULOP(*op, tc);    break;  // multi
                    case RELOP:     JVMgenUtils::gen_RELOP(*op, tc);    break;  // Untested
                    case OR:        JVMgenUtils::gen_OR(*op, tc);       break;  // Untested
                    case AND:       JVMgenUtils::gen_AND(*op, tc);      break;  // Untested
                    case ASSIGNOP:                                      break;  // Redudnat
                    default: // shouldn't happen
//                    std::cerr << "Fatal internal error #1: JVMgenerateExpression" << std::endl;
//                    exit(EXIT_FAILURE);
                        break;
                }
            }


        } else if (etype == SIMPLEexpr) {
            TCsymbol *idsym;
            ASsimpleExpr *se = dynamic_cast<ASsimpleExpr *>(ast);
            TCtoken *t = se->getExpr();
            std::string lexeme = t->getLexeme();
            if (t->getTokenType() == ID) {
                idsym = symTable->getSym(symTable->find(t->getLexeme()));
                JVMgenUtils::gen_ILOAD(*idsym, tc);
            } else if (t->getTokenType() == NUMBER) {
                JVMgenUtils::gen_ICONST(stoi(lexeme), tc);
            } else // shouldn't happen
            {
                std::cerr << "Fatal internal error #2: JVMgenerateExpression" << std::endl;
                exit(EXIT_FAILURE);
            }
        }
        else if (etype == FUNCCALLexpr) { // Semi-testsed [Writestate]
            TCsymbol *idsym;
            ASfuncCall *sexpr = dynamic_cast<ASfuncCall *>(ast);
            ASsimpleExpr *se = dynamic_cast<ASsimpleExpr *>(sexpr->getOp1());
            TCtoken *t = se->getExpr(); std::string choper;
            switch (t->getTokenType())
            {
                case NUMBER:
                    tc->add(new GETSTATIC(OUTPUT_FIELD_SPEC, OUTPUT_DESCRIPTOR));
                    tc->add(new LDC(t->getLexeme()));
                    tc->add(new INVOKEVIRTUAL(PRINT_STRING_METHOD_SPEC));
                    break;
                case ID:
                    idsym = symTable->getSym(symTable->find(t->getLexeme()));
                    tc->add(new GETSTATIC(OUTPUT_FIELD_SPEC, OUTPUT_DESCRIPTOR));
                    JVMgenUtils::gen_ILOAD(*idsym, tc);
                    tc->add(new INVOKEVIRTUAL(PRINT_INT_NEWLINE_METHOD_SPEC));
                    break;
                case STRING:
                    tc->add(new GETSTATIC(OUTPUT_FIELD_SPEC, OUTPUT_DESCRIPTOR));
                    choper = t->getLexeme().substr(1, (t->getLexeme().length() - 2)); // removes extra ""THis is the sirng""
                    tc->add(new LDC(choper));
                    tc->add(new INVOKEVIRTUAL(PRINT_STRING_METHOD_SPEC));
                    break;
                default:
                    break;
            }
        }
//        Unimplemented
//         else if (etype == MINUSexpr) {
//
//        } else if (etype == NOTexpr) {
//
//        } else if (etype == EMPTYexpr) {
//
//        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x740, %rsp            # imm = 0x740
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9480
leaq -0x58(%rbp), %rdi
callq 0x9480
movq -0x8(%rbp), %rdi
callq 0x204c0
movl %eax, -0x530(%rbp)
jmp 0x2a036
movl -0x530(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpl $0x1, -0x64(%rbp)
jne 0x2a584
movq -0x8(%rbp), %rax
movq %rax, -0x538(%rbp)
cmpq $0x0, %rax
je 0x2a092
movq -0x538(%rbp), %rdi
leaq 0x18cd0(%rip), %rsi     # 0x42d38
leaq 0x1ac11(%rip), %rdx     # 0x44c80
xorl %eax, %eax
movl %eax, %ecx
callq 0x93e0
movq %rax, -0x540(%rbp)
jmp 0x2a09d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b335
xorl %eax, %eax
movq %rax, -0x540(%rbp)
jmp 0x2a09d
movq -0x540(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0x2db50
movq %rax, -0x548(%rbp)
jmp 0x2a0ba
movq -0x548(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x1ed20
movq %rax, -0x550(%rbp)
jmp 0x2a0dd
movq -0x550(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x1be60
movl %eax, -0x554(%rbp)
jmp 0x2a0ff
movl -0x554(%rbp), %eax
cmpl $0x16, %eax
jne 0x2a154
movq -0x80(%rbp), %rdi
callq 0x2db30
movq %rax, -0x560(%rbp)
jmp 0x2a11c
movq -0x560(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a000
jmp 0x2a12e
movq -0x80(%rbp), %rdi
callq 0x2db10
movq %rax, -0x568(%rbp)
jmp 0x2a140
movq -0x568(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a000
jmp 0x2a152
jmp 0x2a17a
movq -0x80(%rbp), %rdi
callq 0x2db10
movq %rax, -0x570(%rbp)
jmp 0x2a166
movq -0x570(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a000
jmp 0x2a178
jmp 0x2a17a
movq -0x90(%rbp), %rdi
callq 0x1be60
movl %eax, -0x574(%rbp)
jmp 0x2a18e
movl -0x574(%rbp), %eax
cmpl $0x15, %eax
jne 0x2a2f1
movq -0x80(%rbp), %rdi
callq 0x2db30
movq %rax, -0x580(%rbp)
jmp 0x2a1af
movq -0x580(%rbp), %rax
cmpq $0x0, %rax
je 0x2a1e3
movq -0x580(%rbp), %rdi
leaq 0x18b6e(%rip), %rsi     # 0x42d38
leaq 0x189e7(%rip), %rdx     # 0x42bb8
xorl %eax, %eax
movl %eax, %ecx
callq 0x93e0
movq %rax, -0x588(%rbp)
jmp 0x2a1ee
xorl %eax, %eax
movq %rax, -0x588(%rbp)
jmp 0x2a1ee
movq -0x588(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1e550
movq %rax, -0x590(%rbp)
jmp 0x2a20b
movq -0x590(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x1b443(%rip), %rax     # 0x45660
movq (%rax), %rax
movq %rax, -0x5a0(%rbp)
movq %rax, -0x598(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x1be70
jmp 0x2a240
movq -0x5a0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x31840
movl %eax, -0x5a4(%rbp)
jmp 0x2a25b
movl -0x5a4(%rbp), %esi
movq -0x598(%rbp), %rdi
callq 0x31930
movq %rax, -0x5b0(%rbp)
jmp 0x2a276
movq -0x5b0(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x2b350
jmp 0x2a28b
movq -0x10(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x27270
jmp 0x2a29d
leaq -0xd8(%rbp), %rdi
callq 0x2b3d0
leaq -0xf8(%rbp), %rdi
callq 0x9658
jmp 0x2a57f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2a2e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x2b3d0
leaq -0xf8(%rbp), %rdi
callq 0x9658
jmp 0x2b335
movq -0x90(%rbp), %rdi
callq 0x1be60
movl %eax, -0x5b4(%rbp)
jmp 0x2a305
movl -0x5b4(%rbp), %eax
cmpl $0x16, %eax
je 0x2a336
movq -0x80(%rbp), %rdi
callq 0x2db30
movq %rax, -0x5c0(%rbp)
jmp 0x2a322
movq -0x5c0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a000
jmp 0x2a334
jmp 0x2a336
movq -0x90(%rbp), %rdi
callq 0x1be60
movl %eax, -0x5c4(%rbp)
jmp 0x2a34a
movl -0x5c4(%rbp), %eax
addl $-0x12, %eax
movl %eax, %ecx
movq %rcx, -0x5d0(%rbp)
subl $0x17, %eax
ja 0x2a57b
movq -0x5d0(%rbp), %rax
leaq 0xa4e5(%rip), %rcx      # 0x34858
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x90(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x2b400
jmp 0x2a391
movq -0x10(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x28080
jmp 0x2a3a3
leaq -0x120(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
jmp 0x2a57d
movq -0x90(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x2b400
jmp 0x2a3eb
movq -0x10(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x28290
jmp 0x2a3fd
leaq -0x148(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
movq -0x90(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x2b400
jmp 0x2a440
movq -0x10(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x28290
jmp 0x2a452
leaq -0x170(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
movq -0x90(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x2b400
jmp 0x2a495
movq -0x10(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x284a0
jmp 0x2a4a7
leaq -0x198(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
movq -0x90(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x2b400
jmp 0x2a4ea
movq -0x10(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x28f10
jmp 0x2a4fc
leaq -0x1c0(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
movq -0x90(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x2b400
jmp 0x2a53c
movq -0x10(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x29710
jmp 0x2a54e
leaq -0x1e8(%rbp), %rdi
callq 0x2b440
jmp 0x2a57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x2b440
jmp 0x2b335
jmp 0x2a57d
jmp 0x2a57d
jmp 0x2a57f
jmp 0x2b31a
cmpl $0x4, -0x64(%rbp)
jne 0x2a7e8
movq -0x8(%rbp), %rax
movq %rax, -0x5d8(%rbp)
cmpq $0x0, %rax
je 0x2a5c6
movq -0x5d8(%rbp), %rdi
leaq 0x1878b(%rip), %rsi     # 0x42d38
leaq 0x18604(%rip), %rdx     # 0x42bb8
xorl %eax, %eax
movl %eax, %ecx
callq 0x93e0
movq %rax, -0x5e0(%rbp)
jmp 0x2a5d1
xorl %eax, %eax
movq %rax, -0x5e0(%rbp)
jmp 0x2a5d1
movq -0x5e0(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x1e550
movq %rax, -0x5e8(%rbp)
jmp 0x2a5f4
movq -0x5e8(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x1be70
jmp 0x2a617
movq -0x200(%rbp), %rdi
callq 0x1be60
movl %eax, -0x5ec(%rbp)
jmp 0x2a62b
movl -0x5ec(%rbp), %eax
cmpl $0x18, %eax
jne 0x2a73a
leaq 0x1b01f(%rip), %rax     # 0x45660
movq (%rax), %rax
movq %rax, -0x600(%rbp)
movq %rax, -0x5f8(%rbp)
movq -0x200(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x1be70
jmp 0x2a667
movq -0x600(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x31840
movl %eax, -0x604(%rbp)
jmp 0x2a682
movl -0x604(%rbp), %esi
movq -0x5f8(%rbp), %rdi
callq 0x31930
movq %rax, -0x610(%rbp)
jmp 0x2a69d
movq -0x610(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x9658
movq -0x1f0(%rbp), %rsi
leaq -0x288(%rbp), %rdi
callq 0x2b350
jmp 0x2a6cc
movq -0x10(%rbp), %rsi
leaq -0x288(%rbp), %rdi
callq 0x27490
jmp 0x2a6de
leaq -0x288(%rbp), %rdi
callq 0x2b3d0
jmp 0x2a7c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2a7d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x9658
jmp 0x2a7d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x2b3d0
jmp 0x2a7d7
movq -0x200(%rbp), %rdi
callq 0x1be60
movl %eax, -0x614(%rbp)
jmp 0x2a74e
movl -0x614(%rbp), %eax
cmpl $0x10, %eax
jne 0x2a789
xorl %eax, %eax
movl %eax, %esi
leaq -0x220(%rbp), %rdi
movl $0xa, %edx
callq 0x2b460
movl %eax, -0x618(%rbp)
jmp 0x2a776
movl -0x618(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x27af0
jmp 0x2a787
jmp 0x2a7c4
movq 0x1a860(%rip), %rdi     # 0x44ff0
leaq 0xa121(%rip), %rsi      # 0x348b8
callq 0x9340
movq %rax, -0x620(%rbp)
jmp 0x2a7a5
movq -0x620(%rbp), %rdi
movq 0x1a7fd(%rip), %rsi     # 0x44fb0
callq 0x9380
jmp 0x2a7ba
movl $0x1, %edi
callq 0x9410
jmp 0x2a7c6
leaq -0x220(%rbp), %rdi
callq 0x9658
jmp 0x2b318
leaq -0x220(%rbp), %rdi
callq 0x9658
jmp 0x2b335
cmpl $0x0, -0x64(%rbp)
jne 0x2b316
movq -0x8(%rbp), %rax
movq %rax, -0x628(%rbp)
cmpq $0x0, %rax
je 0x2a82a
movq -0x628(%rbp), %rdi
leaq 0x18527(%rip), %rsi     # 0x42d38
leaq 0x18490(%rip), %rdx     # 0x42ca8
xorl %eax, %eax
movl %eax, %ecx
callq 0x93e0
movq %rax, -0x630(%rbp)
jmp 0x2a835
xorl %eax, %eax
movq %rax, -0x630(%rbp)
jmp 0x2a835
movq -0x630(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rdi
callq 0x1f9c0
movq %rax, -0x638(%rbp)
jmp 0x2a858
movq -0x638(%rbp), %rax
cmpq $0x0, %rax
je 0x2a88c
movq -0x638(%rbp), %rdi
leaq 0x184c5(%rip), %rsi     # 0x42d38
leaq 0x1833e(%rip), %rdx     # 0x42bb8
xorl %eax, %eax
movl %eax, %ecx
callq 0x93e0
movq %rax, -0x640(%rbp)
jmp 0x2a897
xorl %eax, %eax
movq %rax, -0x640(%rbp)
jmp 0x2a897
movq -0x640(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rdi
callq 0x1e550
movq %rax, -0x648(%rbp)
jmp 0x2a8ba
movq -0x648(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x9480
movq -0x2a8(%rbp), %rdi
callq 0x1be60
movl %eax, -0x64c(%rbp)
jmp 0x2a8e8
movl -0x64c(%rbp), %eax
subl $0x10, %eax
je 0x2a92b
jmp 0x2a8f5
movl -0x64c(%rbp), %eax
subl $0x18, %eax
je 0x2ac2d
jmp 0x2a906
movl -0x64c(%rbp), %eax
subl $0x1a, %eax
je 0x2af30
jmp 0x2b2f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b308
movq -0x10(%rbp), %rax
movq %rax, -0x660(%rbp)
movl $0x50, %edi
callq 0x9350
movq %rax, -0x658(%rbp)
jmp 0x2a949
movb $0x1, -0x309(%rbp)
leaq 0x1af89(%rip), %rsi     # 0x458e0
leaq -0x2e8(%rbp), %rdi
callq 0x9170
jmp 0x2a965
leaq 0x1af94(%rip), %rsi     # 0x45900
leaq -0x308(%rbp), %rdi
callq 0x9170
jmp 0x2a97a
movq -0x658(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x308(%rbp), %rdx
callq 0x217d0
jmp 0x2a996
movq -0x658(%rbp), %rcx
movb $0x0, -0x309(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x668(%rbp)
je 0x2a9c5
movq -0x658(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x668(%rbp)
movq -0x660(%rbp), %rdi
movq -0x668(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2a9dd
leaq -0x308(%rbp), %rdi
callq 0x9658
leaq -0x2e8(%rbp), %rdi
callq 0x9658
movq -0x10(%rbp), %rax
movq %rax, -0x678(%rbp)
movl $0x38, %edi
callq 0x9350
movq %rax, -0x670(%rbp)
jmp 0x2aa13
movb $0x1, -0x331(%rbp)
movq -0x2a8(%rbp), %rsi
leaq -0x330(%rbp), %rdi
callq 0x1be70
jmp 0x2aa2f
movq -0x670(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x23b10
jmp 0x2aa44
movq -0x670(%rbp), %rcx
movb $0x0, -0x331(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x680(%rbp)
je 0x2aa73
movq -0x670(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x680(%rbp)
movq -0x678(%rbp), %rdi
movq -0x680(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2aa8b
leaq -0x330(%rbp), %rdi
callq 0x9658
movq -0x10(%rbp), %rax
movq %rax, -0x690(%rbp)
movl $0x30, %edi
callq 0x9350
movq %rax, -0x688(%rbp)
jmp 0x2aab5
movb $0x1, -0x359(%rbp)
leaq 0x1b01d(%rip), %rsi     # 0x45ae0
leaq -0x358(%rbp), %rdi
callq 0x9170
jmp 0x2aad1
movq -0x688(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x22fe0
jmp 0x2aae6
movq -0x688(%rbp), %rcx
movb $0x0, -0x359(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x698(%rbp)
je 0x2ab15
movq -0x688(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x698(%rbp)
movq -0x690(%rbp), %rdi
movq -0x698(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2ab2d
leaq -0x358(%rbp), %rdi
callq 0x9658
jmp 0x2b2fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2ab7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2ab72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x9658
leaq -0x2e8(%rbp), %rdi
callq 0x9658
testb $0x1, -0x309(%rbp)
jne 0x2ab89
jmp 0x2ab9a
movq -0x658(%rbp), %rdi
movl $0x50, %esi
callq 0x9360
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2abc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x9658
testb $0x1, -0x331(%rbp)
jne 0x2abd0
jmp 0x2abe1
movq -0x670(%rbp), %rdi
movl $0x38, %esi
callq 0x9360
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2ac0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x9658
testb $0x1, -0x359(%rbp)
jne 0x2ac17
jmp 0x2ac28
movq -0x688(%rbp), %rdi
movl $0x30, %esi
callq 0x9360
jmp 0x2b308
leaq 0x1aa2c(%rip), %rax     # 0x45660
movq (%rax), %rax
movq %rax, -0x6a8(%rbp)
movq %rax, -0x6a0(%rbp)
movq -0x2a8(%rbp), %rsi
leaq -0x380(%rbp), %rdi
callq 0x1be70
jmp 0x2ac5a
movq -0x6a8(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x31840
movl %eax, -0x6ac(%rbp)
jmp 0x2ac75
movl -0x6ac(%rbp), %esi
movq -0x6a0(%rbp), %rdi
callq 0x31930
movq %rax, -0x6b8(%rbp)
jmp 0x2ac90
movq -0x6b8(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x9658
movq -0x10(%rbp), %rax
movq %rax, -0x6c8(%rbp)
movl $0x50, %edi
callq 0x9350
movq %rax, -0x6c0(%rbp)
jmp 0x2acc8
movb $0x1, -0x3c1(%rbp)
leaq 0x1ac0a(%rip), %rsi     # 0x458e0
leaq -0x3a0(%rbp), %rdi
callq 0x9170
jmp 0x2ace4
leaq 0x1ac15(%rip), %rsi     # 0x45900
leaq -0x3c0(%rbp), %rdi
callq 0x9170
jmp 0x2acf9
movq -0x6c0(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
leaq -0x3c0(%rbp), %rdx
callq 0x217d0
jmp 0x2ad15
movq -0x6c0(%rbp), %rcx
movb $0x0, -0x3c1(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x6d0(%rbp)
je 0x2ad44
movq -0x6c0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x6d0(%rbp)
movq -0x6c8(%rbp), %rdi
movq -0x6d0(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2ad5c
leaq -0x3c0(%rbp), %rdi
callq 0x9658
leaq -0x3a0(%rbp), %rdi
callq 0x9658
movq -0x290(%rbp), %rsi
leaq -0x410(%rbp), %rdi
callq 0x2b350
jmp 0x2ad89
movq -0x10(%rbp), %rsi
leaq -0x410(%rbp), %rdi
callq 0x27490
jmp 0x2ad9b
leaq -0x410(%rbp), %rdi
callq 0x2b3d0
movq -0x10(%rbp), %rax
movq %rax, -0x6e0(%rbp)
movl $0x30, %edi
callq 0x9350
movq %rax, -0x6d8(%rbp)
jmp 0x2adc5
movb $0x1, -0x431(%rbp)
leaq 0x1aced(%rip), %rsi     # 0x45ac0
leaq -0x430(%rbp), %rdi
callq 0x9170
jmp 0x2ade1
movq -0x6d8(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x22fe0
jmp 0x2adf6
movq -0x6d8(%rbp), %rcx
movb $0x0, -0x431(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x6e8(%rbp)
je 0x2ae25
movq -0x6d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x6e8(%rbp)
movq -0x6e0(%rbp), %rdi
movq -0x6e8(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2ae3d
leaq -0x430(%rbp), %rdi
callq 0x9658
jmp 0x2b2fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x9658
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2aeab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2ae9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x9658
leaq -0x3a0(%rbp), %rdi
callq 0x9658
testb $0x1, -0x3c1(%rbp)
jne 0x2aeb6
jmp 0x2aec7
movq -0x6c0(%rbp), %rdi
movl $0x50, %esi
callq 0x9360
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x2b3d0
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2af0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x430(%rbp), %rdi
callq 0x9658
testb $0x1, -0x431(%rbp)
jne 0x2af1a
jmp 0x2af2b
movq -0x6d8(%rbp), %rdi
movl $0x30, %esi
callq 0x9360
jmp 0x2b308
movq -0x10(%rbp), %rax
movq %rax, -0x6f8(%rbp)
movl $0x50, %edi
callq 0x9350
movq %rax, -0x6f0(%rbp)
jmp 0x2af4e
movb $0x1, -0x479(%rbp)
leaq 0x1a984(%rip), %rsi     # 0x458e0
leaq -0x458(%rbp), %rdi
callq 0x9170
jmp 0x2af6a
leaq 0x1a98f(%rip), %rsi     # 0x45900
leaq -0x478(%rbp), %rdi
callq 0x9170
jmp 0x2af7f
movq -0x6f0(%rbp), %rdi
leaq -0x458(%rbp), %rsi
leaq -0x478(%rbp), %rdx
callq 0x217d0
jmp 0x2af9b
movq -0x6f0(%rbp), %rcx
movb $0x0, -0x479(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x700(%rbp)
je 0x2afca
movq -0x6f0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x700(%rbp)
movq -0x6f8(%rbp), %rdi
movq -0x700(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2afe2
leaq -0x478(%rbp), %rdi
callq 0x9658
leaq -0x458(%rbp), %rdi
callq 0x9658
movq -0x2a8(%rbp), %rsi
leaq -0x4c0(%rbp), %rdi
callq 0x1be70
jmp 0x2b00f
movq -0x2a8(%rbp), %rsi
leaq -0x4e0(%rbp), %rdi
callq 0x1be70
jmp 0x2b024
leaq -0x4e0(%rbp), %rdi
callq 0x94e0
movq %rax, %rcx
addq $-0x2, %rcx
leaq -0x4a0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl $0x1, %edx
callq 0x9370
jmp 0x2b051
leaq -0x2c8(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
movq %rsi, -0x718(%rbp)
callq 0x9420
movq -0x718(%rbp), %rdi
callq 0x9658
leaq -0x4e0(%rbp), %rdi
callq 0x9658
leaq -0x4c0(%rbp), %rdi
callq 0x9658
movq -0x10(%rbp), %rax
movq %rax, -0x710(%rbp)
movl $0x38, %edi
callq 0x9350
movq %rax, -0x708(%rbp)
jmp 0x2b0ad
movb $0x1, -0x501(%rbp)
leaq -0x500(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x9170
jmp 0x2b0c9
movq -0x708(%rbp), %rdi
leaq -0x500(%rbp), %rsi
callq 0x23b10
jmp 0x2b0de
movq -0x708(%rbp), %rcx
movb $0x0, -0x501(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x720(%rbp)
je 0x2b10d
movq -0x708(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x720(%rbp)
movq -0x710(%rbp), %rdi
movq -0x720(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2b125
leaq -0x500(%rbp), %rdi
callq 0x9658
movq -0x10(%rbp), %rax
movq %rax, -0x730(%rbp)
movl $0x30, %edi
callq 0x9350
movq %rax, -0x728(%rbp)
jmp 0x2b14f
movb $0x1, -0x529(%rbp)
leaq 0x1a983(%rip), %rsi     # 0x45ae0
leaq -0x528(%rbp), %rdi
callq 0x9170
jmp 0x2b16b
movq -0x728(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x22fe0
jmp 0x2b180
movq -0x728(%rbp), %rcx
movb $0x0, -0x529(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x738(%rbp)
je 0x2b1af
movq -0x728(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x738(%rbp)
movq -0x730(%rbp), %rdi
movq -0x738(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x2b1c7
leaq -0x528(%rbp), %rdi
callq 0x9658
jmp 0x2b2fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b218
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b20c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x478(%rbp), %rdi
callq 0x9658
leaq -0x458(%rbp), %rdi
callq 0x9658
testb $0x1, -0x479(%rbp)
jne 0x2b223
jmp 0x2b234
movq -0x6f0(%rbp), %rdi
movl $0x50, %esi
callq 0x9360
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b25f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0x9658
leaq -0x4c0(%rbp), %rdi
callq 0x9658
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x9658
testb $0x1, -0x501(%rbp)
jne 0x2b2a1
jmp 0x2b2b2
movq -0x708(%rbp), %rdi
movl $0x38, %esi
callq 0x9360
jmp 0x2b308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2b2da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x528(%rbp), %rdi
callq 0x9658
testb $0x1, -0x529(%rbp)
jne 0x2b2e5
jmp 0x2b2f6
movq -0x728(%rbp), %rdi
movl $0x30, %esi
callq 0x9360
jmp 0x2b308
jmp 0x2b2fa
leaq -0x2c8(%rbp), %rdi
callq 0x9658
jmp 0x2b316
leaq -0x2c8(%rbp), %rdi
callq 0x9658
jmp 0x2b335
jmp 0x2b318
jmp 0x2b31a
leaq -0x58(%rbp), %rdi
callq 0x9658
leaq -0x38(%rbp), %rdi
callq 0x9658
addq $0x740, %rsp            # imm = 0x740
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x9658
leaq -0x38(%rbp), %rdi
callq 0x9658
movq -0x70(%rbp), %rdi
callq 0x95b0