// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/to_tac.cpp
// Function: AST_op::to_tac(Tac*)
opd *AST_op::to_tac(Tac* t){
    switch( oper_type ){
        case AND:
            left->to_tac(t);
            t->backpatch(left->truelist, t->next_instruction() );
            
            right->to_tac(t);
            
            falselist.splice(falselist.end(),left->falselist);
            falselist.splice(falselist.end(),right->falselist);
            truelist  = right->truelist;
            break;
            
        case OR:
            left->to_tac(t);
            t->backpatch(left->falselist, t->next_instruction() );
            
            right->to_tac(t);
            
            truelist.splice(truelist.end(),left->truelist);
            truelist.splice(truelist.end(),right->truelist);
            falselist  = right->falselist;
            break;
            
        case IMP:
            left->to_tac(t);
            t->backpatch(left->truelist, t->next_instruction() );

            right->to_tac(t);

            truelist.splice(truelist.end(),left->falselist);
            truelist.splice(truelist.end(),right->truelist);
            falselist  = right->falselist;
            break;

        case CONSEQ:
            right->to_tac(t);
            t->backpatch(right->truelist, t->next_instruction() );

            left->to_tac(t);

            truelist.splice(truelist.end(),right->falselist);
            truelist.splice(truelist.end(),left->truelist);
            falselist  = left->falselist;
            break;
        
        /* Operadores de comparación de igualdad: ==, != */
        case EQ:
            {
                opd* l = left->to_tac(t);

                if (BOOLEAN == left->type) {
                    l = new opd();
                    // almacenar en un temporal el valor booleano de la rama izquierda
                    t->backpatch( left->truelist, t->next_instruction() );
                    t->append_quad(inst::CP, l, new opd(true), 0, "asignación del valor booleano obtenido (true) a rama izquierda de igualdad");
                    t->append_quad(inst::GOTO, 0, 0, new opd(t->next_instruction() + 2, O_LABEL), "salto después de asignar el valor booleano");

                    t->backpatch( left->falselist, t->next_instruction() );
                    t->append_quad(inst::CP, l, new opd(false), 0, "asignación del valor booleano obtenido (false) a rama izquierda de igualdad");
                }
                
                opd* r = right->to_tac(t);

                if (BOOLEAN == right->type) {
                    r = new opd();
                    // almacenar en un temporal el valor booleano de la rama derecha
                    t->backpatch( right->truelist, t->next_instruction() );
                    t->append_quad(inst::CP, r, new opd(true), 0, "asignación del valor booleano obtenido (true) a rama derecha de igualdad");
                    t->append_quad(inst::GOTO, 0, 0, new opd(t->next_instruction() + 2, O_LABEL), "salto después de asignar el valor booleano");

                    t->backpatch( right->falselist, t->next_instruction() );
                    t->append_quad(inst::CP, r, new opd(false), 0, "asignación del valor booleano obtenido (false) a rama derecha de igualdad");
                }

                truelist.push_back( t->next_instruction() );
                t->append_quad(inst::IFEQ, l, r, 0, "comparación de igualdad (true)");
                falselist.push_back( t->next_instruction() );
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de igualdad (false)");
            }
            break;
        case UNEQ:
            {
                opd* l = left->to_tac(t);

                if (BOOLEAN == left->type) {
                    l = new opd();
                    // almacenar en un temporal el valor booleano de la rama izquierda
                    t->backpatch( left->truelist, t->next_instruction() );
                    t->append_quad(inst::CP, l, new opd(true), 0, "asignación del valor booleano obtenido (true) a rama izquierda de desigualdad");
                    t->append_quad(inst::GOTO, 0, 0, new opd(t->next_instruction() + 2, O_LABEL), "salto después de asignar el valor booleano");

                    t->backpatch( left->falselist, t->next_instruction() );
                    t->append_quad(inst::CP, l, new opd(false), 0, "asignación del valor booleano obtenido (false) a rama izquierda de desigualdad");
                }
                
                opd* r = right->to_tac(t);

                if (BOOLEAN == right->type) {
                    r = new opd();
                    // almacenar en un temporal el valor booleano de la rama derecha
                    t->backpatch( right->truelist, t->next_instruction() );
                    t->append_quad(inst::CP, r, new opd(true), 0, "asignación del valor booleano obtenido (true) a rama derecha de desigualdad");
                    t->append_quad(inst::GOTO, 0, 0, new opd(t->next_instruction() + 2, O_LABEL), "salto después de asignar el valor booleano");

                    t->backpatch( right->falselist, t->next_instruction() );
                    t->append_quad(inst::CP, r, new opd(false), 0, "asignación del valor booleano obtenido (false) a rama derecha de desigualdad");
                }
                
                truelist.push_back( t->next_instruction() );
                t->append_quad(inst::IFNEQ, l, r, 0, "comparación de desigualdad (true)");
                falselist.push_back( t->next_instruction() );
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de desigualdad (false)");
            }
            break;
        
        /* Operadores de relación de orden: <, <=, >, >= */
        case LESS:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                truelist.push_back( t->next_instruction() );
                falselist.push_back( t->next_instruction() + 1);
                
                t->append_quad(inst::IFL, l, r, 0, "comparación de menor que (true)");
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de menor que (false)");
            }
            break;
        case LESS_EQ:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                truelist.push_back( t->next_instruction() );
                falselist.push_back( t->next_instruction() + 1);
                
                t->append_quad(inst::IFLEQ, l, r, 0, "comparación de menor o igual (true)");
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de menor o igual (false)");
            }
            break;
        case GREAT:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                truelist.push_back( t->next_instruction() );
                falselist.push_back( t->next_instruction() + 1);
                
                t->append_quad(inst::IFG, l, r, 0, "comparación de mayor (true)");
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de mayor (false)");
            }
            break;
        case GREAT_EQ:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                truelist.push_back( t->next_instruction() );
                falselist.push_back( t->next_instruction() + 1);
                
                t->append_quad(inst::IFGEQ, l, r, 0, "comparación de mayor o igual (true)");
                t->append_quad(inst::GOTO, 0, 0, 0, "comparación de mayor o igual (false)");
            }
            break;
        case PLUS:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                opd* d = new opd();
                t->append_quad(inst::ADD, d, l, r, "operación binaria de suma");
                
                return d;
            }
            break;
        case MINUS:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                opd* d = new opd();
                t->append_quad(inst::SUB, d, l, r, "operación binaria de resta");
                
                return d;
            }
            break;
        case PROD:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                opd* d = new opd();
                t->append_quad(inst::MUL, d, l, r, "operación binaria de producto");
                
                return d;
            }
            break;
        case DIV:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                opd* d = new opd();
                t->append_quad(inst::DIV, d, l, r, "operación binaria de división");
                
                return d;
            }
            break;
        case MOD:
            {
                opd* l = left->to_tac(t);
                opd* r = right->to_tac(t);
                
                opd* d = new opd();
                t->append_quad(inst::MOD, d, l, r, "operación binaria de módulo");
                
                return d;
            }
            break;
        default:
            break;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movl 0x68(%rdi), %eax
cmpq $0xe, %rax
ja 0xd685
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x169cd(%rip), %rcx     # 0x231ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r14
movq %rax, %rdi
callq 0x18148
leaq 0x17bd3(%rip), %rsi     # 0x243f5
leaq 0x88(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x11
popq %rsi
leaq 0x88(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x212de
leaq 0x88(%rsp), %rdi
jmp 0xd09b
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rbp
movl %eax, (%rbp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1243c
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
incl %eax
movl %eax, (%rbp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1243c
leaq 0x17ae9(%rip), %rsi     # 0x243aa
leaq 0xc8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x1d
popq %rsi
leaq 0xc8(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0xc8(%rsp), %rdi
callq 0x65c8
leaq 0x17acc(%rip), %rsi     # 0x243cf
leaq 0xa8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0xa8(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0xa8(%rsp), %rdi
jmp 0xd609
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rbp
movl %eax, (%rbp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1243c
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
incl %eax
movl %eax, (%rbp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1243c
leaq 0x17941(%rip), %rsi     # 0x242e1
leaq 0x188(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x1a
popq %rsi
leaq 0x188(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x188(%rsp), %rdi
callq 0x65c8
leaq 0x17920(%rip), %rsi     # 0x24302
leaq 0x168(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x168(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0x168(%rsp), %rdi
jmp 0xd609
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r14
movq %rax, %rdi
callq 0x18148
leaq 0x17a16(%rip), %rsi     # 0x2446b
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x7
popq %rsi
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x212de
leaq 0x8(%rsp), %rdi
jmp 0xd09b
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rbp
movl %eax, (%rbp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1243c
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
incl %eax
movl %eax, (%rbp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1243c
leaq 0x17839(%rip), %rsi     # 0x24324
leaq 0x148(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x1b
popq %rsi
leaq 0x148(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x148(%rsp), %rdi
callq 0x65c8
leaq 0x1781c(%rip), %rsi     # 0x24349
leaq 0x128(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x128(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0x128(%rsp), %rdi
jmp 0xd609
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x58(%r14), %rax
cmpl $0x6, 0x10(%rax)
jne 0xcce1
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
callq 0x18148
movq 0x58(%r14), %r12
addq $0x18, %r12
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x1837e
leaq 0x173f4(%rip), %rsi     # 0x23fc5
leaq 0x388(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x388(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x388(%rsp), %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
pushq $0x6
popq %rdx
movq %r12, %rdi
movl %eax, %esi
callq 0x1815e
leaq 0x173dc(%rip), %rsi     # 0x24011
leaq 0x368(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x368(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x212de
leaq 0x368(%rsp), %rdi
callq 0x65c8
movq 0x58(%r14), %r12
addq $0x30, %r12
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x17396(%rip), %rsi     # 0x2403d
leaq 0x348(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x348(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x348(%rsp), %rdi
callq 0x65c8
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
movq 0x60(%r14), %rax
cmpl $0x6, 0x10(%rax)
jne 0xce5c
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rax, %rdi
callq 0x18148
movq 0x60(%r14), %r13
addq $0x18, %r13
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x1837e
leaq 0x1733e(%rip), %rsi     # 0x2408a
leaq 0x328(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x328(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x328(%rsp), %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
pushq $0x6
popq %rdx
movq %r13, %rdi
movl %eax, %esi
callq 0x1815e
leaq 0x17261(%rip), %rsi     # 0x24011
leaq 0x308(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x308(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x212de
leaq 0x308(%rsp), %rdi
callq 0x65c8
movq 0x60(%r14), %r13
addq $0x30, %r13
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x172b2(%rip), %rsi     # 0x240d4
leaq 0x2e8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x2e8(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x2e8(%rsp), %rdi
callq 0x65c8
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r13, %rdi
callq 0x1243c
leaq 0x172a1(%rip), %rsi     # 0x2411f
leaq 0x2c8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x18
popq %rsi
leaq 0x2c8(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x2c8(%rsp), %rdi
callq 0x65c8
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x1243c
leaq 0x17264(%rip), %rsi     # 0x2413f
leaq 0x2a8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x2a8(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0x2a8(%rsp), %rdi
jmp 0xd609
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r14
movq %rax, %rdi
callq 0x18148
leaq 0x174de(%rip), %rsi     # 0x2442c
leaq 0x48(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x13
popq %rsi
leaq 0x48(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x212de
leaq 0x48(%rsp), %rdi
jmp 0xd09b
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r14
movq %rax, %rdi
callq 0x18148
leaq 0x17491(%rip), %rsi     # 0x2444b
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x14
popq %rsi
leaq 0x28(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x212de
leaq 0x28(%rsp), %rdi
jmp 0xd09b
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq 0x58(%r14), %r15
addq $0x18, %r15
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
leaq 0x18(%r14), %rbx
movq 0x58(%r14), %rdx
addq $0x30, %rdx
jmp 0xd239
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r14
movq %rax, %rdi
callq 0x18148
leaq 0x173a2(%rip), %rsi     # 0x24410
leaq 0x68(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x12
popq %rsi
leaq 0x68(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x212de
leaq 0x68(%rsp), %rdi
callq 0x65c8
jmp 0xd688
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq 0x58(%r14), %r15
addq $0x18, %r15
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
leaq 0x30(%r14), %rbx
movq 0x58(%r14), %rdx
addq $0x30, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x60(%r14), %rdx
addq $0x30, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x60(%r14), %rsi
addq $0x18, %rsi
addq $0x18, %r14
jmp 0xd67d
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rbp
movl %eax, (%rbp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1243c
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
incl %eax
movl %eax, (%rbp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1243c
leaq 0x171f4(%rip), %rsi     # 0x2436f
leaq 0x108(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x1c
popq %rsi
leaq 0x108(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x108(%rsp), %rdi
callq 0x65c8
leaq 0x171cf(%rip), %rsi     # 0x2438c
leaq 0xe8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0xe8(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0xe8(%rsp), %rdi
jmp 0xd609
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq 0x58(%r14), %r15
addq $0x30, %r15
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
leaq 0x18(%r14), %rbx
movq 0x58(%r14), %rdx
addq $0x18, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x60(%r14), %rdx
addq $0x18, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x60(%r14), %rsi
jmp 0xd675
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r15
movq 0x58(%r14), %rax
cmpl $0x6, 0x10(%rax)
jne 0xd3db
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
callq 0x18148
movq 0x58(%r14), %r12
addq $0x18, %r12
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x1837e
leaq 0x16e95(%rip), %rsi     # 0x24160
leaq 0x288(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x288(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x288(%rsp), %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
pushq $0x6
popq %rdx
movq %r12, %rdi
movl %eax, %esi
callq 0x1815e
leaq 0x16ce2(%rip), %rsi     # 0x24011
leaq 0x268(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x268(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x212de
leaq 0x268(%rsp), %rdi
callq 0x65c8
movq 0x58(%r14), %r12
addq $0x30, %r12
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x16e0e(%rip), %rsi     # 0x241af
leaq 0x248(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x248(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x248(%rsp), %rdi
callq 0x65c8
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %r12
movq 0x60(%r14), %rax
cmpl $0x6, 0x10(%rax)
jne 0xd556
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r12
movq %rax, %rdi
callq 0x18148
movq 0x60(%r14), %r13
addq $0x18, %r13
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x1837e
leaq 0x16db9(%rip), %rsi     # 0x241ff
leaq 0x228(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x228(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x228(%rsp), %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
pushq $0x6
popq %rdx
movq %r13, %rdi
movl %eax, %esi
callq 0x1815e
leaq 0x16b67(%rip), %rsi     # 0x24011
leaq 0x208(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x208(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x212de
leaq 0x208(%rsp), %rdi
callq 0x65c8
movq 0x60(%r14), %r13
addq $0x30, %r13
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x16d30(%rip), %rsi     # 0x2424c
leaq 0x1e8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
leaq 0x1e8(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x1e8(%rsp), %rdi
callq 0x65c8
leaq 0x18(%r14), %r13
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r13, %rdi
callq 0x1243c
leaq 0x16d22(%rip), %rsi     # 0x2429a
leaq 0x1c8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x19
popq %rsi
leaq 0x1c8(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x212de
leaq 0x1c8(%rsp), %rdi
callq 0x65c8
addq $0x30, %r14
movq %rbx, %rdi
callq 0x2138a
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x1243c
leaq 0x16ce8(%rip), %rsi     # 0x242bd
leaq 0x1a8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6d6c
pushq $0x16
popq %rsi
leaq 0x1a8(%rsp), %r9
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x212de
leaq 0x1a8(%rsp), %rdi
callq 0x65c8
jmp 0xd685
movq 0x60(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq 0x60(%r14), %r15
addq $0x18, %r15
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq 0x58(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
leaq 0x18(%r14), %rbx
movq 0x60(%r14), %rdx
addq $0x30, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x58(%r14), %rdx
addq $0x18, %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x128e0
movq 0x58(%r14), %rsi
addq $0x30, %rsi
addq $0x30, %r14
movq %r14, %rdi
callq 0x12420
xorl %r14d, %r14d
movq %r14, %rax
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x2e8(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
jmp 0xd82b
jmp 0xd82b
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x308(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x248(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x348(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x328(%rsp), %rdi
jmp 0xd902
jmp 0xd83b
jmp 0xd83b
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x368(%rsp), %rdi
jmp 0xd902
jmp 0xd82b
jmp 0xd82b
jmp 0xd927
jmp 0xd927
jmp 0xd83b
jmp 0xd83b
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x388(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
jmp 0xd83b
jmp 0xd83b
jmp 0xd7c7
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
jmp 0xd91e
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x2c8(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
jmp 0xd82b
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r13, %rdi
jmp 0xd91e
jmp 0xd83b
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r12, %rdi
jmp 0xd91e
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0xd902
jmp 0xd927
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0xd902
jmp 0xd927
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
jmp 0xd902
jmp 0xd927
jmp 0xd927
jmp 0xd927
jmp 0xd927
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
jmp 0xd902
jmp 0xd927
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0xd902
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x65c8
jmp 0xd92a
jmp 0xd927
jmp 0xd915
jmp 0xd915
jmp 0xd915
jmp 0xd915
jmp 0xd927
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x62e0
jmp 0xd92a
jmp 0xd927
movq %rax, %rbx
movq %rbx, %rdi
callq 0x6530