// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x28d62(%rip), %eax     # 0x2c440
jl 0x36eb
movl -0x4(%rbp), %eax
cmpl 0x28d5b(%rip), %eax     # 0x2c444
jl 0x36f0
jmp 0x4419
cmpq $0x0, 0x28f40(%rip)     # 0x2c638
jne 0x3753
movq 0x28a77(%rip), %rsi     # 0x2c178
addq $0x10, %rsi
movsd 0x23913(%rip), %xmm0    # 0x27020
movl $0x64, %edi
movl $0x1, %edx
callq 0x52f0
movq %rax, 0x28f1d(%rip)     # 0x2c640
movb $0x0, %al
callq 0x51a0
movq %rax, 0x28f07(%rip)     # 0x2c638
movq 0x28a68(%rip), %rax     # 0x2c1a0
leaq 0x28e69(%rip), %rcx     # 0x2c5a8
movq %rcx, (%rax)
movq 0x28a5f(%rip), %rax     # 0x2c1a8
leaq 0x28e78(%rip), %rcx     # 0x2c5c8
movq %rcx, (%rax)
movq 0x28cee(%rip), %rax     # 0x2c448
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x70(%rbp)
movq 0x28cd8(%rip), %rax     # 0x2c448
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x4419
movq 0x28ca3(%rip), %rax     # 0x2c430
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x2, %rax
movl %eax, -0x74(%rbp)
movq 0x28c8d(%rip), %rax     # 0x2c430
movl -0x6c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x78(%rbp)
movq 0x28c7e(%rip), %rax     # 0x2c438
movslq -0x74(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x80(%rbp)
movq 0x28c6d(%rip), %rax     # 0x2c438
movl -0x78(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
subl -0x80(%rbp), %eax
cmpl 0x28c36(%rip), %eax     # 0x2c41c
jge 0x37ed
jmp 0x440b
movq 0x28984(%rip), %rax     # 0x2c178
movq 0x58(%rax), %rcx
movq 0x28979(%rip), %rax     # 0x2c178
movq 0x60(%rax), %rax
movslq -0x6c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
addq 0x10(%rax), %rcx
movq 0x2898f(%rip), %rax     # 0x2c1a8
movq %rcx, 0x10(%rax)
movq 0x2897c(%rip), %rax     # 0x2c1a0
movq %rcx, 0x10(%rax)
movq 0x28949(%rip), %rax     # 0x2c178
movq 0x60(%rax), %rax
movslq -0x6c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movl %ecx, -0x84(%rbp)
movq 0x2895a(%rip), %rax     # 0x2c1a8
movl %ecx, 0x20(%rax)
movq 0x28948(%rip), %rax     # 0x2c1a0
movl %ecx, 0x20(%rax)
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4409
movq -0x10(%rbp), %rax
movslq -0x8c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
movl %eax, -0x9c(%rbp)
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x11d(%rbp)
jge 0x38d5
movq -0x10(%rbp), %rax
movslq -0x90(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
cmpl -0x9c(%rbp), %eax
sete %al
movb %al, -0x11d(%rbp)
movb -0x11d(%rbp), %al
testb $0x1, %al
jne 0x38e1
jmp 0x38f4
jmp 0x38e3
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x389e
movl -0x9c(%rbp), %eax
cmpl 0x28b60(%rip), %eax     # 0x2c460
jl 0x3910
movl -0x9c(%rbp), %eax
cmpl 0x28b56(%rip), %eax     # 0x2c464
jl 0x3915
jmp 0x43f8
movq 0x28b4c(%rip), %rax     # 0x2c468
movl -0x9c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa4(%rbp)
movq 0x28b30(%rip), %rax     # 0x2c468
movslq -0x9c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
cmpl -0xa4(%rbp), %eax
jge 0x43f6
movq 0x28aef(%rip), %rax     # 0x2c450
movslq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x2, %rax
movl %eax, -0xa8(%rbp)
movq 0x28ad3(%rip), %rax     # 0x2c450
movl -0xa0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0xac(%rbp)
movq 0x28abe(%rip), %rax     # 0x2c458
movslq -0xa8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xb4(%rbp)
movq 0x28aa7(%rip), %rax     # 0x2c458
movl -0xac(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
subl -0xb4(%rbp), %eax
cmpl 0x28a44(%rip), %eax     # 0x2c41c
jge 0x39df
jmp 0x43e2
movl $0xffffffff, -0xbc(%rbp) # imm = 0xFFFFFFFF
movl -0x8c(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x90(%rbp), %eax
jge 0x43e0
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3a87
movq 0x28a14(%rip), %rax     # 0x2c458
movl -0xa8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movq -0x98(%rbp), %rcx
subl 0x1c(%rcx), %eax
movl %eax, -0xc4(%rbp)
movl -0xc0(%rbp), %eax
movq -0x98(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0xc8(%rbp)
jmp 0x3ab1
movl $0x0, -0xc0(%rbp)
movq -0x98(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0xc4(%rbp)
movq -0x98(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0xc8(%rbp)
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
movl -0x7c(%rbp), %ecx
subl 0x28958(%rip), %ecx     # 0x2c41c
cmpl %ecx, %eax
jg 0x43ca
movq -0x98(%rbp), %rax
movl 0x18(%rax), %eax
movl -0x80(%rbp), %ecx
addl 0x2893d(%rip), %ecx     # 0x2c41c
cmpl %ecx, %eax
jl 0x43ca
movl -0xc4(%rbp), %eax
movl -0xb0(%rbp), %ecx
subl 0x28923(%rip), %ecx     # 0x2c41c
cmpl %ecx, %eax
jg 0x43ca
movl -0xc8(%rbp), %eax
movl -0xb4(%rbp), %ecx
addl 0x28909(%rip), %ecx     # 0x2c41c
cmpl %ecx, %eax
jl 0x43ca
movq 0x2865e(%rip), %rax     # 0x2c180
movq 0x58(%rax), %rcx
movq 0x28653(%rip), %rax     # 0x2c180
movq 0x60(%rax), %rax
movslq -0xa0(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
addq 0x10(%rax), %rcx
movq 0x2865e(%rip), %rax     # 0x2c1a8
movq %rcx, 0x18(%rax)
movq 0x2864b(%rip), %rax     # 0x2c1a0
movq %rcx, 0x18(%rax)
movq 0x28620(%rip), %rax     # 0x2c180
movq 0x60(%rax), %rax
movslq -0xa0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movl %ecx, -0xb8(%rbp)
movq 0x28626(%rip), %rax     # 0x2c1a8
movl %ecx, 0x24(%rax)
movq 0x28614(%rip), %rax     # 0x2c1a0
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
movq 0x285fd(%rip), %rax     # 0x2c1a8
movl %ecx, 0x8(%rax)
movq 0x285eb(%rip), %rax     # 0x2c1a0
movl %ecx, 0x8(%rax)
movq 0x285e1(%rip), %rax     # 0x2c1a0
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3be0
movq 0x285cf(%rip), %rax     # 0x2c1a0
movq 0x18(%rax), %rdi
movl -0xb8(%rbp), %esi
callq 0xf000
movq -0x40(%rbp), %rdi
movq 0x2884d(%rip), %rsi     # 0x2c438
movl -0x74(%rbp), %edx
movl -0x78(%rbp), %ecx
xorl %r8d, %r8d
callq 0x4430
movq -0x68(%rbp), %rdi
movq 0x28854(%rip), %rsi     # 0x2c458
movl -0xa8(%rbp), %edx
movl -0xac(%rbp), %ecx
movl -0xc0(%rbp), %r8d
callq 0x4430
movq 0x28575(%rip), %rdi     # 0x2c198
movq -0x98(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x44d0
cmpl $0x0, %eax
jne 0x3ef5
movq -0x40(%rbp), %rdi
movq 0x287ed(%rip), %rsi     # 0x2c438
movl -0x74(%rbp), %edx
movl -0x78(%rbp), %ecx
xorl %r8d, %r8d
callq 0x4430
movq -0x68(%rbp), %rdi
movq 0x287f4(%rip), %rsi     # 0x2c458
movl -0xa8(%rbp), %edx
movl -0xac(%rbp), %ecx
movl -0xc0(%rbp), %r8d
callq 0x4430
movq -0x98(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0xcc(%rbp), %rcx
leaq -0xd0(%rbp), %r8
leaq -0xd4(%rbp), %r9
callq 0x4740
cmpl $0x0, %eax
je 0x3ef0
movl -0xcc(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jle 0x3eee
movl -0xcc(%rbp), %eax
subl -0xd0(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xd4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0xd4(%rbp)
movl -0xcc(%rbp), %eax
addl -0xd4(%rbp), %eax
cmpl -0x84(%rbp), %eax
jle 0x3d0c
movl -0x84(%rbp), %eax
subl -0xcc(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd0(%rbp), %eax
addl -0xd4(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jle 0x3d32
movl -0xb8(%rbp), %eax
subl -0xd0(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0xd4(%rbp), %eax
jge 0x3d4c
movl -0xcc(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0xd4(%rbp), %eax
jge 0x3d66
movl -0xd0(%rbp), %eax
movl %eax, -0xd4(%rbp)
cmpl $0x1f4, -0xd4(%rbp)     # imm = 0x1F4
jle 0x3d7c
movl $0x1f4, -0xd4(%rbp)     # imm = 0x1F4
movl -0xd4(%rbp), %eax
shll %eax
movl %eax, -0xd4(%rbp)
movq 0x2840f(%rip), %rdi     # 0x2c1a0
movq 0x288a0(%rip), %rsi     # 0x2c638
movq 0x288a1(%rip), %rdx     # 0x2c640
movl -0xdc(%rbp), %ecx
subl -0xd4(%rbp), %ecx
movl -0xdc(%rbp), %r8d
addl -0xd4(%rbp), %r8d
movl -0xcc(%rbp), %r9d
addl -0xd0(%rbp), %r9d
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
callq 0x56f0
movq 0x283be(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
movl 0x18(%rax), %eax
movq 0x283b1(%rip), %rcx     # 0x2c1a0
movq (%rcx), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl 0x28615(%rip), %eax     # 0x2c41c
jl 0x3eec
movq 0x2838c(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
cvtsi2sdl 0xc(%rax), %xmm1
cvtsi2sdl -0xd8(%rbp), %xmm2
movsd 0x231fc(%rip), %xmm0    # 0x27028
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x3eec
movl -0x6c(%rbp), %ecx
movq 0x2834c(%rip), %rax     # 0x2c190
movl %ecx, 0x24(%rax)
movl -0xa0(%rbp), %ecx
movq 0x2833c(%rip), %rax     # 0x2c190
movl %ecx, 0x28(%rax)
movq 0x28342(%rip), %rax     # 0x2c1a0
movl 0x8(%rax), %ecx
movq 0x28328(%rip), %rax     # 0x2c190
movl %ecx, 0x20(%rax)
movq 0x2832e(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
movq (%rax), %rcx
movq %rcx, 0x286f9(%rip)     # 0x2c578
movq 0x8(%rax), %rcx
movq %rcx, 0x286f6(%rip)     # 0x2c580
movq 0x10(%rax), %rcx
movq %rcx, 0x286f3(%rip)     # 0x2c588
movq 0x18(%rax), %rax
movq %rax, 0x286f0(%rip)     # 0x2c590
movq 0x282f9(%rip), %rax     # 0x2c1a0
movq (%rax), %rdi
callq 0x48c0
movq 0x285ba(%rip), %rdi     # 0x2c470
movq 0x282d3(%rip), %rsi     # 0x2c190
movl $0x2, %edx
callq 0xe710
movq 0x285aa(%rip), %rax     # 0x2c478
addq $0x1, %rax
movq %rax, 0x2859f(%rip)     # 0x2c478
movq 0x282c0(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
movl 0x18(%rax), %eax
movl %eax, -0xbc(%rbp)
jmp 0x3eee
jmp 0x3ef0
jmp 0x43a0
movq 0x2829c(%rip), %rax     # 0x2c198
movl 0x18(%rax), %eax
cmpl -0xbc(%rbp), %eax
jle 0x439e
movq 0x28286(%rip), %rax     # 0x2c198
movl 0x10(%rax), %eax
movl %eax, -0xe0(%rbp)
movq 0x28276(%rip), %rax     # 0x2c198
movl 0x14(%rax), %eax
movl %eax, -0xe4(%rbp)
movq 0x28266(%rip), %rax     # 0x2c198
movl 0x18(%rax), %eax
movl %eax, -0xe8(%rbp)
movq 0x28256(%rip), %rax     # 0x2c198
movl 0x1c(%rax), %eax
movl %eax, -0xec(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x0, -0xe0(%rbp)
jle 0x4112
cmpl $0x0, -0xe4(%rbp)
jle 0x4112
movq 0x2821c(%rip), %rdi     # 0x2c1a0
movq 0x286ad(%rip), %rsi     # 0x2c638
movq 0x286ae(%rip), %rdx     # 0x2c640
movl -0xe0(%rbp), %ecx
subl -0xe4(%rbp), %ecx
movl -0xe0(%rbp), %r8d
addl -0xe4(%rbp), %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x1, 0x8(%rsp)
callq 0xae40
movq 0x281d3(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0xf0(%rbp)
movq 0x281c0(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
movl 0x14(%rax), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x4033
cmpl $0x0, -0xf4(%rbp)
je 0x4033
movq 0x2819b(%rip), %rax     # 0x2c1a0
movq (%rax), %rax
cvtsi2sdl 0xc(%rax), %xmm1
movl -0xe0(%rbp), %eax
subl -0xf0(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0x23003(%rip), %xmm0    # 0x27028
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x40f8
movl -0xe0(%rbp), %eax
subl $0xa, %eax
cmpl -0xf0(%rbp), %eax
jge 0x40cc
movq 0x28149(%rip), %rax     # 0x2c198
movq (%rax), %rax
movq %rax, -0x108(%rbp)
movq 0x28138(%rip), %rax     # 0x2c198
movl 0x8(%rax), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x0, -0x10c(%rbp)
jle 0x40aa
movl -0xe0(%rbp), %edx
subl -0xf0(%rbp), %edx
movq -0x108(%rbp), %rax
movzwl (%rax), %ecx
addl %edx, %ecx
movw %cx, (%rax)
movl -0xe4(%rbp), %edx
subl -0xf4(%rbp), %edx
movq -0x108(%rbp), %rax
movzwl 0x2(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x2(%rax)
movl -0xf0(%rbp), %ecx
movq 0x280e1(%rip), %rax     # 0x2c198
movl %ecx, 0x10(%rax)
movl -0xf4(%rbp), %ecx
movq 0x280d1(%rip), %rax     # 0x2c198
movl %ecx, 0x14(%rax)
jmp 0x40f6
movq 0x280cd(%rip), %rax     # 0x2c1a0
movq (%rax), %rdi
callq 0x48c0
movq 0x280be(%rip), %rax     # 0x2c1a0
movq (%rax), %rdi
movq 0x280ac(%rip), %rsi     # 0x2c198
movl $0x2, %edx
callq 0x4960
jmp 0x4110
movl -0xe0(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0xf4(%rbp)
jmp 0x4112
movl -0xe8(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0xec(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0xe8(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0x4309
movl -0xec(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jge 0x4309
movq 0x28053(%rip), %rdi     # 0x2c1a8
movq 0x284dc(%rip), %rsi     # 0x2c638
movq 0x284dd(%rip), %rdx     # 0x2c640
movl -0xe8(%rbp), %ecx
subl -0xec(%rbp), %ecx
movl -0xe8(%rbp), %r8d
addl -0xec(%rbp), %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
callq 0xae40
movq 0x28008(%rip), %rax     # 0x2c1a8
movq (%rax), %rax
movl 0x18(%rax), %eax
movl %eax, -0xf8(%rbp)
movq 0x27ff5(%rip), %rax     # 0x2c1a8
movq (%rax), %rax
movl 0x1c(%rax), %eax
movl %eax, -0xfc(%rbp)
movl -0xf8(%rbp), %eax
cmpl -0x84(%rbp), %eax
je 0x4210
movl -0xfc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
je 0x4210
movq 0x27fc6(%rip), %rax     # 0x2c1a8
movq (%rax), %rax
cvtsi2sdl 0xc(%rax), %xmm1
movl -0xf8(%rbp), %eax
subl -0xe8(%rbp), %eax
cvtsi2sd %eax, %xmm2
movsd 0x22e26(%rip), %xmm0    # 0x27028
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x42ef
movl -0xe8(%rbp), %eax
addl $0xa, %eax
cmpl -0xf8(%rbp), %eax
jle 0x42c3
movq 0x27f6c(%rip), %rax     # 0x2c198
movq (%rax), %rax
movq %rax, -0x118(%rbp)
movq 0x27f5b(%rip), %rax     # 0x2c198
movl 0x8(%rax), %eax
movl %eax, -0x11c(%rbp)
cmpl $0x0, -0x11c(%rbp)
jle 0x42a1
movl -0xf8(%rbp), %esi
subl -0xe8(%rbp), %esi
movq -0x118(%rbp), %rax
movl -0x11c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %edx
addl %esi, %edx
movw %dx, (%rax,%rcx,2)
movl -0xfc(%rbp), %esi
subl -0xec(%rbp), %esi
movq -0x118(%rbp), %rax
movl -0x11c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %edx
addl %esi, %edx
movw %dx, (%rax,%rcx,2)
movl -0xf8(%rbp), %ecx
movq 0x27eea(%rip), %rax     # 0x2c198
movl %ecx, 0x18(%rax)
movl -0xfc(%rbp), %ecx
movq 0x27eda(%rip), %rax     # 0x2c198
movl %ecx, 0x1c(%rax)
jmp 0x42ed
movq 0x27ede(%rip), %rax     # 0x2c1a8
movq (%rax), %rdi
callq 0x48c0
movq 0x27ebf(%rip), %rdi     # 0x2c198
movq 0x27ec8(%rip), %rax     # 0x2c1a8
movq (%rax), %rsi
movl $0x1, %edx
callq 0x4960
jmp 0x4307
movl -0xe8(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0xec(%rbp), %eax
movl %eax, -0xfc(%rbp)
jmp 0x4309
movl -0xf8(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0xf8(%rbp), %eax
subl -0xf0(%rbp), %eax
cmpl 0x280f5(%rip), %eax     # 0x2c41c
jl 0x4390
movl 0x280f5(%rip), %ecx     # 0x2c424
addl -0x6c(%rbp), %ecx
movq 0x27e57(%rip), %rax     # 0x2c190
movl %ecx, 0x24(%rax)
movl 0x280e6(%rip), %ecx     # 0x2c428
addl -0xa0(%rbp), %ecx
movq 0x27e41(%rip), %rax     # 0x2c190
movl %ecx, 0x28(%rax)
movq 0x27e47(%rip), %rax     # 0x2c1a0
movl 0x8(%rax), %ecx
movq 0x27e2d(%rip), %rax     # 0x2c190
movl %ecx, 0x20(%rax)
movq 0x28103(%rip), %rdi     # 0x2c470
movq 0x27e1c(%rip), %rsi     # 0x2c190
movl $0x2, %edx
callq 0xe710
movq 0x280f3(%rip), %rax     # 0x2c478
addq $0x1, %rax
movq %rax, 0x280e8(%rip)     # 0x2c478
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x4960
jmp 0x43a0
movq 0x27df9(%rip), %rax     # 0x2c1a0
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x43c8
movq 0x27de7(%rip), %rax     # 0x2c1a0
movq 0x18(%rax), %rdi
movl -0xb8(%rbp), %esi
callq 0xf000
jmp 0x43ca
jmp 0x43cc
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x39f5
jmp 0x43e2
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x3948
jmp 0x43f8
movl -0x90(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x3865
jmp 0x440b
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x377a
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)