// File: /workspace/github_c_makefile_star2_O1/thegenemyers[P]DASCRUBBER/DASrealign.c
// Function: EXTENDER
static void EXTENDER(int aread, Overlap *ovls, int novl)
{ Finger      _afinger, *afinger = &_afinger;
  Finger      _bfinger, *bfinger = &_bfinger;

  static Overlap     _ovla, *ovla = &_ovla;
  static Path        *ipath = &_ovla.path;

  static Path         rpath, fpath;
  static Alignment   _ralign, *ralign = &_ralign;
  static Alignment   _falign, *falign = &_falign;

  static Work_Data  *work = NULL;
  static Align_Spec *spec;

  int ap, alast;

  if (aread < ADB_ofirst || aread >= ADB_olast)
    return;

  if (work == NULL)
    { spec = New_Align_Spec(.70,100,ADB->freq,1);
      work = New_Work_Data();
      ralign->path = &rpath;
      falign->path = &fpath;
    }

  alast = IAMAP[aread+1];
  for (ap = IAMAP[aread]; ap < alast; ap++)
    { int mb, me;
      int aend, abeg, alen;

      mb = AMAP_IDX[ap]+2;
      me = AMAP_IDX[ap+1];

      abeg = AMAP[mb];
      aend = AMAP[me-1];
      if (aend - abeg < MIN_LEN)
        continue;

      ralign->aseq = falign->aseq = ((char *) ADB->bases) + ADB->reads[ap].boff;
      ralign->alen = falign->alen = alen = ADB->reads[ap].rlen;

#ifdef OUTLINE
      printf("AREAD %d -> %d [%d,%d]\n",aread,ap,abeg,aend);
      fflush(stdout);
#endif
#ifdef SHOW_MAP
      print_map(AMAP,mb,me,0);
#endif

      { int   o, ob, oe;
        Path *path;
        int   bread;
        int   bp, blast;

        for (ob = 0; ob < novl; ob = oe)
          { bread = ovls[ob].bread;
            for (oe = ob+1; oe < novl && ovls[oe].bread == bread; oe += 1)
              ;
            if (bread < BDB_ofirst || bread >= BDB_olast)
              continue;

            blast = IBMAP[bread+1];
            for (bp = IBMAP[bread]; bp < blast; bp++)
              { int hb, he;
                int bend, bbeg, blen;
                int alpos, clen;

                hb = BMAP_IDX[bp]+2;
                he = BMAP_IDX[bp+1];

                bbeg = BMAP[hb];
                bend = BMAP[he-1];
                if (bend - bbeg < MIN_LEN)
                  continue;

#ifdef OUTLINE
		printf("  BREAD %d->%d [%d,%d]\n",bread,bp,bbeg,bend);
                fflush(stdout);
#endif
#ifdef SHOW_MAP
		print_map(BMAP,hb,he,0);
#endif

                alpos = -1;
                for (o = ob; o < oe; o++)
                  { int bbreal, bereal;

                    path = &(ovls[o].path);
                    if (COMP(ovls[o].flags))
                      { clen = BMAP[hb-1];
                        bbreal = clen-path->bepos;
                        bereal = clen-path->bbpos;
                      }
                    else
                      { clen = 0;
                        bbreal = path->bbpos;
                        bereal = path->bepos;
                      }
  
#ifdef OUTLINE
                    printf("    OVL %d: [%d,%d] %c [%d,%d]\n",o,
                           path->abpos,path->aepos,(clen==0)?'n':'c',bbreal,bereal);
                    fflush(stdout);
#endif

                    if (path->abpos <= aend-MIN_LEN && path->aepos >= abeg+MIN_LEN &&
                             bbreal <= bend-MIN_LEN &&      bereal >= bbeg+MIN_LEN)

                      { ralign->bseq  = falign->bseq  = ((char *) BDB->bases) + BDB->reads[bp].boff;
                        ralign->blen  = falign->blen  = blen = BDB->reads[bp].rlen;
                        ralign->flags = falign->flags = ovls[o].flags;

                        if (COMP(ralign->flags))
                          Complement_Seq(ralign->bseq,blen);

#ifdef SHOW_MAP
                        print_map(BMAP,hb,he,clen);
#endif

                        init_finger(afinger,AMAP,mb,me,0);
                        init_finger(bfinger,BMAP,hb,he,clen);
                        if ( ! recon(ipath,path,afinger,bfinger))
                          { int apos, bpos, acc, len, diag;

                            init_finger(afinger,AMAP,mb,me,0);
                            init_finger(bfinger,BMAP,hb,he,clen);
                            if (estimate(path,afinger,bfinger,&apos,&bpos,&acc))
                              if (apos > alpos)
                                { diag = apos-bpos;

                                  acc /= 2;
                                  if (apos + acc > alen)
                                    acc = alen-apos;
                                  if (bpos + acc > blen)
                                    acc = blen-bpos;
                                  if (apos < acc)
                                    acc = apos;
                                  if (bpos < acc)
                                    acc = bpos;
                                  if (acc > 500)
                                    acc = 500;
                                  acc *= 2;

#ifdef OUTLINE
                                  printf("      Trying: %d,%d + %d\n",apos,bpos,acc);
                                  fflush(stdout);
#endif
                                  Local_Alignment(ralign,work,spec,
                                                  diag-acc,diag+acc,apos+bpos,-1,-1);
#ifdef OUTLINE
                                  printf("      Local: <%d,%d> -> <%d,%d>\n",
                                         ralign->path->abpos,ralign->path->bbpos,
                                         ralign->path->aepos,ralign->path->bepos);
                                  fflush(stdout);
#endif
                                  len = ralign->path->aepos - ralign->path->abpos;
                                  if (len >= MIN_LEN && ralign->path->diffs <= .35*len)
                                    { ovla->aread = ap;
                                      ovla->bread = bp;
                                      ovla->flags = ralign->flags;
                                      _ovla.path  = *(ralign->path);
                                      convert_trace(ralign->path);
#ifdef OUTLINE
                                      printf("      Final: %d[%d..%d] vs %d[%d..%d] %c d=%d\n",
                                             ovla->aread,ovla->path.abpos,ovla->path.aepos,
                                             ovla->bread,ovla->path.bbpos,ovla->path.bepos,
                                             (COMP(ovla->flags) ? 'c' : 'n'), ovla->path.diffs);
                                      fflush(stdout);
#endif
#ifdef SHOW_FINAL
                                      show_overlap(ovla);
#endif
#ifdef SHOW_ALIGNMENTS
                                      Compute_Trace_IRR(ralign,work,GREEDIEST);
                                      Print_Alignment(stdout,ralign,work,4,80,10,0,6);
#else
                                      Write_Overlap(OUTPUT,ovla,sizeof(uint16));
                                      WOVLS += 1;
#endif

                                      alpos  = ralign->path->aepos;
#ifdef OUTLINE
                                      printf("        ACCEPT\n");
#endif
                                    }
#ifdef OUTLINE
                                  else
                                    printf("        REJECT\n");
#endif
                                }
#ifdef OUTLINE
                              else
                                printf("        SKIP\n");
                            else
                              printf("        NO OVERLAP\n");
                            fflush(stdout);
#endif
                          }

                        else if (ipath->aepos > alpos)
                          { int ab, bb;
                            int ae, be;
                            int ar, br;
                            int af, bf;

                            ab = ipath->abpos;
                            bb = ipath->bbpos;
                            ae = ipath->aepos;
                            be = ipath->bepos;

                            ar = ab;
                            br = bb;
                            if (ab > 0 && bb > 0)
                              { Find_Extension(ralign,work,spec,ab-bb,ab+bb,-1,-1,1);
                                ar = ralign->path->abpos;
                                br = ralign->path->bbpos;
#ifdef OUTLINE
                                printf("      Rev: (%d,%d)",ab,bb);
                                printf(" -> (%d,%d)",ar,br);
                                printf(" %d",ralign->path->diffs);
                                fflush(stdout);
#endif
                                if (ar == 0 || br == 0 || ralign->path->diffs <= .35*(ab-ar))
                                  {
#ifdef OUTLINE
                                    printf(" OK\n");
                                    fflush(stdout);
#endif
                                    if (ab - 10 < ar)
                                      { uint16 *trace = (uint16 *) ipath->trace;
                                        int     tlen  = ipath->tlen;

                                        if (tlen > 0)
                                          { trace[0] += ab - ar;
                                            trace[1] += bb - br;
                                          }
                                        ipath->abpos = ar;
                                        ipath->bbpos = br;
                                      }
                                    else
                                      { convert_trace(ralign->path);
                                        fusion(ralign->path,ipath,2);
                                      }
                                  }
                                else
                                  { ar = ab;
                                    br = bb;
#ifdef OUTLINE
                                    printf(" NOTOK\n");
                                    fflush(stdout);
#endif
                                  }
                              }

                            af = ae;
                            bf = be;
                            if (ae < alen && be < blen)
                              { Find_Extension(falign,work,spec,ae-be,ae+be,-1,-1,0);
                                af = falign->path->aepos;
                                bf = falign->path->bepos;
#ifdef OUTLINE
                                printf("      Fow: (%d,%d)",ae,be);
                                printf(" -> (%d,%d)",af,bf);
                                printf(" %d",falign->path->diffs);
                                fflush(stdout);
#endif
                                if (af == alen || bf == blen || falign->path->diffs <= .35*(af-ae))
                                  {
#ifdef OUTLINE
                                    printf(" OK\n");
                                    fflush(stdout);
#endif
                                    if (ae + 10 > af)
                                      { uint16 *trace = (uint16 *) ipath->trace;
                                        int     tlen  = ipath->tlen;

                                        if (tlen > 0)
                                          { trace[tlen-2] += af-ae;
                                            trace[tlen-1] += bf-be;
                                          }
                                        ipath->aepos = af;
                                        ipath->bepos = bf;
                                      }
                                    else
                                      { convert_trace(falign->path);
                                        fusion(ipath,falign->path,1);
                                      }
                                  }
                                else
                                  { af = ae;
                                    bf = be;
#ifdef OUTLINE
                                    printf(" NOTOK\n");
                                    fflush(stdout);
#endif
                                  }
                              }

                            alpos = af;
                            if (af-ar >= MIN_LEN) 
                              { ovla->aread = AFIRST + ap;
                                ovla->bread = BFIRST + bp;
                                ovla->flags = ralign->flags;
#ifdef OUTLINE
                                printf("      Final: %d[%d..%d] vs %d[%d..%d] %c d=%d\n",
                                       ovla->aread,ovla->path.abpos,ovla->path.aepos,
                                       ovla->bread,ovla->path.bbpos,ovla->path.bepos,
                                       (COMP(ovla->flags) ? 'c' : 'n'), ovla->path.diffs);
                                fflush(stdout);
#endif
#ifdef SHOW_FINAL
                                show_overlap(ovla);
#endif
#ifdef SHOW_ALIGNMENTS
				fpath = *ipath;
                                Compute_Trace_IRR(falign,work,GREEDIEST);
                                Print_Alignment(stdout,falign,work,4,80,10,0,6);
#else
                                Write_Overlap(OUTPUT,ovla,sizeof(uint16));
                                WOVLS += 1;
#endif
                              }
#ifdef OUTLINE
                            else
                              printf("        NO OVERLAP\n");
#endif
                            fusion(NULL,NULL,0);
                          }

#ifdef OUTLINE
                        else
                          printf("     SKIP\n");
                        fflush(stdout);
#endif

                        if (COMP(ralign->flags))
                          Complement_Seq(ralign->bseq,blen);
                      }
                  }
              }
          }
      }
    }
}

// Assembly:
cmpl %edi, 0x1e060(%rip)     # 0x211b8
jg 0x4402
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %edi, %ebx
cmpl %edi, 0x1e045(%rip)     # 0x211bc
jle 0x43f1
movl %edx, %r13d
movq %rsi, %rbp
cmpq $0x0, 0x1e225(%rip)     # 0x213b0
jne 0x31dc
leaq 0x1e074(%rip), %rsi     # 0x21208
movsd 0x17e84(%rip), %xmm0    # 0x1b020
movl $0x64, %edi
movl $0x1, %edx
callq 0x47de
movq %rax, 0x1e206(%rip)     # 0x213b8
xorl %eax, %eax
callq 0x4744
movq %rax, 0x1e1f0(%rip)     # 0x213b0
leaq 0x1e159(%rip), %rax     # 0x21320
movq %rax, 0x1e192(%rip)     # 0x21360
leaq 0x1e16b(%rip), %rax     # 0x21340
movq %rax, 0x1e1ac(%rip)     # 0x21388
movq 0x1dfdd(%rip), %rax     # 0x211c0
movslq %ebx, %rcx
movslq 0x4(%rax,%rcx,4), %rdx
movslq (%rax,%rcx,4), %rax
movq %rdx, 0x138(%rsp)
cmpl %edx, %eax
jge 0x43f1
movslq %r13d, %rcx
movq %rcx, 0x168(%rsp)
leaq 0x58(%rbp), %rcx
movq %rcx, 0x140(%rsp)
movl %r13d, 0x18(%rsp)
movq %rbp, 0x70(%rsp)
movq %rax, %rcx
movq 0x1df7e(%rip), %rax     # 0x211a8
movq (%rax,%rcx,8), %rdx
movq %rcx, 0xc8(%rsp)
movq 0x8(%rax,%rcx,8), %rdi
movq 0x1df6e(%rip), %rax     # 0x211b0
movq %rdx, %rsi
shlq $0x20, %rdx
movabsq $0x200000000, %rcx      # imm = 0x200000000
addq %rcx, %rdx
movq %rdx, %rcx
movq %rdx, 0x100(%rsp)
sarq $0x1e, %rcx
movl (%rax,%rcx), %r8d
movq %rdi, %rcx
movq %rdi, 0xa8(%rsp)
shlq $0x20, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rdx, %rcx
sarq $0x1e, %rcx
movl (%rax,%rcx), %r9d
movl %r9d, %eax
movq %r8, 0x170(%rsp)
subl %r8d, %eax
cmpl 0x1defb(%rip), %eax     # 0x2119c
jl 0x43d8
movq 0x1dfa2(%rip), %rax     # 0x21250
movq 0x1dfa3(%rip), %rcx     # 0x21258
movq 0xc8(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
addq 0x10(%rcx,%rdx,8), %rax
movq %rax, 0x1e0cb(%rip)     # 0x21398
movq %rax, 0x1e09c(%rip)     # 0x21370
movl 0x4(%rcx,%rdx,8), %eax
movl %eax, 0x1e0ca(%rip)     # 0x213a8
movl %eax, 0x58(%rsp)
movl %eax, 0x1e098(%rip)     # 0x21380
testl %r13d, %r13d
jle 0x43d8
sarq $0x20, 0x100(%rsp)
addl $0x5, %esi
movq %rsi, 0xd8(%rsp)
movslq %esi, %rcx
movslq 0xa8(%rsp), %rdi
movq %rcx, 0x160(%rsp)
leaq 0x3(%rcx), %rax
movq %rax, 0x150(%rsp)
xorl %eax, %eax
movl %r9d, 0xbc(%rsp)
movq %rdi, 0x40(%rsp)
movl %eax, %edi
movslq %eax, %rsi
movq %rsi, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rcx
movslq 0x28(%rbp,%rcx), %rax
leal 0x1(%rsi), %edx
cmpl %edx, %r13d
cmovgl %r13d, %edx
leal -0x1(%rdx), %r8d
movq %r8, 0xe8(%rsp)
movq %rsi, 0x148(%rsp)
incq %rsi
addq 0x140(%rsp), %rcx
movl %edi, 0x10c(%rsp)
movq %rdi, 0xa0(%rsp)
cmpq 0x168(%rsp), %rsi
jge 0x33be
movq 0xa0(%rsp), %rdi
incl %edi
movq %rdi, 0xa0(%rsp)
incq %rsi
leaq 0x30(%rcx), %rdi
cmpl %eax, (%rcx)
movq %rdi, %rcx
je 0x3380
movq 0xa0(%rsp), %rcx
decl %ecx
movq %rcx, 0xe8(%rsp)
jmp 0x33c6
movq %rdx, 0xa0(%rsp)
cmpl 0x1de0c(%rip), %eax     # 0x211d8
jl 0x43c7
cmpl 0x1de04(%rip), %eax     # 0x211dc
jge 0x43c7
movq 0x1ddfb(%rip), %rcx     # 0x211e0
movslq 0x4(%rcx,%rax,4), %rdx
movslq (%rcx,%rax,4), %rcx
movq %rdx, 0x158(%rsp)
cmpl %edx, %ecx
jge 0x43c7
movq 0xe8(%rsp), %rax
leal 0x1(%rax), %r8d
movl %r8d, 0xc0(%rsp)
movq 0x1ddaf(%rip), %rax     # 0x211c8
movq (%rax,%rcx,8), %rdx
movq %rcx, 0xd0(%rsp)
movq 0x8(%rax,%rcx,8), %r10
movq 0x1dd9f(%rip), %rax     # 0x211d0
movq %rdx, %rsi
shlq $0x20, %rdx
movabsq $0x200000000, %rcx      # imm = 0x200000000
movq %rdx, %r11
addq %rdx, %rcx
movq %rcx, 0xf0(%rsp)
sarq $0x1e, %rcx
movl (%rax,%rcx), %ebx
movq %r10, %rcx
movq %r10, 0xf8(%rsp)
shlq $0x20, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rdx, %rcx
sarq $0x1e, %rcx
movl (%rax,%rcx), %eax
movl %eax, 0x114(%rsp)
movl %ebx, 0x110(%rsp)
subl %ebx, %eax
cmpl 0x1dd0c(%rip), %eax     # 0x2119c
jl 0x43ae
movq 0xe8(%rsp), %rax
cmpl %eax, 0x10c(%rsp)
jg 0x43ae
sarq $0x20, 0xf0(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r11
sarq $0x1e, %r11
movq %r11, 0x178(%rsp)
movq 0xf8(%rsp), %rax
leal -0x4(%rax), %ecx
movl %ecx, 0xb8(%rsp)
leal 0x1(%rsi), %ecx
movl %ecx, 0xb4(%rsp)
cltq
shlq $0x2, %rax
movq %rax, 0x120(%rsp)
addl $0x5, %esi
movq %rsi, 0x118(%rsp)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x148(%rsp), %r10
leaq (%r10,%r10,2), %rax
shlq $0x4, %rax
leaq (%rax,%rbp), %rbx
movl 0x20(%rbp,%rax), %eax
testb $0x1, %al
jne 0x3534
movl 0x14(%rbx), %edx
movl 0x1c(%rbx), %ecx
movl $0x0, 0xc(%rsp)
jmp 0x3552
movq 0x1dc95(%rip), %rcx     # 0x211d0
movq 0x178(%rsp), %rdx
movl (%rcx,%rdx), %ecx
movl %ecx, %edx
subl 0x1c(%rbx), %edx
movl %ecx, 0xc(%rsp)
subl 0x14(%rbx), %ecx
movl 0x1dc44(%rip), %esi     # 0x2119c
movl %r9d, %edi
subl %esi, %edi
cmpl %edi, 0x10(%rbx)
jg 0x43a2
movq 0x170(%rsp), %rdi
addl %esi, %edi
cmpl %edi, 0x18(%rbx)
jl 0x43a2
movl 0x114(%rsp), %edi
subl %esi, %edi
cmpl %edi, %edx
jg 0x43a2
addl 0x110(%rsp), %esi
cmpl %esi, %ecx
jl 0x43a2
movl %r15d, 0x5c(%rsp)
movq 0x1dbc3(%rip), %rcx     # 0x21168
movq 0x58(%rcx), %rdi
movq 0x60(%rcx), %rcx
movq 0xd0(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
addq 0x10(%rcx,%rdx,8), %rdi
movq %rdi, 0x1dddb(%rip)     # 0x213a0
movq %rdi, 0x1ddac(%rip)     # 0x21378
movl 0x4(%rcx,%rdx,8), %ecx
movl %ecx, 0x1ddd6(%rip)     # 0x213ac
movl %ecx, 0x1c(%rsp)
movl %ecx, 0x1dda4(%rip)     # 0x21384
movl %eax, 0x1ddaa(%rip)     # 0x21390
movl %eax, 0x1dd7c(%rip)     # 0x21368
testb $0x1, %al
movq %r10, 0x128(%rsp)
je 0x3601
movl 0x1c(%rsp), %esi
callq 0xab20
movq 0x1dba8(%rip), %r15     # 0x211b0
movq 0xd8(%rsp), %rax
movl %eax, 0x80(%rsp)
movq 0xa8(%rsp), %rax
movl %eax, 0x84(%rsp)
movq 0x100(%rsp), %rax
movl (%r15,%rax,4), %eax
movl %eax, 0x8c(%rsp)
xorl %eax, %eax
movl %eax, 0x88(%rsp)
movl %eax, 0x90(%rsp)
movq %r15, 0x98(%rsp)
movq 0x1db78(%rip), %rax     # 0x211d0
movq %rax, (%rsp)
movl 0xc(%rsp), %edx
testl %edx, %edx
movq 0x40(%rsp), %rdi
je 0x3693
movl 0xb8(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0xb4(%rsp), %eax
movl %eax, 0x24(%rsp)
movl %edx, %eax
movq 0x120(%rsp), %rcx
movq (%rsp), %rsi
subl -0x4(%rsi,%rcx), %eax
jmp 0x36ba
movq 0x118(%rsp), %rax
movl %eax, 0x20(%rsp)
movq 0xf8(%rsp), %rax
movl %eax, 0x24(%rsp)
movq 0xf0(%rsp), %rax
movq (%rsp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl %edx, 0x30(%rsp)
movq (%rsp), %rax
movq %rax, 0x38(%rsp)
movq (%rbx), %rax
movq %rax, 0x130(%rsp)
movl 0x8(%rbx), %eax
cmpl 0x1da91(%rip), %eax     # 0x21178
jle 0x372c
cvtsi2sd %eax, %xmm0
mulsd 0x17913(%rip), %xmm0    # 0x1b008
addsd 0x1791b(%rip), %xmm0    # 0x1b018
cvttsd2si %xmm0, %eax
movl %eax, 0x1da71(%rip)     # 0x21178
movq 0x1dcb2(%rip), %rdi     # 0x213c0
movslq %eax, %rsi
addq %rsi, %rsi
leaq 0x17bbd(%rip), %rdx     # 0x1b2d8
callq 0x13185
movq 0x40(%rsp), %rdi
movq %rax, 0x1dc94(%rip)     # 0x213c0
movq 0x1dc8d(%rip), %rax     # 0x213c0
movq %rax, 0x188(%rsp)
movq %rax, 0x1dbae(%rip)     # 0x212f0
movl 0x1da50(%rip), %esi     # 0x21198
movl 0x10(%rbx), %ecx
movl 0x14(%rbx), %r14d
movl %ecx, %eax
cltd
movl %esi, 0x64(%rsp)
idivl %esi
movl %edx, 0x10(%rsp)
movq 0xd8(%rsp), %rax
movl %eax, %r11d
cmpl 0xa8(%rsp), %eax
jge 0x3802
movl 0x8c(%rsp), %esi
movl 0x88(%rsp), %eax
movq 0x160(%rsp), %rdi
movl (%r15,%rdi,4), %r10d
cmpl %ecx, %r10d
jle 0x37ad
movl 0x80(%rsp), %r8d
movq 0xd8(%rsp), %rdi
movl %edi, %r11d
movq 0x40(%rsp), %rdi
jmp 0x37ec
movq 0x150(%rsp), %r9
movq 0x40(%rsp), %rdi
movl %eax, %r11d
movl -0x14(%r15,%r9,4), %eax
subl %esi, %eax
movl %r10d, %esi
movl %r9d, %r8d
addl -0x10(%r15,%r9,4), %eax
addl %r11d, %eax
cmpq %rdi, %r9
jge 0x37e9
movl (%r15,%r9,4), %r10d
addq $0x3, %r9
movl %r8d, %r11d
cmpl %ecx, %r10d
jle 0x37ba
jmp 0x37ec
movl %r8d, %r11d
movl %esi, 0x8c(%rsp)
movl %eax, 0x88(%rsp)
movl %r8d, 0x80(%rsp)
movslq %r11d, %rax
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpl %ecx, -0x8(%r15,%rax,4)
jl 0x382b
movl %ecx, %eax
subl 0x8c(%rsp), %eax
jl 0x382b
addl 0x88(%rsp), %eax
movl %eax, %esi
xorl %edx, %edx
testl %esi, %esi
js 0x387f
movl 0x20(%rsp), %r8d
movslq %r8d, %rax
cmpl $0x0, 0xc(%rsp)
je 0x3887
movslq 0x24(%rsp), %r11
cmpl %r11d, %r8d
jle 0x396f
movl %ecx, %edx
movq %rbx, 0xe0(%rsp)
movl 0x2c(%rsp), %r10d
movl 0x28(%rsp), %r9d
movl 0xc(%rsp), %ebp
movq (%rsp), %rcx
subl (%rcx,%rax,4), %ebp
cmpl %r14d, %ebp
jle 0x38bd
movl 0x20(%rsp), %ebx
movl %edx, %ecx
xorl %edx, %edx
jmp 0x3949
xorl %r8d, %r8d
jmp 0x39f3
movslq 0x24(%rsp), %r11
cmpl %r11d, %r8d
jge 0x39b0
movl %ecx, %edx
movq %rbx, %r13
movl 0x2c(%rsp), %r10d
movl 0x28(%rsp), %r9d
movq (%rsp), %rcx
movl (%rcx,%rax,4), %ebp
cmpl %r14d, %ebp
jle 0x3907
movl 0x20(%rsp), %ebx
movl %edx, %ecx
xorl %edx, %edx
jmp 0x398f
addq $-0x3, %rax
movl 0xc(%rsp), %r13d
movl %edx, %ecx
xorl %edx, %edx
movl %r9d, %r8d
movq (%rsp), %r12
addl 0x14(%r12,%rax,4), %r10d
movl %r13d, %r9d
subl %r10d, %r9d
movl %ebp, %r10d
movl %eax, %ebx
addl 0x10(%r12,%rax,4), %r9d
addl %r8d, %r9d
cmpq %r11, %rax
jle 0x3946
movl %r13d, %ebp
movq (%rsp), %r8
subl (%r8,%rax,4), %ebp
addq $-0x3, %rax
movl %ebx, %r8d
cmpl %r14d, %ebp
jle 0x38ca
jmp 0x3949
addq $0x3, %rax
movl %edx, %ecx
xorl %edx, %edx
movl %r9d, %r8d
movq (%rsp), %r12
movl -0x14(%r12,%rax,4), %r9d
subl %r10d, %r9d
movl %ebp, %r10d
movl %eax, %ebx
addl -0x10(%r12,%rax,4), %r9d
addl %r8d, %r9d
cmpq %r11, %rax
jge 0x398c
movq (%rsp), %r8
movl (%r8,%rax,4), %ebp
addq $0x3, %rax
movl %ebx, %r8d
cmpl %r14d, %ebp
jle 0x390f
jmp 0x398f
movl %ebx, %r8d
movl %r10d, 0x2c(%rsp)
movl %r9d, 0x28(%rsp)
movl %ebx, 0x20(%rsp)
movq 0x70(%rsp), %rbp
movq 0xe0(%rsp), %rbx
movl 0x18(%rsp), %r13d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movslq %r8d, %rax
movl 0xc(%rsp), %r8d
movq (%rsp), %r9
subl 0x8(%r9,%rax,4), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r14d, %r8d
jge 0x39c3
jmp 0x39d5
movl %ebx, %r8d
movl %r10d, 0x2c(%rsp)
movl %r9d, 0x28(%rsp)
movl %ebx, 0x20(%rsp)
movq 0x70(%rsp), %rbp
movq %r13, %rbx
movl 0x18(%rsp), %r13d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movslq %r8d, %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq (%rsp), %r9
cmpl %r14d, -0x8(%r9,%r8,4)
jl 0x39d5
movl %r14d, %r8d
subl 0x2c(%rsp), %r8d
jl 0x39d5
addl 0x28(%rsp), %r8d
movl %r8d, %eax
movl $0x0, %r8d
testl %eax, %eax
js 0x39f3
movl %esi, 0x1d91b(%rip)     # 0x21300
movl %eax, 0x1d919(%rip)     # 0x21304
xorl %r12d, %r12d
movl %esi, %edx
movl %eax, %r8d
movslq 0x8(%rbx), %rax
movq %rax, 0x190(%rsp)
cmpq $0x2, %rax
jl 0x3d25
movl %r8d, 0x54(%rsp)
movl %edx, 0x48(%rsp)
movq %rbx, 0xe0(%rsp)
subl 0x10(%rsp), %ecx
movl 0x80(%rsp), %ebp
movl 0x88(%rsp), %edx
movl 0x8c(%rsp), %r11d
movl 0x20(%rsp), %esi
movl 0x28(%rsp), %ebx
movl 0x2c(%rsp), %r10d
movslq 0x24(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0xc4(%rsp)
movl $0x1, %r13d
movq %r15, 0x180(%rsp)
addl 0x64(%rsp), %ecx
movq 0xe0(%rsp), %rax
movl 0x18(%rax), %eax
cmpl %eax, %ecx
cmovgel %eax, %ecx
testl %r12d, %r12d
js 0x3a92
movq 0x130(%rsp), %rax
movzwl -0x2(%rax,%r13,2), %eax
addl %eax, 0xc4(%rsp)
cmpl 0xa8(%rsp), %ebp
movl %r12d, 0x78(%rsp)
jge 0x3ada
movslq %ebp, %rax
movl (%r15,%rax,4), %r8d
cmpl %ecx, %r8d
jg 0x3ada
addq $0x3, %rax
movl %edx, %r9d
movl -0x14(%r15,%rax,4), %edx
subl %r11d, %edx
movl %r8d, %r11d
movl %eax, %ebp
addl -0x10(%r15,%rax,4), %edx
addl %r9d, %edx
cmpq %rdi, %rax
jge 0x3ada
movl (%r15,%rax,4), %r8d
addq $0x3, %rax
cmpl %ecx, %r8d
jle 0x3ab0
movq 0x130(%rsp), %rax
movzwl (%rax,%r13,2), %eax
addl %eax, %r14d
movslq %ebp, %rax
movl %ecx, %r8d
subl %r11d, %r8d
leal (%r8,%rdx), %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmovll %edi, %r8d
cmpl %ecx, -0x8(%r15,%rax,4)
cmovll %edi, %r8d
testl %r8d, %r8d
js 0x3ba7
movl 0xc(%rsp), %edi
testl %edi, %edi
je 0x3bbf
cmpl 0x10(%rsp), %esi
movl %ecx, 0x60(%rsp)
jle 0x3b72
movslq %esi, %rax
movl %edi, %r9d
movq (%rsp), %rcx
subl (%rcx,%rax,4), %r9d
cmpl %r14d, %r9d
jg 0x3b72
addq $-0x3, %rax
movq (%rsp), %r12
movl %ebx, %ecx
addl 0x14(%r12,%rax,4), %r10d
movl %edi, %ebx
subl %r10d, %ebx
movl %r9d, %r10d
movl %eax, %esi
addl 0x10(%r12,%rax,4), %ebx
addl %ecx, %ebx
cmpq 0x10(%rsp), %rax
jle 0x3b72
movl %edi, %r9d
subl (%r12,%rax,4), %r9d
addq $-0x3, %rax
cmpl %r14d, %r9d
jle 0x3b3f
movslq %esi, %rax
movq (%rsp), %rcx
subl 0x8(%rcx,%rax,4), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r14d, %edi
jl 0x3c37
movl %r14d, %r9d
subl %r10d, %r9d
movq 0x40(%rsp), %rdi
jl 0x3c3c
addl %ebx, %r9d
movl %r9d, %eax
jmp 0x3c3c
movl 0x48(%rsp), %r8d
movl 0x54(%rsp), %eax
movq 0x40(%rsp), %rdi
movl 0x78(%rsp), %r12d
jmp 0x3cc9
cmpl 0x10(%rsp), %esi
jge 0x3c0b
movslq %esi, %rax
movq (%rsp), %rdi
movl (%rdi,%rax,4), %r9d
cmpl %r14d, %r9d
jg 0x3c0b
addq $0x3, %rax
movl %ebx, %edi
movq (%rsp), %r12
movl -0x14(%r12,%rax,4), %ebx
subl %r10d, %ebx
movl %r9d, %r10d
movl %eax, %esi
addl -0x10(%r12,%rax,4), %ebx
addl %edi, %ebx
cmpq 0x10(%rsp), %rax
jge 0x3c0b
movq (%rsp), %rdi
movl (%rdi,%rax,4), %r9d
addq $0x3, %rax
cmpl %r14d, %r9d
jle 0x3bd9
movslq %esi, %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq (%rsp), %r9
cmpl %r14d, -0x8(%r9,%rdi,4)
jl 0x3ce6
movl %r14d, %r9d
subl %r10d, %r9d
movq 0x40(%rsp), %rdi
jl 0x3c40
addl %ebx, %r9d
movl %r9d, %eax
jmp 0x3c40
movq 0x40(%rsp), %rdi
movl 0x60(%rsp), %ecx
testl %eax, %eax
movl 0x78(%rsp), %r12d
js 0x3c8e
testl %r12d, %r12d
js 0x3c99
movl %r8d, %edi
subl 0x48(%rsp), %edi
movl %r12d, %r9d
movl %r14d, 0x48(%rsp)
movq 0x188(%rsp), %r14
movw %di, (%r14,%r9,2)
movl %eax, %edi
subl 0x54(%rsp), %edi
movw %di, 0x2(%r14,%r9,2)
movq 0x180(%rsp), %r15
movl 0x48(%rsp), %r14d
movq 0x40(%rsp), %r9
addl $0x2, %r12d
jmp 0x3cac
movl 0x48(%rsp), %r8d
movl 0x54(%rsp), %eax
jmp 0x3cc9
movq %rdi, %r9
movl %r8d, 0x1d65d(%rip)     # 0x21300
movl %eax, 0x1d65b(%rip)     # 0x21304
xorl %r12d, %r12d
movl %r8d, 0x1d655(%rip)     # 0x21308
movl %eax, 0x1d653(%rip)     # 0x2130c
movl 0xc4(%rsp), %edi
movl %edi, 0x1d636(%rip)     # 0x212fc
movq %r9, %rdi
addq $0x2, %r13
movl %eax, 0x54(%rsp)
movl %r8d, 0x48(%rsp)
cmpq 0x190(%rsp), %r13
jb 0x3a64
jmp 0x3cf0
movq 0x40(%rsp), %rdi
jmp 0x3c40
movl %ebp, 0x80(%rsp)
movl %r11d, 0x8c(%rsp)
movl %edx, 0x88(%rsp)
movl %esi, 0x20(%rsp)
movl %r10d, 0x2c(%rsp)
movl %ebx, 0x28(%rsp)
movl 0x18(%rsp), %r13d
movq 0x70(%rsp), %rbp
movq 0xe0(%rsp), %rbx
movl %r12d, 0x1d5cc(%rip)    # 0x212f8
testl %r12d, %r12d
movl 0x5c(%rsp), %r15d
jle 0x3dea
movl 0x1d5c8(%rip), %ebx     # 0x21308
cmpl %r15d, %ebx
jle 0x4371
movl 0x1d5b0(%rip), %r12d    # 0x21300
movl 0x1d5ad(%rip), %r15d    # 0x21304
movl 0x1d5ae(%rip), %r14d    # 0x2130c
testl %r12d, %r12d
setg %al
testl %r15d, %r15d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x3de2
movq 0x1d638(%rip), %rsi     # 0x213b0
movq 0x1d639(%rip), %rdx     # 0x213b8
movl %r12d, %ecx
subl %r15d, %ecx
leal (%r15,%r12), %r8d
leaq 0x1d5d0(%rip), %rdi     # 0x21360
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
pushq $0x1
pushq $-0x1
callq 0x824a
addq $0x10, %rsp
movq 0x1d5b6(%rip), %rdi     # 0x21360
movl 0x10(%rdi), %ebp
movl 0x14(%rdi), %eax
testl %ebp, %ebp
sete %cl
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x4150
cvtsi2sdl 0xc(%rdi), %xmm0
movl %r12d, %ecx
subl %ebp, %ecx
cvtsi2sd %ecx, %xmm1
mulsd 0x17250(%rip), %xmm1    # 0x1b028
ucomisd %xmm0, %xmm1
jae 0x4150
movl %r12d, %ebp
jmp 0x41f0
movq 0x1d3bf(%rip), %rax     # 0x211b0
movq 0xd8(%rsp), %rcx
movl %ecx, 0x80(%rsp)
movq 0xa8(%rsp), %rcx
movl %ecx, 0x84(%rsp)
movq 0x100(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x8c(%rsp)
xorl %ecx, %ecx
movl %ecx, 0x88(%rsp)
movl %ecx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movq 0x1d390(%rip), %rax     # 0x211d0
movl 0xc(%rsp), %esi
testl %esi, %esi
je 0x3e6e
movl 0xb8(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movl 0xb4(%rsp), %ecx
movl %ecx, 0x24(%rsp)
movl %esi, %ecx
movq 0x120(%rsp), %rdx
subl -0x4(%rax,%rdx), %ecx
jmp 0x3e91
movq 0x118(%rsp), %rcx
movl %ecx, 0x20(%rsp)
movq 0xf8(%rsp), %rcx
movl %ecx, 0x24(%rsp)
movq 0xf0(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl %esi, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq (%rbx), %rax
movq %rax, (%rsp)
movq %rbx, %rcx
movl 0x10(%rbx), %ebx
movl %ebx, %eax
cltd
idivl 0x64(%rsp)
movl %edx, %ebp
movq %rcx, %r14
movl 0x14(%rcx), %r12d
leaq 0x80(%rsp), %rdi
movl %ebx, %esi
leaq 0x6c(%rsp), %rdx
callq 0x4575
movl %eax, %r15d
movl $0x7fffffff, 0x10(%rsp) # imm = 0x7FFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x78(%rsp)
testl %r15d, %r15d
js 0x3f24
leaq 0x20(%rsp), %rdi
movl %r12d, %esi
leaq 0x68(%rsp), %rdx
callq 0x4575
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x3f29
movl 0x68(%rsp), %ecx
addl 0x6c(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movl %r15d, %ecx
movq %rcx, 0x78(%rsp)
movl %eax, %ecx
jmp 0x3f29
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %r14, %rax
movl 0x8(%r14), %r14d
cmpl $0x2, %r14d
movq %rcx, 0x48(%rsp)
jl 0x3fb7
subl %ebp, %ebx
movl 0x18(%rax), %ebp
movl $0x1, %r13d
movl %r12d, %eax
addl 0x64(%rsp), %ebx
movq (%rsp), %rcx
movzwl (%rcx,%r13,2), %r12d
addl %eax, %r12d
cmpl %ebp, %ebx
cmovgel %ebp, %ebx
leaq 0x80(%rsp), %rdi
movl %ebx, %esi
leaq 0x6c(%rsp), %rdx
callq 0x4575
testl %eax, %eax
js 0x3fae
movl %eax, %r15d
leaq 0x20(%rsp), %rdi
movl %r12d, %esi
leaq 0x68(%rsp), %rdx
callq 0x4575
testl %eax, %eax
js 0x3fae
movl 0x68(%rsp), %ecx
addl 0x6c(%rsp), %ecx
cmpl 0x10(%rsp), %ecx
jge 0x3fae
movl %r15d, %edx
movq %rdx, 0x78(%rsp)
movq %rax, 0x48(%rsp)
movl %ecx, 0x10(%rsp)
addq $0x2, %r13
cmpl %r13d, %r14d
jg 0x3f46
movq 0x78(%rsp), %r10
testl %r10d, %r10d
js 0x4186
movl 0x5c(%rsp), %r15d
cmpl %r15d, %r10d
movl 0x18(%rsp), %r13d
movq 0x70(%rsp), %rbp
jle 0x4371
movl %r10d, %eax
movq 0x48(%rsp), %r9
subl %r9d, %eax
movl 0x10(%rsp), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
leal (%rcx,%r10), %edx
movl 0x58(%rsp), %edi
movl %edi, %esi
subl %r10d, %esi
cmpl %edi, %edx
cmovlel %ecx, %esi
leal (%rsi,%r9), %ecx
movl 0x1c(%rsp), %edx
movl %edx, %edi
subl %r9d, %edi
cmpl %edx, %ecx
cmovlel %esi, %edi
cmpl %edi, %r10d
cmovll %r10d, %edi
cmpl %edi, %r9d
cmovll %r9d, %edi
movl $0x1f4, %ecx            # imm = 0x1F4
cmpl %ecx, %edi
cmovgel %ecx, %edi
leal (%rdi,%rdi), %r11d
movq 0x1d374(%rip), %rsi     # 0x213b0
movq 0x1d375(%rip), %rdx     # 0x213b8
leal (%rax,%rdi,2), %r8d
movl %eax, %ecx
subl %r11d, %ecx
addl %r10d, %r9d
leaq 0x1d30a(%rip), %rdi     # 0x21360
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
pushq %rax
pushq %rax
callq 0x4a29
addq $0x10, %rsp
movq 0x1d2f3(%rip), %rax     # 0x21360
movl 0x18(%rax), %ecx
subl 0x10(%rax), %ecx
cmpl 0x1d123(%rip), %ecx     # 0x2119c
jl 0x4371
cvtsi2sdl 0xc(%rax), %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x16f98(%rip), %xmm1    # 0x1b028
ucomisd %xmm0, %xmm1
jb 0x4371
movq 0xc8(%rsp), %rcx
movl %ecx, 0x1d26c(%rip)     # 0x21314
movq 0xd0(%rsp), %rcx
movl %ecx, 0x1d262(%rip)     # 0x21318
movl 0x1d2ac(%rip), %ecx     # 0x21368
movl %ecx, 0x1d24e(%rip)     # 0x21310
movupd (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movupd %xmm1, 0x1d22d(%rip)    # 0x21300
movupd %xmm0, 0x1d215(%rip)    # 0x212f0
movslq 0x8(%rax), %rsi
testq %rsi, %rsi
jle 0x4121
movq (%rax), %rdi
movl 0x1d0aa(%rip), %r8d     # 0x21198
movl 0x10(%rax), %ecx
movl 0x18(%rax), %r9d
movl %ecx, %eax
cltd
idivl %r8d
movl %ecx, %eax
subl %edx, %eax
xorl %edx, %edx
addl %r8d, %eax
cmpl %r9d, %eax
cmovgel %r9d, %eax
movl %eax, %r10d
subl %ecx, %r10d
movw %r10w, (%rdi,%rdx,2)
addq $0x2, %rdx
movl %eax, %ecx
cmpq %rsi, %rdx
jb 0x4101
movq 0x1d0c0(%rip), %rdi     # 0x211e8
leaq 0x1d1c1(%rip), %rsi     # 0x212f0
movl $0x2, %edx
callq 0xa5ec
incq 0x1d0b0(%rip)           # 0x211f0
movq 0x1d219(%rip), %rax     # 0x21360
movl 0x18(%rax), %r15d
jmp 0x4371
leal -0xa(%r12), %ecx
cmpl %ebp, %ecx
jge 0x419a
cmpl $0x0, 0x1d198(%rip)     # 0x212f8
jle 0x4178
movq 0x1d187(%rip), %rcx     # 0x212f0
subl %ebp, %r12d
addw %r12w, (%rcx)
subl %eax, %r15d
addw %r15w, 0x2(%rcx)
movl %ebp, 0x1d182(%rip)     # 0x21300
movl %eax, 0x1d180(%rip)     # 0x21304
jmp 0x41f0
movl 0x18(%rsp), %r13d
movq 0x70(%rsp), %rbp
movl 0x5c(%rsp), %r15d
jmp 0x4371
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x41df
movq (%rdi), %rsi
movl 0x1cfeb(%rip), %r8d     # 0x21198
movl %ebp, %eax
cltd
idivl %r8d
movl %ebp, %eax
subl %edx, %eax
movl 0x18(%rdi), %edx
xorl %r9d, %r9d
movl %ebp, %r10d
addl %r8d, %eax
cmpl %edx, %eax
cmovgel %edx, %eax
movl %eax, %r11d
subl %r10d, %r11d
movw %r11w, (%rsi,%r9,2)
addq $0x2, %r9
movl %eax, %r10d
cmpq %rcx, %r9
jb 0x41c0
leaq 0x1d10a(%rip), %rsi     # 0x212f0
movl $0x2, %edx
callq 0x4403
cmpl 0x58(%rsp), %ebx
jge 0x426b
cmpl 0x1c(%rsp), %r14d
jge 0x426b
movq 0x1d1ac(%rip), %rsi     # 0x213b0
movq 0x1d1ad(%rip), %rdx     # 0x213b8
movl %ebx, %ecx
subl %r14d, %ecx
leal (%r14,%rbx), %r8d
leaq 0x1d16d(%rip), %rdi     # 0x21388
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
pushq $0x0
pushq $-0x1
callq 0x824a
addq $0x10, %rsp
movq 0x1d153(%rip), %rsi     # 0x21388
movl 0x18(%rsi), %r15d
movl 0x1c(%rsi), %eax
cmpl 0x58(%rsp), %r15d
je 0x4273
cmpl 0x1c(%rsp), %eax
je 0x4273
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsi), %xmm0
movl %r15d, %ecx
subl %ebx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x16dc3(%rip), %xmm1    # 0x1b028
ucomisd %xmm0, %xmm1
jae 0x4273
movl %ebx, %r15d
jmp 0x4304
leal 0xa(%rbx), %ecx
cmpl %r15d, %ecx
jle 0x42b1
movslq 0x1d076(%rip), %rcx     # 0x212f8
testq %rcx, %rcx
jle 0x42a2
movq 0x1d062(%rip), %rdx     # 0x212f0
movl %r15d, %esi
subl %ebx, %esi
addw %si, -0x4(%rdx,%rcx,2)
movl %eax, %esi
subl %r14d, %esi
addw %si, -0x2(%rdx,%rcx,2)
movl %r15d, 0x1d05f(%rip)    # 0x21308
movl %eax, 0x1d05d(%rip)     # 0x2130c
jmp 0x4304
movslq 0x8(%rsi), %rdi
testq %rdi, %rdi
jle 0x42f3
movq (%rsi), %r8
movl 0x1ced4(%rip), %r9d     # 0x21198
movl 0x10(%rsi), %ecx
movl %ecx, %eax
cltd
idivl %r9d
movl %ecx, %eax
subl %edx, %eax
xorl %edx, %edx
addl %r9d, %eax
cmpl %r15d, %eax
cmovgel %r15d, %eax
movl %eax, %r10d
subl %ecx, %r10d
movw %r10w, (%r8,%rdx,2)
addq $0x2, %rdx
movl %eax, %ecx
cmpq %rdi, %rdx
jb 0x42d3
leaq 0x1cff6(%rip), %rdi     # 0x212f0
movl $0x1, %edx
callq 0x4403
movl %r15d, %eax
subl %ebp, %eax
cmpl 0x1ce8d(%rip), %eax     # 0x2119c
jl 0x4362
movl 0x1ce89(%rip), %eax     # 0x211a0
addl 0xc8(%rsp), %eax
movl %eax, 0x1cff0(%rip)     # 0x21314
movl 0x1ce7a(%rip), %eax     # 0x211a4
addl 0xd0(%rsp), %eax
movl %eax, 0x1cfe1(%rip)     # 0x21318
movl 0x1d02b(%rip), %eax     # 0x21368
movl %eax, 0x1cfcd(%rip)     # 0x21310
movq 0x1ce9e(%rip), %rdi     # 0x211e8
leaq 0x1cf9f(%rip), %rsi     # 0x212f0
movl $0x2, %edx
callq 0xa5ec
incq 0x1ce8e(%rip)           # 0x211f0
movl $0x0, 0x1d068(%rip)     # 0x213d4
movq 0x70(%rsp), %rbp
testb $0x1, 0x1cff0(%rip)     # 0x21368
je 0x438a
movq 0x1cff7(%rip), %rdi     # 0x21378
movl 0x1c(%rsp), %esi
callq 0xab20
movl 0xbc(%rsp), %r9d
movl 0xc0(%rsp), %r8d
movq 0x128(%rsp), %r10
incq %r10
cmpl %r10d, %r8d
jne 0x3510
movq 0xd0(%rsp), %rcx
incq %rcx
cmpq 0x158(%rsp), %rcx
jne 0x3412
movq 0xa0(%rsp), %rax
cmpl %r13d, %eax
jl 0x3333
movq 0xc8(%rsp), %rax
incq %rax
cmpq 0x138(%rsp), %rax
jne 0x3220
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq