// File: /workspace/github_cpp_makefile_star2_O2/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 $0xe8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, 0x2c(%rsp)
movl 0x625e33(%rip), %r15d   # 0x62a360
leaq 0x78(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0x48(%rsp), %rdx
callq 0x6038
leaq 0xc0(%rsp), %rdi
leaq 0x78(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r15, %rsi
callq 0x608a
leaq 0x78(%rsp), %rdi
callq 0x744c
movl 0x625df6(%rip), %r15d   # 0x62a360
leaq 0x48(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x6038
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %r15, %rsi
callq 0x608a
leaq 0x48(%rsp), %rdi
callq 0x744c
movl 0x625dbc(%rip), %r15d   # 0x62a360
leaq 0x30(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0x60(%rsp), %rdx
callq 0x6038
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rdx
leaq 0xa8(%rsp), %rcx
movq %r15, %rsi
callq 0x608a
leaq 0x30(%rsp), %rdi
callq 0x744c
movl 0x625d7f(%rip), %r15d   # 0x62a360
leaq 0x60(%rsp), %rdi
pushq $0xa
popq %rsi
leaq 0xa8(%rsp), %rdx
callq 0x6038
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r15, %rsi
callq 0x608a
leaq 0x60(%rsp), %rdi
callq 0x744c
movl 0x625d43(%rip), %esi    # 0x62a360
leaq 0xa8(%rsp), %rdx
movl $0xc350, (%rdx)         # imm = 0xC350
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rcx
callq 0x60e0
movl 0x625d20(%rip), %esi    # 0x62a360
leaq 0x10(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0xa8(%rsp), %rdi
leaq 0x14(%rsp), %rcx
callq 0x6136
movl 0x2c(%rsp), %r12d
movslq %r12d, %rax
movq %rax, 0x98(%rsp)
movq %rbx, 0x18(%rsp)
cmpl $0xc34f, %r12d          # imm = 0xC34F
jg 0x4d06
movq 0x62545d(%rip), %rax    # 0x629ae0
movslq %r12d, %rdx
shlq $0x5, %rdx
movl 0x8(%rax,%rdx), %esi
cmpl %esi, 0x625cd0(%rip)    # 0x62a364
jg 0x4cfa
addq %rdx, %rax
movq 0x625444(%rip), %rcx    # 0x629ae8
movq %rdx, 0xd8(%rsp)
movq (%rcx,%rdx), %rcx
movq %rcx, 0xa0(%rsp)
movl %esi, 0x90(%rsp)
subl 0x625ca3(%rip), %esi    # 0x62a368
movq (%rax), %r15
andl $0x0, 0x10(%rsp)
incl %esi
movl %esi, 0x94(%rsp)
xorl %eax, %eax
movl $0x0, 0x20(%rsp)
cmpl 0x94(%rsp), %eax
jae 0x4ae3
movb (%r15), %cl
addb $-0x55, %cl
cmpb $-0x15, %cl
jbe 0x4d5a
testb $0x1, 0x20(%rsp)
jne 0x4718
movl 0x90(%rsp), %ecx
subl %eax, %ecx
cmpl 0x625c52(%rip), %ecx    # 0x62a364
jb 0x4cfa
movq 0x625c51(%rip), %rdi    # 0x62a370
movl 0x625c47(%rip), %edx    # 0x62a36c
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x8636
movq %r15, 0xe0(%rsp)
movl %eax, %ebp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x4ac9
movl (%r14,%r13,4), %r15d
movb (%rbx,%r13), %al
movq 0x60(%rsp), %rcx
movl (%rcx,%r15,4), %ecx
cmpl %r12d, %ecx
setne %dl
cmpb $0x4, %al
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x47eb
movq 0xc0(%rsp), %rdx
imulq $0x18, %r15, %rcx
movq (%rdx,%rcx), %rsi
cmpq %rsi, 0x8(%rdx,%rcx)
je 0x478d
addq %rcx, %rdx
movq %rsi, 0x8(%rdx)
movq 0x78(%rsp), %rdx
movq (%rdx,%rcx), %rsi
cmpq %rsi, 0x8(%rdx,%rcx)
je 0x47a4
addq %rcx, %rdx
movq %rsi, 0x8(%rdx)
movq 0x48(%rsp), %rdx
movq (%rdx,%rcx), %rsi
cmpq %rsi, 0x8(%rdx,%rcx)
je 0x47bb
addq %rcx, %rdx
movq %rsi, 0x8(%rdx)
movq 0x30(%rsp), %rdx
movq (%rdx,%rcx), %rsi
cmpq %rsi, 0x8(%rdx,%rcx)
je 0x47d2
addq %rcx, %rdx
movq %rsi, 0x8(%rdx)
movq 0xa8(%rsp), %rcx
movb $0x0, (%rcx,%r15)
movq 0x60(%rsp), %rcx
movl %r12d, (%rcx,%r15,4)
movl %r12d, %ecx
movl %eax, %edx
andb $-0x2, %dl
cmpb $0x4, %dl
jne 0x48ae
cmpl %r12d, %ecx
jne 0x4ac1
movq 0xa8(%rsp), %rax
cmpb $0x0, (%rax,%r15)
jne 0x4ac1
movq 0xc0(%rsp), %rdx
imulq $0x18, %r15, %rcx
movq 0x8(%rdx,%rcx), %rsi
cmpq (%rdx,%rcx), %rsi
je 0x485c
movq 0x78(%rsp), %rdx
movq 0x8(%rdx,%rcx), %rsi
subq (%rdx,%rcx), %rsi
sarq $0x2, %rsi
movq 0x625b13(%rip), %rdx    # 0x62a358
movq (%rdx), %rdx
imulq $0xb8, %r15, %rdi
movzwl 0xb2(%rdx,%rdi), %edx
cmpq %rdx, %rsi
jb 0x48a4
movq 0x30(%rsp), %rdx
movq 0x8(%rdx,%rcx), %rsi
cmpq (%rdx,%rcx), %rsi
je 0x4ac1
movq 0x48(%rsp), %rdx
movq 0x8(%rdx,%rcx), %rsi
subq (%rdx,%rcx), %rsi
sarq $0x2, %rsi
movq 0x625acf(%rip), %rcx    # 0x62a358
movq (%rcx), %rcx
imulq $0xb8, %r15, %rdx
movzwl 0xb0(%rcx,%rdx), %ecx
cmpq %rcx, %rsi
jae 0x4ac1
movb $0x1, (%rax,%r15)
jmp 0x4ac1
movzbl %al, %eax
cmpl $0x3, %eax
ja 0x4ac1
movl %eax, %eax
leaq 0x578d(%rip), %rcx      # 0xa050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x48(%rsp), %rsi
imulq $0x18, %r15, %rdi
movq 0x8(%rsi,%rdi), %rdx
movl 0x10(%rsp), %eax
movq 0x625a73(%rip), %rcx    # 0x62a358
movq (%rcx), %rcx
cmpq %rdx, (%rsi,%rdi)
je 0x4a95
imulq $0xb8, %r15, %rsi
movl 0xa0(%rcx,%rsi), %ecx
movl %eax, %esi
subl %ecx, %esi
cmpl %esi, -0x4(%rdx)
jb 0x4aa3
jmp 0x4ac1
movq 0x48(%rsp), %rsi
imulq $0x18, %r15, %rdi
movq 0x8(%rsi,%rdi), %rdx
movl 0x10(%rsp), %eax
movq 0x625a2d(%rip), %rcx    # 0x62a358
movq (%rcx), %rcx
cmpq %rdx, (%rsi,%rdi)
je 0x4a70
imulq $0xb8, %r15, %rsi
movl 0xa4(%rcx,%rsi), %ecx
movl %eax, %esi
subl %ecx, %esi
cmpl %esi, -0x4(%rdx)
jb 0x4a7e
jmp 0x4ac1
movq 0xc0(%rsp), %rcx
imulq $0x18, %r15, %rbx
movq 0x8(%rcx,%rbx), %rax
cmpq %rax, (%rcx,%rbx)
je 0x497c
movl -0x4(%rax), %eax
cmpl 0x10(%rsp), %eax
jae 0x4a69
movq 0x78(%rsp), %rdi
addq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6194
cmpb $0x1, 0xa917(%rip)      # 0xf2ac
jne 0x4a69
movq 0x78(%rsp), %rax
movq 0x8(%rax,%rbx), %rdx
subq (%rax,%rbx), %rdx
sarq $0x2, %rdx
movq 0x6259a4(%rip), %rax    # 0x62a358
movq (%rax), %rax
imulq $0xb8, %r15, %rcx
movzwl 0xb2(%rax,%rcx), %esi
cmpq %rsi, %rdx
jne 0x4a69
movq 0xc0(%rsp), %rdx
jmp 0x4a46
movq 0x30(%rsp), %rcx
imulq $0x18, %r15, %rbx
movq 0x8(%rcx,%rbx), %rax
cmpq %rax, (%rcx,%rbx)
je 0x49f6
movl -0x4(%rax), %eax
cmpl 0x10(%rsp), %eax
jae 0x4a69
movq 0x48(%rsp), %rdi
addq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6194
cmpb $0x1, 0xa89d(%rip)      # 0xf2ac
jne 0x4a69
movq 0x30(%rsp), %rax
movq 0x8(%rax,%rbx), %rdx
subq (%rax,%rbx), %rdx
sarq $0x2, %rdx
movq 0x62592e(%rip), %rax    # 0x62a358
movq (%rax), %rax
imulq $0xb8, %r15, %rcx
movzwl 0xb2(%rax,%rcx), %esi
cmpq %rsi, %rdx
jne 0x4a69
movq 0x48(%rsp), %rdx
movq 0x8(%rdx,%rbx), %rsi
subq (%rdx,%rbx), %rsi
addq %rcx, %rax
sarq $0x2, %rsi
movzwl 0xb0(%rax), %eax
cmpq %rax, %rsi
movq 0x18(%rsp), %rbx
jne 0x4ac1
jmp 0x4ac9
movq 0x18(%rsp), %rbx
jmp 0x4ac1
imulq $0xb8, %r15, %rdx
movl 0xa4(%rcx,%rdx), %ecx
addq 0x30(%rsp), %rdi
addl %eax, %ecx
movl %ecx, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x7784
jmp 0x4abb
imulq $0xb8, %r15, %rdx
movl 0xa0(%rcx,%rdx), %ecx
addq 0xc0(%rsp), %rdi
addl %eax, %ecx
movl %ecx, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x7784
movb $0x1, %al
movl %eax, 0x20(%rsp)
incq %r13
jmp 0x4740
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
movq 0xe0(%rsp), %r15
incq %r15
jmp 0x46e0
testb $0x1, 0x20(%rsp)
movq 0xd8(%rsp), %rcx
je 0x4cfa
movq 0x624fe3(%rip), %rax    # 0x629ae0
movq (%rax,%rcx), %rax
movq %rax, 0x20(%rsp)
movl $0xb2, %r15d
xorl %ebp, %ebp
xorl %r13d, %r13d
movl 0x625849(%rip), %eax    # 0x62a360
cmpq %rax, %r13
jae 0x4cfa
movq 0x60(%rsp), %rax
cmpl %r12d, (%rax,%r13,4)
jne 0x4ce7
movq 0xa8(%rsp), %rax
cmpb $0x0, (%rax,%r13)
je 0x4ce7
movq 0xc0(%rsp), %rcx
movq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rdx
movq %rdx, %rdi
subq %rax, %rdi
movq %rdi, %rsi
sarq $0x2, %rsi
movq 0x6257f1(%rip), %rcx    # 0x62a358
movq (%rcx), %rcx
movzwl -0x2(%rcx,%r15), %r8d
cmpq %r8, %rsi
jne 0x4c2c
movq 0x78(%rsp), %rsi
movq (%rsi,%rbp), %r8
movq 0x8(%rsi,%rbp), %rsi
movq %rsi, %r9
subq %r8, %r9
movq %r9, %r10
sarq $0x2, %r10
movzwl (%rcx,%r15), %r11d
cmpq %r11, %r10
jne 0x4be6
movq 0x30(%rsp), %r10
movq 0x8(%r10,%rbp), %r11
subq (%r10,%rbp), %r11
cmpq %r9, %r11
jne 0x4bc4
movq 0x48(%rsp), %r9
movq 0x8(%r9,%rbp), %r10
subq (%r9,%rbp), %r10
cmpq %rdi, %r10
je 0x4c2c
movl -0x4(%rdx), %edx
cmpl (%r8), %edx
jae 0x4c2c
movl (%rax), %edx
cmpb $0x1, 0xa6db(%rip)      # 0xf2b0
jne 0x4c0a
subl -0x12(%rcx,%r15), %edx
movl -0xe(%rcx,%r15), %ecx
addl -0x4(%rsi), %ecx
jmp 0x4c0d
jae 0x4c2c
cmpb $0x0, 0xa6be(%rip)      # 0xf2ad
je 0x4c2c
movq 0x625788(%rip), %rax    # 0x62a380
movq 0x98(%rsp), %rcx
movq (%rax,%rcx,8), %rax
incl (%rax,%r13,4)
jmp 0x4c2c
movl -0x4(%rsi), %ecx
movl 0x2c(%rsp), %eax
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0xa0(%rsp), %rsi
xorl %r8d, %r8d
movl %r13d, %r9d
callq 0x4176
movq 0x30(%rsp), %rcx
movq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rdx
movq %rdx, %rsi
subq %rax, %rsi
sarq $0x2, %rsi
movq 0x62570d(%rip), %rcx    # 0x62a358
movq (%rcx), %rcx
movzwl (%rcx,%r15), %edi
cmpq %rdi, %rsi
jne 0x4ce7
movq 0x48(%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 0x4ca0
movl -0x4(%rdx), %edx
cmpl (%rdi), %edx
jae 0x4ce7
movl (%rax), %edx
cmpb $0x1, 0xa621(%rip)      # 0xf2b0
jne 0x4cc4
subl -0xe(%rcx,%r15), %edx
movl -0x12(%rcx,%r15), %ecx
addl -0x4(%rsi), %ecx
jmp 0x4cc7
jae 0x4ce7
cmpb $0x0, 0xa604(%rip)      # 0xf2ad
je 0x4ce7
movq 0x6256ce(%rip), %rax    # 0x62a380
movq 0x98(%rsp), %rcx
movq (%rax,%rcx,8), %rax
incl (%rax,%r13,4)
jmp 0x4ce7
movl -0x4(%rsi), %ecx
movl 0x2c(%rsp), %eax
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0xa0(%rsp), %rsi
pushq $0x3
popq %r8
movl %r13d, %r9d
callq 0x4176
incq %r13
addq $0x18, %rbp
addq $0xb8, %r15
jmp 0x4b11
addl 0xa5c7(%rip), %r12d     # 0xf2c8
jmp 0x466f
leaq 0xa8(%rsp), %rdi
callq 0x770a
leaq 0x60(%rsp), %rdi
callq 0x744c
leaq 0x30(%rsp), %rdi
callq 0x61b2
leaq 0x48(%rsp), %rdi
callq 0x61b2
leaq 0x78(%rsp), %rdi
callq 0x61b2
leaq 0xc0(%rsp), %rdi
callq 0x61b2
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa28f(%rip), %rdi      # 0xeff0
leaq 0x54c1(%rip), %rsi      # 0xa229
callq 0x3240
movsbl (%r15), %esi
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3130
leaq 0x54ef(%rip), %rsi      # 0xa277
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
movq %r15, %rsi
callq 0x3240
movq %rax, %rdi
callq 0x3130
pushq $0x1
popq %rdi
callq 0x32e0
movq %rax, %rbx
jmp 0x4e1f
movq %rax, %rbx
jmp 0x4e29
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x744c
jmp 0x4e33
movq %rax, %rbx
jmp 0x4e33
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x744c
jmp 0x4e3d
movq %rax, %rbx
jmp 0x4e3d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x744c
jmp 0x4e47
movq %rax, %rbx
jmp 0x4e47
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x744c
jmp 0x4e54
movq %rax, %rbx
jmp 0x4e54
jmp 0x4e0f
jmp 0x4e0f
jmp 0x4e0f
jmp 0x4e0f
jmp 0x4e0f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x770a
leaq 0x60(%rsp), %rdi
callq 0x744c
leaq 0x30(%rsp), %rdi
callq 0x61b2
leaq 0x48(%rsp), %rdi
callq 0x61b2
leaq 0x78(%rsp), %rdi
callq 0x61b2
leaq 0xc0(%rsp), %rdi
callq 0x61b2
movq %rbx, %rdi
callq 0x3440