// File: /workspace/github_c_makefile_star2_O0/tstword[P]MIPSAssemblerC/src/assembler.c
// Function: assemble_psuedo_instruction
int assemble_psuedo_instruction(struct instruction_node *instr) {
    struct opcode_entry *entry = (struct opcode_entry *)instr->mnemonic->attrptr;
    
    int assemble_status = 1; /* Assume instruction is assembled */

    switch(entry - opcode_table) {
        case MNEMONIC_MOVE: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, rd->value.reg, 0, 0x21));
            break;
        }
        case MNEMONIC_LI: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *imm = instr->operand_list->next;
            uint32_t immediate = imm->value.integer;
            if(((immediate >> 15) & 0x1FFFF) != 0x1FFFF && ((immediate >> 16) & 0xFFFF) != 0x0000) {
                /* 32-bit sign extended or unsigned value */
                write_instruction(CREATE_INSTRUCTION_I(0x0F, 0, 1, (immediate >> 16)));
                write_instruction(CREATE_INSTRUCTION_I(0x0D, 1, rd->value.reg, immediate));
            }
            else if(((immediate >> 16) & 0xFFFF) == 0x0000 && ((immediate >> 15) & 0x1)) {
                /* Cannot sign-extend, must use ORI */
                write_instruction(CREATE_INSTRUCTION_I(0x0D, 0, rd->value.reg, immediate));
            }
            else {
                write_instruction(CREATE_INSTRUCTION_I(0x09, 0, rd->value.reg, immediate));
            }
            break;
        }
        case MNEMONIC_LA: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *label = instr->operand_list->next;
            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                write_instruction(CREATE_INSTRUCTION_I(0x0F, 0, 1, (sym_entry->offset >> 16)));
                write_instruction(CREATE_INSTRUCTION_I(0x0D, 1, rd->value.reg, sym_entry->offset));
            }   
            break;
        }
        case MNEMONIC_NOT: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, 0, rd->value.reg, 0, 0x27));
            break; 
        }
        case MNEMONIC_BEQZ: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *label = instr->operand_list->next;
            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                write_instruction(CREATE_INSTRUCTION_I(0x04, rs->value.reg, 0, get_branch_offset(sym_entry)));
            }   
            break;
        }
        case MNEMONIC_BGE: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                assemble_status = 0;
                insert_front(sym_entry->instr_list, (void *)instr);
            }
            else {
                if(rt_imm)
                    write_instruction(CREATE_INSTRUCTION_I(0x0A, rs->value.reg, 1, rt->value.integer));
                else
                    write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, 1, 0, 0x2A));
                write_instruction(CREATE_INSTRUCTION_I(0x04, 1, 0, get_branch_offset(sym_entry))); 
            }
            break;
        }
        case MNEMONIC_BLE: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                assemble_status = 0;
                if(rt_imm) incr_segment_offset(0x4);
                insert_front(sym_entry->instr_list, (void *)instr);
            }
            else {
                if(rt_imm) {
                    write_instruction(CREATE_INSTRUCTION_I(0x08, rs->value.reg, 1, -1));
                    write_instruction(CREATE_INSTRUCTION_I(0x0A, 1, 1, rt->value.integer));
                    write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry)));
                }
                else {
                    write_instruction(CREATE_INSTRUCTION_R(0, rt->value.reg, rs->value.reg, 1, 0, 0x2A));
                    write_instruction(CREATE_INSTRUCTION_I(0x04, 1, 0, get_branch_offset(sym_entry)));
                }
            }
            break;
        }
        case MNEMONIC_BNEZ: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *label = instr->operand_list->next;
            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                write_instruction(CREATE_INSTRUCTION_I(0x05, rs->value.reg, 0, get_branch_offset(sym_entry)));  
            }
            break;
        }
        case MNEMONIC_BLT: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                if(rt_imm)
                    write_instruction(CREATE_INSTRUCTION_I(0x0A, rs->value.reg, 1, rt->value.integer));
                else
                    write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, 1, 0, 0x2A));
                write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry)));
            }
            break;
        }
        case MNEMONIC_BGT: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                if(rt_imm) incr_segment_offset(0x4);
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                if(rt_imm) {
                    write_instruction(CREATE_INSTRUCTION_I(0x08, 0, 1, rt->value.integer));
                    write_instruction(CREATE_INSTRUCTION_R(0, 1, rs->value.reg, 1, 0, 0x2A));
                    write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry)));
                }
                else {
                    write_instruction(CREATE_INSTRUCTION_R(0, rt->value.reg, rs->value.reg, 1, 0, 0x2A));
                    write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry))); 
                }
            }
            break;
        }
        /* Apparently, MARS doesn't treat mul as a psuedo-instruction it is a core instruction 
         * I'll leave this here for now until I decide if I want to keep it a psuedo or not */
        case MNEMONIC_MUL: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            struct operand_node *rt = instr->operand_list->next->next;
            write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, 0, 0, 0x18));
            write_instruction(CREATE_INSTRUCTION_R(0, 0, 0, rd->value.reg, 0, 0x12));
            break;
        }
        case MNEMONIC_ABS: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, 1, 31, 0x03));
            write_instruction(CREATE_INSTRUCTION_R(0, 1, rs->value.reg, rd->value.reg, 0, 0x26));
            write_instruction(CREATE_INSTRUCTION_R(0, rd->value.reg, 1, rd->value.reg, 0, 0x23));
            break;
        }
        case MNEMONIC_NEG: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, rd->value.reg, 0, 0x22));
            break;
        }
        case MNEMONIC_ROR: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            struct operand_node *imm = instr->operand_list->next->next;
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, 1, 32 - imm->value.integer, 0x00));
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, rd->value.reg, imm->value.integer, 0x02));
            write_instruction(CREATE_INSTRUCTION_R(0, rd->value.reg, 1, rd->value.reg, 0, 0x25));
            break;
        }
        case MNEMONIC_ROL: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            struct operand_node *imm = instr->operand_list->next->next;
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, 1, 32 - imm->value.integer, 0x02));
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rs->value.reg, rd->value.reg, imm->value.integer, 0x00));
            write_instruction(CREATE_INSTRUCTION_R(0, rd->value.reg, 1, rd->value.reg, 0, 0x25));
            break;
        }
        case MNEMONIC_SGT: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            struct operand_node *rt = instr->operand_list->next->next;
            write_instruction(CREATE_INSTRUCTION_R(0, rt->value.reg, rs->value.reg, rd->value.reg, 0, 0x2A));
            break;
        }
        case MNEMONIC_B: {
            struct operand_node *label = instr->operand_list;
            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                write_instruction(CREATE_INSTRUCTION_I(0x01, 0, 0x01, get_branch_offset(sym_entry)));
            }
            break;
        }
        case MNEMONIC_SNE: {
            struct operand_node *rd = instr->operand_list;
            struct operand_node *rs = instr->operand_list->next;
            struct operand_node *rt = instr->operand_list->next->next;
            write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, rd->value.reg, 0, 0x23));
            write_instruction(CREATE_INSTRUCTION_R(0, 0, rd->value.reg, rd->value.reg, 0, 0x2B));
            break;
        }
        case MNEMONIC_BLEU: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;
            
            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                assemble_status = 0;
                if(rt_imm) incr_segment_offset(0x4); /* Immediate operand requires an extra instruction */
                insert_front(sym_entry->instr_list, (void *)instr);
            }
            else {
                if(rt_imm) {
                    write_instruction(CREATE_INSTRUCTION_I(0x08, 0, 1, rt->value.integer));
                    write_instruction(CREATE_INSTRUCTION_R(0, 1, rs->value.reg, 1, 0, 0x2B));
                    write_instruction(CREATE_INSTRUCTION_I(0x04, 1, 0, get_branch_offset(sym_entry))); 
                }
                else {
                    write_instruction(CREATE_INSTRUCTION_R(0, rt->value.reg, rs->value.reg, 1, 0, 0x2B));
                    write_instruction(CREATE_INSTRUCTION_I(0x04, 1, 0, get_branch_offset(sym_entry))); 
                }
            }
            break;
        }
        case MNEMONIC_BGEU: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                assemble_status = 0;
                insert_front(sym_entry->instr_list, (void *)instr);
            }
            else {
                if(rt_imm)
                    write_instruction(CREATE_INSTRUCTION_I(0x0B, rs->value.reg, 1, rt->value.integer));
                else
                    write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, 1, 0, 0x2B));
                write_instruction(CREATE_INSTRUCTION_I(0x04, 1, 0, get_branch_offset(sym_entry))); 
            }
            break;
        }
        case MNEMONIC_BLTU: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                if(rt_imm)
                    write_instruction(CREATE_INSTRUCTION_I(0x0B, rs->value.reg, 1, rt->value.integer));
                else
                    write_instruction(CREATE_INSTRUCTION_R(0, rs->value.reg, rt->value.reg, 1, 0, 0x2B));
                write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry)));
            }
            break;
        }
        case MNEMONIC_BGTU: {
            struct operand_node *rs = instr->operand_list;
            struct operand_node *rt = instr->operand_list->next;
            struct operand_node *label = instr->operand_list->next->next;
            int rt_imm = rt->operand & OPERAND_IMMEDIATE;

            /* Check if label has been defined */
            struct symbol_table_entry *sym_entry = get_symbol_table(cfg_assembler->symbol_table, label->identifier);
            if(sym_entry->status == SYMBOL_UNDEFINED) {
                if(rt_imm) incr_segment_offset(0x4);
                insert_front(sym_entry->instr_list, (void *)instr);
                assemble_status = 0;
            }
            else {
                if(rt_imm) {
                    write_instruction(CREATE_INSTRUCTION_I(0x08, 0, 1, rt->value.integer));
                    write_instruction(CREATE_INSTRUCTION_R(0, 1, rs->value.reg, 1, 0, 0x2B));
                    write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry)));
                }
                else {
                    write_instruction(CREATE_INSTRUCTION_R(0, rt->value.reg, rs->value.reg, 1, 0, 0x2B));
                    write_instruction(CREATE_INSTRUCTION_I(0x05, 1, 0, get_branch_offset(sym_entry))); 
                }
            }
            break;
        }
    }

    if(!assemble_status) incr_segment_offset(entry->size);

    return assemble_status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
leaq 0x9b50(%rip), %rcx      # 0xe0d0
subq %rcx, %rax
sarq $0x3, %rax
addq $-0x29, %rax
movq %rax, -0x288(%rbp)
subq $0x27, %rax
ja 0x5943
movq -0x288(%rbp), %rax
leaq 0x5be6(%rip), %rcx      # 0xa190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
movq -0x20(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x21, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
shrl $0xf, %eax
andl $0x1ffff, %eax          # imm = 0x1FFFF
cmpl $0x1ffff, %eax          # imm = 0x1FFFF
je 0x4684
movl -0x3c(%rbp), %eax
shrl $0x10, %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x0, %eax
je 0x4684
movl -0x3c(%rbp), %edi
shrl $0x10, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x3c010000, %edi       # imm = 0x3C010000
callq 0x37c0
movq -0x30(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x34200000, %edi       # imm = 0x34200000
movl -0x3c(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x46ec
movl -0x3c(%rbp), %eax
shrl $0x10, %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x46c7
movl -0x3c(%rbp), %eax
shrl $0xf, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x46c7
movq -0x30(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x34000000, %edi       # imm = 0x34000000
movl -0x3c(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x46ea
movq -0x30(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x24000000, %edi       # imm = 0x24000000
movl -0x3c(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x46ec
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq 0xae94(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4750
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x4792
movq -0x58(%rbp), %rax
movl 0xc(%rax), %edi
shrl $0x10, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x3c010000, %edi       # imm = 0x3C010000
callq 0x37c0
movq -0x48(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x34200000, %edi       # imm = 0x34200000
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
orl $0x0, %edi
movq -0x60(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x27, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq 0xad9e(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4846
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x487d
movq -0x70(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x15, %eax
orl $0x10000000, %eax       # imm = 0x10000000
orl $0x0, %eax
movl %eax, -0x28c(%rbp)
movq -0x80(%rbp), %rdi
callq 0x38d0
movl -0x28c(%rbp), %edi
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x9c(%rbp)
movq 0xacd3(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4920
movl $0x0, -0x14(%rbp)
movq -0xa8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
jmp 0x49b5
cmpl $0x0, -0x9c(%rbp)
je 0x495e
movq -0x88(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x28000000, %edi       # imm = 0x28000000
orl $0x10000, %edi          # imm = 0x10000
movq -0x90(%rbp), %rax
movl 0x8(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x4996
movq -0x88(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x90(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
movq -0xa8(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x10200000, %edi       # imm = 0x10200000
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0xc4(%rbp)
movq 0xab9b(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4a6b
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0xc4(%rbp)
je 0x4a52
movl $0x4, %edi
callq 0x3490
movq -0xd0(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
jmp 0x4b31
cmpl $0x0, -0xc4(%rbp)
je 0x4ad8
movq -0xb0(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x20000000, %edi       # imm = 0x20000000
orl $0x10000, %edi          # imm = 0x10000
orl $0xffff, %edi           # imm = 0xFFFF
callq 0x37c0
movq -0xb8(%rbp), %rax
movl 0x8(%rax), %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x28210000, %edi       # imm = 0x28210000
callq 0x37c0
movq -0xd0(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x4b2f
movq -0xb8(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0xb0(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
movq -0xd0(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x10200000, %edi       # imm = 0x10200000
callq 0x37c0
jmp 0x4b31
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xe0(%rbp)
movq 0xaa49(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4ba7
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x4be4
movq -0xd8(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x15, %eax
orl $0x14000000, %eax       # imm = 0x14000000
orl $0x0, %eax
movl %eax, -0x290(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x38d0
movl -0x290(%rbp), %edi
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x104(%rbp)
movq 0xa96c(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x100(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4c87
movq -0x110(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x4d1c
cmpl $0x0, -0x104(%rbp)
je 0x4cc5
movq -0xf0(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x28000000, %edi       # imm = 0x28000000
orl $0x10000, %edi          # imm = 0x10000
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x4cfd
movq -0xf0(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0xf8(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
movq -0x110(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x12c(%rbp)
movq 0xa834(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x128(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x4dd2
cmpl $0x0, -0x12c(%rbp)
je 0x4db2
movl $0x4, %edi
callq 0x3490
movq -0x138(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x4e98
cmpl $0x0, -0x12c(%rbp)
je 0x4e3f
movq -0x120(%rbp), %rax
movl 0x8(%rax), %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x20010000, %edi       # imm = 0x20010000
callq 0x37c0
movq -0x118(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x200000, %edi         # imm = 0x200000
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
movq -0x138(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x4e96
movq -0x120(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x118(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
movq -0x138(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x4e98
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x148(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x150(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x0, %edi
orl $0x18, %edi
callq 0x37c0
movq -0x140(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0xb, %edi
orl $0x0, %edi
orl $0x0, %edi
orl $0x12, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x158(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x7c0, %edi            # imm = 0x7C0
orl $0x3, %edi
callq 0x37c0
movq -0x160(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x200000, %edi         # imm = 0x200000
movq -0x158(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x26, %edi
callq 0x37c0
movq -0x158(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
orl $0x10000, %edi          # imm = 0x10000
movq -0x158(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x23, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
movq -0x168(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x22, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x178(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x180(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
orl $0x800, %edi            # imm = 0x800
movq -0x188(%rbp), %rcx
movl $0x20, %eax
subl 0x8(%rcx), %eax
andl $0x1f, %eax
shll $0x6, %eax
orl %eax, %edi
orl $0x0, %edi
callq 0x37c0
movq -0x180(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
movq -0x178(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
movq -0x188(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1f, %eax
shll $0x6, %eax
orl %eax, %edi
orl $0x2, %edi
callq 0x37c0
movq -0x178(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
orl $0x10000, %edi          # imm = 0x10000
movq -0x178(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x25, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x190(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x198(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1a0(%rbp)
movq -0x198(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
orl $0x800, %edi            # imm = 0x800
movq -0x1a0(%rbp), %rcx
movl $0x20, %eax
subl 0x8(%rcx), %eax
andl $0x1f, %eax
shll $0x6, %eax
orl %eax, %edi
orl $0x2, %edi
callq 0x37c0
movq -0x198(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
movq -0x190(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
movq -0x1a0(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1f, %eax
shll $0x6, %eax
orl %eax, %edi
orl $0x0, %edi
callq 0x37c0
movq -0x190(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
orl $0x10000, %edi          # imm = 0x10000
movq -0x190(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x25, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x1b0(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
movq -0x1a8(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x2a, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1c0(%rbp)
movq 0xa2eb(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x1c0(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x5305
movq -0x1c8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x5324
movq -0x1c8(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x4010000, %edi        # imm = 0x4010000
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1d0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1d8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x1e0(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
movq -0x1d0(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x23, %edi
callq 0x37c0
movq -0x1d0(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x0, %edi
movq -0x1d0(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl %eax, %edi
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1e8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1f0(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f0(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x1fc(%rbp)
movq 0xa177(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x1f8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x548f
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x1fc(%rbp)
je 0x5476
movl $0x4, %edi
callq 0x3490
movq -0x208(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
jmp 0x5555
cmpl $0x0, -0x1fc(%rbp)
je 0x54fc
movq -0x1f0(%rbp), %rax
movl 0x8(%rax), %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x20010000, %edi       # imm = 0x20010000
callq 0x37c0
movq -0x1e8(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x200000, %edi         # imm = 0x200000
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x208(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x10200000, %edi       # imm = 0x10200000
callq 0x37c0
jmp 0x5553
movq -0x1f0(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x1e8(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x208(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x10200000, %edi       # imm = 0x10200000
callq 0x37c0
jmp 0x5555
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x210(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x218(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x224(%rbp)
movq 0x9ffb(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x220(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x55f8
movl $0x0, -0x14(%rbp)
movq -0x230(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
jmp 0x568d
cmpl $0x0, -0x224(%rbp)
je 0x5636
movq -0x210(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x2c000000, %edi       # imm = 0x2C000000
orl $0x10000, %edi          # imm = 0x10000
movq -0x218(%rbp), %rax
movl 0x8(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x566e
movq -0x210(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x218(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x230(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x10200000, %edi       # imm = 0x10200000
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x238(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x240(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x248(%rbp)
movq -0x240(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x24c(%rbp)
movq 0x9ec3(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x248(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x5730
movq -0x258(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x57c5
cmpl $0x0, -0x24c(%rbp)
je 0x576e
movq -0x238(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x2c000000, %edi       # imm = 0x2C000000
orl $0x10000, %edi          # imm = 0x10000
movq -0x240(%rbp), %rax
movl 0x8(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %edi
callq 0x37c0
jmp 0x57a6
movq -0x238(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x240(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x258(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x5943
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x260(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x268(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x270(%rbp)
movq -0x268(%rbp), %rax
movzbl (%rax), %eax
andl $0x2, %eax
movl %eax, -0x274(%rbp)
movq 0x9d8b(%rip), %rax      # 0xf5a8
movq 0x10(%rax), %rdi
movq -0x270(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7ef0
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jne 0x587b
cmpl $0x0, -0x274(%rbp)
je 0x585b
movl $0x4, %edi
callq 0x3490
movq -0x280(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7210
movl $0x0, -0x14(%rbp)
jmp 0x5941
cmpl $0x0, -0x274(%rbp)
je 0x58e8
movq -0x268(%rbp), %rax
movl 0x8(%rax), %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x20010000, %edi       # imm = 0x20010000
callq 0x37c0
movq -0x260(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x10, %edi
orl $0x200000, %edi         # imm = 0x200000
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x280(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x593f
movq -0x268(%rbp), %rax
movzbl 0xd(%rax), %edi
andl $0x1f, %edi
shll $0x15, %edi
orl $0x0, %edi
movq -0x260(%rbp), %rax
movzbl 0xd(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl %eax, %edi
orl $0x800, %edi            # imm = 0x800
orl $0x0, %edi
orl $0x2b, %edi
callq 0x37c0
movq -0x280(%rbp), %rdi
callq 0x38d0
movl %eax, %edi
andl $0xffff, %edi           # imm = 0xFFFF
orl $0x14200000, %edi       # imm = 0x14200000
callq 0x37c0
jmp 0x5941
jmp 0x5943
cmpl $0x0, -0x14(%rbp)
jne 0x5961
movq -0x10(%rbp), %rax
movw 0x6(%rax), %ax
shrw $0x8, %ax
andw $0x7f, %ax
movzbl %al, %edi
callq 0x3490
movl -0x14(%rbp), %eax
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
nopl (%rax)