// File: /workspace/github_cpp_makefile_star2_O2/Rubenmp[P]Rubik/src/Rubik.cpp
// Function: main
int main(int argc, char* argv[]){
   Rubik rubik;
   char character;
   vector<char> solution;

   // Options
   if (argc == 1) {
     // Print help and exit
     arguments(argv[0]);
     return 1;    
   }
   else if (argc <= 4){
     // Probably there are better implementations to handle options
     if (argv[1][0] == '-'){
       if (strlen(argv[1]) != 2){ // Two or more options
         if (argv[1][1] == 'M'){ // Execute movement
           ifstream is;
           is.open(argv[2]);
         
           if (!is){
             cerr << "Error: not readable file " << argv[2] << "." << endl;
             return 1;
           }
           is >> rubik; // Read cube
           is.close();

           char mov = argv[1][2];
           if (mov == 'F')
             rubik.F(solution);
           else if (mov == 'f')
             rubik.f(solution);
           else if (mov == 'B')
             rubik.B(solution);
           else if (mov == 'b')
             rubik.b(solution);
           else if (mov == 'R')
             rubik.R(solution);
           else if (mov == 'r')
             rubik.r(solution);
           else if (mov == 'L')
             rubik.L(solution);
           else if (mov == 'l')
             rubik.l(solution);
           else if (mov == 'U')
             rubik.U(solution);
           else if (mov == 'u')
             rubik.u(solution);
           else if (mov == 'D')
             rubik.D(solution);
           else if (mov == 'd')
             rubik.d(solution);
           else{
             cerr << "Error: invalid movement (" << mov << ") to execute." << endl;
             return 1;
           }
           ofstream os;
           os.open(argv[2]);
           
           if (!os){
             cerr << "Error: not writable file " << argv[2] << endl;
             return 1;
           }
           os << rubik; // Write cube
           os.close();
         }
         else{
           cerr << "Error: too many options " << argv[1] << endl;
           return 1;
         }
       }
       else if ((argv[1][1] == 's' || argv[1][1] == 'p') && argc == 3){
         ifstream is;
         is.open(argv[2]);
         
         if (!is){
           cerr << "Error: not readable file " << argv[2] << endl;
           return 1;
         }
         is >> rubik; // Read cube
         is.close();
         if (argv[1][1] == 's'){
           if (rubik.isSolved())
             cout << "y" << endl;
           else
             cout << "n" << endl;
         }
         else
           rubik.printAll();
       }
       else{ // See options
         if (argv[1][1] == 'e') // Example
           Rubik::fileExample();
         else if (argv[1][1] == 'h') // Help
           arguments(argv[0]);
         else if (argv[1][1] == 'i'){ // Interactive mode
           char entry;
           do{
             cout << "Do you want to read of an file (1) or keyboard (2)." << endl;
             cin >> entry;
             cin.ignore(1024, '\n');
           }while(entry != '1' && entry != '2');
           
           if (entry == '1'){
             bool repeat = true;
             char anyKey[100];
             ifstream is;
             
             while (repeat){
               strcpy(anyKey, "");
               cout << "Create a file \"./data/rubik.dat\" with colours in valid order (see -e for explanation of valid file). ";
               cout << "Press any key to continue." << endl;
               cin.getline(anyKey, '\n');
               is.open("./data/rubik.dat");
               if (is)
                 repeat = false;
               else
                 cout << "It's imposible open \"./data/rubik.dat\"" << endl;
               
               is.close();
             }
             
             is.open("./data/rubik.dat");
             is >> rubik;
             is.close();
           }
           else{
             cout << "Reading rubik's cube in terminal (not recommended):" << endl;
             cin >> rubik;
           }
           
           rubik.printAll();
           do{
             cout << "Do you want to correct any position [y/n]?" << endl;
             cin >> character;
           }while (tolower(character) != 'y' && tolower(character) != 'n');
           
           if (tolower(character) == 'y')
             rubik.correctMistakes();
           
           rubik.solveStepByStep(solution);
         }
         else if (argv[1][1] == 'm') // Explain movements
           movements();
         else if (argv[1][1] == 'r'){ // Random solution
           bool boolean = true;
           Rubik aux;
           while (boolean){
             /*
               This is a trick, it will not fail ever... or you will not notice
               (Supposedly it will never repeat the loop if program is correct)
              */
             rubik = Rubik::randomRubik();
             aux = rubik;
             rubik.solve(solution);
             
             if (rubik.isSolved())
               boolean = false;
           }
           aux.printAll();
           cout << endl;
           cout << "Solution: ";
           for (unsigned int i=0; i<solution.size(); ++i)
             cout << solution[i];

           cout << endl << endl;
           rubik.printAll();
           cout << endl;
         }
         else if (argv[1][1] == 'R') // Random Rubik's cube
           cout << Rubik::randomRubik();
         else{
           if (argv[1][1] == 's'){
             cerr << "Error: -s option needs extra argument <input_file>." << endl;
             return 1;
           }
           else{
             cerr << "Error: invalid argument '" << argv[1][1] << "'." << endl;
             return 1;
           }
         }
       }
     }
     else if (argc <= 3) { // Files configuration
       ifstream file;
       file.open(argv[1]);
       if (!file) {
         cerr << "Error: not readable file " << argv[1] << "." << endl;
         return 1;
       }
       else{
         file >> rubik;
         file.close();
         rubik.solve(solution);
         
         if (argc == 2){
           for (unsigned int i=0; i<solution.size(); ++i)
             cout << solution[i];
           cout << endl;
         }
         else if (argc == 3){
           ofstream outFile(argv[2]);
           if (outFile.is_open()) {
             for (unsigned int i=0; i<solution.size(); ++i)
               outFile << solution[i];
             outFile << endl;
             outFile.close();
           }
           else{
             cerr << "Error: can not open " << argv[2] << "." << endl;
             return 1;
           }
         }
         else{
           cerr << "Error: invalid arguments, -h for help." << endl;
           return 1;
         }        
       }
     }
   }  
   else{
     cerr << "Error: invalid number of arguments." << endl;
     return 1;
   }

   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x32(%rsp), %rdi
callq 0x84aa
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
cmpl $0x1, %ebp
jne 0x2463
movq (%rbx), %rsi
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x2f4a
leaq 0x88(%rsp), %rdi
callq 0xac15
leaq 0x88(%rsp), %rdi
callq 0x20e0
jmp 0x24c2
movq 0xdb86(%rip), %r14      # 0xfff0
cmpl $0x4, %ebp
jg 0x24ab
movq 0x8(%rbx), %r15
cmpb $0x2d, (%r15)
jne 0x24e3
movq %r15, %rdi
callq 0x20d0
movzbl 0x1(%r15), %ecx
cmpq $0x2, %rax
jne 0x257d
cmpl $0x73, %ecx
jne 0x2609
cmpl $0x3, %ebp
je 0x261b
leaq 0x8d4f(%rip), %rsi      # 0xb1f8
jmp 0x24b2
leaq 0x8dd3(%rip), %rsi      # 0xb285
movq %r14, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
leaq 0x10(%rsp), %rdi
callq 0x2f90
movl %ebx, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %ebp
je 0x2e7f
leaq 0xa8(%rsp), %rdi
callq 0x21f0
movq 0x8(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2120
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xc8(%rsp,%rax)
je 0x26ac
movq 0xdac2(%rip), %rdi      # 0xfff0
leaq 0x8af3(%rip), %rsi      # 0xb028
callq 0x21b0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
leaq 0x8cf7(%rip), %rsi      # 0xb247
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
xorl %ebp, %ebp
leaq 0xa8(%rsp), %rdi
callq 0x2070
testb %bpl, %bpl
je 0x24c5
jmp 0x2e7f
cmpl $0x4d, %ecx
jne 0x2688
leaq 0xa8(%rsp), %rdi
callq 0x21f0
movq 0x10(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2120
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xc8(%rsp,%rax)
je 0x2752
movq 0xda28(%rip), %rdi      # 0xfff0
leaq 0x8a59(%rip), %rsi      # 0xb028
callq 0x21b0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
leaq 0x8c60(%rip), %rsi      # 0xb247
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
leaq 0xa8(%rsp), %rdi
callq 0x2070
jmp 0x24c2
cmpl $0x3, %ebp
jne 0x272c
cmpb $0x70, %cl
jne 0x272c
leaq 0xa8(%rsp), %rdi
callq 0x21f0
movq 0x10(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2120
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %ebp
testb $0x5, %bpl
je 0x27f9
movq 0xd990(%rip), %rdi      # 0xfff0
leaq 0x89c1(%rip), %rsi      # 0xb028
callq 0x21b0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x28f3
movq 0xd961(%rip), %rdi      # 0xfff0
leaq 0x89ee(%rip), %rsi      # 0xb084
callq 0x21b0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
jmp 0x24ba
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xaa26
leaq 0xa8(%rsp), %rdi
callq 0x2050
leaq 0x2b0(%rsp), %rdx
movb $0x42, (%rdx)
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x9c90
cmpl $0x3, %ebp
je 0x285d
cmpl $0x2, %ebp
jne 0x28be
xorl %r14d, %r14d
movq 0xd8c7(%rip), %rbx      # 0xffc8
movl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jbe 0x28d1
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2200
incl %r14d
jmp 0x2701
leal -0x65(%rcx), %eax
cmpl $0x8, %eax
ja 0x290f
leaq 0x88c5(%rip), %rcx      # 0xb004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x9cdc
jmp 0x2e7f
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xaa26
leaq 0xa8(%rsp), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
movzbl 0x2(%rax), %ebp
cmpl $0x42, %ebp
je 0x2d86
cmpl $0x44, %ebp
je 0x2d3f
cmpl $0x75, %ebp
je 0x2dca
cmpl $0x4c, %ebp
je 0x2da8
cmpl $0x52, %ebp
je 0x2d17
cmpl $0x55, %ebp
je 0x2db9
cmpl $0x62, %ebp
je 0x2d53
cmpl $0x64, %ebp
je 0x2d97
cmpl $0x66, %ebp
je 0x2d2b
cmpl $0x6c, %ebp
je 0x2d64
cmpl $0x72, %ebp
je 0x2d75
cmpl $0x46, %ebp
jne 0x2e86
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3e6e
jmp 0x2dd9
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xaa26
leaq 0xa8(%rsp), %rdi
callq 0x2050
movq 0x8(%rbx), %rax
cmpb $0x73, 0x1(%rax)
jne 0x28e7
leaq 0x32(%rsp), %rdi
callq 0x86b8
leaq 0x8866(%rip), %rcx      # 0xb09d
leaq 0x8861(%rip), %rsi      # 0xb09f
testb %al, %al
cmovneq %rcx, %rsi
movq 0xd77d(%rip), %rdi      # 0xffc8
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
jmp 0x28f1
movq 0x10(%rbx), %rsi
leaq 0x2b0(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x21e0
leaq 0x320(%rsp), %rdi
callq 0x2060
movl %eax, %ebp
testb %al, %al
je 0x29e9
xorl %r14d, %r14d
leaq 0x2b0(%rsp), %rbx
movl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jbe 0x2a24
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2200
incl %r14d
jmp 0x2893
leaq 0x8999(%rip), %rsi      # 0xb25e
movq 0xd724(%rip), %rdi      # 0xfff0
jmp 0x2550
movq 0xd6f0(%rip), %rdi      # 0xffc8
callq 0x20f0
xorl %ebx, %ebx
movb $0x1, %bpl
jmp 0x2562
leaq 0x32(%rsp), %rdi
callq 0x9364
xorl %ebx, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x2070
testb $0x5, %bpl
jne 0x24c5
jmp 0x2e7f
cmpl $0x52, %ecx
je 0x2c22
cmpl $0x72, %ecx
jne 0x2a52
leaq 0xa8(%rsp), %rdi
callq 0x84aa
leaq 0x2b0(%rsp), %rbx
leaq 0x32(%rsp), %r14
leaq 0xa8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
callq 0x9dd0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x84de
movq %r15, %rdi
movq %r14, %rsi
callq 0x84de
movb $0x42, 0x2b0(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x9c90
movq %r14, %rdi
callq 0x86b8
testb %al, %al
je 0x2948
leaq 0xa8(%rsp), %rdi
callq 0x9364
movq 0xd62c(%rip), %rdi      # 0xffc8
callq 0x20f0
movq 0xd620(%rip), %rdi      # 0xffc8
leaq 0x883e(%rip), %rsi      # 0xb1ed
callq 0x21b0
xorl %r14d, %r14d
movq 0xd60a(%rip), %rbx      # 0xffc8
movl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jbe 0x2c48
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2200
incl %r14d
jmp 0x29be
movq 0xd600(%rip), %rdi      # 0xfff0
leaq 0x8852(%rip), %rsi      # 0xb249
callq 0x21b0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
leaq 0x8838(%rip), %rsi      # 0xb247
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rbx
jmp 0x2a40
leaq 0x2b0(%rsp), %rdi
callq 0x20f0
xorl %ebx, %ebx
leaq 0x2b0(%rsp), %rdi
callq 0x2220
leaq 0x2b0(%rsp), %rdi
callq 0x2240
jmp 0x2562
movq 0xd597(%rip), %rdi      # 0xfff0
leaq 0x87cc(%rip), %rsi      # 0xb22c
callq 0x21b0
movq 0x8(%rbx), %rcx
movsbl 0x1(%rcx), %esi
movq %rax, %rdi
callq 0x2200
movq %rax, %r14
leaq 0x87c7(%rip), %rsi      # 0xb246
jmp 0x24b2
callq 0xabd7
jmp 0x2e7f
movq (%rbx), %rsi
leaq 0x68(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x2f4a
leaq 0x68(%rsp), %rdi
callq 0xac15
leaq 0x68(%rsp), %rdi
callq 0x20e0
jmp 0x2e7f
movq 0xd505(%rip), %rbx      # 0xffc8
leaq 0x85d7(%rip), %r14      # 0xb0a1
movq 0xd507(%rip), %r15      # 0xffd8
leaq 0xe(%rsp), %r12
pushq $0xa
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x2210
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movl %ebp, %edx
callq 0x2130
movb 0xe(%rsp), %al
leal -0x33(%rax), %ecx
cmpb $-0x2, %cl
jb 0x2ad9
cmpb $0x31, %al
jne 0x2c77
leaq 0xa8(%rsp), %rdi
callq 0x21f0
movq 0xd49a(%rip), %rbx      # 0xffc8
pushq $0xa
popq %rbp
leaq 0x861e(%rip), %r14      # 0xb156
leaq 0xa8(%rsp), %r15
pushq $0x8
popq %r12
movb $0x0, 0x2b0(%rsp)
movq %rbx, %rdi
leaq 0x857f(%rip), %rsi      # 0xb0d5
callq 0x21b0
movq %rbx, %rdi
leaq 0x85d6(%rip), %rsi      # 0xb13b
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq 0xd45f(%rip), %rdi      # 0xffd8
leaq 0x2b0(%rsp), %rsi
movq %rbp, %rdx
callq 0x20a0
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2120
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %r13d
testb $0x5, %r13b
je 0x2bc8
movq %rbx, %rdi
leaq 0x85ac(%rip), %rsi      # 0xb167
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x2050
testb $0x5, %r13b
jne 0x2b44
leaq 0x8575(%rip), %rsi      # 0xb156
leaq 0xa8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2120
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xaa26
leaq 0xa8(%rsp), %rdi
callq 0x2050
leaq 0xa8(%rsp), %rdi
callq 0x2070
jmp 0x2ca3
leaq 0xa8(%rsp), %rdi
callq 0x9dd0
movq 0xd392(%rip), %rdi      # 0xffc8
leaq 0xa8(%rsp), %rsi
callq 0x9de6
jmp 0x2e7f
movq 0xd379(%rip), %rdi      # 0xffc8
callq 0x20f0
movq %rax, %rdi
callq 0x20f0
leaq 0x32(%rsp), %rdi
callq 0x9364
movq 0xd35b(%rip), %rdi      # 0xffc8
callq 0x20f0
jmp 0x2e7f
movq 0xd34a(%rip), %rdi      # 0xffc8
leaq 0x8509(%rip), %rsi      # 0xb18e
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq 0xd33f(%rip), %rdi      # 0xffd8
leaq 0x32(%rsp), %rsi
callq 0xaa26
leaq 0x32(%rsp), %rdi
callq 0x9364
movq 0xd314(%rip), %rbx      # 0xffc8
leaq 0x8507(%rip), %r14      # 0xb1c2
movq 0xd316(%rip), %r15      # 0xffd8
leaq 0xf(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x2210
movsbl 0xf(%rsp), %edi
callq 0x2230
cmpl $0x6e, %eax
je 0x2d03
cmpl $0x79, %eax
jne 0x2cc7
leaq 0x32(%rsp), %rdi
callq 0x8c12
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x99a6
jmp 0x2e7f
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3a72
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3f0a
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3cae
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4054
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3c1c
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3b04
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3fae
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3d1e
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3b90
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3d8e
jmp 0x2dd9
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3dfe
leaq 0x2b0(%rsp), %rdi
callq 0x2280
movq 0x10(%rbx), %rsi
leaq 0x2b0(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x2040
movq 0x2b0(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x2d0(%rsp,%rax), %ebp
testb $0x5, %bpl
je 0x2e3c
movq 0xd1d6(%rip), %rdi      # 0xfff0
leaq 0x8249(%rip), %rsi      # 0xb06a
callq 0x21b0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
jmp 0x2e5b
leaq 0x2b0(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0x9de6
leaq 0x2b0(%rsp), %rdi
callq 0x2220
leaq 0x2b0(%rsp), %rdi
callq 0x2240
leaq 0xa8(%rsp), %rdi
callq 0x2070
testb $0x5, %bpl
jne 0x24c2
xorl %ebx, %ebx
jmp 0x24c5
movq 0xd163(%rip), %rdi      # 0xfff0
leaq 0x81ae(%rip), %rsi      # 0xb042
callq 0x21b0
movsbl %bpl, %esi
movq %rax, %rdi
callq 0x2200
leaq 0x81b0(%rip), %rsi      # 0xb05c
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
jmp 0x25f7
jmp 0x2f35
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x2f2c
jmp 0x2f35
jmp 0x2f0d
jmp 0x2f35
jmp 0x2f0d
jmp 0x2f35
jmp 0x2f0d
jmp 0x2f0d
jmp 0x2f35
jmp 0x2ef3
jmp 0x2f0d
jmp 0x2f35
jmp 0x2f35
jmp 0x2ef3
jmp 0x2f35
jmp 0x2f35
jmp 0x2f35
jmp 0x2f35
jmp 0x2f35
jmp 0x2f35
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x2240
jmp 0x2f10
jmp 0x2f0d
jmp 0x2f0d
jmp 0x2f0d
jmp 0x2f0d
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2070
jmp 0x2f38
jmp 0x2f35
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20e0
jmp 0x2f38
jmp 0x2f35
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2f90
movq %rbx, %rdi
callq 0x2290