// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/REPtrim.c
// Function: main
int main(int argc, char *argv[])
{ int c;

  //  Process arguments

  Prog_Name = Strdup("REPtrim","");

  if (argc < 2)
    { fprintf(stderr,"Usage: %s %s\n",Prog_Name,Usage);
      exit (1);
    }

  //  Open trimmed DB and .qual and .trim tracks

  for (c = 1; c < argc; c++)

    { DAZZ_DB    _DB, *DB  = &_DB;
      DAZZ_EXTRA ex_hgap, ex_cest, ex_good, ex_bad, ex_trim;

      //  Load DB

      { int status;

        status = Open_DB(argv[c],DB);
        if (status < 0)
          exit (1);
        if (status == 1)
          { fprintf(stderr,"%s: Cannot be called on a .dam index: %s\n",Prog_Name,argv[1]);
            exit (1);
          }
        Trim_DB(DB);
      }

      //  Get .trim track extras

      { FILE *afile;
        char *aname;
        int   extra, tracklen, size;

        afile = NULL;
        if (DB->part)
          { aname = Strdup(Catenate(DB->path,Numbered_Suffix(".",DB->part,"."),"trim",".anno"),
                           "Allocating anno file");
            if (aname == NULL)
              exit (1);
            afile  = fopen(aname,"r");
            if (afile == NULL)
              { fprintf(stderr,"%s: Must have a 'trim.%d' track, run DAStrim\n",Prog_Name,DB->part);
                exit (1);
              }
          }
        else
          { aname = Strdup(Catenate(DB->path,".","trim",".anno"),"Allocating anno file");
            if (aname == NULL)
              exit (1);
            afile = fopen(aname,"r");
            if (afile == NULL)
              { fprintf(stderr,"%s: Must have a 'trim' track, run DAStrim\n",Prog_Name);
                exit (1);
              }
          }

        fread(&tracklen,sizeof(int),1,afile);
        fread(&size,sizeof(int),1,afile);
        fseeko(afile,0,SEEK_END);
        extra = ftell(afile) - (size*(tracklen+1) + 2*sizeof(int));
        fseeko(afile,-extra,SEEK_END);
        ex_hgap.nelem = 0;
        if (Read_Extra(afile,aname,&ex_hgap) != 0)
          { fprintf(stderr,"%s: Hgap threshold extra missing from .trim track?\n",Prog_Name);
            exit (1);
          }
        ex_cest.nelem = 0;
        if (Read_Extra(afile,aname,&ex_cest) != 0)
          { fprintf(stderr,"%s: Coverage estimate extra missing from .trim track?\n",Prog_Name);
            exit (1);
          }
        ex_good.nelem = 0;
        if (Read_Extra(afile,aname,&ex_good) != 0)
          { fprintf(stderr,"%s: Good QV threshold extra missing from .trim track?\n",Prog_Name);
            exit (1);
          }
        ex_bad.nelem = 0;
        if (Read_Extra(afile,aname,&ex_bad) != 0)
          { fprintf(stderr,"%s: Bad QV threshdold extra missing from .trim track?\n",Prog_Name);
            exit (1);
          }
        ex_trim.nelem = 0;
        if (Read_Extra(afile,aname,&ex_trim) != 0)
          { fprintf(stderr,"%s: Trimming statistics extra missing from .trim track?\n",Prog_Name);
            exit (1);
          }
        fclose(afile);
      }

      //  Generate Display

      { char       *root;
        int64       nreads, totlen;
        int64       nelim, nelimbp;
        int64       n5trm, n5trmbp;
        int64       n3trm, n3trmbp;
        int64       natrm, natrmbp;
        int64       ngaps, ngapsbp;
        int64       nlowq, nlowqbp;
        int64       nspan, nspanbp;
        int64       nchim, nchimbp;
        int         rlog, blog;
        int         cover, hgap_min;
        int         bad_qv, good_qv;
        int64      *tstats;

        //  Get relevant variables

        root   = Root(argv[c],".db");
        nreads = DB->nreads;
        totlen = DB->totlen;

        hgap_min = (int) ((int64 *) (ex_hgap.value))[0];
        cover    = (int) ((int64 *) (ex_cest.value))[0];
        good_qv  = (int) ((int64 *) (ex_good.value))[0];
        bad_qv   = (int) ((int64 *) (ex_bad.value))[0];
        tstats   = (int64 *) (ex_trim.value);

        nelim   = tstats[0];
        n5trm   = tstats[1];
        n3trm   = tstats[2];
        natrm   = tstats[3];
        nelimbp = tstats[4];
        n5trmbp = tstats[5];
        n3trmbp = tstats[6];
        natrmbp = tstats[7];

        ngaps   = tstats[8];
        nlowq   = tstats[9];
        nspan   = tstats[10];
        nchim   = tstats[11];
        ngapsbp = tstats[12];
        nlowqbp = tstats[13];
        nspanbp = tstats[14];
        nchimbp = tstats[15];

        printf("\nDAStrim");
        if (hgap_min > 0)
          printf(" [-H%d]",hgap_min);
        printf(" -c%d -g%d -b%d %s\n\n",cover,good_qv,bad_qv,root);

        //  Compensate for HGAP

        if (hgap_min > 0)
          { int i;

            for (i = 0; i < DB->nreads; i++)
              if (DB->reads[i].rlen < hgap_min)
                { nreads -= 1;
                  totlen -= DB->reads[i].rlen;
                }
          }

        //  Compute maximum field widths of statistics

        { int64 mult;

          rlog = 0;
          mult = 1;
          while (mult <= nreads || mult <= ngaps)
            { mult *= 10;
              rlog += 1;
            }
          if (rlog <= 3)
            rlog = 3;
          else
            rlog += (rlog-1)/3;
  
          blog = 0;
          mult = 1;
          while (mult <= totlen)
            { mult *= 10;
              blog += 1;
            }
          if (blog <= 3)
            blog = 3;
          else
            blog += (blog-1)/3;
        }

        //  Display the statistices

        printf("  Input:    ");
        Print_Number((int64) nreads,rlog,stdout);
        printf(" (100.0%%) reads     ");
        Print_Number(totlen,blog,stdout);
        printf(" (100.0%%) bases");
        if (hgap_min > 0)
          { printf(" (another ");
            Print_Number((int64) (DB->nreads-nreads),0,stdout);
            printf(" were < H-length)");
          }
        printf("\n");

        printf("  Trimmed:  ");
        Print_Number(nelim,rlog,stdout);
        printf(" (%5.1f%%) reads     ",(100.*nelim)/nreads);
        Print_Number(nelimbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*nelimbp)/totlen);

        printf("  5' trim:  ");
        Print_Number(n5trm,rlog,stdout);
        printf(" (%5.1f%%) reads     ",(100.*n5trm)/nreads);
        Print_Number(n5trmbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*n5trmbp)/totlen);

        printf("  3' trim:  ");
        Print_Number(n3trm,rlog,stdout);
        printf(" (%5.1f%%) reads     ",(100.*n3trm)/nreads);
        Print_Number(n3trmbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*n3trmbp)/totlen);

        printf("  Adapter:  ");
        Print_Number(natrm,rlog,stdout);
        printf(" (%5.1f%%) reads     ",(100.*natrm)/nreads);
        Print_Number(natrmbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*natrmbp)/totlen);

        printf("\n");

        printf("  Gaps:     ");
        Print_Number(ngaps,rlog,stdout);
        printf(" (%5.1f%%) gaps      ",(100.*(ngaps))/nreads);
        Print_Number(ngapsbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(ngapsbp))/totlen);

        printf("    Low QV: ");
        Print_Number(nlowq,rlog,stdout);
        printf(" (%5.1f%%) gaps      ",(100.*(nlowq))/nreads);
        Print_Number(nlowqbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(nlowqbp))/totlen);

        printf("    Span'd: ");
        Print_Number(nspan,rlog,stdout);
        printf(" (%5.1f%%) gaps      ",(100.*(nspan))/nreads);
        Print_Number(nspanbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(nspanbp))/totlen);

        printf("    Break:  ");
        Print_Number(nchim,rlog,stdout);
        printf(" (%5.1f%%) gaps      ",(100.*(nchim))/nreads);
        Print_Number(nchimbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(nchimbp))/totlen);

        printf("\n");

        printf("  Clipped:  ");
        Print_Number(n5trm+n3trm+nelim+nchim,rlog,stdout);
        printf(" clips              ");
        Print_Number(n5trmbp+n3trmbp+nelimbp+nchimbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(n5trmbp+n3trmbp+nelimbp+nchimbp))/totlen);

        printf("  Patched:  ");
        Print_Number(nlowq+nspan,rlog,stdout);
        printf(" patches            ");
        Print_Number(nlowqbp+nspanbp,blog,stdout);
        printf(" (%5.1f%%) bases\n",(100.*(nlowqbp+nspanbp))/totlen);

        free(root);
        Close_DB(DB);
      }
    }

  free(Prog_Name);
  exit (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xcc50(%rip), %rdi      # 0xe010
leaq 0xce38(%rip), %rsi      # 0xe1ff
callq 0x25a0
movq %rax, %rcx
leaq 0x10f62(%rip), %rax     # 0x12338
movq %rcx, (%rax)
cmpl $0x2, -0x8(%rbp)
jge 0x1412
movq 0x10c12(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10f48(%rip), %rax     # 0x12338
movq (%rax), %rdx
movq 0x10d66(%rip), %rcx     # 0x12160
leaq 0xcc17(%rip), %rsi      # 0xe018
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x23d5
leaq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x90(%rbp), %rsi
callq 0x3c30
movl %eax, -0x134(%rbp)
cmpl $0x0, -0x134(%rbp)
jge 0x1464
movl $0x1, %edi
callq 0x1260
cmpl $0x1, -0x134(%rbp)
jne 0x14a1
movq 0x10b84(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10eba(%rip), %rax     # 0x12338
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xcb96(%rip), %rsi      # 0xe026
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movq -0x90(%rbp), %rdi
callq 0x4860
movq $0x0, -0x140(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x159a
movq -0x90(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x228(%rbp)
movq -0x90(%rbp), %rax
movl 0x38(%rax), %esi
leaq 0xce5d(%rip), %rdx      # 0xe349
movq %rdx, %rdi
callq 0x29e0
movq -0x228(%rbp), %rdi
movq %rax, %rsi
leaq 0xcb0e(%rip), %rdx      # 0xe013
leaq 0xcb44(%rip), %rcx      # 0xe050
callq 0x2890
movq %rax, %rdi
leaq 0xcb3b(%rip), %rsi      # 0xe056
callq 0x25a0
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x148(%rbp)
jne 0x153b
movl $0x1, %edi
callq 0x1260
movq -0x148(%rbp), %rdi
leaq 0xd931(%rip), %rsi      # 0xee7a
callq 0x1230
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x140(%rbp)
jne 0x1595
movq 0x10a92(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10dc8(%rip), %rax     # 0x12338
movq (%rax), %rdx
movq -0x90(%rbp), %rax
movl 0x38(%rax), %ecx
leaq 0xcae7(%rip), %rsi      # 0xe06b
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
jmp 0x163b
movq -0x90(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0xcd9d(%rip), %rsi      # 0xe349
leaq 0xca60(%rip), %rdx      # 0xe013
leaq 0xca96(%rip), %rcx      # 0xe050
callq 0x2890
movq %rax, %rdi
leaq 0xca8d(%rip), %rsi      # 0xe056
callq 0x25a0
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x148(%rbp)
jne 0x15e9
movl $0x1, %edi
callq 0x1260
movq -0x148(%rbp), %rdi
leaq 0xd883(%rip), %rsi      # 0xee7a
callq 0x1230
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x140(%rbp)
jne 0x1639
movq 0x109e4(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10d1a(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xca71(%rip), %rsi      # 0xe099
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
jmp 0x163b
movq -0x140(%rbp), %rcx
leaq -0x150(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
movq -0x140(%rbp), %rcx
leaq -0x154(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
movq -0x140(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1220
movq -0x140(%rbp), %rdi
callq 0x1190
movl -0x154(%rbp), %ecx
movl -0x150(%rbp), %edx
addl $0x1, %edx
imull %edx, %ecx
movslq %ecx, %rcx
addq $0x8, %rcx
subq %rcx, %rax
movl %eax, -0x14c(%rbp)
movq -0x140(%rbp), %rdi
xorl %eax, %eax
subl -0x14c(%rbp), %eax
movslq %eax, %rsi
movl $0x2, %edx
callq 0x1220
movl $0x0, -0xac(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x7be0
cmpl $0x0, %eax
je 0x1729
movq 0x108f4(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10c2a(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xc9ac(%rip), %rsi      # 0xe0c4
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl $0x0, -0xcc(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x7be0
cmpl $0x0, %eax
je 0x177e
movq 0x1089f(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10bd5(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xc98b(%rip), %rsi      # 0xe0f8
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl $0x0, -0xec(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x7be0
cmpl $0x0, %eax
je 0x17d3
movq 0x1084a(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10b80(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xc96d(%rip), %rsi      # 0xe12f
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl $0x0, -0x10c(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0x7be0
cmpl $0x0, %eax
je 0x1828
movq 0x107f5(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10b2b(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xc94f(%rip), %rsi      # 0xe166
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl $0x0, -0x12c(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0x130(%rbp), %rdx
callq 0x7be0
cmpl $0x0, %eax
je 0x187d
movq 0x107a0(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0x10ad6(%rip), %rax     # 0x12338
movq (%rax), %rdx
leaq 0xc931(%rip), %rsi      # 0xe19d
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movq -0x140(%rbp), %rdi
callq 0x10b0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc93a(%rip), %rsi      # 0xe1d6
callq 0x2750
movq %rax, -0x160(%rbp)
movq -0x90(%rbp), %rax
movslq 0x30(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x90(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
movq -0x98(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x200(%rbp)
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x1fc(%rbp)
movq -0xd8(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x208(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x204(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x178(%rbp)
movq -0x210(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x188(%rbp)
movq -0x210(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x198(%rbp)
movq -0x210(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x210(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x180(%rbp)
movq -0x210(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x190(%rbp)
movq -0x210(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x1a0(%rbp)
movq -0x210(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x210(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x1b8(%rbp)
movq -0x210(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x1c8(%rbp)
movq -0x210(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x1d8(%rbp)
movq -0x210(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x1e8(%rbp)
movq -0x210(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x1c0(%rbp)
movq -0x210(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x1d0(%rbp)
movq -0x210(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x1e0(%rbp)
movq -0x210(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x1f0(%rbp)
leaq 0xc79a(%rip), %rdi      # 0xe1da
movb $0x0, %al
callq 0x10f0
cmpl $0x0, -0x200(%rbp)
jle 0x1a64
movl -0x200(%rbp), %esi
leaq 0xc786(%rip), %rdi      # 0xe1e3
movb $0x0, %al
callq 0x10f0
movl -0x1fc(%rbp), %esi
movl -0x208(%rbp), %edx
movl -0x204(%rbp), %ecx
movq -0x160(%rbp), %r8
leaq 0xc767(%rip), %rdi      # 0xe1eb
movb $0x0, %al
callq 0x10f0
cmpl $0x0, -0x200(%rbp)
jle 0x1b30
movl $0x0, -0x214(%rbp)
movl -0x214(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x1b2e
movq -0x90(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x214(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x200(%rbp), %eax
jge 0x1b18
movq -0x168(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x168(%rbp)
movq -0x90(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x214(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
movq -0x170(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x170(%rbp)
jmp 0x1b1a
movl -0x214(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x214(%rbp)
jmp 0x1aa2
jmp 0x1b30
movl $0x0, -0x1f4(%rbp)
movq $0x1, -0x220(%rbp)
movq -0x220(%rbp), %rcx
movb $0x1, %al
cmpq -0x168(%rbp), %rcx
movb %al, -0x229(%rbp)
jle 0x1b74
movq -0x220(%rbp), %rax
cmpq -0x1b8(%rbp), %rax
setle %al
movb %al, -0x229(%rbp)
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0x1b80
jmp 0x1ba0
imulq $0xa, -0x220(%rbp), %rax
movq %rax, -0x220(%rbp)
movl -0x1f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f4(%rbp)
jmp 0x1b45
cmpl $0x3, -0x1f4(%rbp)
jg 0x1bb5
movl $0x3, -0x1f4(%rbp)
jmp 0x1bd2
movl -0x1f4(%rbp), %eax
subl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
addl -0x1f4(%rbp), %eax
movl %eax, -0x1f4(%rbp)
movl $0x0, -0x1f8(%rbp)
movq $0x1, -0x220(%rbp)
movq -0x220(%rbp), %rax
cmpq -0x170(%rbp), %rax
jg 0x1c17
imulq $0xa, -0x220(%rbp), %rax
movq %rax, -0x220(%rbp)
movl -0x1f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f8(%rbp)
jmp 0x1be7
cmpl $0x3, -0x1f8(%rbp)
jg 0x1c2c
movl $0x3, -0x1f8(%rbp)
jmp 0x1c49
movl -0x1f8(%rbp), %eax
subl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
addl -0x1f8(%rbp), %eax
movl %eax, -0x1f8(%rbp)
leaq 0xc5b0(%rip), %rdi      # 0xe200
movb $0x0, %al
callq 0x10f0
movq -0x168(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x1036d(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
leaq 0xc593(%rip), %rdi      # 0xe20d
movb $0x0, %al
callq 0x10f0
movq -0x170(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0x10343(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
leaq 0xc57f(%rip), %rdi      # 0xe223
movb $0x0, %al
callq 0x10f0
cmpl $0x0, -0x200(%rbp)
jle 0x1cf3
leaq 0xc579(%rip), %rdi      # 0xe234
movb $0x0, %al
callq 0x10f0
movq -0x90(%rbp), %rax
movslq 0x30(%rax), %rdi
subq -0x168(%rbp), %rdi
movq 0x102fd(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
xorl %esi, %esi
callq 0x2af0
leaq 0xc553(%rip), %rdi      # 0xe23f
movb $0x0, %al
callq 0x10f0
leaq 0xc504(%rip), %rdi      # 0xe1fe
movb $0x0, %al
callq 0x10f0
leaq 0xc549(%rip), %rdi      # 0xe251
movb $0x0, %al
callq 0x10f0
movq -0x178(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x102b5(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x178(%rbp), %xmm1
movsd 0xc2cc(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc50a(%rip), %rdi      # 0xe25e
movb $0x1, %al
callq 0x10f0
movq -0x180(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0x10269(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x180(%rbp), %xmm1
movsd 0xc280(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc4d4(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc4d8(%rip), %rdi      # 0xe286
movb $0x0, %al
callq 0x10f0
movq -0x188(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x1020f(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x188(%rbp), %xmm1
movsd 0xc226(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc464(%rip), %rdi      # 0xe25e
movb $0x1, %al
callq 0x10f0
movq -0x190(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0x101c3(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x190(%rbp), %xmm1
movsd 0xc1da(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc42e(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc43f(%rip), %rdi      # 0xe293
movb $0x0, %al
callq 0x10f0
movq -0x198(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x10169(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x198(%rbp), %xmm1
movsd 0xc180(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc3be(%rip), %rdi      # 0xe25e
movb $0x1, %al
callq 0x10f0
movq -0x1a0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0x1011d(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1a0(%rbp), %xmm1
movsd 0xc134(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc388(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc3a6(%rip), %rdi      # 0xe2a0
movb $0x0, %al
callq 0x10f0
movq -0x1a8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x100c3(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1a8(%rbp), %xmm1
movsd 0xc0da(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc318(%rip), %rdi      # 0xe25e
movb $0x1, %al
callq 0x10f0
movq -0x1b0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0x10077(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1b0(%rbp), %xmm1
movsd 0xc08e(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc2e2(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc25e(%rip), %rdi      # 0xe1fe
movb $0x0, %al
callq 0x10f0
leaq 0xc2ff(%rip), %rdi      # 0xe2ad
movb $0x0, %al
callq 0x10f0
movq -0x1b8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0x1000f(%rip), %rax     # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1b8(%rbp), %xmm1
movsd 0xc026(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc2c0(%rip), %rdi      # 0xe2ba
movb $0x1, %al
callq 0x10f0
movq -0x1c0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xffc3(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1c0(%rbp), %xmm1
movsd 0xbfda(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc22e(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc27c(%rip), %rdi      # 0xe2d0
movb $0x0, %al
callq 0x10f0
movq -0x1c8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0xff69(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1c8(%rbp), %xmm1
movsd 0xbf80(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc21a(%rip), %rdi      # 0xe2ba
movb $0x1, %al
callq 0x10f0
movq -0x1d0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xff1d(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1d0(%rbp), %xmm1
movsd 0xbf34(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc188(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc1e3(%rip), %rdi      # 0xe2dd
movb $0x0, %al
callq 0x10f0
movq -0x1d8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0xfec3(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1d8(%rbp), %xmm1
movsd 0xbeda(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc174(%rip), %rdi      # 0xe2ba
movb $0x1, %al
callq 0x10f0
movq -0x1e0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xfe77(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1e0(%rbp), %xmm1
movsd 0xbe8e(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc0e2(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xc14a(%rip), %rdi      # 0xe2ea
movb $0x0, %al
callq 0x10f0
movq -0x1e8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0xfe1d(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1e8(%rbp), %xmm1
movsd 0xbe34(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x168(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc0ce(%rip), %rdi      # 0xe2ba
movb $0x1, %al
callq 0x10f0
movq -0x1f0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xfdd1(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
cvtsi2sdq -0x1f0(%rbp), %xmm1
movsd 0xbde8(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xc03c(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xbfb8(%rip), %rdi      # 0xe1fe
movb $0x0, %al
callq 0x10f0
leaq 0xc0a3(%rip), %rdi      # 0xe2f7
movb $0x0, %al
callq 0x10f0
movq -0x188(%rbp), %rdi
addq -0x198(%rbp), %rdi
addq -0x178(%rbp), %rdi
addq -0x1e8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0xfd54(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
leaq 0xc071(%rip), %rdi      # 0xe304
movb $0x0, %al
callq 0x10f0
movq -0x190(%rbp), %rdi
addq -0x1a0(%rbp), %rdi
addq -0x180(%rbp), %rdi
addq -0x1f0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xfd15(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
movq -0x190(%rbp), %rax
addq -0x1a0(%rbp), %rax
addq -0x180(%rbp), %rax
addq -0x1f0(%rbp), %rax
cvtsi2sd %rax, %xmm1
movsd 0xbd14(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xbf68(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
leaq 0xbfff(%rip), %rdi      # 0xe319
movb $0x0, %al
callq 0x10f0
movq -0x1c8(%rbp), %rdi
addq -0x1d8(%rbp), %rdi
movl -0x1f4(%rbp), %esi
movq 0xfc9c(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
leaq 0xbfdb(%rip), %rdi      # 0xe326
movb $0x0, %al
callq 0x10f0
movq -0x1d0(%rbp), %rdi
addq -0x1e0(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq 0xfc6b(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
callq 0x2af0
movq -0x1d0(%rbp), %rax
addq -0x1e0(%rbp), %rax
cvtsi2sd %rax, %xmm1
movsd 0xbc78(%rip), %xmm0     # 0xe008
mulsd %xmm1, %xmm0
cvtsi2sdq -0x170(%rbp), %xmm1
divsd %xmm1, %xmm0
leaq 0xbecc(%rip), %rdi      # 0xe274
movb $0x1, %al
callq 0x10f0
movq -0x160(%rbp), %rdi
callq 0x1030
movq -0x90(%rbp), %rdi
callq 0x5580
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1419
leaq 0xff5c(%rip), %rax      # 0x12338
movq (%rax), %rdi
callq 0x1030
xorl %edi, %edi
callq 0x1260
nopl (%rax,%rax)