// File: /workspace/github_cpp_makefile_star2_O3/Ahhgust[P]STRaitRazor/trie.cpp
// Function: Trie::makeTrieFromConfig(std::vector<Config, std::allocator<Config>>*, unsigned int, unsigned char, unsigned char)
void
Trie::makeTrieFromConfig(vector<Config> *c, unsigned numStrs, unsigned char distance, unsigned char motifDistance) {
  unsigned i, nf, nr, memNeeded=0;

  if (distance >2) {
    cerr << "Sorry, the max anchor distance supported with trie-search is 2; " << distance   << " is too big!" << endl;
    exit(EXIT_FAILURE);
  } else if (motifDistance > 1) {
    cerr << "Sorry, the max motif distance supported with trie-search is 1; " << motifDistance   << " is too big!" << endl;
    exit(EXIT_FAILURE);
  }

  // make a table of IUPAC codes
  char IUPAC[255][2];
  memset(IUPAC, 0, 255+255);
  IUPAC[ (int)'R'][0] = 'A';
  IUPAC[ (int)'R'][1] = 'G';

  IUPAC[ (int)'Y'][0] = 'C';
  IUPAC[ (int)'Y'][1] = 'T';

  IUPAC[ (int)'S'][0] = 'G';
  IUPAC[ (int)'S'][1] = 'C';

  IUPAC[ (int)'W'][0] = 'A';
  IUPAC[ (int)'W'][1] = 'T';

  IUPAC[ (int)'K'][0] = 'G';
  IUPAC[ (int)'K'][1] = 'T';

  IUPAC[ (int)'M'][0] = 'A';
  IUPAC[ (int)'M'][1] = 'C';

  // compute an (upper-bound) on the number of nodes in the trie
  for (i=0; i < numStrs; ++i) {
    // math for the memory needed for a hamming distance of 1:
    // N = length of string + 1 (ie, including \0)
    // entering that string requires at most N nodes.
    // entering all the 1-base substitutions on that string requires
    // 3*N for all the substitutions on the 0th positoin
    // 3*(N-1) for all of the substutitions on the 1st position (previous position 0 is already in the trie)
    // 3*(N-2) for all of the subs on the second position (previous 2 positions are in the trie) 
    // ...
    // 3 
    // which is equal to:
    // N + 3N + (3(N)(N-1))/2
    //memNeeded += (2*c[i].forwardLength + 2) + (3* (c[i].reverseLength+2)* (c[i].reverseLength+3))/2;
    //memNeeded += (2*c[i].reverseLength + 2) + (3* (c[i].forwardLength+2)* (c[i].forwardLength+3))/2;

    // we have the forwardFlank twice (8N) (+ and - strand)
    // and again for the reverse flank
    nf = (8*((*c)[i].forwardLength+1)) + 3* ((*c)[i].forwardLength)*((*c)[i].forwardLength-1);
    nr = (8*((*c)[i].reverseLength+1)) + 3* ((*c)[i].reverseLength)*((*c)[i].reverseLength-1);


    const char *s = (*c)[i].forwardFlank.c_str();
    unsigned nfAmbig=0;
    for (unsigned j = 0; j < (*c)[i].forwardLength; ++j, ++s) { // adjust the memory for IUPAC codes (double the memory for each IUPAC code)
      if ( IUPAC[(int)*s][0] != 0) {
        nf = nf + nf;
        ++nfAmbig;
      }
    }

    if (nfAmbig > 1) {
      cerr << endl << "At most 1 ambiguity code is supported per anchor." << endl 
           << "Problem with locus: " << (*c)[i].locusName << " Anchor " << (*c)[i].forwardFlank << endl << endl;
      exit(EXIT_FAILURE);
    }

    s = (*c)[i].reverseFlank.c_str();
    unsigned nrAmbig=0;
    for (unsigned j = 0; j < (*c)[i].reverseLength; ++j, ++s) { // adjust the memory for IUPAC codes (double the memory for each IUPAC code)
      if ( IUPAC[(int)*s][0] != 0) {
        nr = nr + nr;
        ++nrAmbig;
      }
    }



    if (nrAmbig > 1) {
      cerr << endl << "At most 1 ambiguity code is supported per anchor." << endl <<
        "Problem with locus: " << (*c)[i].locusName << " Anchor " << (*c)[i].reverseFlank << endl << endl;
      exit(EXIT_FAILURE);
    }
    
    if (distance == 0) {
      memNeeded += ((*c)[i].forwardLength+1)*(2*(nfAmbig+1)) + ((*c)[i].reverseLength+1)*(2*(nrAmbig+1));
    } else if (distance == 1) {
      memNeeded += nf + nr;
    } else if (distance == 2) {
      // got lazy with this one; wolfram alpha was used to simplify the sum:
      // sum i=1 to N (i)(i-1)
      // which is the (worst-case) memory needed to add a word of length N and all 2-permutations of it
      memNeeded += (nfAmbig*nfAmbig+1)*6*((*c)[i].forwardLength)*((*c)[i].forwardLength+1)*((*c)[i].forwardLength+2);
      memNeeded += (nrAmbig*nrAmbig+1)*6*((*c)[i].reverseLength)*((*c)[i].reverseLength+1)*((*c)[i].reverseLength-1);
    }

    memNeeded += ((*c)[i].motifLength+1) *2; // the motifs are also added
    if (motifDistance == 1) {
      memNeeded += (8*((*c)[i].motifLength+1)) + 3* ((*c)[i].motifLength)*((*c)[i].motifLength-1);
    }
  }

  initMem(memNeeded);

  for (i=0; i < numStrs; ++i) {

    int numAmbig=0;
    string s =  (*c)[i].forwardFlank;
    for (unsigned j= 0; j < (*c)[i].forwardLength; ++j) {
      if ( IUPAC[(int)s.at(j)][0] != 0) {

        int iupac = (int)s.at(j);

        s[j] = IUPAC[ iupac ][0]; // overwrite the ambiguity code with the first form, then add to trie
        addPermutations(s, (*c)[i].forwardLength, i, (unsigned char) FORWARDFLANK,
                        (unsigned char) FORWARDFLANK_RC, distance);
        
        
        s[j] = IUPAC[ iupac ][1]; // overwrite the ambiguity code with the second form, then add to trie
        addPermutations(s, (*c)[i].forwardLength, i, (unsigned char) FORWARDFLANK,
                        (unsigned char) FORWARDFLANK_RC, distance);
        
        ++numAmbig;
        break;
      }
    }
    
    if (numAmbig==0) {

      addPermutations((*c)[i].forwardFlank, (*c)[i].forwardLength, i, (unsigned char) FORWARDFLANK,
                      (unsigned char) FORWARDFLANK_RC, distance);
    }
    numAmbig=0;
    s =  (*c)[i].reverseFlank;
    for (unsigned j= 0; j < (*c)[i].reverseLength; ++j) {
      if ( IUPAC[(int)s.at(j)][0] != 0) {

        int iupac = (int)s.at(j);

        s[j] = IUPAC[ iupac ][0]; // overwrite the ambiguity code with the first form, then add to trie
        addPermutations(s, (*c)[i].reverseLength, i, (unsigned char) REVERSEFLANK, 
                        (unsigned char) REVERSEFLANK_RC, distance);
        
        s[j] = IUPAC[ iupac ][1]; // overwrite the ambiguity code with the second form, then add to trie
        addPermutations(s, (*c)[i].reverseLength, i, (unsigned char) REVERSEFLANK, 
                        (unsigned char) REVERSEFLANK_RC, distance);
        
        ++numAmbig;
        break;
      }
    }


    // and the reverse flank (and its RC)
    if (numAmbig==0)
      addPermutations((*c)[i].reverseFlank, (*c)[i].reverseLength, i, (unsigned char) REVERSEFLANK, 
                      (unsigned char) REVERSEFLANK_RC, distance);
    
    if (motifDistance==0) {
    // add the motif (no degeneracy in this)
      addWord((*c)[i].strMotif.c_str(), (*c)[i].motifLength, i, MOTIF);
      addWordRC((*c)[i].strMotif.c_str(), (*c)[i].motifLength, i, MOTIF_RC);
    } else {
      addPermutations((*c)[i].strMotif, (*c)[i].motifLength, i, (unsigned char) MOTIF, (unsigned char) MOTIF_RC, motifDistance);
    }
  } 
  
  //  cerr << memNeeded << " bytes asked for ; Mem unused: " << memNeeded - (mem-root) << endl;

  if (mem-root > (int) memNeeded) {
    cerr << "Error with the maths. Email the author (August) to fix this!" << endl;
    exit(1);
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movl %edx, 0x40(%rsp)
movq %rdi, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
cmpb $0x3, %cl
jae 0xaada
movl %r8d, %r15d
movzbl %r15b, %eax
movl %eax, 0x44(%rsp)
cmpb $0x2, %r15b
jae 0xaaf7
movq %rsi, %rbx
leaq 0x140(%rsp), %r13
movl $0x1fe, %edx            # imm = 0x1FE
movq %r13, %rdi
xorl %esi, %esi
callq 0x3180
movw $0x5443, 0xb2(%r13)     # imm = 0x5443
movl $0x43474741, 0xa4(%r13) # imm = 0x43474741
movw $0x5441, 0xae(%r13)     # imm = 0x5441
movw $0x5447, 0x96(%r13)     # imm = 0x5447
movw $0x4341, 0x9a(%r13)     # imm = 0x4341
movl 0x40(%rsp), %ecx
movl %ecx, %eax
movq %rax, 0x48(%rsp)
movzbl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
testl %ecx, %ecx
je 0xa494
movq (%rbx), %rax
movq %rax, 0x138(%rsp)
xorl %edx, %edx
xorl %eax, %eax
imulq $0xb8, %rdx, %r13
movq 0x138(%rsp), %rcx
leaq (%rcx,%r13), %rsi
movl 0xa0(%rcx,%r13), %edi
movl 0xa4(%rcx,%r13), %r8d
leal (%rdi,%rdi,2), %r9d
addl $0x5, %r9d
imull %edi, %r9d
addl $0x8, %r9d
testq %rdi, %rdi
je 0xa376
movq 0x40(%rsi), %r11
xorl %r14d, %r14d
xorl %r10d, %r10d
movsbq (%r11,%r14), %r12
xorl %ecx, %ecx
cmpb $0x0, 0x140(%rsp,%r12,2)
setne %cl
shll %cl, %r9d
addl %ecx, %r10d
incq %r14
cmpl %r14d, %edi
jne 0xa34a
cmpl $0x1, %r10d
jbe 0xa379
jmp 0xaa5e
xorl %r10d, %r10d
leal (%r8,%r8,2), %ebp
addl $0x5, %ebp
imull %r8d, %ebp
addl $0x8, %ebp
testq %r8, %r8
je 0xa3db
movq %r13, 0x130(%rsp)
movq %rax, %r13
movq %rbx, %rax
movl %r15d, %ebx
movq 0x60(%rsi), %r14
xorl %r12d, %r12d
xorl %r11d, %r11d
movsbq (%r14,%r12), %r15
xorl %ecx, %ecx
cmpb $0x0, 0x140(%rsp,%r15,2)
setne %cl
shll %cl, %ebp
addl %ecx, %r11d
incq %r12
cmpl %r12d, %r8d
jne 0xa3a7
cmpl $0x1, %r11d
movl %ebx, %r15d
movq %rax, %rbx
movq %r13, %rax
jbe 0xa3de
jmp 0xa9fa
xorl %r11d, %r11d
cmpb $0x1, 0x18(%rsp)
je 0xa411
cmpl $0x0, 0xc(%rsp)
jne 0xa419
incl %edi
leal 0x2(,%r10,2), %r9d
imull %edi, %r9d
incl %r8d
leal 0x2(,%r11,2), %ecx
imull %r8d, %ecx
addl %eax, %r9d
addl %ecx, %r9d
jmp 0xa465
addl %eax, %r9d
addl %ebp, %r9d
jmp 0xa465
leal -0x1(%r8), %ecx
imull %r10d, %r10d
leal (%r10,%r10,2), %r9d
leal 0x6(,%r9,2), %r9d
leal 0x1(%rdi), %r10d
imull %edi, %r10d
addl $0x2, %edi
imull %r10d, %edi
imull %r9d, %edi
addl %eax, %edi
imull %r11d, %r11d
leal (%r11,%r11,2), %r9d
leal 0x6(,%r9,2), %r10d
leal 0x1(%r8), %r9d
imull %r8d, %r9d
imull %ecx, %r9d
imull %r10d, %r9d
addl %edi, %r9d
movl 0xa8(%rsi), %ecx
leal (%r9,%rcx,2), %eax
addl $0x2, %eax
cmpb $0x1, %r15b
jne 0xa486
leal (%rcx,%rcx,2), %esi
addl $0x5, %esi
imull %ecx, %esi
addl %esi, %eax
addl $0x8, %eax
incq %rdx
cmpq 0x48(%rsp), %rdx
jne 0xa308
movq %rax, %r14
movl %r14d, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
movq %r13, %rdi
callq 0x3030
movq %rax, %r12
movq 0x10(%rsp), %rax
movq %r12, 0x8(%rax)
movq %r14, 0x18(%rsp)
testl %r14d, %r14d
je 0xa4cd
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3180
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movl %ecx, 0x10(%rax)
movq %r12, (%rax)
movq %r12, %rax
cmpl $0x0, 0x40(%rsp)
je 0xa9a3
xorl %r12d, %r12d
movq (%rbx), %rax
imulq $0xb8, %r12, %r13
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x40(%rax,%r13), %rsi
movq 0x48(%rax,%r13), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa0(%rax,%r13), %ecx
testq %rcx, %rcx
je 0xa558
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
xorl %ebp, %ebp
cmpq %rbp, %rdx
je 0xa9d8
movsbq (%rsi,%rbp), %r14
movb 0x140(%rsp,%r14,2), %dil
testb %dil, %dil
jne 0xa5c7
incq %rbp
cmpq %rbp, %rcx
jne 0xa535
leaq 0x100(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movq 0x40(%rax,%r13), %rsi
movq 0x48(%rax,%r13), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa0(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x9f5a
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rcx
jmp 0xa6c4
movb %dil, (%rsi,%rbp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa0(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x9f5a
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0xa64a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x32d0
movb 0x141(%rsp,%r14,2), %al
movq 0x20(%rsp), %rcx
movb %al, (%rcx,%rbp)
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x110(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa0(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x9f5a
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0xa6d7
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq (%rbx), %rax
leaq (%rax,%r13), %rsi
addq $0x60, %rsi
leaq 0x20(%rsp), %rdi
callq 0x3170
movq (%rbx), %rax
movl 0xa4(%rax,%r13), %ecx
testq %rcx, %rcx
je 0xa72b
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
xorl %ebp, %ebp
cmpq %rbp, %rdx
je 0xa9e9
movsbq (%rsi,%rbp), %r14
movb 0x140(%rsp,%r14,2), %dil
testb %dil, %dil
jne 0xa79d
incq %rbp
cmpq %rbp, %rcx
jne 0xa708
leaq 0xc0(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x60(%rax,%r13), %rsi
movq 0x68(%rax,%r13), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa4(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl %r12d, %ecx
movl $0x3, %r8d
movl $0x2, %r9d
callq 0x9f5a
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rcx
jmp 0xa894
movb %dil, (%rsi,%rbp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa4(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl %r12d, %ecx
movl $0x3, %r8d
movl $0x2, %r9d
callq 0x9f5a
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xa817
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x32d0
movb 0x141(%rsp,%r14,2), %al
movq 0x20(%rsp), %rcx
movb %al, (%rcx,%rbp)
leaq 0xe0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa4(%rax,%r13), %edx
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
movl %r12d, %ecx
movl $0x3, %r8d
movl $0x2, %r9d
callq 0x9f5a
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0xa8a7
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq (%rbx), %rax
testb %r15b, %r15b
je 0xa924
leaq 0x60(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x80(%rax,%r13), %rsi
movq 0x88(%rax,%r13), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x92de
movq (%rbx), %rax
movl 0xa8(%rax,%r13), %edx
movl 0x44(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %r12d, %ecx
movl $0x4, %r8d
movl $0x5, %r9d
callq 0x9f5a
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa96d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0xa96d
movq 0x80(%rax,%r13), %rsi
movl 0xa8(%rax,%r13), %edx
movq 0x10(%rsp), %rdi
movl %r12d, %ecx
movl $0x4, %r8d
callq 0x9b48
movq (%rbx), %rax
movq 0x80(%rax,%r13), %rsi
movl 0xa8(%rax,%r13), %edx
movq 0x10(%rsp), %rdi
movl %r12d, %ecx
movl $0x5, %r8d
callq 0x9d0a
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa989
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32d0
incq %r12
cmpq 0x48(%rsp), %r12
jne 0xa4ee
movq 0x10(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
subq %r12, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movslq 0x18(%rsp), %rax
cmpq %rax, %rcx
jg 0xab22
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x167a(%rip), %rdi      # 0xc059
movq %rdx, %rsi
xorl %eax, %eax
callq 0x33d0
leaq 0x1669(%rip), %rdi      # 0xc059
movq %rdx, %rsi
xorl %eax, %eax
callq 0x33d0
movq 0x45ef(%rip), %rdi      # 0xeff0
callq 0x3140
leaq 0x1575(%rip), %rsi      # 0xbf82
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3140
leaq 0x1590(%rip), %rsi      # 0xbfb4
movq %rax, %rdi
callq 0x32a0
movq (%rbx), %rsi
movq 0x130(%rsp), %r14
addq %r14, %rsi
movq %rax, %rdi
callq 0x3270
leaq 0x1580(%rip), %rsi      # 0xbfc9
movq %rax, %rdi
callq 0x32a0
movq (%rbx), %rcx
leaq (%rcx,%r14), %rsi
addq $0x60, %rsi
jmp 0xaab8
movq 0x458b(%rip), %rdi      # 0xeff0
callq 0x3140
leaq 0x1511(%rip), %rsi      # 0xbf82
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3140
leaq 0x152c(%rip), %rsi      # 0xbfb4
movq %rax, %rdi
callq 0x32a0
movq (%rbx), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x3270
leaq 0x1524(%rip), %rsi      # 0xbfc9
movq %rax, %rdi
callq 0x32a0
movq (%rbx), %rcx
leaq (%rcx,%r13), %rsi
addq $0x40, %rsi
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3140
movq %rax, %rdi
callq 0x3140
movl $0x1, %edi
callq 0x3340
movq 0x450f(%rip), %rdi      # 0xeff0
leaq 0x140c(%rip), %rsi      # 0xbef4
callq 0x32a0
movzbl 0x18(%rsp), %esi
movq %rax, %rdi
jmp 0xab11
movq 0x44f2(%rip), %rdi      # 0xeff0
leaq 0x143d(%rip), %rsi      # 0xbf42
callq 0x32a0
movq %rax, %rdi
movl 0x44(%rsp), %esi
callq 0x33e0
leaq 0x1418(%rip), %rsi      # 0xbf35
movq %rax, %rdi
jmp 0xab30
movq 0x44c7(%rip), %rdi      # 0xeff0
leaq 0x14a2(%rip), %rsi      # 0xbfd2
callq 0x32a0
jmp 0xaac8
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0xa0(%rsp), %rsi
jmp 0xac30
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0x80(%rsp), %rsi
jmp 0xac30
movq %rax, %rbx
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0x120(%rsp), %rsi
jmp 0xac30
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0xe0(%rsp), %rsi
jmp 0xac30
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0x60(%rsp), %rsi
jmp 0xac30
jmp 0xac3e
jmp 0xac3e
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0xc0(%rsp), %rsi
jmp 0xac30
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0xac41
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0xac41
jmp 0xac3e
jmp 0xac3e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xac5d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3480
nop