// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/main.cpp
// Function: main
int main(int argc, char *argv[]){

  if(argc < 4){
    cerr << "Missing parameters: prog input species ascendant" << endl;
    return -1;
  }

  string input_path(argv[1]);
  string simple_input_path = "public/simple_input.ly";
  int species = atoi(argv[2]);
  bool ascendant = (string(argv[3]) == "true");
  printf("[%s] [%d] [%d]\n", input_path.c_str(), species, ascendant);

  LyParser::convert_file_to_simple_format(input_path, simple_input_path);
  Song song = LyParser::read_file(simple_input_path);

  Song counterpoint, second_counterpoint, third_counterpoint, fourth_counterpoint;
  switch (species) {
    case 1:
      cout << "\nGenerating first species counterpoint...\n";
      counterpoint = FirstSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size());
    break;

    case 2:
      cout << "\nGenerating second species counterpoint...\n";
      counterpoint = SecondSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 2);
    break;

    case 3:
      cout << "\nGenerating third species counterpoint...\n";
      counterpoint = ThirdSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 4);
    break;

    case 4:
      cout << "\nGenerating fourth species counterpoint...\n";
      counterpoint = FourthSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 2);
    break;

    default:
      cout << "\nGenerating counterpoints...\n";
      counterpoint = FirstSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size());
      second_counterpoint = SecondSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 2);
      third_counterpoint = ThirdSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 4);
      fourth_counterpoint = FourthSpeciesCounterpoint::dfs_generate_counterpoint(song, ascendant, 4, song.size() * 2);
    break;
  }

  if(counterpoint.size())
    LyParser::add_counterpoint_to_lilypond(counterpoint, input_path, "public/counterpoint.ly");

  if(second_counterpoint.size())
    LyParser::add_counterpoint_to_lilypond(second_counterpoint, input_path, "public/counterpoint_2.ly");

  if(third_counterpoint.size())
    LyParser::add_counterpoint_to_lilypond(third_counterpoint, input_path, "public/counterpoint_3.ly");

  if(fourth_counterpoint.size())
    LyParser::add_counterpoint_to_lilypond(fourth_counterpoint, input_path, "public/counterpoint_4.ly");


  if(counterpoint.size() == 0){
    cout << "Couldn't generate counterpoint\n";
    return -2;
  }

  int size = min(song.size(), counterpoint.size());
  for(int i = 0; i < size; ++i){
    Interval in(song.notes[i], counterpoint.notes[i]);
    cout << song.notes[i].full_note_with_octave() << " " << counterpoint.notes[i].full_note_with_octave() << " " << in.description() << endl;
  }

  cout << endl;

  cout << "First Species Counterpoint\n";
  for(auto & c : counterpoint.notes){
    cout << SongReader::note_to_string(c) << " ";
  }
  cout << endl;
  printf("Size: %d\n", (int) counterpoint.size());

  cout << endl;
  cout << "Second Species Counterpoint\n";
  for(auto & c : second_counterpoint.notes){
    cout << SongReader::note_to_string(c) << " ";
  }
  cout << endl;
  printf("Size: %d\n", (int) second_counterpoint.size());

  cout << endl;
  cout << "Third Species Counterpoint\n";
  for(auto & c : third_counterpoint.notes){
    cout << SongReader::note_to_string(c) << " ";
  }
  cout << endl;
  printf("Size: %d\n", (int) third_counterpoint.size());

  cout << endl;
  cout << "Fourth Species Counterpoint\n";
  for(auto & c : fourth_counterpoint.notes){
    cout << SongReader::note_to_string(c) << " ";
  }
  cout << endl;
  printf("Size: %d\n", (int) fourth_counterpoint.size());

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8f8, %rsp            # imm = 0x8F8
cmpl $0x3, %edi
jg 0x11695
movq 0x2896f(%rip), %rdi     # 0x39fe8
leaq 0x17c74(%rip), %rsi     # 0x292f4
callq 0x5350
movq %rax, %rdi
callq 0x51d0
pushq $-0x1
popq %rbx
jmp 0x12131
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x238(%rsp), %rdx
callq 0x96e6
leaq 0x17c70(%rip), %rsi     # 0x29325
leaq 0xf8(%rsp), %rdi
leaq 0x238(%rsp), %rdx
callq 0x96e6
movq 0x10(%rbx), %rdi
callq 0x5500
movl %eax, %r14d
movq 0x18(%rbx), %rsi
leaq 0x238(%rsp), %rdi
leaq 0x388(%rsp), %rdx
callq 0x96e6
leaq 0x17c46(%rip), %rsi     # 0x2933c
leaq 0x238(%rsp), %rbx
movq %rbx, %rdi
callq 0x989a
movl %eax, %ebp
movq %rbx, %rdi
callq 0x51b0
leaq 0x8(%rsp), %r15
movq (%r15), %rsi
movzbl %bpl, %ebx
leaq 0x17c1e(%rip), %rdi     # 0x29341
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x5060
leaq 0x328(%rsp), %rdi
movq %r15, %rsi
callq 0x5480
leaq 0x308(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x5480
leaq 0x328(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x1070c
leaq 0x308(%rsp), %rdi
callq 0x51b0
leaq 0x328(%rsp), %rdi
callq 0x51b0
leaq 0x218(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x5480
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x10004
leaq 0x218(%rsp), %rdi
callq 0x51b0
leaq 0x388(%rsp), %rdi
callq 0xc30e
leaq 0x618(%rsp), %rdi
callq 0xc30e
leaq 0x548(%rsp), %rdi
callq 0xc30e
leaq 0x478(%rsp), %rdi
callq 0xc30e
decl %r14d
cmpl $0x3, %r14d
ja 0x11959
leaq 0x17adf(%rip), %rax     # 0x292e4
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x28793(%rip), %rdi     # 0x39fa8
leaq 0x17b35(%rip), %rsi     # 0x29351
callq 0x5350
leaq 0x238(%rsp), %rdi
callq 0x17ce4
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0xa390
leaq 0x388(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
jmp 0x11a75
movq 0x28742(%rip), %rdi     # 0x39fa8
leaq 0x17b3b(%rip), %rsi     # 0x293a8
callq 0x5350
leaq 0x238(%rsp), %rdi
callq 0x17ce4
shll $0x2, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0x25288
leaq 0x388(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
jmp 0x11a75
movq 0x286ee(%rip), %rdi     # 0x39fa8
leaq 0x17b12(%rip), %rsi     # 0x293d3
callq 0x5350
leaq 0x238(%rsp), %rdi
callq 0x17ce4
addl %eax, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0xc648
leaq 0x388(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
jmp 0x11a75
movq 0x2869b(%rip), %rdi     # 0x39fa8
leaq 0x17a68(%rip), %rsi     # 0x2937c
callq 0x5350
leaq 0x238(%rsp), %rdi
callq 0x17ce4
addl %eax, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0x14970
leaq 0x388(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
jmp 0x11a75
movq 0x28648(%rip), %rdi     # 0x39fa8
leaq 0x17a98(%rip), %rsi     # 0x293ff
callq 0x5350
leaq 0x238(%rsp), %rdi
callq 0x17ce4
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0xa390
leaq 0x388(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
leaq 0x28(%rsp), %rdi
callq 0xc3b0
leaq 0x238(%rsp), %rdi
callq 0x17ce4
addl %eax, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0x14970
leaq 0x618(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
leaq 0x28(%rsp), %rdi
callq 0xc3b0
leaq 0x238(%rsp), %rdi
callq 0x17ce4
shll $0x2, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0x25288
leaq 0x548(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
leaq 0x28(%rsp), %rdi
callq 0xc3b0
leaq 0x238(%rsp), %rdi
callq 0x17ce4
addl %eax, %eax
leaq 0x28(%rsp), %rdi
leaq 0x238(%rsp), %rsi
pushq $0x4
popq %rcx
movl %ebx, %edx
movl %eax, %r8d
callq 0xc648
leaq 0x478(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x123e2
leaq 0x28(%rsp), %rdi
callq 0xc3b0
leaq 0x388(%rsp), %rdi
callq 0x17ce4
testl %eax, %eax
je 0x11af2
leaq 0x1f8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5480
leaq 0x17974(%rip), %rsi     # 0x2941d
leaq 0x1d8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x96e6
leaq 0x388(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x1d8(%rsp), %rdx
callq 0x10f14
leaq 0x1d8(%rsp), %rdi
callq 0x51b0
leaq 0x1f8(%rsp), %rdi
callq 0x51b0
leaq 0x618(%rsp), %rdi
callq 0x17ce4
testl %eax, %eax
je 0x11b65
leaq 0x1b8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5480
leaq 0x17918(%rip), %rsi     # 0x29434
leaq 0x198(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x96e6
leaq 0x618(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x198(%rsp), %rdx
callq 0x10f14
leaq 0x198(%rsp), %rdi
callq 0x51b0
leaq 0x1b8(%rsp), %rdi
callq 0x51b0
leaq 0x548(%rsp), %rdi
callq 0x17ce4
testl %eax, %eax
je 0x11bd8
leaq 0x178(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5480
leaq 0x178be(%rip), %rsi     # 0x2944d
leaq 0x158(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x96e6
leaq 0x548(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0x10f14
leaq 0x158(%rsp), %rdi
callq 0x51b0
leaq 0x178(%rsp), %rdi
callq 0x51b0
leaq 0x478(%rsp), %rdi
callq 0x17ce4
testl %eax, %eax
je 0x11c4b
leaq 0x138(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5480
leaq 0x17864(%rip), %rsi     # 0x29466
leaq 0x118(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x96e6
leaq 0x478(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0x118(%rsp), %rdx
callq 0x10f14
leaq 0x118(%rsp), %rdi
callq 0x51b0
leaq 0x138(%rsp), %rdi
callq 0x51b0
leaq 0x388(%rsp), %rdi
callq 0x17ce4
testl %eax, %eax
je 0x120c3
leaq 0x238(%rsp), %rdi
callq 0x17ce4
movl %eax, %r14d
leaq 0x388(%rsp), %rdi
callq 0x17ce4
cmpl %r14d, %eax
cmovbl %eax, %r14d
xorl %ebx, %ebx
testl %r14d, %r14d
cmovlel %ebx, %r14d
imulq $0x58, %r14, %rax
movq %rax, (%rsp)
leaq 0x8a0(%rsp), %rdi
leaq 0x458(%rsp), %r13
leaq 0x17560(%rip), %r12     # 0x2920c
cmpq %rbx, (%rsp)
je 0x11dd7
movq %r12, %r15
movq %r13, %r12
movq 0x238(%rsp), %rsi
addq %rbx, %rsi
movq %rdi, %rbp
callq 0x12676
movq 0x388(%rsp), %rsi
addq %rbx, %rsi
leaq 0x848(%rsp), %r13
movq %r13, %rdi
callq 0x12676
leaq 0x28(%rsp), %rdi
movq %rbp, %r14
movq %rbp, %rsi
movq %r13, %rdx
callq 0xf41a
movq %r13, %rdi
callq 0x979a
movq %r14, %rdi
callq 0x979a
movq 0x238(%rsp), %rsi
addq %rbx, %rsi
movq %r12, %r13
movq %r12, %rdi
callq 0x129f4
movq 0x2827e(%rip), %rdi     # 0x39fa8
movq %r13, %rsi
callq 0x5310
movq %r15, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x5350
movq %rax, %r14
movq 0x388(%rsp), %rsi
addq %rbx, %rsi
leaq 0x368(%rsp), %r15
movq %r15, %rdi
callq 0x129f4
movq %r14, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
movq %r12, %rsi
callq 0x5350
movq %rax, %r14
leaq 0x348(%rsp), %r15
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
callq 0xf548
movq %r14, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
callq 0x51d0
leaq 0x348(%rsp), %rdi
callq 0x51b0
leaq 0x368(%rsp), %rdi
callq 0x51b0
movq %r13, %rdi
callq 0x51b0
leaq 0x30(%rsp), %rdi
callq 0x51b0
addq $0x58, %rbx
movq %rbp, %rdi
jmp 0x11cac
movq 0x281ca(%rip), %rdi     # 0x39fa8
callq 0x51d0
movq 0x281be(%rip), %rdi     # 0x39fa8
leaq 0x176ae(%rip), %rsi     # 0x2949f
callq 0x5350
movq 0x388(%rsp), %rbx
movq 0x390(%rsp), %rbp
leaq 0x7f0(%rsp), %r14
leaq 0x28(%rsp), %r15
movq 0x2818e(%rip), %r12     # 0x39fa8
leaq 0x173eb(%rip), %r13     # 0x2920c
cmpq %rbp, %rbx
je 0x11e68
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12676
movq %r15, %rdi
movq %r14, %rsi
callq 0x18102
movq %r12, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
movq %r13, %rsi
callq 0x5350
movq %r15, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x979a
addq $0x58, %rbx
jmp 0x11e21
movq 0x28139(%rip), %rdi     # 0x39fa8
callq 0x51d0
leaq 0x388(%rsp), %rdi
callq 0x17ce4
leaq 0x17633(%rip), %rdi     # 0x294bb
movl %eax, %esi
xorl %eax, %eax
callq 0x5060
movq 0x28110(%rip), %rdi     # 0x39fa8
callq 0x51d0
movq 0x28104(%rip), %rdi     # 0x39fa8
leaq 0x1761a(%rip), %rsi     # 0x294c5
callq 0x5350
movq 0x618(%rsp), %rbx
movq 0x620(%rsp), %rbp
leaq 0x798(%rsp), %r14
leaq 0x28(%rsp), %r15
movq 0x280d4(%rip), %r12     # 0x39fa8
leaq 0x17331(%rip), %r13     # 0x2920c
cmpq %rbp, %rbx
je 0x11f22
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12676
movq %r15, %rdi
movq %r14, %rsi
callq 0x18102
movq %r12, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
movq %r13, %rsi
callq 0x5350
movq %r15, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x979a
addq $0x58, %rbx
jmp 0x11edb
movq 0x2807f(%rip), %rdi     # 0x39fa8
callq 0x51d0
leaq 0x618(%rsp), %rdi
callq 0x17ce4
leaq 0x17579(%rip), %rdi     # 0x294bb
movl %eax, %esi
xorl %eax, %eax
callq 0x5060
movq 0x28056(%rip), %rdi     # 0x39fa8
callq 0x51d0
movq 0x2804a(%rip), %rdi     # 0x39fa8
leaq 0x1757d(%rip), %rsi     # 0x294e2
callq 0x5350
movq 0x548(%rsp), %rbx
movq 0x550(%rsp), %rbp
leaq 0x740(%rsp), %r14
leaq 0x28(%rsp), %r15
movq 0x2801a(%rip), %r12     # 0x39fa8
leaq 0x17277(%rip), %r13     # 0x2920c
cmpq %rbp, %rbx
je 0x11fdc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12676
movq %r15, %rdi
movq %r14, %rsi
callq 0x18102
movq %r12, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
movq %r13, %rsi
callq 0x5350
movq %r15, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x979a
addq $0x58, %rbx
jmp 0x11f95
movq 0x27fc5(%rip), %rdi     # 0x39fa8
callq 0x51d0
leaq 0x548(%rsp), %rdi
callq 0x17ce4
leaq 0x174bf(%rip), %rdi     # 0x294bb
movl %eax, %esi
xorl %eax, %eax
callq 0x5060
movq 0x27f9c(%rip), %rdi     # 0x39fa8
callq 0x51d0
movq 0x27f90(%rip), %rdi     # 0x39fa8
leaq 0x174df(%rip), %rsi     # 0x294fe
callq 0x5350
movq 0x478(%rsp), %rbx
movq 0x480(%rsp), %rbp
leaq 0x6e8(%rsp), %r14
leaq 0x28(%rsp), %r15
movq 0x27f60(%rip), %r12     # 0x39fa8
leaq 0x171bd(%rip), %r13     # 0x2920c
cmpq %rbp, %rbx
je 0x12096
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12676
movq %r15, %rdi
movq %r14, %rsi
callq 0x18102
movq %r12, %rdi
movq %r15, %rsi
callq 0x5310
movq %rax, %rdi
movq %r13, %rsi
callq 0x5350
movq %r15, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x979a
addq $0x58, %rbx
jmp 0x1204f
movq 0x27f0b(%rip), %rdi     # 0x39fa8
callq 0x51d0
leaq 0x478(%rsp), %rdi
callq 0x17ce4
leaq 0x17405(%rip), %rdi     # 0x294bb
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x5060
jmp 0x120d9
movq 0x27ede(%rip), %rdi     # 0x39fa8
leaq 0x173ae(%rip), %rsi     # 0x2947f
callq 0x5350
pushq $-0x2
popq %rbx
leaq 0x478(%rsp), %rdi
callq 0xc3b0
leaq 0x548(%rsp), %rdi
callq 0xc3b0
leaq 0x618(%rsp), %rdi
callq 0xc3b0
leaq 0x388(%rsp), %rdi
callq 0xc3b0
leaq 0x238(%rsp), %rdi
callq 0xc3b0
leaq 0xf8(%rsp), %rdi
callq 0x51b0
leaq 0x8(%rsp), %rdi
callq 0x51b0
movl %ebx, %eax
addq $0x8f8, %rsp            # imm = 0x8F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12153
jmp 0x12153
jmp 0x12153
jmp 0x12153
jmp 0x12153
jmp 0x12153
jmp 0x12153
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xc3b0
jmp 0x12382
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x51b0
jmp 0x121ac
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
jmp 0x1237d
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x51b0
jmp 0x121ce
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x1237d
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x51b0
jmp 0x121f0
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
jmp 0x1237d
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x51b0
jmp 0x12212
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
jmp 0x1237d
movq %rax, %rbx
jmp 0x1238f
movq %rax, %rbx
jmp 0x1239c
movq %rax, %rbx
jmp 0x123a9
movq %rax, %rbx
jmp 0x123b6
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
jmp 0x1226b
jmp 0x12277
movq %rax, %rbx
leaq 0x308(%rsp), %rdi
callq 0x51b0
jmp 0x12263
movq %rax, %rbx
leaq 0x328(%rsp), %rdi
callq 0x51b0
jmp 0x123c3
jmp 0x12277
movq %rax, %rbx
jmp 0x123c3
movq %rax, %rbx
jmp 0x123d0
jmp 0x122aa
jmp 0x122aa
jmp 0x122aa
movq %rax, %rbx
jmp 0x122f0
jmp 0x122aa
movq %rax, %rbx
jmp 0x12307
jmp 0x122aa
movq %rax, %rbx
jmp 0x1231e
jmp 0x122aa
movq %rax, %rbx
jmp 0x12335
movq %rax, %rbx
jmp 0x12382
jmp 0x12356
movq %rax, %rbx
jmp 0x122cc
movq %rax, %rbx
leaq 0x848(%rsp), %rdi
callq 0x979a
leaq 0x8a0(%rsp), %rdi
jmp 0x1233d
movq %rax, %rbx
jmp 0x12378
jmp 0x12368
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51b0
leaq 0x6e8(%rsp), %rdi
jmp 0x1233d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51b0
leaq 0x740(%rsp), %rdi
jmp 0x1233d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51b0
leaq 0x798(%rsp), %rdi
jmp 0x1233d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51b0
leaq 0x7f0(%rsp), %rdi
callq 0x979a
jmp 0x12382
movq %rax, %rbx
leaq 0x348(%rsp), %rdi
callq 0x51b0
jmp 0x12359
movq %rax, %rbx
leaq 0x368(%rsp), %rdi
callq 0x51b0
jmp 0x1236b
movq %rax, %rbx
leaq 0x458(%rsp), %rdi
callq 0x51b0
leaq 0x30(%rsp), %rdi
callq 0x51b0
leaq 0x478(%rsp), %rdi
callq 0xc3b0
leaq 0x548(%rsp), %rdi
callq 0xc3b0
leaq 0x618(%rsp), %rdi
callq 0xc3b0
leaq 0x388(%rsp), %rdi
callq 0xc3b0
leaq 0x238(%rsp), %rdi
callq 0xc3b0
leaq 0xf8(%rsp), %rdi
callq 0x51b0
leaq 0x8(%rsp), %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x55d0