// File: /workspace/github_cpp_makefile_star2_O3/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: main
int main(int argc, char* argv[]){

  if(argc != 13){
    std::cout << "\n" << "Usage is --app [wordcount, sort] --impl [procs, threads] --maps num_maps --reduces num_reduces --input infile --output outfile" << "\n" <<std::endl;
    exit(EXIT_FAILURE);
  }

  parse_cmdline(argc - 1, argv + 1);
  std::string app = argv[2];
  std::string impl = argv[4];
  int maps = std::stoi(argv[6]);
  int reduces = std::stoi(argv[8]);
  std::string infile = argv[10];
  std::string outfile = argv[12];
  ThreadData thread_data[maps];
  ProcData proc_data[maps];

  std::cout << "\nCurrent arguments are " << argv[1] << " " << app << " "
                                     << argv[3] << " " << impl << " "
                                     << argv[5] << " " << maps << " "
                                     << argv[7] << " " << reduces << " "
					<< argv[9] << " " << infile << " "
                                     << argv[11] << " " << outfile << "\n" <<std::endl;

  std::vector<std::string> sorted_ary = split_input(infile, maps);
  if(impl.compare("threads") == 0){
    map_threads(sorted_ary, maps, thread_data);
    std::cout << "Finished mapping Threads" << std::endl;
    //std::cout << thread_data[0].line_array << std::endl;
    std::map<std::string, int> result = reduce_threads(reduces, maps, thread_data);
    if(app.compare("wordcount") == 0){
      wordCountPrint(result, outfile);
    } else { // sort
      sortPrint(result, outfile);
    }
  }
  if(impl.compare("procs") == 0){

    
    map_proc(sorted_ary, maps, proc_data);
		//std::string result = proc_data[0].line_array;
		//if(app.compare("wordcount") == 0)
		//{
		//	wordCountPrint(result, outfile);
		//} else {
		//	sortPrint(result, outfile);	
		//}
	  
    std::cout << "Finished mapping Processes" << std::endl;
    map_threads(sorted_ary, maps, thread_data);
    std::map<std::string, int> result = reduce_threads(reduces, maps, thread_data);
    if(app.compare("wordcount") == 0){
     wordCountPrint(result, outfile);
    }else {
      sortPrint(result, outfile);
      
    }
    //std::cout << proc_data[0].line_array << std::endl;
    //std::map<std::string, int> result = reduce_threads(reduces, maps, thread_data);
    //std::cout << "Process" << std::endl;
    //if(app.compare("wordcount") == 0){
    //  wordCountPrint(result, outfile);
    //} else { // sort
    //  sortPrint(result, outfile);
    //}
	  
  }
  //print for error checking
  //for (std::vector<std::string>::const_iterator i = sorted_ary.begin(); i != sorted_ary.end(); i++){
  //  std::cout << *i << '\n';
  //}
  //
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
cmpl $0xd, %edi
jne 0x420b
movq %rsi, %r13
leaq 0x8(%rsi), %rbx
movq %rbx, %rsi
callq 0x4460
movq 0x10(%r13), %rsi
leaq -0x118(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
movq 0x20(%r13), %rsi
leaq -0xf8(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
movq %rbx, -0xc0(%rbp)
movq 0x30(%r13), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3110
movq -0x90(%rbp), %rbx
callq 0x3050
movq %rax, %r14
movl (%rax), %r12d
movl $0x0, (%rax)
leaq -0xb0(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x33e0
cmpq %rbx, (%r15)
je 0x424d
movslq %eax, %rcx
movq %rax, -0x30(%rbp)
cmpq %rax, %rcx
jne 0x4259
movl (%r14), %eax
cmpl $0x22, %eax
je 0x4259
testl %eax, %eax
jne 0x38dc
movl %r12d, (%r14)
leaq -0x80(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x38ef
callq 0x32f0
movq 0x40(%r13), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3110
movq -0x90(%rbp), %rbx
movl (%r14), %eax
movl %eax, -0x38(%rbp)
movl $0x0, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x33e0
cmpq %rbx, (%r15)
je 0x4265
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rcx
cmpq %rdx, %rcx
jb 0x4271
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x4271
movq %rax, -0x40(%rbp)
testl %ecx, %ecx
jne 0x3964
movl -0x38(%rbp), %eax
movl %eax, (%r14)
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0x3975
callq 0x32f0
movq 0x50(%r13), %rsi
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
movq 0x60(%r13), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
movq %rsp, -0xb8(%rbp)
movq -0x30(%rbp), %rdx
movl %edx, %edi
movq %rsp, %r14
imulq $0x58, %rdi, %rax
leaq 0xf(%rax), %rcx
andq $-0x10, %rcx
subq %rcx, %r14
movq %r14, %rsp
testl %edx, %edx
movq %rdi, -0x38(%rbp)
je 0x3a5a
leaq 0x30(%r14), %rcx
xorl %edx, %edx
leaq -0x18(%rcx), %rsi
movq %rsi, -0x28(%rcx)
movq %rdx, -0x20(%rcx)
movb $0x0, -0x18(%rcx)
movl $0x0, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
addq $0x58, %rcx
addq $-0x58, %rax
jne 0x39d4
movq %rsp, %rcx
imulq $0x58, %rdi, %rax
leaq 0xf(%rax), %rdx
andq $-0x10, %rdx
movq %rcx, %r15
subq %rdx, %r15
movq %r15, %rsp
negq %rdx
addq %rdx, %rcx
addq $0x30, %rcx
xorl %edx, %edx
leaq -0x18(%rcx), %rsi
movq %rsi, -0x28(%rcx)
movq %rdx, -0x20(%rcx)
movb $0x0, -0x18(%rcx)
movl $0x0, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
addq $0x58, %rcx
addq $-0x58, %rax
jne 0x3a28
jmp 0x3a6f
movq %rsp, %r15
imulq $0x58, %rdi, %rax
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq 0x1b55a(%rip), %rbx     # 0x1efd0
leaq 0x11624(%rip), %rsi     # 0x150a1
movl $0x17, %edx
movq %rbx, %rdi
callq 0x3340
movq -0xc0(%rbp), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x3ab5
movq %r12, %rdi
callq 0x3130
movq 0x1b528(%rip), %rdi     # 0x1efd0
movq %r12, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3acc
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3520
movq 0x1b4fd(%rip), %rdi     # 0x1efd0
leaq 0x1165a(%rip), %rsi     # 0x15134
movl $0x1, %edx
callq 0x3340
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq 0x1b4d7(%rip), %rdi     # 0x1efd0
callq 0x3340
movq %rax, %r12
leaq 0x1162c(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x18(%r13), %rbx
testq %rbx, %rbx
je 0x3b36
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3b51
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x115dc(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
movq %r12, %rdi
callq 0x3340
movq %rax, %r12
leaq 0x115af(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x28(%r13), %rbx
testq %rbx, %rbx
je 0x3bb3
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3bce
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x1155f(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x3550
movq %rax, %r12
leaq 0x1153c(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x38(%r13), %rbx
testq %rbx, %rbx
je 0x3c26
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3c41
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x114ec(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq %r12, %rdi
movq -0x40(%rbp), %rsi
callq 0x3550
movq %rax, %r12
leaq 0x114c9(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x48(%r13), %rbx
testq %rbx, %rbx
je 0x3c99
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3cb4
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x11479(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq %r12, %rdi
callq 0x3340
movq %rax, %r12
leaq 0x1144c(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x58(%r13), %rbx
testq %rbx, %rbx
je 0x3d16
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3d31
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x113fc(%rip), %rsi     # 0x15134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r12, %rdi
callq 0x3340
movq %rax, %r12
leaq 0x112c1(%rip), %rsi     # 0x15020
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3300
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x1f0(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x200(%rbp), %rdi
callq 0x7a0c
leaq -0xd8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movq -0x30(%rbp), %r13
movl %r13d, %edx
callq 0x4bdb
movq -0x200(%rbp), %rdi
cmpq %r12, %rdi
je 0x3de8
callq 0x32f0
leaq 0x112ca(%rip), %rsi     # 0x150b9
leaq -0xf8(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
jne 0x3f75
leaq -0x160(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6d94
leaq -0x160(%rbp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x4d61
leaq -0x160(%rbp), %rdi
callq 0x6e22
movq 0x1b195(%rip), %rbx     # 0x1efd0
leaq 0x1127f(%rip), %rsi     # 0x150c1
movl $0x18, %edx
movq %rbx, %rdi
callq 0x3340
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3300
movsbl %al, %esi
movq 0x1b163(%rip), %rdi     # 0x1efd0
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x90(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0x4e6e
leaq 0x11243(%rip), %rsi     # 0x150da
leaq -0x118(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x3efb
leaq -0x290(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7422
leaq -0x1b0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1c0(%rbp), %rdi
callq 0x7a0c
leaq -0x290(%rbp), %r12
leaq -0x1c0(%rbp), %rsi
movq %r12, %rdi
callq 0x5473
movq -0x1c0(%rbp), %rdi
jmp 0x3f4d
leaq -0x2c0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7422
leaq -0x1d0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x7a0c
leaq -0x2c0(%rbp), %r12
leaq -0x1e0(%rbp), %rsi
movq %r12, %rdi
callq 0x5122
movq -0x1e0(%rbp), %rdi
cmpq %r13, %rdi
je 0x3f5d
movq -0x30(%rbp), %r13
callq 0x32f0
jmp 0x3f61
movq -0x30(%rbp), %r13
movq %r12, %rdi
callq 0x76c2
leaq -0x90(%rbp), %rdi
callq 0x76c2
leaq 0x11168(%rip), %rsi     # 0x150e4
leaq -0xf8(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
jne 0x4133
leaq -0x148(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6d94
leaq -0x148(%rbp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x5658
leaq -0x148(%rbp), %rdi
callq 0x6e22
movq 0x1b008(%rip), %rbx     # 0x1efd0
leaq 0x1111b(%rip), %rsi     # 0x150ea
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x3340
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3300
movsbl %al, %esi
movq 0x1afd6(%rip), %rdi     # 0x1efd0
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x130(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6d94
leaq -0x130(%rbp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x4d61
leaq -0x130(%rbp), %rdi
callq 0x6e22
leaq -0x90(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0x4e6e
leaq 0x11085(%rip), %rsi     # 0x150da
leaq -0x118(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x40b9
leaq -0x230(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7422
leaq -0x170(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x180(%rbp), %rdi
callq 0x7a0c
leaq -0x230(%rbp), %r12
leaq -0x180(%rbp), %rsi
movq %r12, %rdi
callq 0x5473
movq -0x180(%rbp), %rdi
jmp 0x410b
leaq -0x260(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7422
leaq -0x190(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a0(%rbp), %rdi
callq 0x7a0c
leaq -0x260(%rbp), %r12
leaq -0x1a0(%rbp), %rsi
movq %r12, %rdi
callq 0x5122
movq -0x1a0(%rbp), %rdi
cmpq %r13, %rdi
je 0x411b
movq -0x30(%rbp), %r13
callq 0x32f0
jmp 0x411f
movq -0x30(%rbp), %r13
movq %r12, %rdi
callq 0x76c2
leaq -0x90(%rbp), %rdi
callq 0x76c2
leaq -0xd8(%rbp), %rdi
callq 0x6e22
testl %r13d, %r13d
je 0x41a2
leaq -0x40(%r15), %rbx
imulq $0x58, -0x38(%rbp), %r12
leaq -0x30(%r15), %r13
leaq (%r12,%r13), %rdi
callq 0x76c2
movq -0x50(%r15,%r12), %rdi
leaq (%rbx,%r12), %rax
cmpq %rdi, %rax
je 0x416d
callq 0x32f0
addq $-0x58, %r12
jne 0x4151
leaq -0x40(%r14), %rbx
imulq $0x58, -0x38(%rbp), %r15
leaq -0x30(%r14), %r12
leaq (%r12,%r15), %rdi
callq 0x76c2
movq -0x50(%r14,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x419c
callq 0x32f0
addq $-0x58, %r15
jne 0x4180
movq -0xb8(%rbp), %rsp
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41bb
callq 0x32f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41d0
callq 0x32f0
leaq -0xe8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41e5
callq 0x32f0
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41fa
callq 0x32f0
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1adbe(%rip), %rdi     # 0x1efd0
leaq 0x10e07(%rip), %rbx     # 0x15020
movq %rbx, %rsi
callq 0x3310
leaq 0x10dfa(%rip), %rsi     # 0x15022
movq %rax, %rdi
callq 0x3310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3310
movq %rax, %rdi
callq 0x3170
movl $0x1, %edi
callq 0x3370
leaq 0x1116e(%rip), %rdi     # 0x153c2
callq 0x31d0
leaq 0x11162(%rip), %rdi     # 0x153c2
callq 0x3400
leaq 0x11156(%rip), %rdi     # 0x153c2
callq 0x31d0
leaq 0x1114a(%rip), %rdi     # 0x153c2
callq 0x3400
movq %rax, %rbx
movq -0x1a0(%rbp), %rdi
cmpq %r13, %rdi
je 0x4296
callq 0x32f0
jmp 0x4296
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
jmp 0x4303
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
cmpq %r13, %rdi
je 0x42b8
callq 0x32f0
jmp 0x42b8
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
jmp 0x4303
movq %rax, %rbx
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x42da
callq 0x32f0
jmp 0x42da
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
jmp 0x4303
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
cmpq %r13, %rdi
je 0x42fc
callq 0x32f0
jmp 0x42fc
movq %rax, %rbx
leaq -0x290(%rbp), %rdi
callq 0x76c2
jmp 0x4320
jmp 0x431d
jmp 0x43bd
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x434c
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x76c2
jmp 0x43c0
jmp 0x43bd
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
jmp 0x434c
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x6e22
jmp 0x43c0
movq %rax, %rbx
movq -0x200(%rbp), %rdi
cmpq %r12, %rdi
je 0x43d1
callq 0x32f0
jmp 0x43d1
jmp 0x43ce
movq %rax, %rbx
jmp 0x4419
jmp 0x4377
jmp 0x4377
movq %rax, %rbx
jmp 0x442e
movq %rax, %rbx
jmp 0x4443
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x4396
movl -0x38(%rbp), %eax
movl %eax, (%r14)
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
jne 0x4429
jmp 0x442e
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x43b7
movl %r12d, (%r14)
leaq -0x80(%rbp), %rax
jmp 0x4420
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x6e22
jmp 0x43d1
movq %rax, %rbx
cmpl $0x0, -0x30(%rbp)
je 0x4407
addq $-0x58, %r15
imulq $0x58, -0x38(%rbp), %r12
leaq (%r15,%r12), %rdi
callq 0x6e7a
addq $-0x58, %r12
jne 0x43e0
addq $-0x58, %r14
imulq $0x58, -0x38(%rbp), %r15
leaq (%r14,%r15), %rdi
callq 0x6ea8
addq $-0x58, %r15
jne 0x43f8
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4419
callq 0x32f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x442e
callq 0x32f0
leaq -0xe8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4443
callq 0x32f0
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4458
callq 0x32f0
movq %rbx, %rdi
callq 0x3560