// File: /workspace/github_cpp_makefile_star2_O3/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 0x9576
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x1, %ebp
jne 0x24f1
movq (%rbx), %rsi
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x32d2
leaq 0x88(%rsp), %rdi
callq 0xc779
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28c8
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x28c8
cmpl $0x4, %ebp
jg 0x255a
movq 0x8(%rbx), %r14
cmpb $0x2d, (%r14)
jne 0x25ae
movq %r14, %rdi
callq 0x20a0
movzbl 0x1(%r14), %ecx
cmpq $0x2, %rax
jne 0x263b
cmpl $0x73, %ecx
jne 0x26cd
cmpl $0x3, %ebp
je 0x26df
movq 0xfabc(%rip), %r14      # 0x11ff0
leaq 0xacbd(%rip), %rsi      # 0xd1f8
movl $0x33, %edx
movq %r14, %rdi
callq 0x21d0
movl $0x1, %ebx
movq %r14, %rdi
callq 0x20b0
jmp 0x28cd
movl $0x23, %edx
leaq 0xad1f(%rip), %rbx      # 0xd285
movq 0xfa83(%rip), %rdi      # 0x11ff0
movq %rbx, %rsi
callq 0x21d0
movq 0xfa74(%rip), %rdi      # 0x11ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0xfa59(%rip), %rdi      # 0x11ff0
callq 0x2030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x2110
jmp 0x28cd
cmpl $0x4, %ebp
je 0x2b04
leaq 0xa8(%rsp), %rdi
callq 0x21c0
movq 0x8(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
callq 0x20e0
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xc8(%rsp,%rax)
je 0x2789
movq 0xf9f5(%rip), %r14      # 0x11ff0
leaq 0xaa26(%rip), %rsi      # 0xd028
movl $0x19, %edx
movq %r14, %rdi
callq 0x21d0
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x285d
movq %rbx, %rdi
callq 0x20a0
movq 0xf9c5(%rip), %rdi      # 0x11ff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
jmp 0x2875
cmpl $0x4d, %ecx
jne 0x2751
leaq 0xa8(%rsp), %rdi
callq 0x21c0
movq 0x10(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
callq 0x20e0
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xc8(%rsp,%rax)
je 0x2915
movq 0xf968(%rip), %rdi      # 0x11ff0
leaq 0xa999(%rip), %rsi      # 0xd028
movl $0x19, %edx
callq 0x21d0
movq 0x10(%rbx), %rsi
movq 0xf94c(%rip), %rdi      # 0x11ff0
callq 0x2180
movq %rax, %rbx
leaq 0xab94(%rip), %rsi      # 0xd247
movl $0x1, %edx
movq %rax, %rdi
callq 0x21d0
movq %rbx, %rdi
callq 0x20b0
jmp 0x28bb
cmpl $0x3, %ebp
jne 0x2837
cmpb $0x70, %cl
jne 0x2837
leaq 0xa8(%rsp), %rdi
callq 0x21c0
movq 0x10(%rbx), %rsi
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
callq 0x20e0
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xc8(%rsp,%rax)
je 0x2981
movq 0xf8cd(%rip), %rdi      # 0x11ff0
leaq 0xa8fe(%rip), %rsi      # 0xd028
movl $0x19, %edx
callq 0x21d0
movq 0x10(%rbx), %rsi
movq 0xf8b1(%rip), %rdi      # 0x11ff0
callq 0x2180
movq %rax, %rdi
callq 0x20b0
jmp 0x28bb
movq 0xf898(%rip), %r14      # 0x11ff0
leaq 0xa925(%rip), %rsi      # 0xd084
movl $0x18, %edx
movq %r14, %rdi
callq 0x21d0
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x28f8
movq %rbx, %rdi
callq 0x20a0
movq %rax, %rdx
jmp 0x2566
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xc4f2
leaq 0xa8(%rsp), %rdi
callq 0x2060
leaq 0x2b0(%rsp), %rdx
movb $0x42, (%rdx)
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaff8
cmpl $0x3, %ebp
je 0x29ee
cmpl $0x2, %ebp
jne 0x2a8c
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x2826
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0xf7da(%rip), %rbx      # 0x11fc8
leaq 0x2b0(%rsp), %r14
movb (%rax,%rcx), %al
movb %al, 0x2b0(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movl %ebp, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x27f6
movq 0xf79b(%rip), %rdi      # 0x11fc8
callq 0x20b0
jmp 0x2af7
leal -0x65(%rcx), %eax
cmpl $0x8, %eax
ja 0x2b0b
leaq 0xa7ba(%rip), %rcx      # 0xd004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xb050
jmp 0x2b04
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2260
movq 0xf774(%rip), %rbx      # 0x11ff0
leaq 0xa9c4(%rip), %rsi      # 0xd247
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0xf742(%rip), %rdi      # 0x11ff0
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0xa8(%rsp), %rdi
callq 0x2080
movl $0x1, %ebx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x28e4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movl %ebx, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2260
jmp 0x2575
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xc4f2
leaq 0xa8(%rsp), %rdi
callq 0x2060
movq 0x8(%rbx), %rax
movb 0x2(%rax), %bpl
movzbl %bpl, %eax
cmpl $0x61, %eax
jg 0x2ab5
cmpl $0x4b, %eax
jg 0x2caa
cmpl $0x42, %eax
je 0x3079
cmpl $0x44, %eax
je 0x30bd
cmpl $0x46, %eax
jne 0x31ba
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x42a8
jmp 0x30ff
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xc4f2
leaq 0xa8(%rsp), %rdi
callq 0x2060
movq 0x8(%rbx), %rax
cmpb $0x73, 0x1(%rax)
jne 0x2aed
leaq 0x32(%rsp), %rdi
callq 0x975c
leaq 0xa6de(%rip), %rcx      # 0xd09d
leaq 0xa6d9(%rip), %rsi      # 0xd09f
testb %al, %al
cmovneq %rcx, %rsi
movq 0xf5f5(%rip), %rdi      # 0x11fc8
movl $0x1, %edx
callq 0x21d0
movq 0xf5e4(%rip), %rdi      # 0x11fc8
callq 0x20b0
jmp 0x2af7
movq 0x10(%rbx), %rsi
leaq 0x2b0(%rsp), %rdi
movl $0x10, %edx
callq 0x21b0
leaq 0x320(%rsp), %rdi
callq 0x2070
movl %eax, %ebp
testb %al, %al
je 0x2c36
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x2a6b
movl $0x1, %r15d
xorl %ecx, %ecx
leaq 0x2b0(%rsp), %rbx
leaq 0xe(%rsp), %r14
movb (%rax,%rcx), %al
movb %al, 0xe(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movl %r15d, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
incl %r15d
cmpq %rcx, %rdx
ja 0x2a3c
leaq 0x2b0(%rsp), %rdi
callq 0x20b0
xorl %ebx, %ebx
leaq 0x2b0(%rsp), %rdi
callq 0x2200
jmp 0x2c82
movq 0xf55d(%rip), %rdi      # 0x11ff0
leaq 0xa7c4(%rip), %rsi      # 0xd25e
movl $0x26, %edx
callq 0x21d0
movq 0xf545(%rip), %rdi      # 0x11ff0
callq 0x20b0
jmp 0x28bb
cmpl $0x6b, %eax
jg 0x2cd9
cmpl $0x62, %eax
je 0x308a
cmpl $0x64, %eax
je 0x30ce
cmpl $0x66, %eax
jne 0x31ba
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4344
jmp 0x30ff
leaq 0x32(%rsp), %rdi
callq 0xa4ac
leaq 0xa8(%rsp), %rdi
callq 0x2080
xorl %ebx, %ebx
jmp 0x28cd
cmpl $0x52, %ecx
je 0x2f8d
cmpl $0x72, %ecx
jne 0x2d08
leaq 0xa8(%rsp), %rdi
callq 0x9576
leaq 0x2b0(%rsp), %rbx
leaq 0x32(%rsp), %r14
leaq 0xa8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
callq 0xb226
movq %r14, %rdi
movq %rbx, %rsi
callq 0x95aa
movq %r15, %rdi
movq %r14, %rsi
callq 0x95aa
movb $0x42, 0x2b0(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xaff8
movq %r14, %rdi
callq 0x975c
testb %al, %al
je 0x2b44
leaq 0xa8(%rsp), %rdi
callq 0xa4ac
movq 0xf430(%rip), %rdi      # 0x11fc8
callq 0x20b0
movq 0xf424(%rip), %rdi      # 0x11fc8
leaq 0xa642(%rip), %rsi      # 0xd1ed
movl $0xa, %edx
callq 0x21d0
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x2c07
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0xf3f9(%rip), %rbx      # 0x11fc8
leaq 0x2b0(%rsp), %r14
movb (%rax,%rcx), %al
movb %al, 0x2b0(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movl %ebp, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2bd7
movq 0xf3ba(%rip), %rdi      # 0x11fc8
callq 0x20b0
movq %rax, %rdi
callq 0x20b0
leaq 0x32(%rsp), %rdi
callq 0xa4ac
movq 0xf39c(%rip), %rdi      # 0x11fc8
callq 0x20b0
jmp 0x2b04
movq 0xf3b3(%rip), %rdi      # 0x11ff0
leaq 0xa605(%rip), %rsi      # 0xd249
movl $0x14, %edx
callq 0x21d0
movq 0x10(%rbx), %rsi
movq 0xf397(%rip), %rdi      # 0x11ff0
callq 0x2180
movq %rax, %r14
leaq 0xa5df(%rip), %rsi      # 0xd247
movl $0x1, %edx
movq %rax, %rdi
callq 0x21d0
movl $0x1, %ebx
movq %r14, %rdi
callq 0x20b0
leaq 0x2b0(%rsp), %rdi
callq 0x2220
leaq 0xa8(%rsp), %rdi
callq 0x2080
testb %bpl, %bpl
je 0x28cd
jmp 0x2b04
cmpl $0x4c, %eax
je 0x309b
cmpl $0x52, %eax
je 0x30df
cmpl $0x55, %eax
jne 0x31ba
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x41c8
jmp 0x30ff
cmpl $0x6c, %eax
je 0x30ac
cmpl $0x72, %eax
je 0x30f0
cmpl $0x75, %eax
jne 0x31ba
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4238
jmp 0x30ff
movq 0xf2e1(%rip), %rdi      # 0x11ff0
leaq 0xa516(%rip), %rsi      # 0xd22c
movl $0x19, %edx
callq 0x21d0
movq 0x8(%rbx), %rax
movb 0x1(%rax), %al
leaq 0xa8(%rsp), %rsi
movb %al, (%rsi)
movq 0xf2b8(%rip), %rdi      # 0x11ff0
movl $0x1, %edx
callq 0x21d0
movq %rax, %r14
leaq 0xa4fa(%rip), %rsi      # 0xd246
movl $0x2, %edx
movq %rax, %rdi
callq 0x21d0
jmp 0x2548
callq 0xc70d
jmp 0x2b04
movq (%rbx), %rsi
leaq 0x68(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x32d2
leaq 0x68(%rsp), %rdi
callq 0xc779
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b04
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x2b04
movq 0xf216(%rip), %rbx      # 0x11fc8
leaq 0xa2e8(%rip), %r15      # 0xd0a1
movq 0xf218(%rip), %r14      # 0x11fd8
leaq 0xe(%rsp), %r12
movl $0x33, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r14, %rdi
movq %r12, %rsi
callq 0x21f0
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movl $0xa, %edx
callq 0x20f0
movb 0xe(%rsp), %al
leal -0x33(%rax), %ecx
cmpb $-0x2, %cl
jb 0x2dc5
cmpb $0x31, %al
jne 0x2fb3
leaq 0xa8(%rsp), %rdi
callq 0x21c0
leaq 0x2b0(%rsp), %r13
leaq 0xa30d(%rip), %rbp      # 0xd156
leaq 0xa8(%rsp), %r15
movb $0x0, 0x2b0(%rsp)
movl $0x65, %edx
movq %rbx, %rdi
leaq 0xa26d(%rip), %rsi      # 0xd0d5
callq 0x21d0
movl $0x1a, %edx
movq %rbx, %rdi
leaq 0xa2bf(%rip), %rsi      # 0xd13b
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %ecx
movl $0xa, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x22a0
movq %r15, %rdi
movq %rbp, %rsi
movl $0x8, %edx
callq 0x20e0
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %r12d
testb $0x5, %r12b
je 0x2f34
movl $0x26, %edx
movq %rbx, %rdi
leaq 0xa25f(%rip), %rsi      # 0xd167
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x2060
testb $0x5, %r12b
jne 0x2e51
leaq 0xa209(%rip), %rsi      # 0xd156
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
callq 0x20e0
leaq 0xa8(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xc4f2
leaq 0xa8(%rsp), %rdi
callq 0x2060
leaq 0xa8(%rsp), %rdi
callq 0x2080
jmp 0x2fe8
leaq 0xa8(%rsp), %rdi
callq 0xb226
movq 0xf027(%rip), %rdi      # 0x11fc8
leaq 0xa8(%rsp), %rsi
callq 0xb23c
jmp 0x2b04
movq 0xf00e(%rip), %rdi      # 0x11fc8
leaq 0xa1cd(%rip), %rsi      # 0xd18e
movl $0x33, %edx
callq 0x21d0
movq 0xeff6(%rip), %rdi      # 0x11fc8
callq 0x20b0
movq 0xeffa(%rip), %rdi      # 0x11fd8
leaq 0x32(%rsp), %rsi
callq 0xc4f2
leaq 0x32(%rsp), %rdi
callq 0xa4ac
leaq 0xa1c9(%rip), %r14      # 0xd1c2
movq 0xefd8(%rip), %r15      # 0x11fd8
leaq 0xf(%rsp), %r12
movl $0x2a, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r15, %rdi
movq %r12, %rsi
callq 0x21f0
movsbl 0xf(%rsp), %edi
callq 0x2210
cmpl $0x6e, %eax
je 0x3065
cmpl $0x79, %eax
jne 0x3005
leaq 0x32(%rsp), %rdi
callq 0x9cc6
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xac7a
jmp 0x2b04
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x43e8
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x448e
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3fca
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4056
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x40e8
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4158
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3eac
jmp 0x30ff
leaq 0x32(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3f3e
leaq 0x2b0(%rsp), %rdi
callq 0x2270
movq 0x10(%rbx), %rsi
leaq 0x2b0(%rsp), %rdi
movl $0x10, %edx
callq 0x2050
movq 0x2b0(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x2d0(%rsp,%rax), %ebp
testb $0x5, %bpl
je 0x316d
movq 0xeeae(%rip), %rdi      # 0x11ff0
leaq 0x9f21(%rip), %rsi      # 0xd06a
movl $0x19, %edx
callq 0x21d0
movq 0x10(%rbx), %rsi
movq 0xee92(%rip), %rdi      # 0x11ff0
callq 0x2180
movq %rax, %rdi
callq 0x20b0
jmp 0x318c
leaq 0x2b0(%rsp), %rdi
leaq 0x32(%rsp), %rsi
callq 0xb23c
leaq 0x2b0(%rsp), %rdi
callq 0x2200
leaq 0x2b0(%rsp), %rdi
callq 0x2220
leaq 0xa8(%rsp), %rdi
callq 0x2080
movl $0x1, %ebx
testb $0x5, %bpl
jne 0x28cd
jmp 0x2b04
movq 0xee2f(%rip), %rdi      # 0x11ff0
leaq 0x9e7a(%rip), %rsi      # 0xd042
movl $0x19, %edx
callq 0x21d0
leaq 0x2b0(%rsp), %rsi
movb %bpl, (%rsi)
movq 0xee0c(%rip), %rdi      # 0x11ff0
movl $0x1, %edx
callq 0x21d0
movq %rax, %rbx
leaq 0x9e64(%rip), %rsi      # 0xd05c
movl $0xd, %edx
movq %rax, %rdi
callq 0x21d0
movq %rbx, %rdi
callq 0x20b0
jmp 0x28bb
jmp 0x32af
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32b2
movq 0x78(%rsp), %rsi
jmp 0x32a3
jmp 0x32af
jmp 0x3273
jmp 0x32af
jmp 0x3273
jmp 0x32af
jmp 0x3273
jmp 0x3273
jmp 0x32af
jmp 0x3253
jmp 0x3273
jmp 0x32af
jmp 0x32af
jmp 0x32af
jmp 0x3253
jmp 0x32af
jmp 0x32af
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x2220
jmp 0x3276
jmp 0x32af
jmp 0x32af
jmp 0x3273
jmp 0x3273
jmp 0x3273
jmp 0x32af
jmp 0x3273
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2080
jmp 0x32b2
jmp 0x32af
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32b2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x32b2
jmp 0x32af
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x32c9
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2280
nop