// File: /workspace/github_cpp_makefile_star2_O1/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 0x4204
movq %rsi, %r13
leaq 0x8(%rsi), %rbx
movq %rbx, %rsi
callq 0x445f
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 0x4246
movslq %eax, %rcx
movq %rax, -0x30(%rbp)
cmpq %rax, %rcx
jne 0x4252
movl (%r14), %eax
cmpl $0x22, %eax
je 0x4252
testl %eax, %eax
jne 0x38ec
movl %r12d, (%r14)
leaq -0x80(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x38ff
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 0x425e
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rcx
cmpq %rdx, %rcx
jb 0x426a
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x426a
movq %rax, -0x40(%rbp)
testl %ecx, %ecx
jne 0x3974
movl -0x38(%rbp), %eax
movl %eax, (%r14)
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0x3985
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, %eax
movq %rsp, %r14
movq %rax, -0x38(%rbp)
imulq $0x58, %rax, %rax
leaq 0xf(%rax), %rcx
andq $-0x10, %rcx
subq %rcx, %r14
movq %r14, %rsp
testl %edx, %edx
je 0x3a10
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 0x39e0
movq %rsp, %r15
imulq $0x58, -0x38(%rbp), %rax
leaq 0xf(%rax), %rcx
andq $-0x10, %rcx
subq %rcx, %r15
movq %r15, %rsp
cmpl $0x0, -0x30(%rbp)
je 0x3a62
leaq 0x30(%r15), %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 0x3a32
movq 0x1c567(%rip), %rbx     # 0x1ffd0
leaq 0x12631(%rip), %rsi     # 0x160a1
movl $0x17, %edx
movq %rbx, %rdi
callq 0x3340
movq -0xc0(%rbp), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x3aa8
movq %r12, %rdi
callq 0x3130
movq 0x1c535(%rip), %rdi     # 0x1ffd0
movq %r12, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3abf
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3520
movq 0x1c50a(%rip), %rdi     # 0x1ffd0
leaq 0x12667(%rip), %rsi     # 0x16134
movl $0x1, %edx
callq 0x3340
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq 0x1c4e4(%rip), %rdi     # 0x1ffd0
callq 0x3340
movq %rax, %r12
leaq 0x12639(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x18(%r13), %rbx
testq %rbx, %rbx
je 0x3b29
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3b44
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x125e9(%rip), %rsi     # 0x16134
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 0x125bc(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x28(%r13), %rbx
testq %rbx, %rbx
je 0x3ba6
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3bc1
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x1256c(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x3550
movq %rax, %r12
leaq 0x12549(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x38(%r13), %rbx
testq %rbx, %rbx
je 0x3c19
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3c34
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x124f9(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %r12, %rdi
callq 0x3340
movq %r12, %rdi
movq -0x40(%rbp), %rsi
callq 0x3550
movq %rax, %r12
leaq 0x124d6(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x48(%r13), %rbx
testq %rbx, %rbx
je 0x3c8c
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3ca7
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x12486(%rip), %rsi     # 0x16134
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 0x12459(%rip), %rsi     # 0x16134
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq 0x58(%r13), %rbx
testq %rbx, %rbx
je 0x3d09
movq %rbx, %rdi
callq 0x3130
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x3d24
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3520
leaq 0x12409(%rip), %rsi     # 0x16134
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 0x122ce(%rip), %rsi     # 0x16020
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 0x7b88
leaq -0xd8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movq -0x30(%rbp), %r13
movl %r13d, %edx
callq 0x4bec
movq -0x200(%rbp), %rdi
cmpq %r12, %rdi
je 0x3ddb
callq 0x32f0
leaq 0x122d7(%rip), %rsi     # 0x160b9
leaq -0xf8(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
jne 0x3f68
leaq -0x160(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6ee2
leaq -0x160(%rbp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x4d72
leaq -0x160(%rbp), %rdi
callq 0x6f70
movq 0x1c1a2(%rip), %rbx     # 0x1ffd0
leaq 0x1228c(%rip), %rsi     # 0x160c1
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 0x1c170(%rip), %rdi     # 0x1ffd0
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x90(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0x4e83
leaq 0x12250(%rip), %rsi     # 0x160da
leaq -0x118(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x3eee
leaq -0x290(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x759e
leaq -0x1b0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1c0(%rbp), %rdi
callq 0x7b88
leaq -0x290(%rbp), %r12
leaq -0x1c0(%rbp), %rsi
movq %r12, %rdi
callq 0x5474
movq -0x1c0(%rbp), %rdi
jmp 0x3f40
leaq -0x2c0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x759e
leaq -0x1d0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x7b88
leaq -0x2c0(%rbp), %r12
leaq -0x1e0(%rbp), %rsi
movq %r12, %rdi
callq 0x511b
movq -0x1e0(%rbp), %rdi
cmpq %r13, %rdi
je 0x3f50
movq -0x30(%rbp), %r13
callq 0x32f0
jmp 0x3f54
movq -0x30(%rbp), %r13
movq %r12, %rdi
callq 0x783e
leaq -0x90(%rbp), %rdi
callq 0x783e
leaq 0x12175(%rip), %rsi     # 0x160e4
leaq -0xf8(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
jne 0x4126
leaq -0x148(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6ee2
leaq -0x148(%rbp), %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x5655
leaq -0x148(%rbp), %rdi
callq 0x6f70
movq 0x1c015(%rip), %rbx     # 0x1ffd0
leaq 0x12128(%rip), %rsi     # 0x160ea
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 0x1bfe3(%rip), %rdi     # 0x1ffd0
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x130(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6ee2
leaq -0x130(%rbp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x4d72
leaq -0x130(%rbp), %rdi
callq 0x6f70
leaq -0x90(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0x4e83
leaq 0x12092(%rip), %rsi     # 0x160da
leaq -0x118(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x40ac
leaq -0x230(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x759e
leaq -0x170(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x180(%rbp), %rdi
callq 0x7b88
leaq -0x230(%rbp), %r12
leaq -0x180(%rbp), %rsi
movq %r12, %rdi
callq 0x5474
movq -0x180(%rbp), %rdi
jmp 0x40fe
leaq -0x260(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x759e
leaq -0x190(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a0(%rbp), %rdi
callq 0x7b88
leaq -0x260(%rbp), %r12
leaq -0x1a0(%rbp), %rsi
movq %r12, %rdi
callq 0x511b
movq -0x1a0(%rbp), %rdi
cmpq %r13, %rdi
je 0x410e
movq -0x30(%rbp), %r13
callq 0x32f0
jmp 0x4112
movq -0x30(%rbp), %r13
movq %r12, %rdi
callq 0x783e
leaq -0x90(%rbp), %rdi
callq 0x783e
leaq -0xd8(%rbp), %rdi
callq 0x6f70
testl %r13d, %r13d
je 0x419b
leaq -0x40(%r15), %rbx
imulq $0x58, -0x38(%rbp), %r12
leaq -0x30(%r15), %r13
leaq (%r12,%r13), %rdi
callq 0x783e
movq -0x50(%r15,%r12), %rdi
leaq (%rbx,%r12), %rax
cmpq %rdi, %rax
je 0x4160
callq 0x32f0
addq $-0x58, %r12
jne 0x4144
cmpl $0x0, -0x30(%rbp)
je 0x419b
leaq -0x40(%r14), %rbx
imulq $0x58, -0x38(%rbp), %r15
leaq -0x30(%r14), %r12
leaq (%r12,%r15), %rdi
callq 0x783e
movq -0x50(%r14,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x4195
callq 0x32f0
addq $-0x58, %r15
jne 0x4179
movq -0xb8(%rbp), %rsp
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41b4
callq 0x32f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41c9
callq 0x32f0
leaq -0xe8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41de
callq 0x32f0
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41f3
callq 0x32f0
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1bdc5(%rip), %rdi     # 0x1ffd0
leaq 0x11e0e(%rip), %rbx     # 0x16020
movq %rbx, %rsi
callq 0x3310
leaq 0x11e01(%rip), %rsi     # 0x16022
movq %rax, %rdi
callq 0x3310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3310
movq %rax, %rdi
callq 0x3170
movl $0x1, %edi
callq 0x3370
leaq 0x12175(%rip), %rdi     # 0x163c2
callq 0x31d0
leaq 0x12169(%rip), %rdi     # 0x163c2
callq 0x3400
leaq 0x1215d(%rip), %rdi     # 0x163c2
callq 0x31d0
leaq 0x12151(%rip), %rdi     # 0x163c2
callq 0x3400
movq %rax, %rbx
movq -0x1a0(%rbp), %rdi
cmpq %r13, %rdi
je 0x428f
callq 0x32f0
jmp 0x428f
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
jmp 0x42fc
movq %rax, %rbx
movq -0x1e0(%rbp), %rdi
cmpq %r13, %rdi
je 0x42b1
callq 0x32f0
jmp 0x42b1
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
jmp 0x42fc
movq %rax, %rbx
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x42d3
callq 0x32f0
jmp 0x42d3
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
jmp 0x42fc
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
cmpq %r13, %rdi
je 0x42f5
callq 0x32f0
jmp 0x42f5
movq %rax, %rbx
leaq -0x290(%rbp), %rdi
callq 0x783e
jmp 0x4319
jmp 0x4316
jmp 0x43b6
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x4345
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x783e
jmp 0x43b9
jmp 0x43b6
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
jmp 0x4345
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x6f70
jmp 0x43b9
movq %rax, %rbx
movq -0x200(%rbp), %rdi
cmpq %r12, %rdi
je 0x43ca
callq 0x32f0
jmp 0x43ca
jmp 0x43c7
movq %rax, %rbx
jmp 0x4418
jmp 0x4370
jmp 0x4370
movq %rax, %rbx
jmp 0x442d
movq %rax, %rbx
jmp 0x4442
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x438f
movl -0x38(%rbp), %eax
movl %eax, (%r14)
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
jne 0x4428
jmp 0x442d
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x43b0
movl %r12d, (%r14)
leaq -0x80(%rbp), %rax
jmp 0x441f
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x6f70
jmp 0x43ca
movq %rax, %rbx
cmpl $0x0, -0x30(%rbp)
je 0x4406
addq $-0x58, %r15
imulq $0x58, -0x38(%rbp), %r12
leaq (%r15,%r12), %rdi
callq 0x6fbe
addq $-0x58, %r12
jne 0x43d9
cmpl $0x0, -0x30(%rbp)
je 0x4406
addq $-0x58, %r14
imulq $0x58, -0x38(%rbp), %r15
leaq (%r14,%r15), %rdi
callq 0x6fec
addq $-0x58, %r15
jne 0x43f7
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4418
callq 0x32f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x442d
callq 0x32f0
leaq -0xe8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4442
callq 0x32f0
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4457
callq 0x32f0
movq %rbx, %rdi
callq 0x3560