// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DAMASKER/tandem.c
// Function: report_thread
static void *report_thread(void *arg)
{ Report_Arg  *data   = (Report_Arg *) arg;

  DAZZ_READ   *aread  = MR_ablock->reads;
  KmerPos     *asort  = MG_alist;

  int         *score  = data->score;
  int         *scorp  = data->score + 1;
  int         *scorm  = data->score - 1;
  int         *lastp  = data->lastp;
  int         *lasta  = data->lasta;
  int          maxdiag = ( MR_ablock->maxlen >> Binshift);
  int          mindiag = (-MR_ablock->maxlen >> Binshift);

  FILE        *ofile  = data->ofile;

  char        *aseq   = (char *) (MR_ablock->bases);
  Work_Data   *work   = data->work;
  int          afirst = MR_ablock->tfirst;

  Overlap     _ovla, *ovla = &_ovla;
  Alignment   _align, *align = &_align;
  Path        *apath = &(ovla->path);
  int64        nfilt = 0;
  int64        ahits = 0;
  int          small, tbytes;

  int    novla;
  int    AOmax;
  Path  *amatch;

  Trace_Buffer _tbuf, *tbuf = &_tbuf;

  int      ar, aend;
  KmerPos *aoff;

  align->flags = ovla->flags = 0;
  align->path  = apath;

  if (MR_tspace <= TRACE_XOVR)
    { small  = 1;
      tbytes = sizeof(uint8);
    }
  else
    { small  = 0;
      tbytes = sizeof(uint16);
    }

  AOmax  = MATCH_CHUNK;
  amatch = Malloc(sizeof(Path)*AOmax,"Allocating match vector");

  tbuf->max   = 2*TRACE_CHUNK;
  tbuf->trace = Malloc(sizeof(short)*tbuf->max,"Allocating trace vector");

  if (amatch == NULL || tbuf->trace == NULL)
    Clean_Exit(1);

  fwrite(&ahits,sizeof(int64),1,ofile);
  fwrite(&MR_tspace,sizeof(int),1,ofile);

#ifdef TEST_GATHER
  printf("\nNEW THREAD %5d(%5lld)-%5d(%5lld)\n",asort[data->beg].read,data->beg,
                                                asort[data->end-1].read,data->end);
  fflush(stdout);
#endif

  aoff = asort + (data->beg - Kmer);
  aend = asort[data->end-1].read;
  for (ar = asort[data->beg].read; ar <= aend; ar++)
    { int alen, amarkb, amarke;
      int apos, diag;
      int setaln;

#ifdef TEST_GATHER
      printf("Read %5d\n",ar);
      fflush(stdout);
#endif
      setaln = 1;
      novla  = 0;
      tbuf->top = 0;

      alen   = aread[ar].rlen;
      amarkb = Kmer;
      amarke = PANEL_SIZE;
      if (amarke >= alen)
        amarke = alen+1;
      while (1)
        {
          // Accumulate diagonal scores

          for (apos = amarkb; apos < amarke; apos++)
            { diag = aoff[apos].code;
              if (diag == 0) continue;
              diag >>= Binshift;
              if (apos - lastp[diag] >= Kmer)
                score[diag] += Kmer;
              else
                score[diag] += apos - lastp[diag];
              lastp[diag] = apos;
            }

          // Examine diagonal scores for hits to check out

          for (apos = amarkb; apos < amarke; apos++)
            { diag = aoff[apos].code;
              if (diag == 0) continue;
              diag >>= Binshift;
              if (apos > lasta[diag] &&
                  (score[diag] + scorp[diag] >= Hitmin || score[diag] + scorm[diag] >= Hitmin))
                { int bpos;

                  bpos = apos - aoff[apos].code;
                  if (setaln)
                    { setaln = 0;
                      align->aseq = align->bseq = aseq + aread[ar].boff;
                      align->alen = align->blen = alen;
                      ovla->aread = ovla->bread = ar + afirst;
                    }
#ifdef TEST_GATHER
                  if (scorm[diag] > scorp[diag])
                    printf("  %5d.. x %5d.. %5d (%3d)",
                           bpos,apos,apos-bpos,score[diag]+scorm[diag]);
                  else
                    printf("  %5d.. x %5d.. %5d (%3d)",
                           bpos,apos,apos-bpos,score[diag]+scorp[diag]);
                  fflush(stdout);
#endif

                  nfilt += 1;

                  Local_Alignment(align,work,MR_spec,apos-bpos,apos-bpos,apos+bpos,-1,-1);

                  { int low, hgh, ae;

                    Diagonal_Span(apath,&low,&hgh);
                    if (diag < low)
                      low = diag;
                    else if (diag > hgh)
                      hgh = diag;
                    ae = apath->aepos;
                    for (diag = low; diag <= hgh; diag++)
                      if (ae > lasta[diag])
                        lasta[diag] = ae;
#ifdef TEST_GATHER
                    printf(" %d - %d @ %d",low,hgh,apath->aepos);
#endif
                  }

                  if ((apath->aepos-apath->abpos) + (apath->bepos-apath->bbpos) >= MINOVER)
                    { if (novla >= AOmax)
                        { AOmax = 1.2*novla + MATCH_CHUNK;
                          amatch = Realloc(amatch,sizeof(Path)*AOmax,
                                           "Reallocating match vector");
                          if (amatch == NULL)
                            Clean_Exit(1);
                        }
                      if (tbuf->top + apath->tlen > tbuf->max)
                        { tbuf->max = 1.2*(tbuf->top+apath->tlen) + TRACE_CHUNK;
                          tbuf->trace = Realloc(tbuf->trace,sizeof(short)*tbuf->max,
                                                "Reallocating trace vector");
                          if (tbuf->trace == NULL)
                            Clean_Exit(1);
                        }
                      amatch[novla] = *apath;
                      amatch[novla].trace = (void *) (tbuf->top);
                      memmove(tbuf->trace+tbuf->top,apath->trace,sizeof(short)*apath->tlen);
                      novla += 1;
                      tbuf->top += apath->tlen;

#ifdef TEST_GATHER
                      printf("  [%5d,%5d] x [%5d,%5d] = %4d",
                             apath->abpos,apath->aepos,apath->bbpos,apath->bepos,apath->diffs);
#endif
#ifdef SHOW_OVERLAP
                      printf("\n\n                    %d(%d) vs %d(%d)\n\n",
                             ovla->aread,ovla->alen,ovla->bread,ovla->blen);
                      Print_ACartoon(stdout,align,ALIGN_INDENT);
#ifdef SHOW_ALIGNMENT
                      Compute_Trace_ALL(align,work);
                      printf("\n                      Diff = %d\n",align->path->diffs);
                      Print_Alignment(stdout,align,work,
                                      ALIGN_INDENT,ALIGN_WIDTH,ALIGN_BORDER,0,5);
#endif
#endif // SHOW_OVERLAP
                    }
#ifdef TEST_GATHER
                  else
                    printf("  No alignment %d",
                            ((apath->aepos-apath->abpos) + (apath->bepos-apath->bbpos))/2);
                  printf("\n");
#endif
                }
            }

          // Clear diagonal scores

          for (apos = amarkb; apos < amarke; apos++)
            { diag = aoff[apos].code;
              if (diag == 0) continue;
              diag >>= Binshift;
              score[diag] = lastp[diag] = 0;
            }

          if (amarke > alen) break;

          amarkb = amarke - PANEL_OVERLAP;
          amarke = amarkb + PANEL_SIZE;
          if (amarke > alen)
            amarke = alen+1;
        }

      // Clear diagonal last positions

      for (apos = Kmer; apos <= alen; apos++)
        { int d;

          diag = aoff[apos].code;
          if (diag == 0) continue;
          diag >>= Binshift;
          for (d = diag; d <= maxdiag; d++)
            if (lasta[d] == 0)
              break;
            else
              lasta[d] = 0;
          for (d = diag-1; d >= mindiag; d--)
            if (lasta[d] == 0)
              break;
            else
              lasta[d] = 0;
        }

      // Merge overlapping alignments and remove redundant ones

      { int i;

#ifdef TEST_CONTAIN
        if (novla > 1)
          printf("\n%5d vs %5d:\n",ar,ar);
#endif

        if (novla > 1)
          novla = Handle_Redundancies(amatch,novla,tbuf);

        for (i = 0; i < novla; i++)
          { ovla->path = amatch[i];
            ovla->path.trace = tbuf->trace + (uint64) (ovla->path.trace);
            if (small)
              Compress_TraceTo8(ovla,1);
            Write_Overlap(ofile,ovla,tbytes);
          }
        ahits += novla;
      }

      aoff += alen - (Kmer-1);
    }

  free(tbuf->trace);
  free(amatch);

  data->nfilt  = nfilt;
  data->ncheck = ahits;

  rewind(ofile);
  fwrite(&ahits,sizeof(int64),1,ofile);
  fclose(ofile);

  return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq 0x1ed03(%rip), %rax     # 0x24210
movq 0x60(%rax), %rcx
movq %rcx, 0x108(%rsp)
movq 0x1ece8(%rip), %r14     # 0x24208
movq 0x10(%rdi), %rcx
movq %rcx, 0x68(%rsp)
movq 0x18(%rdi), %rcx
movq %rcx, 0x70(%rsp)
movb 0x1ecac(%rip), %cl      # 0x241e4
movl 0x20(%rax), %ebp
movl %ebp, %edx
sarl %cl, %edx
movq %rdx, 0xe8(%rsp)
movq 0x20(%rdi), %rdx
movq %rdx, 0x28(%rsp)
movl 0x40(%rax), %edx
movq %rdx, 0x100(%rsp)
negl %ebp
sarl %cl, %ebp
movq 0x30(%rdi), %r12
movq 0x58(%rax), %rax
movq %rax, 0x118(%rsp)
movq %rdi, 0xd8(%rsp)
movq 0x28(%rdi), %rax
movq %rax, 0x128(%rsp)
movq $0x0, 0x78(%rsp)
xorl %eax, %eax
leaq 0xa0(%rsp), %rcx
movl %eax, 0x20(%rcx)
movl %eax, 0x138(%rsp)
movq %rcx, 0x130(%rsp)
movl 0x1ec52(%rip), %eax     # 0x24200
movl %eax, 0x94(%rsp)
cmpl $0x7e, %eax
setge %bl
leaq 0x1818b(%rip), %rsi     # 0x1d74d
movl $0xc80, %edi            # imm = 0xC80
callq 0x1512d
movq %rax, %r15
movq $0x9c40, 0x50(%rsp)     # imm = 0x9C40
leaq 0x18186(%rip), %rsi     # 0x1d765
movl $0x13880, %edi          # imm = 0x13880
callq 0x1512d
movq %rax, %r13
movq %rax, 0x60(%rsp)
movq %r15, 0x18(%rsp)
testq %r15, %r15
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x5613
movl $0x1, %edi
callq 0x351c
leaq 0x78(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x22f0
leaq 0x1ebcf(%rip), %rdi     # 0x24200
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x22f0
movq 0xd8(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
shlq $0x4, %rcx
movl -0x4(%r14,%rcx), %edx
movq %rax, %rcx
shlq $0x4, %rcx
movslq 0xc(%r14,%rcx), %rsi
cmpl %edx, %esi
jle 0x5672
xorl %ebx, %ebx
jmp 0x5e74
xorl %ecx, %ecx
movb %bl, %cl
incl %ecx
movl %ecx, 0x90(%rsp)
movl 0x1eb5b(%rip), %edi     # 0x241e0
subq %rdi, %rax
shlq $0x4, %rax
addq %rax, %r14
movq %r14, 0x20(%rsp)
movslq %ebp, %rbx
incl %edx
movq 0xe8(%rsp), %rax
incl %eax
movl %eax, 0x8c(%rsp)
movl $0x64, 0x3c(%rsp)
movq $0x0, 0xf8(%rsp)
movq 0x28(%rsp), %r13
movq %rbx, 0x40(%rsp)
movq %r12, 0xe0(%rsp)
movl %ebp, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq $0x0, 0x58(%rsp)
leaq (%rsi,%rsi,4), %rax
movq 0x108(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x120(%rsp)
movl 0x4(%rax), %r14d
leal 0x1(%r14), %eax
cmpl $0xc351, %r14d          # imm = 0xC351
movl %eax, 0x38(%rsp)
movl %eax, %ebp
movl $0xc350, %eax           # imm = 0xC350
cmovgel %eax, %ebp
movq 0x100(%rsp), %rax
movq %rsi, 0x110(%rsp)
addl %esi, %eax
movl %eax, 0x98(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x1, 0x30(%rsp)
movq 0x20(%rsp), %rdx
movq 0x68(%rsp), %r10
movq 0x70(%rsp), %r11
xorl %r12d, %r12d
movq %r14, 0x48(%rsp)
movq %rdx, 0x20(%rsp)
cmpl %ebp, %edi
jge 0x5b2b
movl 0x1ea75(%rip), %ecx     # 0x241e4
movl 0x1ea6b(%rip), %eax     # 0x241e0
movslq %edi, %rbx
movslq %ebp, %r13
movq %rbx, %r15
shlq $0x4, %r15
addq %rdx, %r15
subq %rbx, %r13
movq %r13, %rdx
movq %r15, %rsi
movq %rdi, 0xf0(%rsp)
movl (%rsi), %r8d
testl %r8d, %r8d
je 0x57bb
sarl %cl, %r8d
movslq %r8d, %r8
movl %edi, %r9d
subl (%r11,%r8,4), %r9d
cmpl %eax, %r9d
jl 0x57b3
movl %eax, %r9d
addl %r9d, (%r10,%r8,4)
movl %edi, (%r11,%r8,4)
incl %edi
addq $0x10, %rsi
decq %rdx
jne 0x5796
cmpl %ebp, 0xf0(%rsp)
jge 0x5b17
movq 0x20(%rsp), %rdx
movq %rbx, %rax
shlq $0x4, %rax
movl (%rdx,%rax), %r8d
testl %r8d, %r8d
je 0x5ad0
movb 0x1e9f2(%rip), %cl      # 0x241e4
movl %r8d, %r14d
sarl %cl, %r14d
movslq %r14d, %rax
movq 0x28(%rsp), %rcx
movslq (%rcx,%rax,4), %rcx
cmpq %rcx, %rbx
jle 0x5ad0
movl (%r10,%rax,4), %ecx
movl 0x4(%r10,%rax,4), %esi
addl %ecx, %esi
movl 0x1e9ca(%rip), %edx     # 0x241e8
cmpl %edx, %esi
jge 0x582f
addl -0x4(%r10,%rax,4), %ecx
cmpl %edx, %ecx
jl 0x5acb
cmpl $0x0, 0x30(%rsp)
je 0x5882
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rax
addq 0x118(%rsp), %rax
movq %rax, 0x148(%rsp)
movq %rax, 0x140(%rsp)
movq 0x48(%rsp), %rax
movl %eax, 0x154(%rsp)
movl %eax, 0x150(%rsp)
movl 0x98(%rsp), %eax
movl %eax, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
movq 0x1e98f(%rip), %rdx     # 0x24218
leal (%rbx,%rbx), %r9d
subl %r8d, %r9d
leaq 0x130(%rsp), %rdi
movq 0x128(%rsp), %rsi
movl %r8d, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
pushq %rax
pushq %rax
callq 0x69e9
addq $0x10, %rsp
leaq 0xa0(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x9c(%rsp), %rdx
callq 0x40a5
movl 0x9c(%rsp), %eax
cmpl %eax, %r14d
movl %eax, %ecx
cmovgl %r14d, %ecx
movl 0xc(%rsp), %esi
cmpl %esi, %r14d
cmovll %eax, %ecx
cmovll %r14d, %esi
movl 0xb8(%rsp), %eax
cmpl %ecx, %esi
movq 0x70(%rsp), %r11
jg 0x591c
movslq %esi, %rdx
movq 0x28(%rsp), %rdi
leaq (%rdi,%rdx,4), %rdx
subl %esi, %ecx
incl %ecx
xorl %esi, %esi
cmpl (%rdx,%rsi,4), %eax
jle 0x5915
movl %eax, (%rdx,%rsi,4)
incq %rsi
cmpl %esi, %ecx
jne 0x590d
incq 0xf8(%rsp)
movl 0xb0(%rsp), %ecx
addl 0xbc(%rsp), %eax
addl 0xb4(%rsp), %ecx
subl %ecx, %eax
movl $0x0, 0x30(%rsp)
leaq 0x1e886(%rip), %rcx     # 0x241d0
cmpl (%rcx), %eax
jge 0x5958
movq 0x68(%rsp), %r10
jmp 0x5acb
movl 0x10(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jge 0x5969
movq 0x18(%rsp), %r8
jmp 0x59b4
cvtsi2sd %eax, %xmm0
mulsd 0x17693(%rip), %xmm0    # 0x1d008
addsd 0x17cc3(%rip), %xmm0    # 0x1d640
cvttsd2si %xmm0, %eax
movl %eax, 0x3c(%rsp)
movslq %eax, %rsi
shlq $0x5, %rsi
movq 0x18(%rsp), %rdi
leaq 0x17de5(%rip), %rdx     # 0x1d77d
callq 0x15185
testq %rax, %rax
je 0x59a7
movq %rax, %r8
jmp 0x59b4
movl $0x1, %edi
callq 0x351c
xorl %r8d, %r8d
movq 0x58(%rsp), %r14
movq 0x60(%rsp), %rax
movslq 0xa8(%rsp), %rcx
addq %r14, %rcx
cmpq 0x50(%rsp), %rcx
jbe 0x5a5a
movq %rcx, %xmm0
punpckldq 0x17c2f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x17c37(%rip), %xmm0    # 0x1d620
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1760b(%rip), %xmm1    # 0x1d008
addsd 0x17c43(%rip), %xmm1    # 0x1d648
cvttsd2si %xmm1, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x17c37(%rip), %xmm1    # 0x1d650
cvttsd2si %xmm1, %rsi
andq %rdx, %rsi
orq %rcx, %rsi
movq %rsi, 0x50(%rsp)
addq %rsi, %rsi
movq %rax, %rdi
leaq 0x17d61(%rip), %rdx     # 0x1d797
movq %r8, %r12
callq 0x15185
movq %r12, %r8
movq %rax, 0x60(%rsp)
testq %rax, %rax
jne 0x5a5a
movl $0x1, %edi
callq 0x351c
movq %r12, %r8
xorl %eax, %eax
movl 0x10(%rsp), %r12d
movslq %r12d, %rcx
shlq $0x5, %rcx
movups 0xa0(%rsp), %xmm0
movups 0xb0(%rsp), %xmm1
movups %xmm0, (%r8,%rcx)
movups %xmm1, 0x10(%r8,%rcx)
movq %r8, 0x18(%rsp)
movq %r14, (%r8,%rcx)
leaq (%rax,%r14,2), %rdi
movq 0xa0(%rsp), %rsi
movslq 0xa8(%rsp), %rdx
addq %rdx, %rdx
callq 0x2290
incl %r12d
movl %r12d, 0x10(%rsp)
movslq 0xa8(%rsp), %rax
addq %r14, %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %r10
movq 0x70(%rsp), %r11
xorl %r12d, %r12d
movq 0x20(%rsp), %rdx
incq %rbx
cmpl %ebx, %ebp
jne 0x57d8
cmpl %ebp, 0xf0(%rsp)
jge 0x5b06
movl 0x1e6fa(%rip), %ecx     # 0x241e4
movl (%r15), %eax
testl %eax, %eax
je 0x5afd
sarl %cl, %eax
cltq
movl %r12d, (%r11,%rax,4)
movl %r12d, (%r10,%rax,4)
addq $0x10, %r15
decq %r13
jne 0x5aea
movq 0x28(%rsp), %r13
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %r14
jmp 0x5b2b
movq 0x28(%rsp), %r13
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %r14
movq 0x20(%rsp), %rdx
cmpl %r14d, %ebp
jg 0x5b49
leal -0x2710(%rbp), %edi
addl $0x9c40, %ebp           # imm = 0x9C40
cmpl %r14d, %ebp
cmovgl 0x38(%rsp), %ebp
jmp 0x5761
movl 0x1e691(%rip), %eax     # 0x241e0
cmpl %r14d, %eax
movq 0xe0(%rsp), %r12
movl 0x88(%rsp), %ebp
movq 0x18(%rsp), %r10
jg 0x5bec
movl 0x1e672(%rip), %ecx     # 0x241e4
movq %rax, %rdx
shlq $0x4, %rdx
movq 0x20(%rsp), %rsi
movl (%rsi,%rdx), %esi
testl %esi, %esi
je 0x5be0
sarl %cl, %esi
movslq %esi, %rdx
cmpl 0xe8(%rsp), %esi
jg 0x5bc3
leaq (,%rdx,4), %rdi
addq %r13, %rdi
movl 0x8c(%rsp), %r8d
subl %edx, %r8d
xorl %r9d, %r9d
cmpl $0x0, (%rdi,%r9,4)
je 0x5bc3
movl $0x0, (%rdi,%r9,4)
incq %r9
cmpl %r9d, %r8d
jne 0x5bac
cmpl %ebp, %esi
jle 0x5be0
cmpl $0x0, -0x4(%r13,%rdx,4)
je 0x5be0
movl $0x0, -0x4(%r13,%rdx,4)
decq %rdx
cmpq %rbx, %rdx
jg 0x5bc7
leaq 0x1(%rax), %rdx
cmpl %eax, %r14d
movq %rdx, %rax
jg 0x5b72
movl 0x10(%rsp), %eax
cmpl $0x2, %eax
jl 0x5d9b
movl $0x0, 0xc(%rsp)
movl %eax, %r8d
movl $0x1, %r15d
movq %r8, 0x10(%rsp)
movq %r15, %r13
shlq $0x5, %r13
addq %r10, %r13
movq %r15, 0x30(%rsp)
decl %r15d
movq %r15, %rbp
shlq $0x5, %rbp
movl 0x10(%r10,%rbp), %r14d
testl %r14d, %r14d
js 0x5d23
addq %r10, %rbp
movl 0x10(%r13), %r12d
cmpl %r14d, %r12d
jge 0x5ca3
movl 0x18(%r13), %ebx
cmpl %ebx, %r14d
jg 0x5d23
movl 0x14(%rbp), %eax
cmpl 0x1c(%r13), %eax
jg 0x5d23
movq 0x60(%rsp), %rdx
movq %r13, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rcx
callq 0x638e
testl %eax, %eax
jne 0x5ccd
cmpl %ebx, 0x18(%rbp)
movq 0x18(%rsp), %r10
jle 0x5d1c
movl 0xc(%rsp), %esi
movq %r13, %rdi
movq %rbp, %rdx
leaq 0x50(%rsp), %rcx
callq 0x6550
movq 0x18(%rsp), %r10
movq 0x30(%rsp), %r15
jmp 0x5d1c
movl 0x18(%rbp), %ebx
cmpl %ebx, %r12d
jg 0x5d23
movl 0x14(%r13), %eax
cmpl 0x1c(%rbp), %eax
jg 0x5d23
movq 0x60(%rsp), %rdx
movq %rbp, %rdi
movq %r13, %rsi
leaq 0xc(%rsp), %rcx
callq 0x638e
testl %eax, %eax
je 0x5cd4
movq 0x18(%rsp), %r10
jmp 0x5d23
movl 0x18(%r13), %eax
cmpl %r12d, %r14d
movq 0x18(%rsp), %r10
jne 0x5ce8
cmpl %eax, %ebx
jg 0x5d0a
jmp 0x5d1c
cmpl %ebx, %eax
jle 0x5d0a
movl 0xc(%rsp), %esi
movq %rbp, %rdi
movq %r13, %rdx
leaq 0x50(%rsp), %rcx
callq 0x6550
movq 0x18(%rsp), %r10
movq 0x30(%rsp), %r15
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
movl $0xffffffff, 0x10(%rbp) # imm = 0xFFFFFFFF
testl %r15d, %r15d
jg 0x5c1e
movq 0x30(%rsp), %r15
incq %r15
movq 0x10(%rsp), %r8
cmpq %r8, %r15
jne 0x5c0f
shlq $0x5, %r8
leaq 0x10(%r10), %rax
xorl %ecx, %ecx
movl $0x0, 0x10(%rsp)
movq 0xe0(%rsp), %r12
cmpl $0x0, (%rax,%rcx)
js 0x5d8d
leaq (%rax,%rcx), %rdx
addq $-0x10, %rdx
movl 0x10(%rsp), %edi
movslq %edi, %rsi
incl %edi
movl %edi, 0x10(%rsp)
shlq $0x5, %rsi
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%r10,%rsi)
movups %xmm0, (%r10,%rsi)
addq $0x20, %rcx
cmpq %rcx, %r8
jne 0x5d5c
movq 0x28(%rsp), %r13
cmpl $0x0, 0x10(%rsp)
jle 0x5e27
movq 0x60(%rsp), %rbx
movl 0x10(%rsp), %r14d
shlq $0x5, %r14
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movups (%rax,%r15), %xmm0
movups 0x10(%rax,%r15), %xmm1
movaps %xmm0, 0xa0(%rsp)
movaps %xmm1, 0xb0(%rsp)
movq 0xa0(%rsp), %rax
leaq (%rbx,%rax,2), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x7d, 0x94(%rsp)
jg 0x5e07
leaq 0xa0(%rsp), %rdi
movl $0x1, %esi
callq 0xc5bb
movq %r12, %rdi
leaq 0xa0(%rsp), %rsi
movl 0x90(%rsp), %edx
callq 0xc55b
addq $0x20, %r15
cmpq %r15, %r14
jne 0x5db7
movslq 0x10(%rsp), %rax
addq %rax, 0x78(%rsp)
movl 0x1e3a9(%rip), %edi     # 0x241e0
movl 0x38(%rsp), %eax
subl %edi, %eax
cltq
shlq $0x4, %rax
addq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rsi
incq %rsi
movl 0x84(%rsp), %edx
cmpl %esi, %edx
movq 0x40(%rsp), %rbx
jne 0x56de
movq 0x60(%rsp), %r13
movq 0xf8(%rsp), %rbx
movq %r13, %rdi
callq 0x2030
movq 0x18(%rsp), %rdi
callq 0x2030
movq 0xd8(%rsp), %rcx
movq %rbx, 0x38(%rcx)
leaq 0x78(%rsp), %rbx
movq (%rbx), %rax
movq %rax, 0x40(%rcx)
movq %r12, %rdi
callq 0x2160
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rcx
callq 0x22f0
movq %r12, %rdi
callq 0x2100
xorl %eax, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq