// File: /workspace/github_cpp_makefile_star2_O1/Ahhgust[P]STRaitRazor/str8.cpp
// Function: processDNA_Trie(int, unsigned int*, unsigned char*)
void
processDNA_Trie(int id, unsigned *matchIds, unsigned char *matchTypes) {


  int a;
  vector< vector<unsigned> > fpMatches( numStrs, vector<unsigned>(10) ); // forwardflank, positive strand
  vector< vector<unsigned> > rpMatches( numStrs, vector<unsigned>(10) ); // reverse flank, positive strand 
  vector< vector<unsigned> > frMatches( numStrs, vector<unsigned>(10) ); // ditto for negative strand
  vector< vector<unsigned> > rrMatches( numStrs, vector<unsigned>(10) );

  vector<unsigned > lastHitRecord( numStrs, RECSINMEM ); // the index (a in below loop) that yielded a valid hit for a paritcular locus
  vector<unsigned char > validMotif(numStrs, 0); // whether or not there's a valid motif found for a particular STR
  // valid means after a forwardflank or reverseflank_rc (the flanks may not be paired)

  for (a=id ; a < RECSINMEM; a += opt.numThreads) {
    const char *dna = records[a].c_str(); // ascii representation of DNA string
    const char *qvals = qrecords[a].c_str(); // quality scores baby!
    
    unsigned dnalen = records[a].length();


    //    if ((unsigned)a >= LASTREC) // creates a race condition!
    //      break;


    if ((int)dnalen < minFrag)
      continue;    



    bool gotOne=false;
    unsigned stop = dnalen - minLen + 1;
    for (unsigned j=0; j < stop; ++j, ++dna) {
      // this finds demonstrably wrong sequences (less than 'A' or greater than 'T' in the ascii table)
      if (*dna < 65 || *dna > 84) {
        cerr << "Oops! I'm detecting an illegal character in the DNA string. The character is " << *dna << endl <<
          "And the record is " << dna << endl;
        exit(EXIT_FAILURE);
      }


      // if we dont' have a single match (forward or reverse complement of reverse
      // and there isn't enough sequence to get the smallest possible fragment out, then we're done
      if (! gotOne &&
          dnalen - j < (unsigned)minFrag)
        break;

      unsigned numMatches = trie->findPrefixMatch((char*)(dna), maxLen, matchIds, matchTypes);
      
      for (unsigned n = 0; n < numMatches; ++n) {
        unsigned strIndex = matchIds[n];
        unsigned char orientation = matchTypes[n];


#if DEBUG
        //	if (orientation < MOTIF) 
        cerr << "Read offset: " << j << " read # " << 
          a << " Str index " << strIndex << " Orientation " << (unsigned)orientation << endl;
#endif

        if (lastHitRecord[ strIndex ] != (unsigned) a &&
            orientation < MOTIF) { // clear out the vectors for this STR; it's the first time we've seen this marker (in this read)
          fpMatches[strIndex].clear();
          rpMatches[strIndex].clear();
          frMatches[strIndex].clear();
          rrMatches[strIndex].clear();
          validMotif[strIndex]=0; // no valid motifs found
          lastHitRecord[strIndex ] = a;
        }



        if (orientation == MOTIF || orientation == MOTIF_RC) { // common case
          
          if (lastHitRecord[ strIndex ] == (unsigned) a &&  ! validMotif[strIndex]) {  // we have at least one flank found for this locus for this read
            // motifs! (currently the strand is ignored, as per the previous str8razor

            
            // we have at least one (valid) forward flank
            // and not enough reverse flanks
            if (fpMatches[strIndex].size() > 0 && 
                rpMatches[strIndex].size() < (*c)[strIndex].reverseCount) {
              validMotif[strIndex]=1;
              // match is on the negative strand
            } else if (rrMatches[strIndex].size() > 0 && 
                       frMatches[strIndex].size() < (*c)[strIndex].forwardCount) {
              validMotif[strIndex]=1;
	    }

	  }
          // record where the flanks were found, and in which orientation
        } else if (orientation==FORWARDFLANK) {
          
          if (! frMatches[strIndex].empty() &&
              frMatches[strIndex].back()  >= j - (*c)[strIndex].forwardLength) {
	    
            continue; // overlap!
          }

          
          
          fpMatches[ strIndex ].push_back(j + (*c)[strIndex].forwardLength); // the index of the first base of the intervening haplotype
          gotOne=true; 
          
        } else if (orientation == REVERSEFLANK) {
          
          // check to see if this reverse flank that we have is a substring (or overlaps) the forward flank (sadly, this happens. thank you Y chromosome!)
          // if so, let's skip it
          if ( ! fpMatches[strIndex].empty() && 
               fpMatches[strIndex].back()  >= j) {
            continue;
          }
          
          rpMatches[ strIndex ].push_back(j);
          // if specified, stop the search when we find the first STR that appears correct
          if (opt.shortCircuit && 
              rpMatches[ strIndex ].size() == (*c)[strIndex].reverseCount &&
              fpMatches[ strIndex ].size() == (*c)[strIndex].forwardCount)
            break;
          
        } else if (orientation == FORWARDFLANK_RC) {
          
          // and again, but on the negative strand;
          // the 2nd flank overlaps the first flank; let's assume that the second match in the overlap is wrong.
          if (! rrMatches[strIndex].empty() &&
              rrMatches[strIndex].back()  >= j) {
            continue;
          }

          frMatches[ strIndex ].push_back(j);
          if (opt.shortCircuit && 
              rrMatches[ strIndex ].size() == (*c)[strIndex].reverseCount &&
              frMatches[ strIndex ].size() == (*c)[strIndex].forwardCount)
            break;
          
          
        } else if (orientation == REVERSEFLANK_RC) {


          if (! frMatches[strIndex].empty() &&
              frMatches[strIndex].back()  >= j - (*c)[strIndex].reverseLength) {
	    
            continue; // overlap!
          }


          rrMatches[ strIndex ].push_back(j + (*c)[strIndex].reverseLength); // the index of the first base of the intervening haplotype
          gotOne=true; 
          
          // haven't found a valid motif for this STR yet
        } 
        
      }
    } // done reading read
    dna = records[a].c_str(); // reset the pointer
    
    
    if (gotOne) { // is there at least one record
      for (unsigned i = 0; i < numStrs; ++i) {

        if (lastHitRecord[i]== (unsigned) a 
            && validMotif[i]
            ) { // this STR was found for this read
          // positive strand match

          if (fpMatches[i].size() == (*c)[i].forwardCount) {
            if (rpMatches[i].size() == (*c)[i].reverseCount ) {
              // ensure that if it matches once on the positive strand, it doesn't also match on the negative strand (that both if statements below cannot be true)
              if ( rrMatches[i].size() != (*c)[i].reverseCount  ||
                   frMatches[i].size() != (*c)[i].forwardCount ) {
                
#if DEBUG
                cerr << c->at(i).locusName << " STR on forward strand " << i << " fpsize " << fpMatches[i].size() <<
                  " rpsize " << rpMatches[i].size() << endl;
#endif
	      
                if (fpMatches[i].back()  < rpMatches[i].front()) {
                  if (opt.includeAnchors) 
                    makeRecord(dna, qvals, fpMatches[i].front() - (*c)[i].forwardLength, rpMatches[i].back() + (*c)[i].reverseLength, FORWARDFLANK, i, id);
                  else
                    makeRecord(dna, qvals, fpMatches[i].front(), rpMatches[i].back(), FORWARDFLANK, i, id);
                }
                
              }
              
            } else if (opt.verbose && rpMatches[i].size() < (*c)[i].reverseCount ) { // not enough matches for the second anchor
              ++biasCounts[id][i];
            }
            // negative strand match
          }
          if ( rrMatches[i].size() == (*c)[i].reverseCount) {
            if ( frMatches[i].size() == (*c)[i].forwardCount ) {
              
#if DEBUG
              cerr << c->at(i).locusName << " STR on reverse strand " << i << " fpsize " << fpMatches[i].size() <<
                " rpsize " << rpMatches[i].size() << endl;
#endif
              
              if (rrMatches[i].back() < frMatches[i].front() ) {
                if (opt.includeAnchors)
                  makeRecord(dna, qvals, rrMatches[i].front() - (*c)[i].reverseLength , frMatches[i].back()+(*c)[i].forwardLength, REVERSEFLANK, i, id);
                else
                  makeRecord(dna, qvals, rrMatches[i].front(), frMatches[i].back(), REVERSEFLANK, i, id);	      
              }
              
            } else if (opt.verbose && frMatches[i].size() < (*c)[i].forwardCount ) {
              ++biasCounts[id][i]; 
            }
            
          }
        }
      }//for
    } // gotone
  }
  
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, 0x1c(%rsp)
movl 0x625a37(%rip), %r15d   # 0x62a380
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x28, %edi
callq 0x32c0
leaq 0x90(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rcx, 0x8(%rdx)
leaq 0xd8(%rsp), %rdi
leaq 0x30(%rsp), %rcx
movq %r15, %rsi
callq 0x6d1e
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x49cc
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movl 0x6259ad(%rip), %r15d   # 0x62a380
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl $0x28, %edi
callq 0x32c0
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rcx, 0x8(%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rcx
movq %r15, %rsi
callq 0x6d1e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4a47
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movl 0x625932(%rip), %r15d   # 0x62a380
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movl $0x28, %edi
callq 0x32c0
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rcx, 0x8(%rdx)
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rcx
movq %r15, %rsi
callq 0x6d1e
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4abf
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movl 0x6258ba(%rip), %r15d   # 0x62a380
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x28, %edi
callq 0x32c0
leaq 0x70(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rcx, 0x8(%rdx)
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
movq %r15, %rsi
callq 0x6d1e
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x4b40
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movl 0x62583a(%rip), %esi    # 0x62a380
leaq 0xb0(%rsp), %rdx
movl $0xc350, (%rdx)         # imm = 0xC350
leaq 0x70(%rsp), %rdi
leaq 0x14(%rsp), %rcx
callq 0x6db6
movl 0x625817(%rip), %esi    # 0x62a380
leaq 0x14(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0xb0(%rsp), %rdi
leaq 0x18(%rsp), %rcx
callq 0x6e34
cmpl $0xc34f, 0x1c(%rsp)     # imm = 0xC34F
jg 0x532c
movl 0x1c(%rsp), %r12d
movslq %r12d, %rax
movq %rax, 0xc8(%rsp)
movq %rbx, 0x20(%rsp)
movq 0x624f53(%rip), %rax    # 0x629b00
movslq %r12d, %rdx
shlq $0x5, %rdx
movl 0x8(%rax,%rdx), %esi
cmpl %esi, 0x6257c6(%rip)    # 0x62a384
jg 0x5318
addq %rdx, %rax
movq 0x624f3a(%rip), %rcx    # 0x629b08
movq %rdx, 0xf0(%rsp)
movq (%rcx,%rdx), %rcx
movq %rcx, 0xd0(%rsp)
movq (%rax), %r15
movq %rsi, 0xf8(%rsp)
leal 0x1(%rsi), %ecx
xorl %eax, %eax
movl $0x0, 0x14(%rsp)
subl 0x625788(%rip), %ecx    # 0x62a388
movl %ecx, 0xac(%rsp)
je 0x50f5
movl $0x0, 0x28(%rsp)
movb (%r15), %cl
addb $-0x55, %cl
cmpb $-0x15, %cl
jbe 0x53a3
testb $0x1, 0x28(%rsp)
jne 0x4c41
movq 0xf8(%rsp), %rcx
subl %eax, %ecx
cmpl 0x625749(%rip), %ecx    # 0x62a384
jb 0x50f1
movq 0x625748(%rip), %rdi    # 0x62a390
movl 0x62573e(%rip), %edx    # 0x62a38c
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x9794
movq %r15, 0x100(%rsp)
testl %eax, %eax
je 0x50cf
movl %eax, %r13d
xorl %r15d, %r15d
movl (%r14,%r15,4), %ebp
movb (%rbx,%r15), %al
movq 0x70(%rsp), %rcx
cmpl %r12d, (%rcx,%rbp,4)
setne %cl
cmpb $0x4, %al
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4d1c
movq 0xd8(%rsp), %rdx
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movq (%rdx,%rcx,8), %rsi
cmpq %rsi, 0x8(%rdx,%rcx,8)
je 0x4cbc
leaq (%rdx,%rcx,8), %rdx
movq %rsi, 0x8(%rdx)
movq 0x90(%rsp), %rsi
movq (%rsi,%rcx,8), %rdx
cmpq %rdx, 0x8(%rsi,%rcx,8)
je 0x4cd7
leaq (%rsi,%rcx,8), %rsi
movq %rdx, 0x8(%rsi)
movq 0x30(%rsp), %rsi
movq (%rsi,%rcx,8), %rdx
cmpq %rdx, 0x8(%rsi,%rcx,8)
je 0x4cef
leaq (%rsi,%rcx,8), %rsi
movq %rdx, 0x8(%rsi)
movq 0x50(%rsp), %rsi
movq (%rsi,%rcx,8), %rdx
cmpq %rdx, 0x8(%rsi,%rcx,8)
je 0x4d07
leaq (%rsi,%rcx,8), %rcx
movq %rdx, 0x8(%rcx)
movq 0xb0(%rsp), %rcx
movb $0x0, (%rcx,%rbp)
movq 0x70(%rsp), %rcx
movl %r12d, (%rcx,%rbp,4)
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x4, %cl
jne 0x4ded
movq 0x70(%rsp), %rax
cmpl %r12d, (%rax,%rbp,4)
jne 0x50b8
movq 0xb0(%rsp), %rax
cmpb $0x0, (%rax,%rbp)
jne 0x50b8
movq 0xd8(%rsp), %rdx
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movq 0x8(%rdx,%rcx,8), %rsi
cmpq (%rdx,%rcx,8), %rsi
je 0x4d9c
movq 0x90(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %rsi
subq (%rdx,%rcx,8), %rsi
sarq $0x2, %rsi
movq 0x6255f3(%rip), %rdx    # 0x62a378
movq (%rdx), %rdx
imulq $0xb8, %rbp, %rdi
movzwl 0xb2(%rdx,%rdi), %edx
cmpq %rdx, %rsi
jb 0x4de4
movq 0x50(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %rsi
cmpq (%rdx,%rcx,8), %rsi
je 0x50b8
movq 0x30(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %rsi
subq (%rdx,%rcx,8), %rsi
sarq $0x2, %rsi
movq 0x6255af(%rip), %rcx    # 0x62a378
movq (%rcx), %rcx
imulq $0xb8, %rbp, %rdx
movzwl 0xb0(%rcx,%rdx), %ecx
cmpq %rcx, %rsi
jae 0x50b8
movb $0x1, (%rax,%rbp)
jmp 0x50b8
movzbl %al, %eax
cmpl $0x3, %eax
ja 0x50b8
movl %eax, %eax
leaq 0x624e(%rip), %rcx      # 0xb050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movq 0x8(%rax,%rcx,8), %rdx
cmpq %rdx, (%rax,%rcx,8)
je 0x4e50
movl 0x14(%rsp), %esi
movq 0x625547(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rdi
subl 0xa0(%rax,%rdi), %esi
movl $0xa, %eax
cmpl %esi, -0x4(%rdx)
jae 0x50ba
movq 0xd8(%rsp), %rax
leaq (%rax,%rcx,8), %rdi
movq 0x625515(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rcx
movl 0xa0(%rax,%rcx), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jne 0x4f15
leaq 0x18(%rsp), %rdx
callq 0x82ea
jmp 0x4fe1
movq 0x30(%rsp), %rax
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movq 0x8(%rax,%rcx,8), %rdx
cmpq %rdx, (%rax,%rcx,8)
je 0x4ede
movl 0x14(%rsp), %esi
movq 0x6254b9(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rdi
subl 0xa4(%rax,%rdi), %esi
movl $0xa, %eax
cmpl %esi, -0x4(%rdx)
jae 0x50ba
movq 0x50(%rsp), %rax
leaq (%rax,%rcx,8), %rdi
movq 0x62548a(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rcx
movl 0xa4(%rax,%rcx), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x4fd7
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x4fe1
movq 0xd8(%rsp), %rcx
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq 0x8(%rcx,%rbx,8), %rax
cmpq %rax, (%rcx,%rbx,8)
je 0x4f50
movl -0x4(%rax), %ecx
movl $0xa, %eax
cmpl 0x14(%rsp), %ecx
jae 0x4fcd
movq 0x90(%rsp), %rax
leaq (%rax,%rbx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x4fec
movl 0x14(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x4ff6
movq 0x50(%rsp), %rcx
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq 0x8(%rcx,%rbx,8), %rax
cmpq %rax, (%rcx,%rbx,8)
je 0x4fa3
movl -0x4(%rax), %ecx
movl $0xa, %eax
cmpl 0x14(%rsp), %ecx
jae 0x4fcd
movq 0x30(%rsp), %rax
leaq (%rax,%rbx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x5043
movl 0x14(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x504d
movq 0x20(%rsp), %rbx
jmp 0x50ba
leaq 0x18(%rsp), %rdx
callq 0x82ea
movb $0x1, %al
movl %eax, 0x28(%rsp)
jmp 0x50b8
leaq 0x14(%rsp), %rdx
callq 0x840a
cmpb $0x1, 0xa2cf(%rip)      # 0xf2cc
jne 0x50b3
movq 0x90(%rsp), %rax
movq 0x8(%rax,%rbx,8), %rdx
subq (%rax,%rbx,8), %rdx
sarq $0x2, %rdx
movq 0x625359(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rcx
movzwl 0xb2(%rax,%rcx), %esi
cmpq %rsi, %rdx
jne 0x50b3
addq %rcx, %rax
movq 0xd8(%rsp), %rcx
jmp 0x508e
leaq 0x14(%rsp), %rdx
callq 0x840a
cmpb $0x1, 0xa278(%rip)      # 0xf2cc
jne 0x50b3
movq 0x50(%rsp), %rax
movq 0x8(%rax,%rbx,8), %rdx
subq (%rax,%rbx,8), %rdx
sarq $0x2, %rdx
movq 0x625309(%rip), %rax    # 0x62a378
movq (%rax), %rax
imulq $0xb8, %rbp, %rcx
movzwl 0xb2(%rax,%rcx), %esi
cmpq %rsi, %rdx
jne 0x50b3
addq %rcx, %rax
movq 0x30(%rsp), %rcx
movq 0x8(%rcx,%rbx,8), %rdx
subq (%rcx,%rbx,8), %rdx
sarq $0x2, %rdx
movzwl 0xb0(%rax), %ecx
movl $0x8, %eax
cmpq %rcx, %rdx
movq 0x20(%rsp), %rbx
jne 0x50b8
jmp 0x50ba
movq 0x20(%rsp), %rbx
xorl %eax, %eax
cmpl $0xa, %eax
je 0x50c3
testl %eax, %eax
jne 0x50cf
incq %r15
cmpq %r15, %r13
jne 0x4c72
movl 0x14(%rsp), %eax
incl %eax
movl %eax, 0x14(%rsp)
movq 0x100(%rsp), %r15
incq %r15
cmpl 0xac(%rsp), %eax
jb 0x4c15
movl 0x28(%rsp), %eax
testb $0x1, %al
movq 0xf0(%rsp), %rcx
je 0x5318
cmpl $0x0, 0x625274(%rip)    # 0x62a380
je 0x5318
movq 0x6249e7(%rip), %rax    # 0x629b00
movq (%rax,%rcx), %rax
movq %rax, 0x28(%rsp)
movl $0xb2, %r15d
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x70(%rsp), %rax
cmpl %r12d, (%rax,%r13,4)
jne 0x52fb
movq 0xb0(%rsp), %rax
cmpb $0x0, (%rax,%r13)
je 0x52fb
movq 0xd8(%rsp), %rcx
movq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rdx
movq %rdx, %rsi
subq %rax, %rsi
sarq $0x2, %rsi
movq 0x625207(%rip), %rcx    # 0x62a378
movq (%rcx), %rcx
movzwl -0x2(%rcx,%r15), %edi
cmpq %rdi, %rsi
jne 0x523e
movq 0x90(%rsp), %rsi
movq (%rsi,%rbp), %r8
movq 0x8(%rsi,%rbp), %rsi
movq %rsi, %r10
subq %r8, %r10
sarq $0x2, %r10
movzwl (%rcx,%r15), %r9d
cmpq %r9, %r10
jne 0x51f8
movq 0x50(%rsp), %r10
movq 0x8(%r10,%rbp), %r11
subq (%r10,%rbp), %r11
sarq $0x2, %r11
cmpq %r9, %r11
jne 0x51d6
movq 0x30(%rsp), %r9
movq 0x8(%r9,%rbp), %r10
subq (%r9,%rbp), %r10
sarq $0x2, %r10
cmpq %rdi, %r10
je 0x523e
movl -0x4(%rdx), %edx
cmpl (%r8), %edx
jae 0x523e
movl (%rax), %edx
cmpb $0x1, 0xa0e9(%rip)      # 0xf2d0
jne 0x521c
subl -0x12(%rcx,%r15), %edx
movl -0xe(%rcx,%r15), %ecx
addl -0x4(%rsi), %ecx
jmp 0x521f
jae 0x523e
cmpb $0x0, 0xa0cc(%rip)      # 0xf2cd
je 0x523e
movq 0x625196(%rip), %rax    # 0x62a3a0
movq 0xc8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
incl (%rax,%r13,4)
jmp 0x523e
movl -0x4(%rsi), %ecx
movl 0x1c(%rsp), %eax
movl %eax, (%rsp)
movq 0x28(%rsp), %rdi
movq 0xd0(%rsp), %rsi
xorl %r8d, %r8d
movl %r13d, %r9d
callq 0x4503
movq 0x50(%rsp), %rcx
movq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rdx
movq %rdx, %rsi
subq %rax, %rsi
sarq $0x2, %rsi
movq 0x62511b(%rip), %rcx    # 0x62a378
movq (%rcx), %rcx
movzwl (%rcx,%r15), %edi
cmpq %rdi, %rsi
jne 0x52fb
movq 0x30(%rsp), %rsi
movq (%rsi,%rbp), %rdi
movq 0x8(%rsi,%rbp), %rsi
movq %rsi, %r8
subq %rdi, %r8
sarq $0x2, %r8
movzwl -0x2(%rcx,%r15), %r9d
cmpq %r9, %r8
jne 0x52b2
movl -0x4(%rdx), %edx
cmpl (%rdi), %edx
jae 0x52fb
movl (%rax), %edx
cmpb $0x1, 0xa02f(%rip)      # 0xf2d0
jne 0x52d6
subl -0xe(%rcx,%r15), %edx
movl -0x12(%rcx,%r15), %ecx
addl -0x4(%rsi), %ecx
jmp 0x52d9
jae 0x52fb
cmpb $0x0, 0xa012(%rip)      # 0xf2cd
je 0x52fb
movq 0x6250dc(%rip), %rax    # 0x62a3a0
movq 0xc8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
incl (%rax,%r13,4)
jmp 0x52fb
movl -0x4(%rsi), %ecx
movl 0x1c(%rsp), %eax
movl %eax, (%rsp)
movq 0x28(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movl $0x3, %r8d
movl %r13d, %r9d
callq 0x4503
incq %r13
movl 0x62507c(%rip), %eax    # 0x62a380
addq $0x18, %rbp
addq $0xb8, %r15
cmpq %rax, %r13
jb 0x512d
addl 0x9fc9(%rip), %r12d     # 0xf2e8
cmpl $0xc350, %r12d          # imm = 0xC350
jl 0x4ba6
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x5349
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5363
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
leaq 0x50(%rsp), %rdi
callq 0x6e94
leaq 0x30(%rsp), %rdi
callq 0x6e94
leaq 0x90(%rsp), %rdi
callq 0x6e94
leaq 0xd8(%rsp), %rdi
callq 0x6e94
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9c46(%rip), %rdi      # 0xeff0
leaq 0x5e78(%rip), %rsi      # 0xb229
movl $0x4d, %edx
callq 0x3310
movb (%r15), %al
leaq 0x18(%rsp), %rsi
movb %al, (%rsi)
movq 0x9c24(%rip), %rdi      # 0xeff0
movl $0x1, %edx
callq 0x3310
movq %rax, %rdi
callq 0x3140
movq %rax, %rbx
leaq 0x5e8f(%rip), %rsi      # 0xb277
movl $0x12, %edx
movq %rax, %rdi
callq 0x3310
movq %r15, %rdi
callq 0x3130
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3310
movq %rbx, %rdi
callq 0x3140
movl $0x1, %edi
callq 0x3340
movq %rax, %rbx
jmp 0x5506
movq %rax, %rbx
jmp 0x5520
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x552a
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
jmp 0x552a
movq %rax, %rbx
jmp 0x552a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5534
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
jmp 0x5534
movq %rax, %rbx
jmp 0x5534
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x5541
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
jmp 0x5541
movq %rax, %rbx
jmp 0x5541
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x554e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
jmp 0x554e
movq %rax, %rbx
jmp 0x554e
jmp 0x54e6
jmp 0x54e6
jmp 0x54e6
jmp 0x54e6
jmp 0x54e6
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x5506
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5520
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32d0
leaq 0x50(%rsp), %rdi
callq 0x6e94
leaq 0x30(%rsp), %rdi
callq 0x6e94
leaq 0x90(%rsp), %rdi
callq 0x6e94
leaq 0xd8(%rsp), %rdi
callq 0x6e94
movq %rbx, %rdi
callq 0x3480