// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DAMASKER/tandem.c
// Function: Match_Self
void Match_Self(char *aname, DAZZ_DB *ablock, Align_Spec *aspec)
{ THREAD     threads[NTHREADS];
  Merge_Arg  parmm[NTHREADS];
  Lex_Arg    parmx[NTHREADS];
  Report_Arg parmr[NTHREADS];
  int        pairsort[16];

  int64     nfilt, ncheck;

  KmerPos  *asort, *osort;
  int       alen;
  int64     atot;

  //  Setup 

  atot = ablock->totlen;

  nfilt = ncheck = 0;

  { int64 powr;
    int   i, nbyte;

    for (i = 0; i < NTHREADS; i++)
      parmx[i].sptr = (int64 *) alloca(NTHREADS*BPOWR*sizeof(int64));

    for (i = 0; i < 16; i++)
      pairsort[i] = 0;

    powr = 1;
    for (nbyte = 0; powr < ablock->maxlen; nbyte += 1)
      powr <<= 8;
    for (i = 8; i < 8+nbyte; i++)
      pairsort[i] = 1;

    powr = 1;
    for (nbyte = 0; powr < ablock->nreads; nbyte += 1)
      powr <<= 8;
    for (i = 12; i < 12+nbyte; i++)
      pairsort[i] = 1;
  }

  //  Build K-mer sorted index of ablock

  if (VERBOSE)
    printf("\nIndexing %s\n",aname);

  osort = NULL;   //  Just to shut up dumb compilers
  asort = Sort_Kmers(ablock,&alen,&osort);

  if (VERBOSE)
    printf("\nComparing %s to itself\n",aname);

  if (alen == 0)
    goto zerowork;

  //  Determine equal K-mer links

  { int    i, p;
    uint64 c;

    parmm[0].abeg = 0;
    for (i = 1; i < NTHREADS; i++)
      { p = (int) ((((int64) alen) * i) >> NSHIFT);
        if (p > 0)
          { c = asort[p-1].code;
            while (asort[p].code == c)
              p += 1;
          }
        parmm[i].abeg = parmm[i-1].aend = p;
      }
    parmm[NTHREADS-1].aend = alen;

    for (i = 0; i < NTHREADS; i++)
      { parmm[i].kptr = parmx[i].tptr;
        for (p = 0; p < BPOWR; p++)
          parmm[i].kptr[p] = 0;
      }

    MG_alist = asort;

    for (i = 0; i < NTHREADS; i++)
      pthread_create(threads+i,NULL,count_thread,parmm+i);

    for (i = 0; i < NTHREADS; i++)
      pthread_join(threads[i],NULL);

#ifdef TEST_PAIRS
    printf("\nCROSS SORT %d:\n",alen);
    for (i = 0; i < HOW_MANY && i <= alen; i++)
      { KmerPos *c = asort+i;
        printf(" %5d / %5d / %10lld\n",c->read,c->rpos,c->code);
        fflush(stdout);
      }
#endif
  }

  //  Resort the list on read,rpos

  { int      i;
    KmerPos *rez;

    for (i = 0; i < NTHREADS; i++)
      { parmx[i].beg = parmm[i].abeg;
        parmx[i].end = parmm[i].aend;
      }

    rez = (KmerPos *) lex_sort(pairsort,(Double *) asort,(Double *) osort,parmx);
    if (rez != asort)
      { osort = asort;
        asort = rez;
      }

#ifdef TEST_CSORT
    printf("\nCROSS SORT %d:\n",alen);
    for (i = 0; i < HOW_MANY && i <= alen; i++)
      { KmerPos *c = asort+i;
        printf(" %5d / %5d / %10lld\n",c->read,c->rpos,c->code);
        fflush(stdout);
      }
#endif
  }

  //  Apply the diagonal filter and find local alignments about seed hits

  { int    i, w;
    int64  p;
    int    ar;
    int   *counters;

    MG_alist  = asort;
    MR_ablock = ablock;
    MR_spec   = aspec;
    MR_tspace = Trace_Spacing(aspec);

    asort[alen].read = ablock->nreads;
    parmr[0].beg = 0;
    for (i = 1; i < NTHREADS; i++)
      { p = (int) ((((int64) alen) * i) >> NSHIFT);
        if (p > 0)
          { ar = asort[p-1].read;
            while ((asort[p].read) == ar)
              p += 1;
          }
        parmr[i].beg = parmr[i-1].end = p;
      }
    parmr[NTHREADS-1].end = alen;

    w = ((ablock->maxlen >> Binshift) - ((-ablock->maxlen) >> Binshift)) + 1;
    counters = (int *) Malloc(NTHREADS*3*w*sizeof(int),"Allocating diagonal buckets");
    if (counters == NULL)
      Clean_Exit(1);

    for (i = 0; i < 3*w*NTHREADS; i++)
      counters[i] = 0;
    for (i = 0; i < NTHREADS; i++)
      { if (i == 0)
          parmr[i].score = counters - ((-ablock->maxlen) >> Binshift);
        else
          parmr[i].score = parmr[i-1].lasta + w;
        parmr[i].lastp = parmr[i].score + w;
        parmr[i].lasta = parmr[i].lastp + w;
        parmr[i].work  = New_Work_Data();

        parmr[i].ofile =
             Fopen(Catenate(SORT_PATH,"/",aname,Numbered_Suffix(".T",i+1,".las")),"w");
        if (parmr[i].ofile == NULL)
          Clean_Exit(1);
      }

#ifdef NOTHREAD

    for (i = 0; i < NTHREADS; i++)
      report_thread(parmr+i);

#else

    for (i = 0; i < NTHREADS; i++)
      pthread_create(threads+i,NULL,report_thread,parmr+i);

    for (i = 0; i < NTHREADS; i++)
      pthread_join(threads[i],NULL);

#endif

    if (VERBOSE)
      for (i = 0; i < NTHREADS; i++)
        { nfilt  += parmr[i].nfilt;
          ncheck += parmr[i].ncheck;
        }

    for (i = 0; i < NTHREADS; i++)
      Free_Work_Data(parmr[i].work);
    free(counters);
  }

  //  Finish up

  goto epilogue;

zerowork:
  { FILE *ofile;
    int   i;

    nfilt  = 0;
    for (i = 0; i < NTHREADS; i++)
      { ofile = Fopen(Catenate(SORT_PATH,"/",aname,Numbered_Suffix(".T",i+1,".las")),"w");
        fwrite(&nfilt,sizeof(int64),1,ofile);
        fwrite(&MR_tspace,sizeof(int),1,ofile);
        fclose(ofile);
      }
  }

epilogue:

  free(asort);
  free(osort);

  if (VERBOSE)
    { int width;

      if (nfilt <= 0)
        width = 1;
      else
        width = ((int) log10((double) nfilt)) + 1;
      width += (width-1)/3;

      printf("\n     ");
      Print_Number(nfilt,width,stdout);
      printf(" seed hits (%e of matrix)\n     ",(1.*nfilt/atot)/atot);
      Print_Number(ncheck,width,stdout);
      printf(" confirmed hits (%e of matrix)\n",(1.*ncheck/atot)/atot);
      fflush(stdout);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl 0x2ac7b(%rip), %eax     # 0x2e448
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x130(%rbp)
movq %rcx, %rsp
movq %rax, -0x28(%rbp)
movl 0x2ac4e(%rip), %eax     # 0x2e448
movq %rax, %rdx
shlq $0x4, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x128(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movl 0x2ac2d(%rip), %eax     # 0x2e448
imulq $0x818, %rax, %rdx      # imm = 0x818
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x120(%rbp)
movq %rcx, %rsp
movq %rax, -0x38(%rbp)
movl 0x2ac04(%rip), %eax     # 0x2e448
leaq (%rax,%rax,8), %rcx
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x118(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl 0x2aba5(%rip), %eax     # 0x2e448
jge 0x38ee
movq -0x120(%rbp), %rax
movl 0x2ab96(%rip), %ecx     # 0x2e448
shll $0x8, %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, %rsp
movslq -0xbc(%rbp), %rdx
imulq $0x818, %rdx, %rdx      # imm = 0x818
addq %rdx, %rax
movq %rcx, 0x810(%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x3897
movl $0x0, -0xbc(%rbp)
cmpl $0x10, -0xbc(%rbp)
jge 0x3921
movslq -0xbc(%rbp), %rax
movl $0x0, -0x80(%rbp,%rax,4)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x38f8
movq $0x1, -0xb8(%rbp)
movl $0x0, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
cmpq %rcx, %rax
jge 0x396d
movq -0xb8(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xb8(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x3936
movl $0x8, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl -0xc0(%rbp), %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
jge 0x39aa
movslq -0xbc(%rbp), %rax
movl $0x1, -0x80(%rbp,%rax,4)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x3977
movq $0x1, -0xb8(%rbp)
movl $0x0, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x30(%rcx), %rcx
cmpq %rcx, %rax
jge 0x39f6
movq -0xb8(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xb8(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x39bf
movl $0xc, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl -0xc0(%rbp), %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jge 0x3a33
movslq -0xbc(%rbp), %rax
movl $0x1, -0x80(%rbp,%rax,4)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x3a00
leaq 0x2a9ea(%rip), %rax     # 0x2e424
cmpl $0x0, (%rax)
je 0x3a51
movq -0x8(%rbp), %rsi
leaq 0x25c56(%rip), %rdi     # 0x296a0
movb $0x0, %al
callq 0x2130
movq $0x0, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa4(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x45f0
movq %rax, -0x98(%rbp)
leaq 0x2a9a3(%rip), %rax     # 0x2e424
cmpl $0x0, (%rax)
je 0x3a98
movq -0x8(%rbp), %rsi
leaq 0x25c1d(%rip), %rdi     # 0x296ae
movb $0x0, %al
callq 0x2130
cmpl $0x0, -0xa4(%rbp)
jne 0x3aa6
jmp 0x43af
movq -0x128(%rbp), %rax
movl $0x0, (%rax)
movl $0x1, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl 0x2a97f(%rip), %eax     # 0x2e448
jge 0x3b9b
movslq -0xa4(%rbp), %rax
movslq -0xc4(%rbp), %rcx
imulq %rcx, %rax
movl 0x2a965(%rip), %ecx     # 0x2e44c
sarq %cl, %rax
movl %eax, -0xc8(%rbp)
cmpl $0x0, -0xc8(%rbp)
jle 0x3b51
movq -0x98(%rbp), %rax
movl -0xc8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x98(%rbp), %rax
movslq -0xc8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0xd0(%rbp), %rax
jne 0x3b4f
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0x3b1d
jmp 0x3b51
movq -0x128(%rbp), %rax
movl -0xc8(%rbp), %ecx
movl -0xc4(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rsi
shlq $0x4, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movl %ecx, 0x4(%rdx)
movslq -0xc4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x3abd
movq -0x128(%rbp), %rax
movl -0xa4(%rbp), %ecx
movl 0x2a89a(%rip), %edx     # 0x2e448
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl 0x2a874(%rip), %eax     # 0x2e448
jge 0x3c74
movq -0x128(%rbp), %rax
movq -0x120(%rbp), %rcx
movslq -0xc4(%rbp), %rdx
imulq $0x818, %rdx, %rdx      # imm = 0x818
addq %rdx, %rcx
addq $0x10, %rcx
movslq -0xc4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0xc8(%rbp)
cmpl $0x100, -0xc8(%rbp)     # imm = 0x100
jge 0x3c5e
movq -0x128(%rbp), %rax
movslq -0xc4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0xc8(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0x3c19
jmp 0x3c60
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x3bc8
movq -0x98(%rbp), %rax
movq %rax, 0x2a7d6(%rip)     # 0x2e458
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl 0x2a7b0(%rip), %eax     # 0x2e448
jge 0x3ce5
movq -0x128(%rbp), %rcx
movq -0x130(%rbp), %rdi
movslq -0xc4(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movslq -0xc4(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0xfe1(%rip), %rdx       # 0x4cb0
callq 0x2270
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x3c8c
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl 0x2a74d(%rip), %eax     # 0x2e448
jge 0x3d29
movq -0x130(%rbp), %rax
movslq -0xc4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22f0
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x3cef
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl 0x2a709(%rip), %eax     # 0x2e448
jge 0x3db2
movq -0x120(%rbp), %rax
movq -0x128(%rbp), %rcx
movslq -0xd4(%rbp), %rsi
shlq $0x4, %rsi
movq %rcx, %rdx
addq %rsi, %rdx
movslq (%rdx), %rsi
movslq -0xd4(%rbp), %rdx
imulq $0x818, %rdx, %rdi      # imm = 0x818
movq %rax, %rdx
addq %rdi, %rdx
movq %rsi, (%rdx)
movslq -0xd4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq 0x4(%rcx), %rcx
movslq -0xd4(%rbp), %rdx
imulq $0x818, %rdx, %rdx      # imm = 0x818
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x3d33
movq -0x120(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x4e30
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0x98(%rbp), %rax
je 0x3e03
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, 0x2a647(%rip)     # 0x2e458
movq -0x10(%rbp), %rax
movq %rax, 0x2a644(%rip)     # 0x2e460
movq -0x18(%rbp), %rax
movq %rax, 0x2a641(%rip)     # 0x2e468
movq -0x18(%rbp), %rdi
callq 0x7650
movl %eax, %ecx
movq -0x118(%rbp), %rax
movl %ecx, 0x2a611(%rip)     # 0x2e450
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %edx
movq -0x98(%rbp), %rcx
movslq -0xa4(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movl %edx, 0xc(%rcx)
movq $0x0, (%rax)
movl $0x1, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a5cd(%rip), %eax     # 0x2e448
jge 0x3f54
movslq -0xa4(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq %rcx, %rax
movl 0x2a5b3(%rip), %ecx     # 0x2e44c
sarq %cl, %rax
cltq
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
jle 0x3f07
movq -0x98(%rbp), %rax
movq -0xf0(%rbp), %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x98(%rbp), %rax
movq -0xf0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0xf4(%rbp), %eax
jne 0x3f05
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
jmp 0x3ed1
jmp 0x3f07
movq -0x118(%rbp), %rax
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x48, %rdx, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movq %rcx, 0x8(%rdx)
movslq -0xe4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x3e6f
movq -0x118(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movl 0x2a4e0(%rip), %edx     # 0x2e448
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl 0x2a4ae(%rip), %ecx     # 0x2e434
sarl %cl, %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
subl 0x20(%rcx), %edx
movl 0x2a49d(%rip), %ecx     # 0x2e434
sarl %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
imull $0x3, 0x2a49b(%rip), %eax # 0x2e448
imull -0xe8(%rbp), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
leaq 0x25705(%rip), %rsi     # 0x296c7
callq 0x1d780
movq %rax, -0x100(%rbp)
cmpq $0x0, -0x100(%rbp)
jne 0x3fe2
movl $0x1, %edi
callq 0x2420
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
imull $0x3, -0xe8(%rbp), %ecx
imull 0x2a448(%rip), %ecx     # 0x2e448
cmpl %ecx, %eax
jge 0x402a
movq -0x100(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x3fec
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a408(%rip), %eax     # 0x2e448
jge 0x422f
cmpl $0x0, -0xe4(%rbp)
jne 0x409f
movq -0x118(%rbp), %rax
movq -0x100(%rbp), %rcx
movq %rcx, -0x138(%rbp)
movq -0x10(%rbp), %rcx
xorl %edx, %edx
subl 0x20(%rcx), %edx
movl 0x2a3c1(%rip), %ecx     # 0x2e434
sarl %cl, %edx
movq -0x138(%rbp), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0xe4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0x40e0
movq -0x118(%rbp), %rax
movl -0xe4(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x48, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq 0x20(%rcx), %rcx
movslq -0xe8(%rbp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0xe4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x118(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq 0x10(%rcx), %rdx
movslq -0xe8(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rdx
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movq %rdx, 0x18(%rcx)
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movslq -0xe8(%rbp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0xe4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movb $0x0, %al
callq 0x7160
movq %rax, %rcx
movq -0x118(%rbp), %rax
movslq -0xe4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
leaq 0x2a29a(%rip), %rax     # 0x2e418
movq (%rax), %rax
movq %rax, -0x148(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0xe4(%rbp), %esi
addl $0x1, %esi
leaq 0x25542(%rip), %rdi     # 0x296e5
leaq 0x25396(%rip), %rdx     # 0x29540
callq 0x1dce0
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rdx
movq %rax, %rcx
leaq 0x2551c(%rip), %rsi     # 0x296e3
callq 0x1db90
movq %rax, %rdi
leaq 0x25eca(%rip), %rsi     # 0x2a0a0
callq 0x1d940
movq %rax, %rdx
movq -0x118(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movq %rdx, 0x30(%rcx)
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x30(%rax)
jne 0x4219
movl $0x1, %edi
callq 0x2420
jmp 0x421b
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x4034
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a203(%rip), %eax     # 0x2e448
jge 0x4292
movq -0x118(%rbp), %rcx
movq -0x130(%rbp), %rdi
movslq -0xe4(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movslq -0xe4(%rbp), %rax
imulq $0x48, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x1094(%rip), %rdx      # 0x5310
callq 0x2270
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x4239
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a1a0(%rip), %eax     # 0x2e448
jge 0x42d6
movq -0x130(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22f0
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x429c
leaq 0x2a147(%rip), %rax     # 0x2e424
cmpl $0x0, (%rax)
je 0x4357
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a150(%rip), %eax     # 0x2e448
jge 0x4355
movq -0x118(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq 0x38(%rcx), %rcx
addq -0x88(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x40(%rax), %rax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x42ec
jmp 0x4357
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl 0x2a0db(%rip), %eax     # 0x2e448
jge 0x439e
movq -0x118(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0x7210
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x4361
movq -0x100(%rbp), %rdi
callq 0x2030
jmp 0x449d
movq $0x0, -0x88(%rbp)
movl $0x0, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
cmpl 0x2a078(%rip), %eax     # 0x2e448
jge 0x449b
leaq 0x2a03b(%rip), %rax     # 0x2e418
movq (%rax), %rax
movq %rax, -0x158(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x10c(%rbp), %esi
addl $0x1, %esi
leaq 0x252e3(%rip), %rdi     # 0x296e5
leaq 0x25137(%rip), %rdx     # 0x29540
callq 0x1dce0
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rdx
movq %rax, %rcx
leaq 0x252bd(%rip), %rsi     # 0x296e3
callq 0x1db90
movq %rax, %rdi
leaq 0x25c6b(%rip), %rsi     # 0x2a0a0
callq 0x1d940
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x108(%rbp), %rcx
leaq 0x29fe4(%rip), %rdi     # 0x2e450
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movq -0x108(%rbp), %rdi
callq 0x20e0
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x43c4
jmp 0x449d
movq -0x98(%rbp), %rdi
callq 0x2030
movq -0xa0(%rbp), %rdi
callq 0x2030
leaq 0x29f68(%rip), %rax     # 0x2e424
cmpl $0x0, (%rax)
je 0x45e2
cmpq $0x0, -0x88(%rbp)
jg 0x44db
movl $0x1, -0x110(%rbp)
jmp 0x44f6
cvtsi2sdq -0x88(%rbp), %xmm0
callq 0x21d0
cvttsd2si %xmm0, %eax
addl $0x1, %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
subl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
addl -0x110(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq 0x251e7(%rip), %rdi     # 0x29701
movb $0x0, %al
callq 0x2130
movq -0x88(%rbp), %rdi
movl -0x110(%rbp), %esi
movq 0x29aa3(%rip), %rax     # 0x2dfd8
movq (%rax), %rdx
callq 0x1ddf0
cvtsi2sdq -0x88(%rbp), %xmm1
movsd 0x24ad2(%rip), %xmm0    # 0x29020
mulsd %xmm1, %xmm0
cvtsi2sdq -0xb0(%rbp), %xmm1
divsd %xmm1, %xmm0
cvtsi2sdq -0xb0(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0x25175(%rip), %rdi     # 0x296e8
movb $0x1, %al
callq 0x2130
movq -0x90(%rbp), %rdi
movl -0x110(%rbp), %esi
movq 0x29a4a(%rip), %rax     # 0x2dfd8
movq (%rax), %rdx
callq 0x1ddf0
cvtsi2sdq -0x90(%rbp), %xmm1
movsd 0x24a79(%rip), %xmm0    # 0x29020
mulsd %xmm1, %xmm0
cvtsi2sdq -0xb0(%rbp), %xmm1
divsd %xmm1, %xmm0
cvtsi2sdq -0xb0(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0x2513c(%rip), %rdi     # 0x29708
movb $0x1, %al
callq 0x2130
movq 0x299fe(%rip), %rax     # 0x2dfd8
movq (%rax), %rdi
callq 0x2240
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nop