// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DASqv.c
// Function: main
int main(int argc, char *argv[])
{ char  *root, *dpwd;
  int64  novl;
  int    c;

  DAZZ_EXTRA ex_hgap, ex_covr;
  DAZZ_EXTRA ex_cest, ex_qvs, ex_dif;

  char *cest_name = "Coverage Estimate";
  char *qvs_name  = "Histogram of QVs";
  char *dif_name  = "Histogram of Tile Differences";
  int64 cover64;

  //  Process arguments

  { int  i, j, k;
    int  flags[128];
    char *eptr;

    ARG_INIT("DASqv")

    COVERAGE = -1;

    j = 1;
    for (i = 1; i < argc; i++)
      if (argv[i][0] == '-')
        switch (argv[i][1])
        { default:
            ARG_FLAGS("v")
            break;
          case 'c':
            ARG_POSITIVE(COVERAGE,"Voting depth")
            break;
        }
      else
        argv[j++] = argv[i];
    argc = j;

    VERBOSE = flags['v'];

    if (argc < 3)
      { fprintf(stderr,"Usage: %s %s\n",Prog_Name,Usage);
        fprintf(stderr,"\n");
        fprintf(stderr,"      -v: Verbose mode, output statistics as proceed.\n");
        fprintf(stderr,"      -c: Use this as the average coverage (not DAScover estimate).\n");
        exit (1);
      }
  }

  //  Open trimmed DB

  { int status;

    status = Open_DB(argv[1],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);
      }
    if (DB->part)
      { fprintf(stderr,"%s: Cannot be called on a block: %s\n",Prog_Name,argv[1]);
        exit (1);
      }
    Trim_DB(DB);
  }

  //  Get .covr track information

  { FILE      *afile;
    char      *aname;
    int        extra, cmax;
    int64     *cgram;

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

    fseeko(afile,0,SEEK_END);
    extra = ftell(afile) - sizeof(int)*2;
    fseeko(afile,-extra,SEEK_END);
    ex_covr.nelem = 0;
    if (Read_Extra(afile,aname,&ex_covr) != 0)
      { fprintf(stderr,"%s: Histogram extra missing from .covr track?\n",Prog_Name);
        exit (1);
      }
    ex_hgap.nelem = 0;
    if (Read_Extra(afile,aname,&ex_hgap) != 0)
      { fprintf(stderr,"%s: Hgap threshold extra missing from .covr track?\n",Prog_Name);
        exit (1);
      }
    fclose(afile);

    HGAP_MIN = (int) ((int64 *) (ex_hgap.value))[0];
    cgram    = (int64 *) (ex_covr.value);
    cmax     = ex_covr.nelem - 1;

    if (COVERAGE < 0)
      { int i;

        i = 0;
        while (cgram[i+1] < cgram[i])
          i += 1;
        for (COVERAGE = i++; i < cmax; i++)
          if (cgram[COVERAGE] < cgram[i])
            COVERAGE = i;
      }

    if (COVERAGE >= 40)
      QV_DEEP = COVERAGE/8;
     else if (COVERAGE >= 20)
       QV_DEEP = 5;
     else if (COVERAGE >= 4)
       QV_DEEP = COVERAGE/4;
     else
       { fprintf(stderr,"%s: Average coverage is too low (< 4X), cannot infer qv's\n",Prog_Name);
         exit (1);
       }
  }

  //  Setup extras

  ex_cest.vtype = DB_INT;      // Estimated coverage (same for every .las)
  ex_cest.nelem = 1;
  ex_cest.accum = DB_EXACT;
  ex_cest.name  = cest_name;
  cover64 = COVERAGE;
  ex_cest.value = &cover64;

  ex_qvs.vtype = DB_INT;      //  Histogram of MAXQV1 trace-point diff counts
  ex_qvs.nelem = MAXQV1;
  ex_qvs.accum = DB_SUM;
  ex_qvs.name  = qvs_name;
  ex_qvs.value = &qgram;

  ex_dif.vtype = DB_INT;     //  Histogram of MAXQV1 intrinisic qv counts
  ex_dif.nelem = MAXQV1;
  ex_dif.accum = DB_SUM;
  ex_dif.name  = dif_name;
  ex_dif.value = &sgram;

  //  For each .las file do

  dpwd = PathTo(argv[1]);
  root = Root(argv[1],".db");

  for (c = 2; c < argc; c++)
    { Block_Looper *parse;
      FILE         *input;

      parse = Parse_Block_LAS_Arg(argv[c]);

      while ((input = Next_Block_Arg(parse)) != NULL)
        { DB_PART  = 0;
          DB_FIRST = 0;
          DB_LAST  = DB->nreads;

          //  Determine if overlap block is being processed and if so get first and last read
          //    from .db file

          { FILE *dbfile;
            char  buffer[2*MAX_NAME+100];
            char *p, *eptr;
            int   i, part, nfiles, nblocks, cutoff, all, oindx;
            int64 size;

            p = rindex(Block_Arg_Root(parse),'.');
            if (p != NULL)
              { part = strtol(p+1,&eptr,10);
                if (*eptr == '\0' && eptr != p+1)
                  { dbfile = Fopen(Catenate(dpwd,"/",root,".db"),"r");
                    if (dbfile == NULL)
                      exit (1);
                    if (fscanf(dbfile,DB_NFILE,&nfiles) != 1)
                      SYSTEM_READ_ERROR
                    for (i = 0; i < nfiles; i++)
                      if (fgets(buffer,2*MAX_NAME+100,dbfile) == NULL)
                        SYSTEM_READ_ERROR
                    if (fscanf(dbfile,DB_NBLOCK,&nblocks) != 1)
                      SYSTEM_READ_ERROR
                    if (fscanf(dbfile,DB_PARAMS,&size,&cutoff,&all) != 3)
                      SYSTEM_READ_ERROR
                    for (i = 1; i <= part; i++)
                      if (fscanf(dbfile,DB_BDATA,&oindx,&DB_FIRST) != 2)
                        SYSTEM_READ_ERROR
                    if (fscanf(dbfile,DB_BDATA,&oindx,&DB_LAST) != 2)
                      SYSTEM_READ_ERROR
                    fclose(dbfile);
                    DB_PART = part;
                  }
              }
          }

          //   Set up preliminary trimming track

          if (DB_PART > 0)
            { QV_AFILE = Fopen(Catenate(dpwd,PATHSEP,root,
                                        Numbered_Suffix(".",DB_PART,".qual.anno")),"w");
              QV_DFILE = Fopen(Catenate(dpwd,PATHSEP,root,
                                        Numbered_Suffix(".",DB_PART,".qual.data")),"w");
            }
          else
            { QV_AFILE = Fopen(Catenate(dpwd,PATHSEP,root,".qual.anno"),"w");
              QV_DFILE = Fopen(Catenate(dpwd,PATHSEP,root,".qual.data"),"w");
            }
          if (QV_AFILE == NULL || QV_DFILE == NULL)
            exit (1);

          { int size, length;

            length = DB_LAST - DB_FIRST;
            size   = sizeof(int64);
            fwrite(&length,sizeof(int),1,QV_AFILE);
            fwrite(&size,sizeof(int),1,QV_AFILE);
            QV_INDEX = 0;
            fwrite(&QV_INDEX,sizeof(int64),1,QV_AFILE);
          }

          //  Get trace point spacing information

          fread(&novl,sizeof(int64),1,input);
          fread(&TRACE_SPACING,sizeof(int),1,input);

          //  Initialize statistics gathering

          { int i;

            nreads = 0;
            totlen = 0;
            for (i = 0; i <= MAXQV; i++)
              qgram[i] = sgram[i] = 0;
          }

          if (VERBOSE)
            { printf("\n\nDASqv");
              if (HGAP_MIN > 0)
                printf(" -H%d",HGAP_MIN);
              printf(" -c%d %s %s\n\n",COVERAGE,argv[1],Block_Arg_Root(parse));
              fflush(stdout);
            }

          //  Process each read pile

          make_a_pass(input,CALCULATE_QVS,1);

          //  Write out extras and close .qual track

          Write_Extra(QV_AFILE,&ex_hgap);
          Write_Extra(QV_AFILE,&ex_cest);
          Write_Extra(QV_AFILE,&ex_qvs);
          Write_Extra(QV_AFILE,&ex_dif);

          fclose(QV_AFILE);
          fclose(QV_DFILE);
          fclose(input);

          //  If verbose output statistics summary to stdout

          if (VERBOSE)
            { int   i;
              int64 ssum, qsum;
              int64 stotal, qtotal;
              int   gval, bval;

              printf("\n  Input:  ");
              Print_Number(nreads,7,stdout);
              printf("reads,  ");
              Print_Number(totlen,12,stdout);
              printf(" bases");
              if (HGAP_MIN > 0)
                { printf(" (another ");
                  Print_Number((DB_LAST-DB_FIRST) - nreads,0,stdout);
		  printf(" were < H-length)");
		}
	      printf("\n");

	      stotal = qtotal = 0;
	      for (i = 0; i <= MAXQV; i++)
	        { stotal += sgram[i];
                  qtotal += qgram[i];
                }

              printf("\n  Histogram of q-values (average %d best)\n",2*QV_DEEP);
              printf("\n                   Input                 QV\n");
              qsum = qgram[MAXQV];
              ssum = sgram[MAXQV];
              printf("\n      %2d:  %9lld  %5.1f%%    %9lld  %5.1f%%\n\n",
                     MAXQV,sgram[MAXQV],(100.*ssum)/stotal,qgram[MAXQV],(100.*qsum)/qtotal);

              bval    = gval = -1;
              qtotal -= qsum;
              stotal -= ssum;
              ssum = qsum = 0;
              for (i = MAXQV-1; i >= 0; i--) 
                if (qgram[i] > 0)
                  { ssum += sgram[i];
                    qsum += qgram[i];
                    printf("      %2d:  %9lld  %5.1f%%    %9lld  %5.1f%%\n",
                           i,sgram[i],(100.*ssum)/stotal,
                             qgram[i],(100.*qsum)/qtotal);
                    if ((100.*qsum)/qtotal > 7. && bval < 0)
                      bval = i;
                    if ((100.*qsum)/qtotal > 20. && gval < 0)
                      gval = i;
                  }

              printf("\n    Recommend \'DAStrim -g%d -b%d'\n\n",gval,bval);
            }
        }

      Free_Block_Arg(parse);
    }

  //  Clean up

  free(dpwd);
  free(root);

  Close_DB(DB);
  free(Prog_Name);

  exit (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4fd8, %rsp           # imm = 0x4FD8
movq %rsi, 0x8(%rsp)
movl %edi, %ebp
leaq 0x17e81(%rip), %rdi     # 0x1a33c
leaq 0x17f28(%rip), %rsi     # 0x1a3ea
callq 0x1252e
leaq 0x1e112(%rip), %r14     # 0x205e0
movq %rax, (%r14)
leaq 0x150(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1140
movl $0xffffffff, 0x1dcc1(%rip) # imm = 0xFFFFFFFF
cmpl $0x1, %ebp
jle 0x2623
movl %ebp, %ebx
movl $0x1, %r13d
movl $0x1, %r14d
leaq 0x17e33(%rip), %r15     # 0x1a340
movq 0x8(%rsp), %rbp
movq (%rbp,%r14,8), %r12
cmpb $0x2d, (%r12)
jne 0x25b4
movzbl 0x1(%r12), %eax
testl %eax, %eax
je 0x25bf
addq $0x2, %r12
cmpl $0x63, %eax
jne 0x257e
movq %r12, %rdi
leaq 0x98(%rsp), %rsi
movl $0xa, %edx
callq 0x11e0
movl %eax, 0x1dc5c(%rip)     # 0x201b0
movq 0x98(%rsp), %rcx
cmpb $0x0, (%rcx)
movq (%rbp,%r14,8), %r8
jne 0x26be
cmpb $0x0, 0x2(%r8)
je 0x26be
testl %eax, %eax
jg 0x25bf
jmp 0x26eb
movsbl %al, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x1150
testq %rax, %rax
je 0x2690
movslq %ebp, %rax
movl $0x1, 0x150(%rsp,%rax,4)
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x257e
movq 0x8(%rsp), %rbp
jmp 0x25bf
movslq %r13d, %rax
incl %r13d
movq %r12, (%rbp,%rax,8)
incq %r14
cmpq %rbx, %r14
jne 0x2512
movl 0x328(%rsp), %eax
movl %eax, 0x1dbdc(%rip)     # 0x201b4
cmpl $0x2, %r13d
leaq 0x1dffd(%rip), %r14     # 0x205e0
jle 0x262d
movq 0x8(%rbp), %rdi
leaq 0x1df48(%rip), %rsi     # 0x20538
callq 0x134f7
testl %eax, %eax
js 0x26b4
cmpl $0x1, %eax
jne 0x2719
movq 0x1d9eb(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq (%r14), %rdx
movq 0x8(%rbp), %rcx
leaq 0x17b5f(%rip), %rsi     # 0x1a17d
jmp 0x27b6
movl $0x0, 0x1db87(%rip)     # 0x201b4
movq 0x1d9c4(%rip), %rbx     # 0x1fff8
movq (%rbx), %rdi
movq (%r14), %rdx
leaq 0x17ab2(%rip), %rsi     # 0x1a0f3
leaq 0x17df6(%rip), %rcx     # 0x1a43e
xorl %eax, %eax
callq 0x11b0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1180
movq (%rbx), %rcx
leaq 0x17a9b(%rip), %rdi     # 0x1a101
movl $0x36, %esi
movl $0x1, %edx
callq 0x12a0
movq (%rbx), %rcx
leaq 0x17ab9(%rip), %rdi     # 0x1a138
movl $0x44, %esi
movl $0x1, %edx
callq 0x12a0
jmp 0x26b4
movq 0x1d961(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1df3f(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x179d6(%rip), %rsi     # 0x1a081
movl %ebp, %ecx
xorl %eax, %eax
callq 0x11b0
movl $0x1, %edi
callq 0x1290
movq 0x1d933(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1df11(%rip), %rax     # 0x205e0
movq (%rax), %rdx
movsbl 0x1(%r8), %ecx
addq $0x2, %r8
leaq 0x179bd(%rip), %rsi     # 0x1a09f
xorl %eax, %eax
callq 0x11b0
jmp 0x26b4
movq 0x1d906(%rip), %rcx     # 0x1fff8
movq (%rcx), %rdi
leaq 0x1dee4(%rip), %rcx     # 0x205e0
movq (%rcx), %rdx
leaq 0x179c2(%rip), %rsi     # 0x1a0c8
leaq 0x179d9(%rip), %rcx     # 0x1a0e6
movl %eax, %r8d
xorl %eax, %eax
callq 0x11b0
jmp 0x26b4
cmpl $0x0, 0x1de50(%rip)     # 0x20570
jne 0x279e
leaq 0x1de0f(%rip), %rdi     # 0x20538
callq 0x13d00
movq 0x1de4b(%rip), %rdi     # 0x20580
leaq 0x17d2e(%rip), %rsi     # 0x1a46a
leaq 0x17a89(%rip), %rdx     # 0x1a1cc
leaq 0x17bdf(%rip), %rcx     # 0x1a329
callq 0x12713
leaq 0x17a7b(%rip), %rsi     # 0x1a1d1
movq %rax, %rdi
callq 0x1252e
testq %rax, %rax
je 0x26b4
movq %rax, %r14
leaq 0x18ce5(%rip), %rsi     # 0x1b456
movq %rax, %rdi
callq 0x1260
testq %rax, %rax
jne 0x27c2
movq 0x1d873(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1de51(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x17a4d(%rip), %rsi     # 0x1a1e6
jmp 0x28f0
movq 0x1d853(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq (%r14), %rdx
movq 0x8(%rbp), %rcx
leaq 0x179f1(%rip), %rsi     # 0x1a1a7
xorl %eax, %eax
callq 0x11b0
jmp 0x26b4
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1250
movq %r15, %rdi
callq 0x11c0
movl $0x8, %ecx
subl %eax, %ecx
movslq %ecx, %rsi
movq %r15, %rdi
movl $0x2, %edx
callq 0x1250
leaq 0xd0(%rsp), %rdx
movl $0x0, 0x4(%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15e0b
testl %eax, %eax
jne 0x28b8
leaq 0x98(%rsp), %rdx
movl $0x0, 0x4(%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15e0b
testl %eax, %eax
jne 0x28d5
movq %r15, %rdi
callq 0x10d0
movq 0xb0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1d969(%rip)     # 0x201b8
movl 0x1d95b(%rip), %eax     # 0x201b0
testl %eax, %eax
jns 0x28ac
movq 0xe8(%rsp), %rcx
movl 0xd4(%rsp), %esi
decl %esi
movq (%rcx), %rax
xorl %edx, %edx
movq 0x8(%rcx,%rdx,8), %rdi
incq %rdx
cmpq %rax, %rdi
movq %rdi, %rax
jl 0x286f
leaq -0x1(%rdx), %rax
movl %eax, 0x1d927(%rip)     # 0x201b0
cmpl %edx, %esi
jle 0x28ac
movl %esi, %esi
movslq %eax, %rdi
movq (%rcx,%rdi,8), %rdi
cmpq (%rcx,%rdx,8), %rdi
jge 0x28a4
movl %edx, 0x1d90e(%rip)     # 0x201b0
movl %edx, %eax
incq %rdx
cmpq %rdx, %rsi
jne 0x288f
cmpl $0x28, %eax
jl 0x28fc
movl %eax, %ecx
shrl $0x3, %ecx
jmp 0x2919
movq 0x1d739(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1dd17(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x1793f(%rip), %rsi     # 0x1a212
jmp 0x28f0
movq 0x1d71c(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1dcfa(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x17951(%rip), %rsi     # 0x1a241
xorl %eax, %eax
callq 0x11b0
jmp 0x26b4
movl $0x5, %ecx
cmpl $0x13, %eax
jg 0x2919
cmpl $0x4, %eax
jl 0x3a03
movl %eax, %ecx
shrl $0x2, %ecx
movq 0x8(%rsp), %rbp
movl %ecx, 0x1d89d(%rip)     # 0x201bc
movabsq $0x100000000, %rcx      # imm = 0x100000000
leaq 0x130(%rsp), %rdx
movq %rcx, (%rdx)
movl $0x0, 0x8(%rdx)
leaq 0x176fe(%rip), %rcx     # 0x1a040
movq %rcx, 0x10(%rdx)
movl %eax, %eax
leaq 0xc0(%rsp), %rcx
movq %rax, (%rcx)
movq %rcx, 0x18(%rdx)
movabsq $0x3300000000, %rax     # imm = 0x3300000000
leaq 0x110(%rsp), %rsi
movq %rax, (%rsi)
movl $0x1, %ecx
movl %ecx, 0x8(%rsi)
leaq 0x176d7(%rip), %rdx     # 0x1a052
movq %rdx, 0x10(%rsi)
leaq 0x1d83a(%rip), %rdx     # 0x201c0
movq %rdx, 0x18(%rsi)
leaq 0xf0(%rsp), %rdx
movq %rax, (%rdx)
movl %ecx, 0x8(%rdx)
leaq 0x176c4(%rip), %rax     # 0x1a063
movq %rax, 0x10(%rdx)
leaq 0x1d9b6(%rip), %rax     # 0x20360
movq %rax, 0x18(%rdx)
movq 0x8(%rbp), %rdi
callq 0x125f1
movq %rax, 0x38(%rsp)
movq 0x8(%rbp), %rdi
leaq 0x178e9(%rip), %rsi     # 0x1a2b0
callq 0x1264b
movq %rax, 0x30(%rsp)
movl %r13d, %eax
movq %rax, 0x68(%rsp)
movl $0x2, %eax
movq %rax, 0x70(%rsp)
movq (%rbp,%rax,8), %rdi
callq 0x172f6
movq %rax, %r15
movq %rax, %rdi
callq 0x17128
movq %rax, (%rsp)
testq %rax, %rax
je 0x3986
movq %r15, 0x18(%rsp)
xorl %eax, %eax
movl %eax, 0x1dae6(%rip)     # 0x204f8
movl %eax, 0x1dae4(%rip)     # 0x204fc
movl 0x1db4a(%rip), %eax     # 0x20568
movl %eax, 0x1dadc(%rip)     # 0x20500
movq %r15, %rdi
callq 0x171dc
movq %rax, %rdi
movl $0x2e, %esi
callq 0x1270
testq %rax, %rax
je 0x2bb5
movq %rax, %r12
incq %r12
movq %r12, %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x11e0
movq %rax, %r15
movq 0x48(%rsp), %rax
cmpq %r12, %rax
je 0x2bb5
cmpb $0x0, (%rax)
jne 0x2bb5
movq 0x38(%rsp), %rdi
leaq 0x17834(%rip), %rsi     # 0x1a2b4
movq 0x30(%rsp), %rdx
leaq 0x17824(%rip), %rcx     # 0x1a2b0
callq 0x12713
movq %rax, %rdi
leaq 0x189bb(%rip), %rsi     # 0x1b456
callq 0x12591
testq %rax, %rax
je 0x26b4
movq %rax, %r13
movq %rax, %rdi
leaq 0x17800(%rip), %rsi     # 0x1a2b6
leaq 0x2c(%rsp), %rdx
xorl %eax, %eax
callq 0x1090
cmpl $0x1, %eax
jne 0x39d7
cmpl $0x0, 0x2c(%rsp)
jle 0x2afa
xorl %ebx, %ebx
leaq 0x150(%rsp), %rdi
movl $0x4e84, %esi           # imm = 0x4E84
movq %r13, %rdx
callq 0x1190
testq %rax, %rax
je 0x39d7
incl %ebx
cmpl 0x2c(%rsp), %ebx
jl 0x2ad4
movq %r13, %rdi
leaq 0x177df(%rip), %rsi     # 0x1a2e3
leaq 0x94(%rsp), %rdx
xorl %eax, %eax
callq 0x1090
cmpl $0x1, %eax
jne 0x39d7
movq %r13, %rdi
leaq 0x177cb(%rip), %rsi     # 0x1a2f1
leaq 0xb8(%rsp), %rdx
leaq 0x90(%rsp), %rcx
leaq 0x8c(%rsp), %r8
xorl %eax, %eax
callq 0x1090
cmpl $0x3, %eax
jne 0x39d7
movl %r15d, %ebx
testl %r15d, %r15d
jle 0x2b80
movq %r13, %rdi
leaq 0x177b7(%rip), %rsi     # 0x1a317
leaq 0x54(%rsp), %rdx
leaq 0x1d990(%rip), %rcx     # 0x204fc
xorl %eax, %eax
callq 0x1090
cmpl $0x2, %eax
jne 0x39d7
decl %ebx
jne 0x2b56
movq %r13, %rdi
leaq 0x1778d(%rip), %rsi     # 0x1a317
leaq 0x54(%rsp), %rdx
leaq 0x1d96a(%rip), %rcx     # 0x20500
xorl %eax, %eax
callq 0x1090
cmpl $0x2, %eax
jne 0x39d7
movq %r13, %rdi
callq 0x10d0
movl %r15d, 0x1d943(%rip)    # 0x204f8
movl 0x1d93d(%rip), %esi     # 0x204f8
testl %esi, %esi
jle 0x2c33
leaq 0x178a4(%rip), %r15     # 0x1a46a
movq %r15, %rdi
leaq 0x17754(%rip), %rdx     # 0x1a324
callq 0x1281a
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1773d(%rip), %r12     # 0x1a321
movq %r12, %rsi
movq 0x30(%rsp), %r14
movq %r14, %rdx
movq %rax, %rcx
callq 0x12713
movq %rax, %rdi
leaq 0x1827b(%rip), %r13     # 0x1ae7c
movq %r13, %rsi
callq 0x12591
movq %rax, 0x1d8f8(%rip)     # 0x20508
movl 0x1d8e2(%rip), %esi     # 0x204f8
movq %r15, %rdi
leaq 0x1770f(%rip), %rdx     # 0x1a32f
callq 0x1281a
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rax, %rcx
jmp 0x2c82
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
leaq 0x176df(%rip), %r15     # 0x1a321
movq %r15, %rsi
movq 0x30(%rsp), %r14
movq %r14, %rdx
leaq 0x176d0(%rip), %rcx     # 0x1a324
callq 0x12713
movq %rax, %rdi
leaq 0x18219(%rip), %r13     # 0x1ae7c
movq %r13, %rsi
callq 0x12591
movq %rax, 0x1d896(%rip)     # 0x20508
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
leaq 0x176ad(%rip), %rcx     # 0x1a32f
callq 0x12713
movq %rax, %rdi
movq %r13, %rsi
callq 0x12591
movq %rax, 0x1d877(%rip)     # 0x20510
movq 0x1d868(%rip), %rcx     # 0x20508
testq %rcx, %rcx
je 0x26b4
testq %rax, %rax
je 0x26b4
movl 0x1d848(%rip), %eax     # 0x20500
subl 0x1d83e(%rip), %eax     # 0x204fc
movl %eax, 0x48(%rsp)
movl $0x8, 0x150(%rsp)
movl $0x4, %esi
movl $0x1, %edx
leaq 0x48(%rsp), %rdi
callq 0x12a0
movq 0x1d820(%rip), %rcx     # 0x20508
movl $0x4, %esi
movl $0x1, %edx
leaq 0x150(%rsp), %rdi
callq 0x12a0
xorl %ebx, %ebx
movq %rbx, 0x1d810(%rip)     # 0x20518
movq 0x1d7f9(%rip), %rcx     # 0x20508
movl $0x8, %esi
movl $0x1, %edx
leaq 0x1d7f8(%rip), %rdi     # 0x20518
callq 0x12a0
movl $0x8, %esi
movl $0x1, %edx
leaq 0xc8(%rsp), %rdi
movq (%rsp), %r14
movq %r14, %rcx
callq 0x10c0
movl $0x4, %esi
movl $0x1, %edx
leaq 0x1d7cc(%rip), %rdi     # 0x20520
movq %r14, %rcx
callq 0x10c0
movq %rbx, 0x1d7c5(%rip)     # 0x20528
movq %rbx, 0x1d7c6(%rip)     # 0x20530
movl $0x198, %edx            # imm = 0x198
leaq 0x1d5ea(%rip), %rdi     # 0x20360
xorl %esi, %esi
callq 0x1140
movl $0x198, %edx            # imm = 0x198
leaq 0x1d437(%rip), %rdi     # 0x201c0
xorl %esi, %esi
callq 0x1140
cmpl $0x0, 0x1d41d(%rip)     # 0x201b4
je 0x2e00
leaq 0x1759a(%rip), %rdi     # 0x1a33a
xorl %eax, %eax
callq 0x1110
movl 0x1d40b(%rip), %esi     # 0x201b8
testl %esi, %esi
jle 0x2dbf
leaq 0x1758a(%rip), %rdi     # 0x1a342
xorl %eax, %eax
callq 0x1110
movl 0x1d3eb(%rip), %ebp     # 0x201b0
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %r15
movq 0x18(%rsp), %rdi
callq 0x171dc
leaq 0x17569(%rip), %rdi     # 0x1a348
movl %ebp, %esi
movq %rbx, %rbp
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
movq 0x1d1e0(%rip), %rax     # 0x1ffd8
movq (%rax), %rdi
callq 0x1210
cmpq $0x0, 0x1d7a0(%rip)     # 0x205a8
jne 0x2e35
movslq 0x1d367(%rip), %rax     # 0x20178
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
leaq 0x1764c(%rip), %rsi     # 0x1a46c
callq 0x12471
movq %rax, 0x1d77c(%rip)     # 0x205a8
testq %rax, %rax
je 0x26b4
cmpq $0x0, 0x1d773(%rip)     # 0x205b0
movq 0x18(%rsp), %r15
jne 0x2e6a
movslq 0x1d331(%rip), %rdi     # 0x2017c
addq %rdi, %rdi
leaq 0x17631(%rip), %rsi     # 0x1a486
callq 0x12471
movq %rax, 0x1d74f(%rip)     # 0x205b0
testq %rax, %rax
je 0x26b4
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x1120
movl $0x8, %esi
movl $0x1, %edx
leaq 0x150(%rsp), %rdi
movq %rbx, %rcx
callq 0x10c0
movl $0x4, %esi
movl $0x1, %edx
leaq 0x1d67f(%rip), %rdi     # 0x20520
movq %rbx, %rcx
callq 0x10c0
xorl %eax, %eax
cmpl $0x7e, 0x1d66e(%rip)    # 0x20520
setge %al
incl %eax
movl %eax, 0x1d6fb(%rip)     # 0x205b8
movq 0x1d6e4(%rip), %rsi     # 0x205a8
movq %rbx, %rdi
callq 0x9843
movq 0x1d6d5(%rip), %rdi     # 0x205a8
testl %eax, %eax
je 0x2ee3
movl $0x7fffffff, 0x24(%rdi) # imm = 0x7FFFFFFF
jmp 0x2f7d
movl 0x8(%rdi), %ecx
movq 0x1d6c3(%rip), %rax     # 0x205b0
cmpl 0x1d289(%rip), %ecx     # 0x2017c
jle 0x2f42
cvtsi2sd %ecx, %xmm0
mulsd 0x17107(%rip), %xmm0    # 0x1a008
addsd 0x17107(%rip), %xmm0    # 0x1a010
cvttsd2si %xmm0, %ecx
movl %ecx, 0x1d269(%rip)     # 0x2017c
movslq %ecx, %rsi
addq %rsi, %rsi
movq %rax, %rdi
leaq 0x1757a(%rip), %rdx     # 0x1a49d
callq 0x124c9
movq %rax, 0x1d681(%rip)     # 0x205b0
testq %rax, %rax
je 0x26b4
movq 0x1d669(%rip), %rcx     # 0x205a8
movl 0x8(%rcx), %ecx
movl 0x1d670(%rip), %esi     # 0x205b8
movslq %ecx, %rdx
movq %rax, %rdi
movq (%rsp), %rcx
callq 0x10c0
cmpl $0x1, 0x1d65a(%rip)     # 0x205b8
movq 0x1d643(%rip), %rdi     # 0x205a8
jne 0x2f7d
movq 0x1d642(%rip), %rax     # 0x205b0
movq %rax, (%rdi)
callq 0x994e
movq 0x1d62b(%rip), %rdi     # 0x205a8
movslq 0x1d578(%rip), %r14     # 0x204fc
cmpl %r14d, 0x24(%rdi)
jl 0x3a23
cmpl 0x1d56b(%rip), %r14d    # 0x20500
jge 0x3675
xorl %esi, %esi
xorl %ebx, %ebx
movq 0x1d602(%rip), %r15     # 0x205a8
movslq %ebx, %rax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movupd (%r15,%rax), %xmm0
movupd 0x10(%r15,%rax), %xmm1
movupd 0x20(%r15,%rax), %xmm2
movupd %xmm2, 0x20(%r15)
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movslq 0x24(%r15), %r12
cmpq %r12, %r14
movq %r14, 0x58(%rsp)
jne 0x3026
movq 0x1d5c5(%rip), %rdi     # 0x205b0
movslq %esi, %rax
leaq (%rdi,%rax,2), %rsi
movslq 0x8(%r15), %rdx
addq %rdx, %rdx
callq 0x1240
movl 0x8(%r15), %r13d
addq $0x30, %r15
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x9843
movl $0x1, %r14d
testl %eax, %eax
je 0x302d
movl $0x1, %ebx
jmp 0x3177
xorl %ebx, %ebx
jmp 0x31b7
xorl %ebp, %ebp
movq 0x1d572(%rip), %rax     # 0x205a8
movl 0x38(%rax,%rbp), %ecx
leal (%rcx,%r13), %edx
movq 0x1d56b(%rip), %rax     # 0x205b0
cmpl 0x1d131(%rip), %edx     # 0x2017c
jle 0x309e
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0x16fac(%rip), %xmm0    # 0x1a008
addsd 0x16fac(%rip), %xmm0    # 0x1a010
cvttsd2si %xmm0, %ecx
movl %ecx, 0x1d10e(%rip)     # 0x2017c
movslq %ecx, %rsi
addq %rsi, %rsi
movq %rax, %rdi
leaq 0x1741f(%rip), %rdx     # 0x1a49d
callq 0x124c9
movq %rax, 0x1d526(%rip)     # 0x205b0
testq %rax, %rax
je 0x26b4
movq 0x1d50e(%rip), %rcx     # 0x205a8
movl 0x38(%rcx,%rbp), %ecx
movslq %r13d, %rbx
leaq (%rax,%rbx,2), %rdi
movl 0x1d50d(%rip), %esi     # 0x205b8
movslq %ecx, %rdx
movq (%rsp), %rcx
callq 0x10c0
cmpl $0x1, 0x1d4fa(%rip)     # 0x205b8
jne 0x30e1
addq %rbx, %rbx
addq 0x1d4e6(%rip), %rbx     # 0x205b0
movq 0x1d4d7(%rip), %rax     # 0x205a8
leaq (%rax,%rbp), %rdi
addq $0x30, %rdi
movq %rbx, (%rdi)
callq 0x994e
movq 0x1d4c0(%rip), %r15     # 0x205a8
cmpl %r12d, 0x54(%r15,%rbp)
jne 0x3668
addl 0x38(%r15,%rbp), %r13d
incq %r14
cmpl %r14d, 0x1d076(%rip)    # 0x20178
jg 0x3152
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x16ef4(%rip), %xmm0    # 0x1a008
addsd 0x16efc(%rip), %xmm0    # 0x1a018
cvttsd2si %xmm0, %eax
movl %eax, 0x1d052(%rip)     # 0x20178
cltq
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq %r15, %rdi
leaq 0x173bd(%rip), %rdx     # 0x1a4f7
callq 0x124c9
movq %rax, %r15
movq %rax, 0x1d45f(%rip)     # 0x205a8
testq %rax, %rax
je 0x26b4
leaq (%r15,%rbp), %rsi
addq $0x60, %rsi
movq (%rsp), %rdi
callq 0x9843
addq $0x30, %rbp
testl %eax, %eax
je 0x302f
movl %r14d, %ebx
movq 0x8(%rsp), %rbp
movq 0x1d42a(%rip), %r15     # 0x205a8
leaq (%r14,%r14,2), %rax
shlq $0x4, %rax
movl $0x7fffffff, 0x24(%r15,%rax) # imm = 0x7FFFFFFF
movq 0x1d41a(%rip), %rax     # 0x205b0
leaq 0x8(%r15), %rcx
xorl %esi, %esi
movslq %esi, %rsi
leaq (%rax,%rsi,2), %rdx
movq %rdx, -0x8(%rcx)
addl (%rcx), %esi
addq $0x30, %rcx
decq %r14
jne 0x319c
movq 0x58(%rsp), %r14
movq %rsi, 0x78(%rsp)
movq 0x1d3d5(%rip), %rax     # 0x20598
movslq %r14d, %rcx
leaq (%rcx,%rcx,4), %rcx
movslq 0x4(%rax,%rcx,8), %rsi
movl 0x1d34b(%rip), %ecx     # 0x20520
leal (%rsi,%rcx), %eax
decl %eax
cltd
idivl %ecx
movq %rsi, 0x40(%rsp)
cmpl 0x1cfd0(%rip), %esi     # 0x201b8
jl 0x3631
cmpl 0x1d3c8(%rip), %eax     # 0x205bc
movsd 0x16e2c(%rip), %xmm2    # 0x1a028
movl %eax, 0x28(%rsp)
jle 0x330c
movl %ebx, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x16df1(%rip), %xmm0    # 0x1a008
addsd 0x16df9(%rip), %xmm0    # 0x1a018
cvttsd2si %xmm0, %eax
movl %eax, 0x1d393(%rip)     # 0x205bc
movq 0x1d390(%rip), %rdi     # 0x205c0
imull $0x33, %eax, %eax
movslq %eax, %rsi
shlq $0x2, %rsi
leaq 0x172cf(%rip), %rbx     # 0x1a510
movq %rbx, %rdx
callq 0x124c9
movq %rax, 0x1d370(%rip)     # 0x205c0
movq 0x1d371(%rip), %rdi     # 0x205c8
movslq 0x1d35e(%rip), %rax     # 0x205bc
imulq $0xcc, %rax, %rsi
movq %rbx, %rdx
callq 0x124c9
movq %rax, 0x1d354(%rip)     # 0x205c8
movq 0x1d355(%rip), %rdi     # 0x205d0
movslq 0x1d33a(%rip), %rsi     # 0x205bc
leaq 0x1729d(%rip), %rdx     # 0x1a526
callq 0x124c9
movq %rax, 0x1d33b(%rip)     # 0x205d0
movq 0x1d324(%rip), %rcx     # 0x205c0
testq %rcx, %rcx
je 0x26b4
movq 0x1d31c(%rip), %rdx     # 0x205c8
testq %rdx, %rdx
je 0x26b4
testq %rax, %rax
je 0x26b4
movl 0x1d2f8(%rip), %eax     # 0x205bc
testl %eax, %eax
movl $0x0, %edi
jle 0x32e5
imull $0x33, %eax, %eax
leal 0x1(%rax), %esi
decl %eax
movl %edi, (%rdx,%rax,4)
movl %edi, (%rcx,%rax,4)
decl %esi
decq %rax
cmpl $0x1, %esi
jg 0x32d5
xorps %xmm0, %xmm0
cvtsi2sdl 0x1d230(%rip), %xmm0 # 0x20520
mulsd 0x16d28(%rip), %xmm0    # 0x1a020
cvttsd2si %xmm0, %eax
movl %eax, 0x1d2d6(%rip)     # 0x205d8
movsd 0x16d1e(%rip), %xmm2    # 0x1a028
movl %ebp, %ebx
movl %ebx, 0x24(%rsp)
testl %ebx, %ebx
jle 0x343f
movl 0x1d2ba(%rip), %eax     # 0x205d8
movl %eax, 0x10(%rsp)
movl 0x24(%rsp), %edi
movq 0x1d293(%rip), %r8      # 0x205c0
movq 0x1d294(%rip), %r9      # 0x205c8
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r12
shlq $0x4, %r12
movq (%r15,%r12), %r14
movl 0x8(%r15,%r12), %r13d
testb $0x1, 0x20(%r15,%r12)
movq %r9, %r11
cmoveq %r8, %r11
movl 0x10(%r15,%r12), %eax
movl 0x1d1c0(%rip), %esi     # 0x20520
cltd
idivl %esi
imull $0x33, %eax, %eax
leal 0x33(%rax), %ebx
xorl %ebp, %ebp
testl %edx, %edx
cmovel %eax, %ebx
setne %bpl
addl %ebp, %ebp
movl 0x18(%r15,%r12), %ecx
movl %ecx, %eax
cltd
idivl %esi
leal -0x2(%r13), %eax
testl %edx, %edx
cmovel %r13d, %eax
cmpl %eax, %ebp
jge 0x33eb
addq %r15, %r12
movl %ebp, %ecx
movl %eax, %r13d
movslq %ebx, %rbx
movzwl (%r14,%rcx,2), %esi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movzwl 0x2(%r14,%rcx,2), %esi
addl 0x1d16f(%rip), %esi     # 0x20520
mulsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movslq %esi, %rbp
cmpq $0x32, %rbp
jl 0x33d2
movl $0x32, %ebp
addq %rbx, %rbp
incl (%r11,%rbp,4)
addq $0x33, %rbx
addq $0x2, %rcx
cmpq %r13, %rcx
jb 0x3399
movl 0x18(%r12), %ecx
cmpl 0x40(%rsp), %ecx
jne 0x3433
cmpl 0x10(%rsp), %edx
jl 0x3433
cltq
movzwl (%r14,%rax,2), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movzwl 0x2(%r14,%rax,2), %eax
addl %eax, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
mulsd %xmm2, %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cmpl $0x32, %eax
movl $0x32, %ecx
cmovgel %ecx, %eax
addl %ebx, %eax
cltq
incl (%r11,%rax,4)
incq %r10
cmpq %rdi, %r10
jne 0x3337
movq 0x1d18a(%rip), %rdi     # 0x205d0
movl 0x28(%rsp), %esi
testl %esi, %esi
movq 0x8(%rsp), %rbp
jle 0x35f7
movq 0x1d16a(%rip), %r15     # 0x205c8
movq 0x1d15b(%rip), %r14     # 0x205c0
movl 0x1cd51(%rip), %ebx     # 0x201bc
movl %esi, %r10d
xorl %r11d, %r11d
leaq 0x1cee8(%rip), %r8      # 0x20360
movq %rdi, 0x10(%rsp)
movq %r10, 0x60(%rsp)
movq %r8, %rax
xorl %ecx, %ecx
movslq (%r14,%rcx,4), %rdx
movslq (%r15,%rcx,4), %rsi
addq %rdx, %rsi
addq %rsi, (%rax)
incq %rcx
addq $0x8, %rax
cmpq $0x33, %rcx
jne 0x3487
xorl %eax, %eax
movl $0xc8, %edx
xorl %ebp, %ebp
xorl %r13d, %r13d
movl %ebp, %ecx
movl (%r14,%rax,4), %esi
movl $0x0, (%r14,%rax,4)
addl %esi, %r13d
movl %eax, %ebp
imull %esi, %ebp
addl %ecx, %ebp
movl %ebx, %ecx
subl %r13d, %ecx
jle 0x34dc
incq %rax
addq $-0x4, %rdx
cmpq $-0x4, %rdx
jne 0x34ae
jmp 0x3510
imull %eax, %ecx
addl %ecx, %ebp
cmpq $0x31, %rax
ja 0x350d
leaq (%r14,%rax,4), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movq %r11, %r12
callq 0x1140
movq %r12, %r11
movq 0x60(%rsp), %r10
movq 0x10(%rsp), %rdi
leaq 0x1ce53(%rip), %r8      # 0x20360
movl %ebx, %r13d
xorl %eax, %eax
movl $0xc8, %edx
xorl %r12d, %r12d
xorl %r9d, %r9d
movl %r12d, %ecx
movl (%r15,%rax,4), %esi
movl $0x0, (%r15,%rax,4)
addl %esi, %r9d
movl %eax, %r12d
imull %esi, %r12d
addl %ecx, %r12d
movl %ebx, %ecx
subl %r9d, %ecx
jle 0x354f
incq %rax
addq $-0x4, %rdx
cmpq $-0x4, %rdx
jne 0x351d
jmp 0x358e
imull %eax, %ecx
addl %ecx, %r12d
cmpq $0x31, %rax
ja 0x358b
leaq (%r15,%rax,4), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movq %r11, 0x80(%rsp)
callq 0x1140
movq 0x80(%rsp), %r11
movq 0x60(%rsp), %r10
movq 0x10(%rsp), %rdi
leaq 0x1cdd5(%rip), %r8      # 0x20360
movl %ebx, %r9d
movl $0x32, %ecx
movl $0x32, %esi
cmpl $0x2, %r13d
jl 0x35a6
movl %ebp, %eax
cltd
idivl %r13d
movl %eax, %esi
cmpl $0x2, %r9d
jl 0x35b5
movl %r12d, %eax
cltd
idivl %r9d
movl %eax, %ecx
cmpl %ecx, %esi
cmovgl %esi, %ecx
movb %cl, (%rdi,%r11)
movl $0xcc, %eax
addq %rax, %r14
addq %rax, %r15
incq %r11
cmpq %r10, %r11
movq 0x8(%rsp), %rbp
jne 0x3482
xorl %eax, %eax
leaq 0x1cbdd(%rip), %rdx     # 0x201c0
movl 0x28(%rsp), %esi
movzbl (%rdi,%rax), %ecx
incq (%rdx,%rcx,8)
incq %rax
cmpq %rax, %r10
jne 0x35e7
incq 0x1cf2a(%rip)           # 0x20528
movq 0x40(%rsp), %rax
addq %rax, 0x1cf26(%rip)     # 0x20530
movslq %esi, %r12
movq 0x1cefc(%rip), %rcx     # 0x20510
movl $0x1, %esi
movq %r12, %rdx
callq 0x12a0
addq %r12, 0x1cef0(%rip)     # 0x20518
movq 0x58(%rsp), %r14
movl 0x24(%rsp), %ebx
movq 0x1ced0(%rip), %rcx     # 0x20508
movl $0x8, %esi
movl $0x1, %edx
leaq 0x1cecf(%rip), %rdi     # 0x20518
callq 0x12a0
incq %r14
movslq 0x1cea8(%rip), %rax     # 0x20500
cmpq %rax, %r14
movq 0x78(%rsp), %rsi
jl 0x2f9f
jmp 0x3679
movl %r14d, %ebx
movq 0x8(%rsp), %rbp
jmp 0x318f
xorl %eax, %eax
jmp 0x3688
movq 0x1cf28(%rip), %rdi     # 0x205a8
movslq %ebx, %rax
movq 0x18(%rsp), %r15
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
cmpl $0x7fffffff, 0x24(%rdi,%rax) # imm = 0x7FFFFFFF
jne 0x3a23
movq 0x1ce63(%rip), %rdi     # 0x20508
leaq 0x98(%rsp), %rsi
callq 0x161b0
movq 0x1ce4f(%rip), %rdi     # 0x20508
leaq 0x130(%rsp), %rsi
callq 0x161b0
movq 0x1ce3b(%rip), %rdi     # 0x20508
leaq 0x110(%rsp), %rsi
callq 0x161b0
movq 0x1ce27(%rip), %rdi     # 0x20508
leaq 0xf0(%rsp), %rsi
callq 0x161b0
movq 0x1ce13(%rip), %rdi     # 0x20508
callq 0x10d0
movq 0x1ce0f(%rip), %rdi     # 0x20510
callq 0x10d0
movq (%rsp), %rdi
callq 0x10d0
cmpl $0x0, 0x1ca9e(%rip)     # 0x201b4
je 0x3971
leaq 0x16c33(%rip), %rdi     # 0x1a356
xorl %eax, %eax
callq 0x1110
movq 0x1cdf7(%rip), %rdi     # 0x20528
movq 0x1c8a0(%rip), %rbx     # 0x1ffd8
movq (%rbx), %rdx
movl $0x7, %esi
callq 0x128c9
leaq 0x16c16(%rip), %rdi     # 0x1a362
xorl %eax, %eax
callq 0x1110
movq 0x1cdd6(%rip), %rdi     # 0x20530
movq (%rbx), %rdx
movl $0xc, %esi
callq 0x128c9
leaq 0x16bfd(%rip), %rdi     # 0x1a36b
xorl %eax, %eax
callq 0x1110
cmpl $0x0, 0x1ca3c(%rip)     # 0x201b8
jle 0x37bc
leaq 0x16bed(%rip), %rdi     # 0x1a372
xorl %eax, %eax
callq 0x1110
movslq 0x1cd6d(%rip), %rdi     # 0x20500
movslq 0x1cd62(%rip), %rax     # 0x204fc
subq %rax, %rdi
subq 0x1cd84(%rip), %rdi     # 0x20528
movq (%rbx), %rdx
xorl %esi, %esi
callq 0x128c9
leaq 0x16bc8(%rip), %rdi     # 0x1a37d
xorl %eax, %eax
callq 0x1110
movl $0xa, %edi
callq 0x1040
xorl %eax, %eax
xorl %ebx, %ebx
xorl %r12d, %r12d
leaq 0x1c9ec(%rip), %rcx     # 0x201c0
leaq 0x1cb85(%rip), %rdx     # 0x20360
addq (%rax,%rdx), %r12
addq (%rax,%rcx), %rbx
addq $0x8, %rax
cmpq $0x198, %rax            # imm = 0x198
jne 0x37db
movl 0x1c9c7(%rip), %esi     # 0x201bc
addl %esi, %esi
leaq 0x16b91(%rip), %rdi     # 0x1a38f
xorl %eax, %eax
callq 0x1110
leaq 0x16d2f(%rip), %rdi     # 0x1a53b
callq 0x10a0
movq 0x1cb38(%rip), %r14     # 0x20350
movq 0x1ccd1(%rip), %r15     # 0x204f0
cvtsi2sd %r15, %xmm0
cvtsi2sd %r12, %xmm1
movsd 0x167e7(%rip), %xmm2    # 0x1a018
mulsd %xmm2, %xmm0
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r14, %xmm1
mulsd %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
divsd %xmm2, %xmm1
leaq 0x16b63(%rip), %rdi     # 0x1a3bb
movl $0x32, %esi
movq %r15, %rdx
movq %r14, %rcx
movb $0x2, %al
callq 0x1110
leaq 0x1caef(%rip), %rdx     # 0x20360
leaq 0x1c948(%rip), %rax     # 0x201c0
subq %r15, %r12
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
movsd %xmm0, 0x10(%rsp)
subq %r14, %rbx
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
movsd %xmm0, (%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x31, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x18(%rsp), %r15
movq (%rax,%rbx,8), %rcx
testq %rcx, %rcx
jle 0x394f
movq (%rdx,%rbx,8), %rdx
addq %rdx, %r13
xorps %xmm0, %xmm0
cvtsi2sd %r13, %xmm0
addq %rcx, %r12
movsd 0x1673d(%rip), %xmm2    # 0x1a018
mulsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
divsd 0x10(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd (%rsp), %xmm1
movl %ebx, %r15d
leaq 0x16aeb(%rip), %rdi     # 0x1a3eb
movl %ebx, %esi
movsd %xmm1, 0x40(%rsp)
movb $0x2, %al
callq 0x1110
movl %ebx, %eax
testl %ebp, %ebp
js 0x3917
movl %ebp, %eax
movsd 0x40(%rsp), %xmm0
ucomisd 0x1670b(%rip), %xmm0    # 0x1a030
cmoval %eax, %ebp
testl %r14d, %r14d
js 0x3930
movl %r14d, %r15d
ucomisd 0x16700(%rip), %xmm0    # 0x1a038
cmoval %r15d, %r14d
leaq 0x1c87d(%rip), %rax     # 0x201c0
leaq 0x1ca16(%rip), %rdx     # 0x20360
movq 0x18(%rsp), %r15
addq $-0x1, %rbx
jb 0x38b4
leaq 0x16ab9(%rip), %rdi     # 0x1a419
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1110
movq 0x8(%rsp), %rbp
movq %r15, %rdi
callq 0x17128
movq %rax, (%rsp)
testq %rax, %rax
jne 0x2a0a
movq %r15, %rdi
callq 0x17207
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x68(%rsp), %rax
jne 0x29de
movq 0x38(%rsp), %rdi
callq 0x1030
movq 0x30(%rsp), %rdi
callq 0x1030
leaq 0x1cb7c(%rip), %rdi     # 0x20538
callq 0x144de
leaq 0x1cc18(%rip), %rax     # 0x205e0
movq (%rax), %rdi
callq 0x1030
xorl %edi, %edi
callq 0x1290
movq 0x1c61a(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1cbf8(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x168d1(%rip), %rsi     # 0x1a2c3
xorl %eax, %eax
callq 0x11b0
movl $0x2, %edi
callq 0x1290
movq 0x1c5ee(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1cbcc(%rip), %rax     # 0x205e0
movq (%rax), %rdx
leaq 0x16857(%rip), %rsi     # 0x1a275
jmp 0x28f0
movq 0x1c5ce(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x1cbac(%rip), %rax     # 0x205e0
movq (%rax), %rdx
movl 0x1cabb(%rip), %ecx     # 0x204f8
leaq 0x16a6f(%rip), %rsi     # 0x1a4b3
jmp 0x26ad
nopl (%rax)