// File: /workspace/github_cpp_makefile_star2_O2/pollow[P]MIPSClide/assembler.cpp
// Function: Assembler::parse()
void Assembler::parse() {
    // No white space at the begin and end of instruction
    static vector<regex> types {
        // command reg1, reg2, imm I-0
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)\\s*,\\s*(-?\\d+)"),
        // command reg1, imm I-1
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*(-?\\d+)"),
        // command reg1, reg2, label I-2
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)\\s*,\\s*(\\w+)"),
        // command reg1, label I-3
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*(\\w+)"),
        // command reg1, number(reg2) I-4
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*(-?\\d+)\\s*\\(\\s*\\$(\\w+)\\s*\\)"),
        // command reg1, reg2, reg3 R-0
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)"),
        // command reg1, reg2 R-1
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)"),
        // command reg1 R-2
        regex("(\\w+)\\s*\\$(\\w+)"),
        // command reg1, reg2, shamt R-3 useless, same as the first.
        regex("(\\w+)\\s*\\$(\\w+)\\s*,\\s*\\$(\\w+)\\s*,\\s*(-?\\d+)"),
        // command label J-0
        regex("(\\w+)\\s*(\\w+)")
    };

    smatch result;
    for(auto i = statements.begin(); i != statements.end(); i++) {
        try {
            // static regex comma_split("(^\\s+)|(\\s+$)");
            static regex comma_split(",");
            if ( tolower((*i)[0]) == 'd' && tolower((*i)[1]) == 'd' ) {
                string data = i->substr(3, i->size()-3);
                data = regex_replace(data, comma_split, " ");
                for(auto j = labels.begin(); j != labels.end(); j++) {
                    if (data.find(j->first) != string::npos) {
                        data = regex_replace(data, regex(j->first), (stringstream() << j->second).str());
                    }
                }
                stringstream buffer( data );
                buffer >> setbase(0);
                for(unsigned int i; buffer >> i; ) {
                    machine_code.push_back(i);
                }
            } else if ( i->substr(0, 4) == "resd" || i->substr(0, 4) == "RESD" ) {
                string data = i->substr(4, i->size()-4);
                stringstream buffer( data );
                int count;
                buffer >> setbase(0) >> count;
                for(int i = 0; i < count; i++) machine_code.push_back(0);
            } else {
                auto j = types.begin();
                for(; j != types.end(); j++) 
                    if ( regex_match(*i, result, *j) ) {
                        // cout << *i << endl;
                        elements.push_back( {} );
                        for(size_t k = 1; k < result.size(); k++) 
                            elements.back().push_back(result[k].str());
                        Instruction *tmp;
                        int imm = 0;
                        switch (j-types.begin()) {
                            case 0 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), result[3].str(),
                                        atoi(result[4].str().c_str()), 'I');
                                break;
                            case 1 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), 
                                        atoi(result[3].str().c_str()), 'I');
                                break;
                            case 2 : 
                                if (!labels.count(result[4].str())) {
                                    throw invalid_argument("Label undefined");
                                }
                                imm = labels[result[4].str()] - (i - statements.begin()+1) & ((1 << 16) - 1);
                                tmp = new Instruction(result[1].str(), result[2].str(), result[3].str(), imm, 'I');
                                break;
                            case 3 : 
                                if (!labels.count(result[4].str())) {
                                    throw invalid_argument("Label undefined");
                                }
                                imm = labels[result[4].str()] - (i - statements.begin()+1) & ((1 << 16) - 1);
                                tmp = new Instruction(result[1].str(), result[2].str(), imm, 'I');
                                break;
                            case 4 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), atoi(result[3].str().c_str()),
                                        result[4].str(), 'I');
                                break;
                            case 5 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), result[3].str(), 
                                        result[4].str(), 'R');
                                break;
                            case 6 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), result[3].str(), 'R');
                                break;
                            case 7 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), 'R');
                                break;
                            case 8 : 
                                tmp = new Instruction(result[1].str(), result[2].str(), 
                                        atoi(result[3].str().c_str()), 'R');
                                break;
                            case 9 : 
                                if (!labels.count(result[2].str())) {
                                    throw invalid_argument("Label undefined");
                                }
                                imm = labels[result[2].str()];
                                tmp = new Instruction(result[1].str(), imm, 'J');
                                break;
                        }
                        machine_code.push_back(tmp->compile());
                        break;
                    }
                if ( j == types.end() ) {
                    throw invalid_argument("Syntax Error");
                }
            }
        } catch(exception &err) {
            throw invalid_argument("Error occurs when parsing:\n\t" + string(err.what()) + "\n\t\tat " + (*i));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
movb 0x20c2b(%rip), %al      # 0x2a778
testb %al, %al
movq %rdi, -0xb0(%rbp)
je 0xad3b
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq 0x20(%rbx), %r15
leaq 0x38(%rbx), %rax
movq %rax, -0xe8(%rbp)
leaq 0x68(%rbx), %rax
movq %rax, -0xa8(%rbp)
leaq 0x50(%rbx), %rax
movq %rax, -0xd8(%rbp)
leaq 0x70(%rbx), %rax
movq %rax, -0xf0(%rbp)
leaq -0x280(%rbp), %r12
leaq -0xd0(%rbp), %r14
movq -0xb0(%rbp), %rax
cmpq 0x28(%rax), %r15
je 0xace8
movb 0x20be1(%rip), %al      # 0x2a7a0
testb %al, %al
je 0xac85
movq (%r15), %rbx
movsbl (%rbx), %edi
callq 0x5430
cmpl $0x64, %eax
jne 0x9d26
movsbl 0x1(%rbx), %edi
callq 0x5430
cmpl $0x64, %eax
jne 0x9d26
movq 0x8(%r15), %rcx
addq $-0x3, %rcx
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
callq 0x5340
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x20b6c(%rip), %rdx     # 0x2a780
leaq 0x13877(%rip), %rcx     # 0x1d492
xorl %r8d, %r8d
callq 0xbc8b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x53b0
movq %r12, %rdi
callq 0x5160
movq -0xb0(%rbp), %rax
movq 0x80(%rax), %r12
movq %r15, -0x38(%rbp)
cmpq -0xf0(%rbp), %r12
je 0x9e07
leaq 0x20(%r12), %r14
leaq -0x80(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x5610
cmpq $-0x1, %rax
je 0x9d0f
leaq -0xd0(%rbp), %rdi
movq %r14, %rsi
pushq $0x10
popq %rdx
callq 0xbd2c
leaq -0x280(%rbp), %rbx
movq %rbx, %rdi
callq 0x5240
leaq 0x40(%r12), %rsi
movq %rbx, %rdi
callq 0xbd93
leaq -0x2a0(%rbp), %r15
addq $0x18, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x5490
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
leaq -0x80(%rbp), %rbx
movq %rbx, %rsi
leaq -0xd0(%rbp), %r13
movq %r13, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xbcdb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53b0
movq %r14, %rdi
callq 0x5160
movq %r15, %rdi
callq 0x5160
leaq -0x280(%rbp), %rdi
callq 0x5270
movq %r13, %rdi
callq 0xbc02
movq -0x38(%rbp), %r15
movq %r12, %rdi
callq 0x5230
movq %rax, %r12
leaq -0xd0(%rbp), %r14
jmp 0x9c48
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
pushq $0x4
popq %rcx
callq 0x5340
movq %r12, %rdi
leaq 0x12660(%rip), %rsi     # 0x1c3a0
callq 0xbdb1
testb %al, %al
je 0x9d53
movq %r12, %rdi
callq 0x5160
jmp 0x9d99
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
pushq $0x4
popq %rcx
callq 0x5340
movq %rbx, %rdi
leaq 0x12634(%rip), %rsi     # 0x1c3a5
callq 0xbdb1
movl %eax, %r14d
movq %rbx, %rdi
callq 0x5160
movq %r12, %rdi
callq 0x5160
testb %r14b, %r14b
leaq -0xd0(%rbp), %r14
je 0x9e82
movq 0x8(%r15), %rcx
addq $-0x4, %rcx
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x4
popq %rdx
callq 0x5340
movq %r12, %rdi
movq %rbx, %rsi
pushq $0x18
popq %rdx
callq 0x54a0
movq -0x280(%rbp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, -0x268(%rbp,%rax)
movq %r12, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x51e0
xorl %ebx, %ebx
cmpl -0xa0(%rbp), %ebx
jge 0x9e68
andl $0x0, -0xd0(%rbp)
movq -0xd8(%rbp), %rdi
movq %r14, %rsi
callq 0x18d8a
incl %ebx
jmp 0x9de5
leaq -0x280(%rbp), %r12
movq %r12, %rdi
leaq -0x80(%rbp), %rsi
pushq $0x18
popq %rdx
callq 0x54a0
movq -0x280(%rbp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, -0x268(%rbp,%rax)
leaq -0xa0(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5540
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x9e68
movq -0xd8(%rbp), %rdi
leaq -0xa0(%rbp), %rbx
movq %rbx, %rsi
callq 0x8706
jmp 0x9e37
movq %r12, %rdi
callq 0x5270
leaq -0x80(%rbp), %rdi
callq 0x5160
addq $0x20, %r15
jmp 0x9ba8
movq 0x208d7(%rip), %rdx     # 0x2a760
movq %rdx, %rbx
negq %rbx
cmpq 0x208d2(%rip), %rdx     # 0x2a768
je 0x9ec2
movq %r15, %rdi
leaq -0x60(%rbp), %rsi
movq %rdx, -0xe0(%rbp)
xorl %ecx, %ecx
callq 0xbdc1
testb %al, %al
jne 0x9eca
movq -0xe0(%rbp), %rdx
addq $0x20, %rdx
addq $-0x20, %rbx
jmp 0x9e8f
movq %rdx, %rax
jmp 0xab1f
movq %r15, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x280(%rbp)
andq $0x0, -0x270(%rbp)
movq -0xe8(%rbp), %rdi
movq %r12, %rsi
callq 0x18fda
movq %r12, %rdi
callq 0x88fe
pushq $0x18
popq %r15
pushq $0x1
popq %r13
movq -0x60(%rbp), %r12
movq -0x58(%rbp), %r14
cmpq %r14, %r12
je 0x9f63
movq %r14, %rax
subq %r12, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x3, %rax
cmpq %rax, %r13
jae 0x9f68
movq -0xb0(%rbp), %rax
movq 0x40(%rax), %r14
addq %r15, %r12
movq %r12, %rsi
leaq -0x280(%rbp), %r12
movq %r12, %rdi
callq 0xbe22
addq $-0x18, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x9864
movq %r12, %rdi
callq 0x5160
incq %r13
addq $0x18, %r15
jmp 0x9eff
movq %r12, %r13
jmp 0x9f6b
movq %r14, %r13
addq 0x207ee(%rip), %rbx     # 0x2a760
negq %rbx
sarq $0x5, %rbx
cmpq $0x9, %rbx
movq -0x38(%rbp), %r15
ja 0xaae5
leaq 0x12202(%rip), %rcx     # 0x1c190
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa3ba
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa3ba
addq $0x18, %r12
jmp 0xa3c1
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa321
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa321
addq $0x18, %r12
jmp 0xa328
subq %r12, %r13
cmpq %r14, %r12
je 0xa1c8
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa1c8
addq $0x30, %r12
jmp 0xa1cf
subq %r12, %r13
cmpq %r14, %r12
je 0xa237
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xa237
addq $0x60, %r12
jmp 0xa23e
subq %r12, %r13
cmpq %r14, %r12
je 0xa2ad
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xa2ad
addq $0x60, %r12
movq %r12, %rsi
jmp 0xa2b5
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa371
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa371
addq $0x18, %r12
jmp 0xa378
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa403
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa403
addq $0x18, %r12
jmp 0xa40a
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa44c
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa44c
addq $0x18, %r12
jmp 0xa453
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa495
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa495
addq $0x18, %r12
jmp 0xa49c
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
subq %r12, %r13
cmpq %r14, %r12
je 0xa4de
movq %r13, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xa4de
addq $0x18, %r12
jmp 0xa4e5
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0xc00c
movq %rax, %r14
movq %rbx, %rdi
callq 0x5160
testq %r14, %r14
je 0xaeb4
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa762
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa762
addq $0x30, %rsi
jmp 0xa769
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0xc00c
movq %rax, %r14
movq %rbx, %rdi
callq 0x5160
testq %r14, %r14
je 0xaeec
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
movq -0xb0(%rbp), %r14
je 0xa7cc
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xa7cc
addq $0x60, %rsi
jmp 0xa7d3
leaq (%r12,%r13), %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r12
movq %r12, %rdi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %r12, %rsi
callq 0xc00c
movq %rax, %r14
movq %r12, %rdi
callq 0x5160
testq %r14, %r14
je 0xaed0
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
movq -0xb0(%rbp), %rbx
je 0xa847
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xa847
addq $0x60, %rsi
jmp 0xa84e
addq %r13, %r12
addq $-0x48, %r12
leaq -0xd0(%rbp), %rbx
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa527
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa527
addq $0x30, %rsi
jmp 0xa52e
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa56a
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa56a
addq $0x30, %rsi
jmp 0xa571
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa59b
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa59b
addq $0x30, %rsi
jmp 0xa5a2
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa5e5
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa5e5
addq $0x30, %rsi
jmp 0xa5ec
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa62f
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa62f
addq $0x30, %rsi
jmp 0xa636
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa679
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa679
addq $0x30, %rsi
jmp 0xa680
addq %r13, %r12
addq $-0x48, %r12
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa6c3
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xa6c3
addq $0x30, %rsi
jmp 0xa6ca
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa70d
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa70d
addq $0x48, %rsi
jmp 0xa714
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0xbe22
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
pushq $0x52
popq %rcx
callq 0xc29e
jmp 0xaad5
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa8bd
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa8bd
addq $0x48, %rsi
jmp 0xa8c4
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa903
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa903
addq $0x48, %rsi
jmp 0xa90a
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa940
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa940
addq $0x48, %rsi
jmp 0xa947
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa986
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa986
addq $0x48, %rsi
jmp 0xa98d
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r14
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa9bb
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xa9bb
addq $0x48, %rsi
jmp 0xa9c2
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xbe22
movq -0xa0(%rbp), %rdi
callq 0x5460
movl %eax, %r12d
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xa9f5
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xa9f5
addq $0x60, %rsi
jmp 0xa9fc
addq %rcx, %rsi
addq $-0x48, %rsi
movq %rbx, %rdi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0xc030
movl (%rax), %r12d
movq %rbx, %rdi
callq 0x5160
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xab2d
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xab2d
addq $0x18, %rsi
jmp 0xab34
addq %rcx, %rsi
addq $-0x48, %rsi
movq %rbx, %rdi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0xc030
movl 0x20(%r14), %ecx
movl %r15d, %r14d
subl %ecx, %r14d
notl %r14d
shrl $0x5, %r14d
addl (%rax), %r14d
movq %rbx, %rdi
callq 0x5160
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xab53
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xab53
addq $0x18, %rsi
jmp 0xab5a
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r12, %rdi
callq 0xbe22
movq -0xa8(%rbp), %rdi
movq %r12, %rsi
callq 0xc030
movl 0x20(%rbx), %ecx
movl %r15d, %ebx
subl %ecx, %ebx
notl %ebx
shrl $0x5, %ebx
addl (%rax), %ebx
movq %r12, %rdi
callq 0x5160
movl $0x98, %edi
callq 0x5310
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xab91
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0xab91
addq $0x18, %rsi
jmp 0xab98
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xaa3f
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xaa3f
addq $0x60, %rsi
jmp 0xaa46
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xbe22
movq -0xa0(%rbp), %rdi
callq 0x5460
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
movl %eax, %ecx
pushq $0x49
popq %r8
callq 0xbf78
jmp 0xaa33
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xaa8b
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x8, %rax
cmpq $-0x6, %rax
ja 0xaa8b
addq $0x60, %rsi
jmp 0xaa92
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
callq 0xbe22
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
movq %r12, %rcx
pushq $0x52
popq %r8
callq 0xc1fc
jmp 0xaacd
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xbe22
movq -0xa0(%rbp), %rdi
callq 0x5460
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
movl %eax, %ecx
pushq $0x52
popq %r8
callq 0xbf78
jmp 0xaa33
addq %rcx, %rsi
addq $-0x48, %rsi
movq %rbx, %rdi
callq 0xbe22
movq %rbx, %r13
movq -0x30(%rbp), %rdi
leaq -0x280(%rbp), %r14
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
movl %r12d, %ecx
movq %r13, %r8
pushq $0x49
popq %r9
callq 0xc09a
movq %r13, %rdi
callq 0x5160
leaq -0xa0(%rbp), %rdi
jmp 0xaad0
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xd0(%rbp), %rdi
callq 0xbe22
movq -0xd0(%rbp), %rdi
callq 0x5460
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
leaq -0xa0(%rbp), %r12
movq %r12, %rcx
movl %eax, %r8d
pushq $0x49
popq %r9
callq 0xbe66
leaq -0xd0(%rbp), %rdi
jmp 0xaac8
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xd0(%rbp), %r13
movq %r13, %rdi
callq 0xbe22
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
leaq -0xa0(%rbp), %r12
movq %r12, %rcx
movq %r13, %r8
pushq $0x52
popq %r9
callq 0xc14a
movq %r13, %rdi
callq 0x5160
movq %r12, %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5160
movq %r14, %rdi
callq 0x5160
movq -0x30(%rbp), %rdi
callq 0x19a5c
leaq -0x280(%rbp), %r12
movl %eax, -0x280(%rbp)
movq -0xd8(%rbp), %rdi
movq %r12, %rsi
callq 0x18d8a
movq 0x1fc57(%rip), %rax     # 0x2a768
leaq -0xd0(%rbp), %r14
movq -0xe0(%rbp), %rdx
cmpq %rax, %rdx
jne 0x9e79
jmp 0xad03
addq %rcx, %rsi
addq $-0x48, %rsi
movq %rbx, %rdi
callq 0xbe22
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movl %r12d, %edx
pushq $0x4a
popq %rcx
callq 0xc328
movq %rbx, %rdi
jmp 0xaae0
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x280(%rbp), %r13
movq %r13, %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xabc8
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xabc8
addq $0x30, %rsi
jmp 0xabcf
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r12, %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xac00
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0xac00
addq $0x30, %rsi
jmp 0xac07
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x80(%rbp), %rdi
callq 0xbe22
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0xac39
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0xac39
addq $0x48, %rsi
jmp 0xac40
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0x80(%rbp), %r14
movq %r14, %rdi
callq 0xbe22
movzwl %bx, %ecx
movq -0x30(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
pushq $0x49
popq %r8
callq 0xbf78
movq %r14, %rdi
callq 0x5160
movq %r12, %rdi
jmp 0xaae0
addq %rcx, %rsi
addq $-0x48, %rsi
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
callq 0xbe22
movzwl %r14w, %r8d
movq -0x30(%rbp), %rdi
movq %r13, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdx
movq %r12, %rcx
pushq $0x49
popq %r9
callq 0xbe66
movq %r12, %rdi
callq 0x5160
movq %rbx, %rdi
callq 0x5160
movq %r13, %rdi
jmp 0xaae0
leaq 0x1fb14(%rip), %rdi     # 0x2a7a0
callq 0x5580
testl %eax, %eax
je 0x9bc7
leaq 0x1fae0(%rip), %rdi     # 0x2a780
leaq 0x116f7(%rip), %rsi     # 0x1c39e
pushq $0x10
popq %rdx
callq 0xbb98
leaq 0xf4c(%rip), %rdi       # 0xbc02
leaq 0x1fac3(%rip), %rsi     # 0x2a780
leaq 0x1f664(%rip), %rdx     # 0x2a328
callq 0x52b0
leaq 0x1fad0(%rip), %rdi     # 0x2a7a0
callq 0x5210
leaq -0x280(%rbp), %r12
leaq -0xd0(%rbp), %r14
jmp 0x9bc7
leaq -0x60(%rbp), %rdi
callq 0xc500
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %r12
pushq $0x10
popq %rdi
callq 0x5190
movq %rax, %r15
leaq 0x116a2(%rip), %rsi     # 0x1c3ba
movq %rax, %rdi
callq 0x55c0
movq 0x1f2a9(%rip), %rsi     # 0x29fd0
movq 0x1f28a(%rip), %rdx     # 0x29fb8
movq %r15, %rdi
callq 0x5510
jmp 0xb222
leaq 0x1fa36(%rip), %rdi     # 0x2a778
callq 0x5580
testl %eax, %eax
je 0x9b5c
leaq 0x1151e(%rip), %rsi     # 0x1c274
leaq -0x280(%rbp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0xbb98
leaq -0x260(%rbp), %r15
leaq 0x1152a(%rip), %rsi     # 0x1c2a0
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x240(%rbp), %r15
leaq 0x1152f(%rip), %rsi     # 0x1c2be
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x220(%rbp), %r15
leaq 0x11540(%rip), %rsi     # 0x1c2e8
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x200(%rbp), %r15
leaq 0x11543(%rip), %rsi     # 0x1c304
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x1e0(%rbp), %r15
leaq 0x1155c(%rip), %rsi     # 0x1c336
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x1c0(%rbp), %r15
leaq 0x1156f(%rip), %rsi     # 0x1c362
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x1a0(%rbp), %r15
leaq 0x11574(%rip), %rsi     # 0x1c380
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x180(%rbp), %r15
leaq 0x1144f(%rip), %rsi     # 0x1c274
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq -0x160(%rbp), %r15
leaq 0x11552(%rip), %rsi     # 0x1c390
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0xbb98
leaq 0x1f910(%rip), %rdi     # 0x2a760
leaq -0x280(%rbp), %rsi
pushq $0xa
popq %rdx
leaq -0x60(%rbp), %rcx
callq 0xbc26
movl $0x120, %ebx            # imm = 0x120
leaq (%rbx,%rbp), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xbc02
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0xae68
leaq 0xdd7(%rip), %rdi       # 0xbc60
leaq 0x1f8d0(%rip), %rsi     # 0x2a760
leaq 0x1f491(%rip), %rdx     # 0x2a328
callq 0x52b0
leaq 0x1f8d5(%rip), %rdi     # 0x2a778
callq 0x5210
movq -0xb0(%rbp), %rbx
jmp 0x9b5c
pushq $0x10
popq %rdi
callq 0x5190
movq %rax, %r15
leaq 0x114e4(%rip), %rsi     # 0x1c3aa
movq %rax, %rdi
callq 0x55c0
jmp 0xaf06
pushq $0x10
popq %rdi
callq 0x5190
movq %rax, %r15
leaq 0x114c8(%rip), %rsi     # 0x1c3aa
movq %rax, %rdi
callq 0x55c0
jmp 0xaf06
pushq $0x10
popq %rdi
callq 0x5190
movq %rax, %r15
leaq 0x114ac(%rip), %rsi     # 0x1c3aa
movq %rax, %rdi
callq 0x55c0
movq 0x1f0c3(%rip), %rsi     # 0x29fd0
movq 0x1f0a4(%rip), %rdx     # 0x29fb8
movq %r15, %rdi
callq 0x5510
movq %rax, %rbx
movl $0x120, %r14d           # imm = 0x120
leaq (%r14,%rbp), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xbc02
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0xaf25
jmp 0xaf5a
movq %rax, %rbx
jmp 0xaf5a
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0xbc02
cmpq %r14, %r15
jne 0xaf49
leaq 0x1f817(%rip), %rdi     # 0x2a778
callq 0x5200
jmp 0xb28a
movq %rdx, %r14
movq %rax, %rbx
leaq 0x1f828(%rip), %rdi     # 0x2a7a0
callq 0x5200
jmp 0xb174
jmp 0xaf86
jmp 0xaf86
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x5260
jmp 0xb101
jmp 0xb00f
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb0cd
jmp 0xb107
jmp 0xb0cd
jmp 0xb107
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb0cd
jmp 0xb107
jmp 0xb0cd
jmp 0xb107
jmp 0xb00f
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
movq %rdx, %r14
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x5160
jmp 0xb03f
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb039
jmp 0xb04d
jmp 0xb062
jmp 0xb076
jmp 0xb04d
jmp 0xb062
jmp 0xb076
movq %rdx, %r14
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x5160
jmp 0xb053
movq %rdx, %r14
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x5160
jmp 0xb068
jmp 0xb062
jmp 0xb076
movq %rdx, %r14
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x5160
jmp 0xb07c
movq %rdx, %r14
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x52e0
jmp 0xb101
jmp 0xb0cd
jmp 0xb107
jmp 0xb0cd
jmp 0xb107
jmp 0xb0e7
jmp 0xb107
movq %rdx, %r14
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x88fe
jmp 0xb101
movq %rdx, %r14
movq %rax, %rbx
jmp 0xb0bd
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x5260
movq %r12, %r15
jmp 0xb174
jmp 0xb107
jmp 0xb10f
jmp 0xb10f
jmp 0xb107
movq %rdx, %r14
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
jmp 0xb16f
jmp 0xb159
jmp 0xb107
jmp 0xb10f
jmp 0xb107
movq %rdx, %r14
movq %rax, %rbx
jmp 0xb101
movq %rdx, %r14
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x5160
movq -0x38(%rbp), %r15
jmp 0xb174
movq %rdx, %r14
movq %rax, %rbx
jmp 0xb174
movq %rdx, %r14
movq %rax, %rbx
jmp 0xb16b
movq %rdx, %r14
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
callq 0x5160
jmp 0xb139
movq %rdx, %r14
movq %rax, %rbx
jmp 0xb149
movq %rdx, %r14
movq %rax, %rbx
movq -0x38(%rbp), %r15
leaq -0x280(%rbp), %rdi
callq 0x5270
leaq -0xd0(%rbp), %rdi
callq 0xbc02
jmp 0xb16b
jmp 0xb159
movq %rdx, %r14
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x5270
leaq -0x80(%rbp), %rdi
callq 0x5160
cmpl $0x1, %r14d
jne 0xb281
movq %rbx, %rdi
callq 0x5120
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x5190
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq -0xd0(%rbp), %rdi
leaq -0x2a0(%rbp), %rdx
movq %rax, %rsi
callq 0x5110
leaq 0x1120d(%rip), %rsi     # 0x1c3c7
leaq -0xa0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x9302
leaq 0x11210(%rip), %rdx     # 0x1c3e4
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xc3d7
leaq -0x280(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %r15, %rdx
callq 0xc3ae
movb $0x1, %r15b
leaq -0x280(%rbp), %rsi
movq %r14, %rdi
callq 0x5530
xorl %r15d, %r15d
movq 0x1edbd(%rip), %rsi     # 0x29fd0
movq 0x1ed9e(%rip), %rdx     # 0x29fb8
movq %r14, %rdi
callq 0x5510
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x5160
jmp 0xb239
movq %rax, %rbx
movb $0x1, %r15b
leaq -0x80(%rbp), %rdi
callq 0x5160
jmp 0xb24a
movq %rax, %rbx
movb $0x1, %r15b
leaq -0xa0(%rbp), %rdi
callq 0x5160
jmp 0xb25e
movq %rax, %rbx
movb $0x1, %r15b
leaq -0xd0(%rbp), %rdi
callq 0x5160
testb %r15b, %r15b
jne 0xb274
jmp 0xb27c
movq %rax, %rbx
movq %r14, %rdi
callq 0x5260
callq 0x54d0
leaq -0x60(%rbp), %rdi
callq 0xc500
movq %rbx, %rdi
callq 0x5560
movq %rax, %rdi
callq 0x879b