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

  if(cmdOptionExists(argv, argv+argc, "-h"))
  {
    help(argv[0]);
    return 0;
  }

  char * filename1 = getCmdOption(argv, argv + argc, "-a");
  char * filename2 = getCmdOption(argv, argv + argc, "-b");
  char * thresh = getCmdOption(argv, argv + argc, "-t");
  char * jump = getCmdOption(argv, argv + argc, "-s");
  char * verbose = getCmdOption(argv, argv + argc, "-v");

  float THRESHOLD = 7.5;
  int JUMP = 1;
  int something = 0;

  float lowest = 1024.0;
  float index = 0;
  string TCindex;

  int hours = 0;
  int minutes = 0;
  int seconds = 0;
  int frames = 0;

  bool DEBUG = false;

  if(verbose){
    DEBUG = true;
  }

  // parse -t
  if(thresh){
    std::string ts(thresh);
    THRESHOLD = float(strtof(ts.c_str(),NULL));
  }

  //parse -s
  if(jump){
    std::string ts(jump);
    JUMP = int(strtof(ts.c_str(),NULL));
  }

  //parse -a and -b (no file existance check so far)
  if (filename1 && filename2){
    std::vector<float> a,b;
    if(DEBUG)
      std::cout << "loading file A: " << filename1 << std::endl;

    if(is_match(filename1,".xml.gz")){
      a = load(filename1,JUMP);
    }else if(is_match(filename1,".txt")){
      a = loadFromTxt(filename1,JUMP);
    }

    if(DEBUG)
      std::cout << "loaded " << a.size() << " frames of total " << (JUMP * a.size()) << " (skip "<< JUMP <<")" << std::endl;


    if(DEBUG)
      std::cout << "loading file B: " << filename2 << std::endl;

    if(is_match(filename2,".xml.gz")){
      b = load(filename2,JUMP);
    }else if(is_match(filename2,".txt")){
      b = loadFromTxt(filename2,JUMP);
    }

    if(DEBUG)
      std::cout << "loaded " << b.size() << " frames of total " << (JUMP * b.size()) << " (skip "<< JUMP <<")" << std::endl;

    if(DEBUG)
      std::cout << "detected FPS: " << FPS << std::endl;

    if(DEBUG)
      std::cout << "comparing..." << std::endl;

    if(a.size()>b.size()){
      std::cerr << yellow << "Note: input file A should be shorter than B file ("<<filename2<<")" << reset << std::endl;
      return 1;
    }

    // sample comparation main loop
    for(int i = 0 ; i < b.size() - a.size() ; i++){


      // timecode estimation
      //
      if(frames * JUMP >= FPS){
        frames = 0;
        seconds++;
      }

      if(seconds > 59){
        seconds = 0;
        minutes++;
      }

      if(minutes > 59){
        minutes = 0;
        hours++;
      }

      stringstream tc;
      tc << setfill('0') << std::setw(2) << hours;
      tc << ":";
      tc << setfill('0') << std::setw(2) << minutes;
      tc << ":";
      tc << setfill('0') << std::setw(2) << seconds;
      tc << ":";
      tc << setfill('0') << std::setw(2) << frames;
      string TC = tc.str();



      // weird placement but if match is perfect it needs to be broken here
      if(something==2){
        break;
      }

      // if the diff of first sample of B is whitin threshold do seek more samples
      if(fabs(b[i]-a[0])<THRESHOLD){

        float avg = 0;

        // compute average diffenrence
        int cnt = 0;

        for(int ii = 0 ; ii < a.size() ; ii++){
          avg = avg + ( fabs( b[ii+i] - a[ii] ));
          cnt++;
        }
        avg = avg / cnt;

        // this means perfect match
        if(avg==0.0){
          something = 2;
          index = i * JUMP;
          TCindex = TC;
        }

        // record if avg in range
        if(avg < THRESHOLD && something !=2 ){
          something = 1;
          index = i * JUMP;
          TCindex = TC;
        }

        // collect the best fitting record
        if(avg < lowest){
          lowest = avg;
          index = i * JUMP;
          TCindex = TC;
        }

      }

      frames+=1;
    }

  }else{
    help(argv[0]);
    return 0;
  }

  if(something==0){
    if(DEBUG)
    std::cout << "NO match, threshold is " << THRESHOLD << ", best: " << yellow << lowest << reset << " (" << filename2 << ")" << std::endl;
    //std::cout << "FR: " << index << std::endl;
    //std::cout << "TC: " << TCindex << std::endl;
    return 1;
  }

  if(something==1){
    std::cout << green << "close MATCH found" << reset << " whitin threshold of " << THRESHOLD << ", it scores: " << yellow << lowest << reset << std::endl;
    std::cout << filename2 << std::endl;
    std::cout << "FR: " << index << std::endl;
    std::cout << "TC: " << TCindex << std::endl;
  }

  if(something==2){
    std::cout << green << "complete MATCH!" << reset << " file " << filename1 << " and " << filename2 << " are the same @:" << std::endl;
    std::cout << "FR: " << index << std::endl;
    std::cout << "TC: " << TCindex << std::endl;
    return 0;
  }
  return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x6409(%rip), %rsi      # 0xd13c
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
movslq %r14d, %rax
leaq (%rbx,%rax,8), %r14
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6766
movl %eax, %r15d
leaq -0x280(%rbp), %rdi
callq 0x6508
testb %r15b, %r15b
je 0x6da8
movq (%rbx), %rsi
leaq -0x2c0(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0x7a78
leaq -0x2c0(%rbp), %rdi
callq 0x6ca8
leaq -0x2c0(%rbp), %rdi
callq 0x6508
xorl %ebx, %ebx
jmp 0x798f
leaq 0x6390(%rip), %rsi      # 0xd13f
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673c
movq %rax, -0x48(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x6508
leaq 0x6357(%rip), %rsi      # 0xd142
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673c
movq %rax, %r13
leaq -0x280(%rbp), %rdi
callq 0x6508
leaq 0x631f(%rip), %rsi      # 0xd145
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673c
movq %rax, %r12
leaq -0x280(%rbp), %rdi
callq 0x6508
leaq 0x62e7(%rip), %rsi      # 0xd148
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673c
movq %rax, %r15
leaq -0x280(%rbp), %rdi
callq 0x6508
leaq 0x62af(%rip), %rsi      # 0xd14b
leaq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673c
movq %rax, -0x98(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x6508
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
testq %r12, %r12
je 0x6f22
leaq -0x280(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
movq %r12, %rsi
callq 0x7a78
leaq -0x280(%rbp), %r14
movq (%r14), %rdi
xorl %esi, %esi
callq 0x6340
movss %xmm0, -0x40(%rbp)
movq %r14, %rdi
callq 0x6508
jmp 0x6f2f
movss 0x60de(%rip), %xmm0     # 0xd008
movss %xmm0, -0x40(%rbp)
testq %r15, %r15
je 0x6f6c
leaq -0x280(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
movq %r15, %rsi
callq 0x7a78
leaq -0x280(%rbp), %r14
movq (%r14), %rdi
xorl %esi, %esi
callq 0x6340
cvttss2si %xmm0, %eax
movl %eax, -0x30(%rbp)
movq %r14, %rdi
callq 0x6508
jmp 0x6f72
pushq $0x1
popq %rax
movl %eax, -0x30(%rbp)
cmpq $0x0, -0x48(%rbp)
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0x7045
andq $0x0, -0x60(%rbp)
andq $0x0, -0x80(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x90(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x6fd1
movq 0xefff(%rip), %rdi      # 0x15fb0
leaq 0x6196(%rip), %rsi      # 0xd14e
callq 0x6290
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0x6290
movq %rax, %rdi
callq 0x6140
leaq -0x280(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
movq -0x48(%rbp), %rsi
callq 0x7a78
leaq 0x6173(%rip), %rsi      # 0xd15f
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x7a78
leaq -0x280(%rbp), %rbx
leaq -0xb8(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c94
movl %eax, %r15d
movq %r14, %rdi
callq 0x6508
movq %rbx, %rdi
callq 0x6508
testb %r15b, %r15b
je 0x707a
leaq -0x280(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x6974
jmp 0x70db
movq (%rbx), %rsi
leaq -0x2a0(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0x7a78
leaq -0x2a0(%rbp), %rdi
callq 0x6ca8
leaq -0x2a0(%rbp), %rdi
callq 0x6508
xorl %ebx, %ebx
jmp 0x7983
leaq -0x280(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
movq -0x48(%rbp), %rsi
callq 0x7a78
leaq 0x60d2(%rip), %rsi      # 0xd167
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x7a78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c94
movl %eax, %r15d
movq %r14, %rdi
callq 0x6508
movq %rbx, %rdi
callq 0x6508
testb %r15b, %r15b
je 0x70ef
leaq -0x280(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x6850
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0xcf1e
movq %rbx, %rdi
callq 0x81f2
movslq -0x30(%rbp), %r12
cmpq $0x0, -0x98(%rbp)
je 0x71a6
movq 0xeea8(%rip), %rdi      # 0x15fb0
leaq 0x605d(%rip), %rsi      # 0xd16c
callq 0x6290
movq -0x68(%rbp), %rsi
subq -0x70(%rbp), %rsi
sarq $0x2, %rsi
movq %rax, %rdi
callq 0x61a0
leaq 0x6045(%rip), %rsi      # 0xd174
movq %rax, %rdi
callq 0x6290
movq -0x68(%rbp), %rsi
subq -0x70(%rbp), %rsi
sarq $0x2, %rsi
imulq %r12, %rsi
movq %rax, %rdi
callq 0x61a0
leaq 0x6030(%rip), %rsi      # 0xd186
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movl -0x30(%rbp), %esi
callq 0x6460
leaq 0x6753(%rip), %rsi      # 0xd8c3
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
callq 0x6140
movq 0xee29(%rip), %rdi      # 0x15fb0
leaq 0x6000(%rip), %rsi      # 0xd18e
callq 0x6290
movq %rax, %rdi
movq %r13, %rsi
callq 0x6290
movq %rax, %rdi
callq 0x6140
leaq -0x280(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
movq %r13, %rsi
callq 0x7a78
leaq 0x5f9f(%rip), %rsi      # 0xd15f
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x7a78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c94
movl %eax, %r15d
movq %r14, %rdi
callq 0x6508
movq %rbx, %rdi
callq 0x6508
testb %r15b, %r15b
je 0x7207
leaq -0x280(%rbp), %rdi
movq %r13, %rsi
movl -0x30(%rbp), %edx
callq 0x6974
jmp 0x7266
leaq -0x280(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
movq %r13, %rsi
callq 0x7a78
leaq 0x5f46(%rip), %rsi      # 0xd167
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x7a78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c94
movl %eax, %r15d
movq %r14, %rdi
callq 0x6508
movq %rbx, %rdi
callq 0x6508
testb %r15b, %r15b
je 0x727d
leaq -0x280(%rbp), %rdi
movq %r13, %rsi
movl -0x30(%rbp), %edx
callq 0x6850
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
callq 0xcf1e
movq %rbx, %rdi
callq 0x81f2
cmpq $0x0, -0x98(%rbp)
je 0x735c
movq 0xed1e(%rip), %rdi      # 0x15fb0
leaq 0x5ed3(%rip), %rsi      # 0xd16c
callq 0x6290
movq -0x88(%rbp), %rsi
subq -0x90(%rbp), %rsi
sarq $0x2, %rsi
movq %rax, %rdi
callq 0x61a0
leaq 0x5eb5(%rip), %rsi      # 0xd174
movq %rax, %rdi
callq 0x6290
movq -0x88(%rbp), %rsi
subq -0x90(%rbp), %rsi
sarq $0x2, %rsi
imulq %r12, %rsi
movq %rax, %rdi
callq 0x61a0
leaq 0x5e9a(%rip), %rsi      # 0xd186
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movl -0x30(%rbp), %esi
callq 0x6460
leaq 0x65bd(%rip), %rsi      # 0xd8c3
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
callq 0x6140
movq 0xec93(%rip), %rdi      # 0x15fb0
leaq 0x5e7b(%rip), %rsi      # 0xd19f
callq 0x6290
movss 0xef5f(%rip), %xmm0     # 0x16290
movq %rax, %rdi
callq 0x61f0
movq %rax, %rdi
callq 0x6140
movq 0xec68(%rip), %rdi      # 0x15fb0
leaq 0x5e5f(%rip), %rsi      # 0xd1ae
callq 0x6290
movq %rax, %rdi
callq 0x6140
movq -0x68(%rbp), %r14
subq -0x70(%rbp), %r14
movq -0x88(%rbp), %r15
subq -0x90(%rbp), %r15
cmpq %r15, %r14
jbe 0x73ea
movq 0xec6a(%rip), %rdi      # 0x15fe8
leaq 0xef73(%rip), %rsi      # 0x162f8
callq 0x6250
leaq 0x5e2a(%rip), %rsi      # 0xd1bb
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movq %r13, %rsi
callq 0x6290
leaq 0x6518(%rip), %rsi      # 0xd8c3
movq %rax, %rdi
callq 0x6290
leaq 0xef9e(%rip), %rsi      # 0x16358
movq %rax, %rdi
callq 0x6250
movq %rax, %rdi
callq 0x6140
pushq $0x1
popq %rbx
xorl %r12d, %r12d
movss 0x5c34(%rip), %xmm0     # 0xd00c
movss %xmm0, -0x34(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
jmp 0x7745
movq %r15, -0xe0(%rbp)
movq %r14, -0xe8(%rbp)
movq %r13, -0xf0(%rbp)
movss 0x5c05(%rip), %xmm0     # 0xd00c
movss %xmm0, -0x34(%rbp)
movq $0x0, -0xf8(%rbp)
xorl %eax, %eax
movl $0x0, -0x58(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r13d, %r13d
movl $0x0, -0x38(%rbp)
movq %rax, -0x50(%rbp)
movq -0x88(%rbp), %rax
subq -0x90(%rbp), %rax
movq -0x68(%rbp), %rcx
subq -0x70(%rbp), %rcx
sarq $0x2, %rax
sarq $0x2, %rcx
subq %rcx, %rax
cmpq -0x50(%rbp), %rax
jbe 0x772a
movl %r13d, %eax
imull -0x30(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0xee16(%rip), %xmm1     # 0x16290
ucomiss %xmm1, %xmm0
sbbl $-0x1, %r14d
ucomiss %xmm1, %xmm0
movl $0x0, %ecx
cmovael %ecx, %r13d
xorl %eax, %eax
cmpl $0x3c, %r14d
setge %al
cmovgel %ecx, %r14d
addl %eax, %r12d
xorl %ebx, %ebx
cmpl $0x3c, %r12d
setge %r15b
cmovgel %ecx, %r12d
leaq -0x280(%rbp), %rdi
callq 0x61c0
leaq -0x270(%rbp), %rdi
pushq $0x30
popq %rsi
callq 0x63d0
movb %r15b, %bl
movl -0x58(%rbp), %esi
addl %ebx, %esi
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %esi, -0x58(%rbp)
callq 0x6460
leaq -0x270(%rbp), %rdi
leaq 0x5d84(%rip), %rsi      # 0xd27b
callq 0x6290
leaq -0x270(%rbp), %rdi
pushq $0x30
popq %rsi
callq 0x63d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r12d, %esi
callq 0x6460
leaq -0x270(%rbp), %rdi
leaq 0x5d47(%rip), %rsi      # 0xd27b
callq 0x6290
leaq -0x270(%rbp), %rdi
pushq $0x30
popq %rsi
callq 0x63d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r14d, %esi
callq 0x6460
leaq -0x270(%rbp), %rdi
leaq 0x5d0a(%rip), %rsi      # 0xd27b
callq 0x6290
leaq -0x270(%rbp), %rdi
pushq $0x30
popq %rsi
callq 0x63d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r13d, %esi
callq 0x6460
leaq -0xb8(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x63f0
cmpl $0x2, -0x38(%rbp)
jne 0x75c1
pushq $0x2
popq %rbx
jmp 0x76da
movq -0x90(%rbp), %rax
movq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x70(%rbp), %rcx
subss (%rcx), %xmm0
andps 0x5a40(%rip), %xmm0     # 0xd020
movss -0x40(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x7620
movq -0x68(%rbp), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
addq -0xf8(%rbp), %rax
xorps %xmm1, %xmm1
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x762d
movss (%rax,%rsi,4), %xmm0
subss (%rcx,%rsi,4), %xmm0
andps 0x5a09(%rip), %xmm0     # 0xd020
addss %xmm0, %xmm1
incq %rsi
jmp 0x7601
movss -0x34(%rbp), %xmm0
movl -0x38(%rbp), %ebx
jmp 0x76d2
cvtsi2ss %edx, %xmm0
divss %xmm0, %xmm1
ucomiss 0x59d4(%rip), %xmm1     # 0xd010
movss %xmm1, -0x54(%rbp)
jne 0x766c
jp 0x766c
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x6180
movl -0x30(%rbp), %eax
imull -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x3c(%rbp)
pushq $0x2
jmp 0x769e
movss -0x40(%rbp), %xmm0
ucomiss %xmm1, %xmm0
movl -0x38(%rbp), %ebx
jbe 0x769f
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x6180
movl -0x30(%rbp), %eax
imull -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x3c(%rbp)
pushq $0x1
popq %rbx
movss -0x34(%rbp), %xmm0
ucomiss -0x54(%rbp), %xmm0
jbe 0x76d2
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x6180
movl -0x30(%rbp), %eax
imull -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x54(%rbp), %xmm0
incl %r13d
movss %xmm0, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x6508
leaq -0x280(%rbp), %rdi
callq 0x6200
movq -0x50(%rbp), %rax
incq %rax
addq $0x4, -0xf8(%rbp)
cmpl $0x2, -0x38(%rbp)
movl %ebx, -0x38(%rbp)
jne 0x7438
movl %ebx, %r12d
movq -0xf0(%rbp), %r13
xorl %ebx, %ebx
movq -0xe8(%rbp), %r14
movq -0xe0(%rbp), %r15
jmp 0x7745
movq -0xf0(%rbp), %r13
xorl %ebx, %ebx
movq -0xe8(%rbp), %r14
movq -0xe0(%rbp), %r15
movl -0x38(%rbp), %r12d
leaq -0x90(%rbp), %rdi
callq 0x81f2
leaq -0x70(%rbp), %rdi
callq 0x81f2
cmpq %r15, %r14
ja 0x7983
cmpl $0x2, %r12d
je 0x780b
cmpl $0x1, %r12d
jne 0x78e7
movq 0xe832(%rip), %rbx      # 0x15fb0
leaq 0xeb53(%rip), %rsi      # 0x162d8
movq %rbx, %rdi
callq 0x6250
leaq 0x5a7b(%rip), %rsi      # 0xd20f
movq %rax, %rdi
callq 0x6290
leaq 0xebb5(%rip), %rsi      # 0x16358
movq %rax, %rdi
callq 0x6250
leaq 0x5a6f(%rip), %rsi      # 0xd221
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movss -0x40(%rbp), %xmm0
callq 0x61f0
leaq 0x5a69(%rip), %rsi      # 0xd237
movq %rax, %rdi
callq 0x6290
leaq 0xeb1b(%rip), %rsi      # 0x162f8
movq %rax, %rdi
callq 0x6250
movq %rax, %rdi
movss -0x34(%rbp), %xmm0
callq 0x61f0
leaq 0xeb5f(%rip), %rsi      # 0x16358
movq %rax, %rdi
callq 0x6250
movq %rax, %rdi
callq 0x6140
jmp 0x787b
movq 0xe79e(%rip), %rdi      # 0x15fb0
leaq 0xeabf(%rip), %rsi      # 0x162d8
callq 0x6250
leaq 0x5a2a(%rip), %rsi      # 0xd24f
movq %rax, %rdi
callq 0x6290
leaq 0xeb24(%rip), %rsi      # 0x16358
movq %rax, %rdi
callq 0x6250
leaq 0x5a1c(%rip), %rsi      # 0xd25f
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0x6290
leaq 0x5a08(%rip), %rsi      # 0xd266
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movq %r13, %rsi
callq 0x6290
movq %rax, %rbx
leaq 0x59f1(%rip), %r13      # 0xd26c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6290
movq %rax, %rdi
callq 0x6140
movq 0xe71b(%rip), %rdi      # 0x15fb0
leaq 0x59a9(%rip), %rsi      # 0xd245
callq 0x6290
movq %rax, %rdi
movss -0x3c(%rbp), %xmm0
callq 0x61f0
movq %rax, %rdi
callq 0x6140
movq 0xe6f3(%rip), %rdi      # 0x15fb0
leaq 0x5986(%rip), %rsi      # 0xd24a
callq 0x6290
leaq -0xd8(%rbp), %rsi
movq %rax, %rdi
callq 0x6250
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x6140
jmp 0x7983
pushq $0x1
popq %rbx
cmpq $0x0, -0x98(%rbp)
je 0x7983
movq 0xe6b1(%rip), %rdi      # 0x15fb0
leaq 0x58e8(%rip), %rsi      # 0xd1ee
callq 0x6290
movq %rax, %rdi
movss -0x40(%rbp), %xmm0
callq 0x61f0
leaq 0x58e7(%rip), %rsi      # 0xd206
movq %rax, %rdi
callq 0x6290
leaq 0xe9ca(%rip), %rsi      # 0x162f8
movq %rax, %rdi
callq 0x6250
movq %rax, %rdi
movss -0x34(%rbp), %xmm0
callq 0x61f0
leaq 0xea0e(%rip), %rsi      # 0x16358
movq %rax, %rdi
callq 0x6250
leaq 0x5892(%rip), %rsi      # 0xd1eb
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
movq %r13, %rsi
callq 0x6290
leaq 0x5f50(%rip), %rsi      # 0xd8c3
movq %rax, %rdi
callq 0x6290
movq %rax, %rdi
callq 0x6140
leaq -0xd8(%rbp), %rdi
callq 0x6508
movl %ebx, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7a3a
jmp 0x7a3a
jmp 0x79c3
jmp 0x7a3a
jmp 0x7a3a
jmp 0x79c3
jmp 0x7a3a
jmp 0x7a3a
jmp 0x79c3
jmp 0x7a3a
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x6508
jmp 0x7a4e
jmp 0x7a3a
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
callq 0x6508
jmp 0x7a63
jmp 0x7a31
jmp 0x7a31
jmp 0x7a31
jmp 0x7a20
jmp 0x7a2c
jmp 0x7a20
jmp 0x7a2c
jmp 0x7a20
jmp 0x7a2c
jmp 0x7a20
jmp 0x7a2c
jmp 0x7a20
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
jmp 0x7a6a
jmp 0x7a2c
jmp 0x7a2c
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x6508
jmp 0x7a42
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
jmp 0x7a6a
movq %rax, %rbx
jmp 0x7a6f
movq %rax, %rbx
jmp 0x7a63
jmp 0x7a3a
jmp 0x7a3f
movq %rax, %rbx
jmp 0x7a4e
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x6200
leaq -0x90(%rbp), %rdi
callq 0x81f2
leaq -0x70(%rbp), %rdi
callq 0x81f2
leaq -0xd8(%rbp), %rdi
callq 0x6508
movq %rbx, %rdi
callq 0x6470
nop