// File: /workspace/github_cpp_makefile_star2_O1/Ahhgust[P]STRaitRazor/str8.cpp
// Function: main
int
main(int argc, char **argv) {

  if (argc < 3) {
    fprintf(stderr, "Not enough arguments!\n");
    usage(argv[0]);
  }

  unsigned i;

#ifdef OSX // for the named semaphores required by OSX
  char buff[100];
  sprintf(buff, "%ld", (long)getpid() );
#endif


  int start = parseArgs(argc, argv, opt);

  if ( opt.useQuality) {
    initQvalLUT( opt.useQuality );
    USE_QVALS=opt.useQuality; // working with pthreads is much easier if we just use globals... 
  }
  
  if (opt.numThreads == 0)
    opt.numThreads=1;
  
  int *ids;
  
  ids = new int [ opt.numThreads];
  matches = new Matches[ opt.numThreads ]; // each thread records the records it found

  
  
  for (i=0; i < (unsigned) opt.numThreads; ++i)
    ids[i] = i;
  
  std::ios::sync_with_stdio(false);
  
  // parse the config file
  c = parseConfig(opt.config, &numStrs, opt.type);

  biasCounts = new unsigned* [ opt.numThreads]; // and counts for partial allelic dropout  
  totalCounts = new unsigned* [ opt.numThreads]; // and counts for partial allelic dropout  

  leftFlankPosSum = new unsigned long* [ opt.numThreads]; // and counts for partial allelic dropout  
  rightFlankPosSum = new unsigned long* [ opt.numThreads]; // and counts for partial allelic dropout  

  for (i=0; i < (unsigned) opt.numThreads; ++i) {
    biasCounts[i] = new unsigned[ numStrs ](); // () initializes the bias counts to 0
    totalCounts[i] = new unsigned[ numStrs ](); // () initializes the total counts to 0

    leftFlankPosSum[i] = new unsigned long [ numStrs ](); 
    rightFlankPosSum[i] = new unsigned long [ numStrs ](); 
  }
  

  if (numStrs==0) {
    fprintf(stderr, "No markers found in file: %s\n", opt.config);
    return 1;
  }


  // compute minima and maxima for the STRs we're looking for
  minLen = min((*c)[0].forwardLength,  (*c)[0].reverseLength);
  maxLen = max(  (*c)[0].forwardLength,
                 max( (*c)[0].reverseLength, (*c)[0].motifLength));
  // assumes that the motif nomenclature cannot be negative
  minFrag =   (*c)[0].forwardLength +   (*c)[0].reverseLength + (*c)[0].motifOffset;
  for (i=1; i < numStrs; ++i) {

    if ((int)  (*c)[i].forwardLength < minLen)
      minLen =   (*c)[i].forwardLength;

    if ((int)  (*c)[i].reverseLength < minLen)
      minLen =   (*c)[i].reverseLength;

    if ((int)  (*c)[i].forwardLength > maxLen)
      maxLen =   (*c)[i].forwardLength;

    if ((int)  (*c)[i].reverseLength > maxLen)
      maxLen =   (*c)[i].reverseLength;

    if ((int)  (*c)[i].motifLength > maxLen)
      maxLen =   (*c)[i].motifLength;


    int fragLen =   (*c)[i].forwardLength +   (*c)[i].reverseLength + (*c)[i].motifOffset;
    if (fragLen < minFrag)
      minFrag = fragLen;
  }


  trie = new Trie;
  trie->makeTrieFromConfig(c, numStrs, opt.distance, opt.motifDistance);
    

#ifndef NOTHREADS
  if (opt.numThreads > 1) {
    if (pthread_mutex_init(&ioLock, 0)) {
      cerr << "Failed to init mutex..." << endl;
    }
    /* unnamed semaphore. not supported on OSX! */
#ifdef OSX
    writersLock = sem_open( buff , O_CREAT, 0600, 0);
#else
    if (sem_init(&writersLock, 0, 0)) {
      cerr << "Failed to init semaphore..." << endl;
      return 1;
    }
#endif

    

  }
#endif

  
  for (i=start ; i < (unsigned)argc; ++i) {
    ifstream in;
    in.open(argv[i], ios::in);
    if (! in.is_open() ) {
      cerr << "Failed to open " << argv[i] << " for reading\n";
      continue;
    }
    currentInputStream = &in;


    if (opt.numThreads < 2) 
      findMatchesOneThread(  );
    else {
#ifndef NOTHREADS
      int err;
      pthread_t t;
      list <pthread_t> threads;
            
      err = pthread_create(&t, NULL, writerThread, NULL ); 
      if (err) {
        cerr << "Error creating writer thread" << endl;
        exit(EXIT_FAILURE);
      }
      threads.push_back(t);

      for (int j=0; j < opt.numThreads; ++j) {
        err = pthread_create(&t, NULL, workerThread, (void*) &(ids[j]) ); 
        if (err) {
          cerr << "Error creating thread number: " << j << endl;
          exit(EXIT_FAILURE);
        }
        threads.push_back(t);
      }
      for (list<pthread_t>::iterator itr = threads.begin(); itr != threads.end(); ++itr) { // collect the threads when we're done
        t = *itr;
        pthread_join(t, NULL);
      }

      threads.clear();
      std::ios::sync_with_stdio(true);
      printReportsMT(opt.out);
      std::ios::sync_with_stdio(false);
#endif

    }
    in.close();
  }

  // if no fastq files are given then check stdin
  if (argc == start)  {

    currentInputStream = &cin;
    if (opt.numThreads < 2) 
      findMatchesOneThread(  );

    else {
#ifndef NOTHREADS
      int err;
      pthread_t t;
      list <pthread_t> threads;
            
      err = pthread_create(&t, NULL, writerThread, NULL ); 
      if (err) {
        cerr << "Error creating writer thread" << endl;
        exit(EXIT_FAILURE);
      }
      threads.push_back(t);
      
      for (int j=0; j < opt.numThreads; ++j) {
        err = pthread_create(&t, NULL, workerThread, (void*) &ids[j] ); 
        if (err) {
          cerr << "Error creating thread number: " << j << endl;
          exit(EXIT_FAILURE);
        }
        threads.push_back(t);
      }
      for (list<pthread_t>::iterator itr = threads.begin(); itr != threads.end(); ++itr) { // collect the threads when we're done
        t = *itr;
        pthread_join(t, NULL);
      }

      threads.clear();
      std::ios::sync_with_stdio(true);
      printReportsMT(opt.out);
      std::ios::sync_with_stdio(false);
#endif

    }

  }


#ifndef NOTHREADS
  if (opt.numThreads > 1) {
    pthread_mutex_destroy(&ioLock);

#ifdef OSX
    sem_unlink(buff);
#else
    sem_destroy(&writersLock);
#endif

  }
#endif

  // let's close our file handles, shall we?
  fclose(opt.out);

  // optionally can free memory here...
  // delete ids;

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
cmpl $0x2, %edi
jle 0x6b8b
movl %edi, %ebp
leaq 0x9033(%rip), %rdx      # 0xf2c8
movq %rbx, %rsi
callq 0x5812
movl %eax, (%rsp)
movb 0x902c(%rip), %al       # 0xf2d2
testb %al, %al
je 0x62be
movsbl %al, %edi
callq 0x39bc
movb 0x901a(%rip), %al       # 0xf2d2
movb %al, 0x6240b2(%rip)     # 0x62a370
movq %rbx, 0x30(%rsp)
cmpl $0x0, 0x901e(%rip)      # 0xf2e8
jne 0x62d6
movl $0x1, 0x9012(%rip)      # 0xf2e8
movslq 0x900b(%rip), %r14      # 0xf2e8
movl $0x30, %ecx
movq %r14, %rax
mulq %rcx
movq %rax, %rbx
seto %al
orq $0x8, %rbx
movq $-0x1, %rcx
testb %al, %al
cmovneq %rcx, %rbx
leaq (,%r14,4), %rdi
testq %r14, %r14
cmovsq %rcx, %rdi
callq 0x3030
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
callq 0x3030
leaq 0x8(%rax), %rcx
movq %r14, (%rax)
testq %r14, %r14
je 0x635d
addq $0x10, %rax
movq %r14, %rdx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
movl $0x0, (%rax)
movq %rsi, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rsi, 0x20(%rax)
addq $0x30, %rax
addq $-0x30, %rdx
jne 0x633d
movq %rcx, 0x62405c(%rip)    # 0x62a3c0
testl %r14d, %r14d
movq 0x20(%rsp), %rdx
je 0x637e
movl %r14d, %eax
xorl %ecx, %ecx
movl %ecx, (%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x6373
xorl %edi, %edi
callq 0x3120
movq 0x8f54(%rip), %rdi      # 0xf2e0
movq 0x8f5d(%rip), %rdx      # 0xf2f0
leaq 0x623fe6(%rip), %rsi    # 0x62a380
callq 0x8548
movq %rax, 0x623fd2(%rip)    # 0x62a378
movslq 0x8f3b(%rip), %r14      # 0xf2e8
leaq (,%r14,8), %rax
testq %r14, %r14
movq $-0x1, %rbx
cmovnsq %rax, %rbx
movq %rbx, %rdi
callq 0x3030
movq %rax, 0x623fce(%rip)    # 0x62a3a0
movq %rbx, %rdi
callq 0x3030
movq %rax, 0x623fc7(%rip)    # 0x62a3a8
movq %rbx, %rdi
callq 0x3030
movq %rax, 0x623fc0(%rip)    # 0x62a3b0
movq %rbx, %rdi
callq 0x3030
movq %rax, 0x623fb9(%rip)    # 0x62a3b8
testq %r14, %r14
je 0x64b9
movl %r14d, %r12d
movl 0x623f6e(%rip), %r14d   # 0x62a380
leaq (,%r14,4), %r15
shlq $0x3, %r14
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x3030
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3180
movq 0x623f60(%rip), %rax    # 0x62a3a0
movq %rbx, (%rax,%r13,8)
movq %r15, %rdi
callq 0x3030
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3180
movq 0x623f45(%rip), %rax    # 0x62a3a8
movq %rbx, (%rax,%r13,8)
movq %r14, %rdi
callq 0x3030
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3180
movq 0x623f2a(%rip), %rax    # 0x62a3b0
movq %rbx, (%rax,%r13,8)
movq %r14, %rdi
callq 0x3030
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3180
movq 0x623f0f(%rip), %rax    # 0x62a3b8
movq %rbx, (%rax,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x6421
movl 0x623ec1(%rip), %eax    # 0x62a380
testq %rax, %rax
je 0x6af1
movq 0x623ea9(%rip), %rcx    # 0x62a378
movq (%rcx), %rcx
movl 0xa0(%rcx), %esi
movl 0xa4(%rcx), %edx
cmpl %esi, %edx
movl %esi, %edi
cmovbl %edx, %edi
movl %edi, 0x623e9d(%rip)    # 0x62a388
movl 0xa8(%rcx), %edi
cmpl %edi, %edx
jb 0x64fb
movl 0xa4(%rcx), %edi
cmpl %edi, %esi
jb 0x6505
movl 0xa0(%rcx), %edi
movl %edi, 0x623e81(%rip)    # 0x62a38c
addl %edx, %esi
movzwl 0xae(%rcx), %edx
addl %esi, %edx
movl %edx, 0x623e68(%rip)    # 0x62a384
cmpl $0x1, %eax
je 0x65c6
movl 0x623e61(%rip), %edi    # 0x62a38c
movl 0x623e57(%rip), %esi    # 0x62a388
addq $0x158, %rcx            # imm = 0x158
decq %rax
movl (%rcx), %r8d
cmpl %esi, %r8d
jge 0x654d
movl %r8d, 0x623e3e(%rip)    # 0x62a388
movl %r8d, %esi
movl 0x4(%rcx), %r8d
cmpl %esi, %r8d
jge 0x6560
movl %r8d, 0x623e2b(%rip)    # 0x62a388
movl %r8d, %esi
movl (%rcx), %r8d
cmpl %edi, %r8d
jle 0x6572
movl %r8d, 0x623e1d(%rip)    # 0x62a38c
movl %r8d, %edi
movl 0x4(%rcx), %r8d
cmpl %edi, %r8d
jle 0x6585
movl %r8d, 0x623e0a(%rip)    # 0x62a38c
movl %r8d, %edi
movl 0x8(%rcx), %r8d
cmpl %edi, %r8d
jle 0x6598
movl %r8d, 0x623df7(%rip)    # 0x62a38c
movl %r8d, %edi
movl 0x4(%rcx), %r9d
addl (%rcx), %r9d
movzwl 0xe(%rcx), %r8d
addl %r9d, %r8d
cmpl %edx, %r8d
jge 0x65b6
movl %r8d, 0x623dd1(%rip)    # 0x62a384
movl %r8d, %edx
addq $0xb8, %rcx
decq %rax
jne 0x653b
movl $0x18, %edi
callq 0x32c0
movq %rax, %r14
movq %rax, %rdi
callq 0x9784
movq %r14, 0x623dae(%rip)    # 0x62a390
movq 0x623d8f(%rip), %rsi    # 0x62a378
movl 0x623d91(%rip), %edx    # 0x62a380
movzbl 0x8cf7(%rip), %ecx      # 0xf2ed
movzbl 0x8cf0(%rip), %r8d      # 0xf2ee
movq %r14, %rdi
callq 0xa106
cmpl $0x2, 0x8cdb(%rip)      # 0xf2e8
movq 0x30(%rsp), %r14
jl 0x66cc
leaq 0x6234f9(%rip), %rdi    # 0x629b18
xorl %esi, %esi
callq 0x33c0
testl %eax, %eax
je 0x666c
movq 0x89bf(%rip), %rbx      # 0xeff0
leaq 0x5688(%rip), %rsi      # 0xbcc0
movl $0x17, %edx
movq %rbx, %rdi
callq 0x3310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31c0
leaq 0x6234cd(%rip), %rdi    # 0x629b40
xorl %esi, %esi
xorl %edx, %edx
callq 0x3250
testl %eax, %eax
je 0x66cc
movq 0x8969(%rip), %rbx      # 0xeff0
leaq 0x564a(%rip), %rsi      # 0xbcd8
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x3310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31c0
movl $0x1, %eax
jmp 0x6adf
movl %ebp, 0x4(%rsp)
cmpl %ebp, (%rsp)
jae 0x6929
movl (%rsp), %r13d
movl 0x4(%rsp), %eax
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rbx
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %rbp
leaq -0x6d1(%rip), %r12      # 0x602b
movq %rbx, %rdi
callq 0x3300
movq (%r14,%r13,8), %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x31a0
leaq 0xb8(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x6740
movq %rbx, 0x6233e3(%rip)    # 0x629b10
cmpl $0x1, 0x8bb4(%rip)      # 0xf2e8
jg 0x6789
callq 0x5556
jmp 0x68ce
movl $0xf, %edx
movq 0x88a4(%rip), %rdi      # 0xeff0
leaq 0x55a1(%rip), %rsi      # 0xbcf4
callq 0x3310
movq (%r14,%r13,8), %rbx
testq %rbx, %rbx
je 0x68d8
movq %rbx, %rdi
callq 0x3130
movq 0x887c(%rip), %rdi      # 0xeff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3310
leaq 0x40(%rsp), %rbx
jmp 0x68fb
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
leaq -0x605(%rip), %rdx      # 0x61a3
xorl %ecx, %ecx
callq 0x34b0
testl %eax, %eax
jne 0x6b65
movl $0x18, %edi
callq 0x32c0
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0x18(%rsp)
cmpl $0x0, 0x8b07(%rip)      # 0xf2e8
jle 0x6839
movq 0x20(%rsp), %rbx
xorl %r14d, %r14d
movq %rbp, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x34b0
testl %eax, %eax
jne 0x6afb
movl $0x18, %edi
callq 0x32c0
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0x18(%rsp)
incq %r14
movslq 0x8ab8(%rip), %rax      # 0xf2e8
addq $0x4, %rbx
cmpq %rax, %r14
jl 0x67eb
movq %r15, %rbx
movq (%rbx), %rbx
cmpq %r15, %rbx
je 0x6856
movq 0x10(%rbx), %rdi
movq %rdi, 0x28(%rsp)
xorl %esi, %esi
callq 0x3280
jmp 0x683c
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6875
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x32d0
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x6860
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, %edi
callq 0x3120
movq 0x30(%rsp), %r14
movq 0x8a3a(%rip), %rdi      # 0xf2d8
callq 0x41cf
xorl %edi, %edi
callq 0x3120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x68c9
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x32d0
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x68b4
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x3090
jmp 0x6913
movq 0x8711(%rip), %rcx      # 0xeff0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x1, %esi
callq 0x3450
leaq 0x40(%rsp), %rbx
movl $0xd, %edx
movq 0x86e9(%rip), %rdi      # 0xeff0
leaq 0x53f6(%rip), %rsi      # 0xbd04
callq 0x3310
movq %rbx, %rdi
callq 0x30b0
incq %r13
cmpq 0x38(%rsp), %r13
jne 0x66fc
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jne 0x6ab0
movq 0x869b(%rip), %rax      # 0xefd8
movq %rax, 0x6231cc(%rip)    # 0x629b10
cmpl $0x1, 0x899d(%rip)      # 0xf2e8
jg 0x6957
callq 0x5556
jmp 0x6ab0
leaq 0x40(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
leaq -0x7cf(%rip), %rdx      # 0x61a3
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x34b0
testl %eax, %eax
jne 0x6b93
movl $0x18, %edi
callq 0x32c0
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x40(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x3060
incq 0x10(%r14)
cmpl $0x0, 0x8932(%rip)      # 0xf2e8
movq 0x20(%rsp), %rcx
jle 0x6a22
xorl %r15d, %r15d
leaq -0x99c(%rip), %r12      # 0x602b
leaq 0x8(%rsp), %r13
leaq 0x40(%rsp), %rbp
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rcx, %rbx
callq 0x34b0
testl %eax, %eax
jne 0x6b34
movl $0x18, %edi
callq 0x32c0
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3060
incq 0x50(%rsp)
incq %r15
movslq 0x88d2(%rip), %rax      # 0xf2e8
movq %rbx, %rcx
addq $0x4, %rcx
cmpq %rax, %r15
jl 0x69d1
movq %r14, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x6a3f
movq 0x10(%r15), %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
callq 0x3280
jmp 0x6a25
leaq 0x40(%rsp), %r14
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x6a61
movq (%rdi), %r15
movl $0x18, %esi
callq 0x32d0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x6a4c
movq %r14, 0x48(%rsp)
movq %r14, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x1, %edi
callq 0x3120
movq 0x8853(%rip), %rdi      # 0xf2d8
callq 0x41cf
xorl %edi, %edi
callq 0x3120
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x6ab0
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x32d0
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x6a9b
cmpl $0x2, 0x8831(%rip)      # 0xf2e8
jl 0x6ad1
leaq 0x623058(%rip), %rdi    # 0x629b18
callq 0x3320
leaq 0x623074(%rip), %rdi    # 0x629b40
callq 0x34f0
movq 0x8800(%rip), %rdi      # 0xf2d8
callq 0x32b0
xorl %eax, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3545
jmp 0x66c2
movq 0x84ee(%rip), %rdi      # 0xeff0
leaq 0x5226(%rip), %rsi      # 0xbd2f
movl $0x1e, %edx
callq 0x3310
movq 0x84d6(%rip), %rdi      # 0xeff0
movl %r14d, %esi
callq 0x3460
movq %rax, %rdi
callq 0x3140
movl $0x1, %edi
callq 0x3340
movq 0x84b5(%rip), %rdi      # 0xeff0
leaq 0x51ed(%rip), %rsi      # 0xbd2f
movl $0x1e, %edx
callq 0x3310
movq 0x849d(%rip), %rdi      # 0xeff0
movl %r15d, %esi
callq 0x3460
movq %rax, %rdi
callq 0x3140
jmp 0x6b2a
movq 0x8484(%rip), %rdi      # 0xeff0
leaq 0x519f(%rip), %rsi      # 0xbd12
movl $0x1c, %edx
callq 0x3310
movq 0x846c(%rip), %rdi      # 0xeff0
callq 0x3140
jmp 0x6b2a
movq %rbx, %rdi
callq 0x3564
movq 0x8456(%rip), %rdi      # 0xeff0
leaq 0x5171(%rip), %rsi      # 0xbd12
movl $0x1c, %edx
callq 0x3310
movq 0x843e(%rip), %rdi      # 0xeff0
callq 0x3140
jmp 0x6b2a
jmp 0x6bd6
movq %rax, %r15
movl $0x18, %esi
movq %r14, %rdi
callq 0x32d0
jmp 0x6c39
jmp 0x6c0a
jmp 0x6bd6
jmp 0x6bd6
movq %rax, %r15
movq 0x40(%rsp), %rdi
leaq 0x40(%rsp), %rbx
cmpq %rbx, %rdi
je 0x6c39
movq (%rdi), %r14
movl $0x18, %esi
callq 0x32d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x6be8
jmp 0x6c39
jmp 0x6c0a
movq %rax, %r15
jmp 0x6c2f
jmp 0x6c0a
jmp 0x6c0a
movq %rax, %r15
leaq 0x8(%rsp), %rbx
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x6c2f
movq (%rdi), %r14
movl $0x18, %esi
callq 0x32d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x6c1a
leaq 0x40(%rsp), %rdi
callq 0x30b0
movq %r15, %rdi
callq 0x3480
nop