// File: /workspace/github_c_makefile_star2_O2/jsh58[P]Genrich/Genrich.c
// Function: runProgram
void runProgram(char* inFile, char* ctrlFile, char* outFile,
    char* logFile, char* pileFile, char* bedFile,
    bool gzOut, bool singleOpt, bool extendOpt, int extend,
    bool avgExtOpt, int minMapQ, int xcount,
    char** xchrList, char* xFile, float pqvalue,
    bool qvalOpt, int minLen, int maxGap, float minAUC,
    float asDiff, bool atacOpt, int atacLen5, int atacLen3,
    bool atacAdj, bool dupsOpt, char* dupsFile,
    bool peaksOpt, bool peaksOnly, bool sortOpt,
    uint64_t genomeLen, bool verbose) {

  // option to call peaks only, from already produced log file
  if (peaksOnly) {
    findPeaksOnly(logFile, outFile, gzOut, xcount,
      xchrList, xFile, pqvalue, qvalOpt, minLen, maxGap,
      minAUC, genomeLen, verbose);
    return;
  }

  // open optional output files
  File bed, pile, dups;
  if (bedFile != NULL)
    openWrite(bedFile, &bed, gzOut);
  if (pileFile != NULL)
    openWrite(pileFile, &pile, gzOut);
  bool dupsVerb = false;
  if (dupsOpt && dupsFile != NULL) {
    openWrite(dupsFile, &dups, gzOut);
    dupsVerb = true;
  }

  // initialize variables
  char* line = (char*) memalloc(MAX_SIZE);
  int chromLen = 0;     // number of reference sequences
  Chrom* chrom = NULL;  // array of reference sequences
  Aln* aln = (Aln*) memalloc(MAX_ALNS * sizeof(Aln)); // array of saved alns
  int unpairMem = 0;    // number of unpaired alns (for avg-ext option)
  Aln** unpair = NULL;  // array of unpaired alns (for avg-ext option)
  char* readName = memalloc(MAX_ALNS + 1);  // name of read being analyzed
  readName[0] = readName[MAX_ALNS] = '\0';
  int sample = 0;       // number of sample pairs analyzed

  // variables for duplicate removal option
  Read** readPr = NULL;     // array of reads with properly paired aln(s)
  int readMemPr = 0;        // index into readPr array
  Read** readDc = NULL;     // array of reads with discordant aln(s)
  int readMemDc = 0;        // index into readDc array
  Read** readSn = NULL;     // array of reads with singleton aln(s)
  int readMemSn = 0;        // index into readSn array
  HashAln** table = NULL;   // hashtable for paired/discordant alns (recycled)
  uint32_t tableMem = 0;    // size of above hashtable
  HashAln** tableSn = NULL; // hashtable for singletons alns
  uint32_t tableSnMem = 0;  // size of above hashtable
  uint32_t* order = NULL;   // array for order of reads to be processed
  uint32_t* order0 = NULL;  // |
  uint32_t* order1 = NULL;  // | temp arrays for order
  uint32_t* order2 = NULL;  // |
  uint16_t* qual = NULL;    // array of quality score sums (sorting key)
  uint16_t* qual0 = NULL;   // |
  uint16_t* qual1 = NULL;   // | temp arrays for qual
  uint16_t* qual2 = NULL;   // |
  uint32_t arrMem = 0;      // length of above order/qual arrays

  // save genomic regions to exclude
  Bed* xBed = NULL;
  int xBedLen = 0;
  if (xFile != NULL)
    xBedLen = loadBED(xFile, line, &xBed);

  // loop through input files (experimental and control)
  char* end1, *end2;
  char* exptName = strtok_r(inFile, COM, &end1);
  char* ctrlName = ctrlFile == NULL ? NULL
    : strtok_r(ctrlFile, COM, &end2);
  while (exptName) {

    // reset 'save' bools of each Chrom
    for (int j = 0; j < chromLen; j++)
      (chrom + j)->save = false;

    // process matching experimental/control files
    double fragLen = 0.0; // total weighted length of all experimental fragments
    for (int i = 0; i < 2; i++) {

      // get expt/ctrl filename
      char* filename = exptName;
      if (i) {
        filename = ctrlName;
        if (ctrlName != NULL && !strcmp(ctrlName, "null"))
          filename = NULL;
        if (filename == NULL) {
          if (verbose)
            fprintf(stderr, "- control file #%d not provided -\n",
              sample);
          savePileupNoCtrl(chrom, chromLen, fragLen,
            genomeLen, verbose);
          break;
        }
      }

      // open input file
      File in;
      bool gz = openRead(filename, &in);
      bool bam = checkBAM(in, gz);
      if (verbose)
        fprintf(stderr, "Processing %s file #%d: %s\n",
          i ? "control" : "experimental", sample, filename);
      if (dupsVerb) {
        if (gzOut)
          gzprintf(dups.gzf, "# %s file #%d: %s\n",
            i ? "control" : "experimental", sample, filename);
        else
          fprintf(dups.f, "# %s file #%d: %s\n",
            i ? "control" : "experimental", sample, filename);
      }

      // reset 'diff' array for each Chrom
      for (int j = 0; j < chromLen; j++) {
        Chrom* c = chrom + j;
        if (c->diff != NULL)
          for (int k = 0; k < 1 + c->len; k++) {
            c->diff->frac[k] = 0;
            c->diff->cov[k] = 0;
          }
      }

      // load and process alignments
      uint64_t unmapped = 0, paired = 0, single = 0,
        orphan = 0, pairedPr = 0, singlePr = 0, supp = 0,
        skipped = 0, lowMapQ = 0, secPair = 0,
        secSingle = 0, countPr = 0, dupsPr = 0,
        countDc = 0, dupsDc = 0, countSn = 0, dupsSn = 0,
        errCount = 0;  // counting variables
      double totalLen = 0.0;  // total weighted length of paired fragments
      uint64_t count;
      if (bam)
        count = readBAM(in.gzf, line, &aln, readName,
          &totalLen, &unmapped, &paired, &single,
          &pairedPr, &singlePr, &supp, &skipped, &lowMapQ,
          minMapQ, xcount, xchrList, xBedLen, xBed,
          &secPair, &secSingle, &orphan, &chromLen, &chrom,
          singleOpt, extendOpt, extend, avgExtOpt, &unpair,
          &unpairMem, asDiff, atacOpt, atacLen5, atacLen3,
          atacAdj, bed, bedFile != NULL, gzOut, i, sample,
          dupsOpt, dups, dupsVerb, &readPr, &readMemPr,
          &readDc, &readMemDc, &readSn, &readMemSn, &table,
          &tableMem, &tableSn, &tableSnMem, &order,
          &order0, &order1, &order2, &qual, &qual0, &qual1,
          &qual2, &arrMem, &countPr, &dupsPr, &countDc,
          &dupsDc, &countSn, &dupsSn, &errCount, sortOpt,
          verbose);
      else
        count = readSAM(in, gz, line, &aln, readName,
          &totalLen, &unmapped, &paired, &single,
          &pairedPr, &singlePr, &supp, &skipped, &lowMapQ,
          minMapQ, xcount, xchrList, xBedLen, xBed,
          &secPair, &secSingle, &orphan, &chromLen, &chrom,
          singleOpt, extendOpt, extend, avgExtOpt, &unpair,
          &unpairMem, asDiff, atacOpt, atacLen5, atacLen3,
          atacAdj, bed, bedFile != NULL, gzOut, i, sample,
          dupsOpt, dups, dupsVerb, &readPr, &readMemPr,
          &readDc, &readMemDc, &readSn, &readMemSn, &table,
          &tableMem, &tableSn, &tableSnMem, &order,
          &order0, &order1, &order2, &qual, &qual0, &qual1,
          &qual2, &arrMem, &countPr, &dupsPr, &countDc,
          &dupsDc, &countSn, &dupsSn, &errCount, sortOpt,
          verbose);

      // log counts
      if (verbose)
        logCounts(count, unmapped, supp, skipped, chrom,
          chromLen, minMapQ, lowMapQ, paired, secPair,
          orphan, single, secSingle, singlePr, pairedPr,
          totalLen, singleOpt, extendOpt, extend,
          avgExtOpt, bam, atacOpt, atacLen5 + atacLen3,
          dupsOpt, countPr, dupsPr, countDc, dupsDc,
          countSn, dupsSn, errCount);

      // save pileup values
      if (i)
        savePileupCtrl(chrom, chromLen, fragLen, genomeLen,
          verbose);
      else
        fragLen = savePileupExpt(chrom, chromLen);

      // close input file
      if ( (gz && gzclose(in.gzf) != Z_OK)
          || (! gz && fclose(in.f)) )
        exit(error(filename, ERRCLOSE));
    }

    // calculate p-values
    savePval(chrom, chromLen, sample, pile,
      pileFile != NULL, exptName, ctrlName, gzOut);

    exptName = strtok_r(NULL, COM, &end1);
    ctrlName = ctrlFile == NULL ? NULL
      : strtok_r(NULL, COM, &end2);
    sample++;
  }

  // free 'diff' arrays
  for (int i = 0; i < chromLen; i++) {
    Chrom* chr = chrom + i;
    if (chr->diff) {
      free(chr->diff->frac);
      free(chr->diff->cov);
      free(chr->diff);
    }
  }

  // open output files
  File out, log;
  if (peaksOpt)
    openWrite(outFile, &out, gzOut);
  if (logFile != NULL)
    openWrite(logFile, &log, gzOut);

  // find peaks
  findPeaks(out, log, logFile != NULL, gzOut, chrom,
    chromLen, &sample, pqvalue, qvalOpt, minLen,
    maxGap, minAUC, peaksOpt, genomeLen, verbose);

  // free memory
  if (xcount) {
    for (int i = 0; i < xcount; i++)
      free(xchrList[i]);
    free(xchrList);
  }
  if (xBedLen) {
    for (int i = 0; i < xBedLen; i++)
      free(xBed[i].name);
    free(xBed);
  }
  if (avgExtOpt) {
    for (int i = 0; i < unpairMem; i++)
      free(unpair[i]);
    free(unpair);
  }
  if (dupsOpt) {
    for (int i = 0; i < readMemPr; i++)
      free(readPr[i]);
    free(readPr);
    for (int i = 0; i < readMemDc; i++)
      free(readDc[i]);
    free(readDc);
    for (int i = 0; i < readMemSn; i++)
      free(readSn[i]);
    free(readSn);
    free(table);
    free(tableSn);
    free(order);
    free(order0);
    free(order1);
    free(order2);
    free(qual);
    free(qual0);
    free(qual1);
    free(qual2);
  }
  for (int i = 0; i < chromLen; i++) {
    Chrom* chr = chrom + i;
    if (! chr->skip) {
      if (chr->bedLen)
        free(chr->bed);
      if (qvalOpt && chr->qval) {
        free(chr->qval->end);
        free(chr->qval->cov);
        free(chr->qval);
      }
      for (int j = 0; j < sample; j++) {
        if (chr->pval[j]) {
          free(chr->pval[j]->end);
          free(chr->pval[j]->cov);
          free(chr->pval[j]);
        }
      }
      free(chr->pval);
      free(chr->pvalLen);
      free(chr->ctrl->end);
      free(chr->ctrl->cov);
      free(chr->expt->end);
      free(chr->expt->cov);
    }
    free(chr->ctrl);
    free(chr->expt);
    free(chr->name);
  }
  free(chrom);
  free(aln);
  free(readName);
  free(line);

  // close files
  if (peaksOpt && ( ( gzOut && gzclose(out.gzf) != Z_OK )
      || ( ! gzOut && fclose(out.f) ) ) )
    exit(error(outFile, ERRCLOSE));
  if (logFile != NULL && ( ( ! gzOut && fclose(log.f) )
      || ( gzOut && gzclose(log.gzf) != Z_OK ) ) )
    exit(error(logFile, ERRCLOSE));
  if (pileFile != NULL && ( ( ! gzOut && fclose(pile.f) )
      || ( gzOut && gzclose(pile.gzf) != Z_OK ) ) )
    exit(error(pileFile, ERRCLOSE));
  if (bedFile != NULL && ( ( ! gzOut && fclose(bed.f) )
      || ( gzOut && gzclose(bed.gzf) != Z_OK ) ) )
    exit(error(bedFile, ERRCLOSE));
  if (dupsVerb && ( ( ! gzOut && fclose(dups.f) )
      || ( gzOut && gzclose(dups.gzf) != Z_OK ) ) )
    exit(error(dupsFile, ERRCLOSE));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movss %xmm2, 0x58(%rsp)
movq %r9, %r15
movq %r8, %rbp
movq %rsi, 0x1f0(%rsp)
movl 0x2e8(%rsp), %r12d
movl 0x2e0(%rsp), %r10d
movq 0x2d0(%rsp), %r14
movq 0x2c8(%rsp), %r8
movl 0x2c0(%rsp), %eax
cmpb $0x0, 0x328(%rsp)
movzbl 0x340(%rsp), %r13d
movzbl 0x2d8(%rsp), %r11d
movzbl 0x290(%rsp), %r9d
je 0xe24a
subq $0x8, %rsp
movq %rcx, %rdi
movq %rdx, %rsi
movl %r9d, %edx
movl %eax, %ecx
movq %r14, %r9
pushq %r13
pushq 0x348(%rsp)
pushq %r12
pushq %r10
pushq %r11
callq 0xd8be
addq $0x288, %rsp            # imm = 0x288
jmp 0xf3f4
movq %rdi, %rbx
movq %r13, 0x40(%rsp)
movss %xmm0, 0x1e0(%rsp)
movss %xmm1, 0x1e4(%rsp)
movq %r11, 0x230(%rsp)
movq %rdx, 0x1e8(%rsp)
movq %rcx, 0x28(%rsp)
testq %r15, %r15
movq %r9, %r13
je 0xe294
leaq 0x1d8(%rsp), %rsi
movq %r15, %rdi
movl %r13d, %edx
callq 0xd384
movq 0x318(%rsp), %r12
testq %rbp, %rbp
je 0xe2b4
leaq 0x228(%rsp), %rsi
movq %rbp, %rdi
movl %r13d, %edx
callq 0xd384
testq %r12, %r12
setne %al
andb 0x310(%rsp), %al
movb %al, 0x7(%rsp)
cmpb $0x1, %al
jne 0xe2dc
leaq 0x1d0(%rsp), %rsi
movq %r12, %rdi
movl %r13d, %edx
callq 0xd384
movl $0xfff0, %edi           # imm = 0xFFF0
callq 0x2752
andl $0x0, 0xc(%rsp)
movq %rax, %r12
andq $0x0, 0x10(%rsp)
movl $0x1400, %edi           # imm = 0x1400
callq 0x2752
andl $0x0, 0x24(%rsp)
movq %rax, 0x1c8(%rsp)
andq $0x0, 0x1c0(%rsp)
movl $0x81, %edi
callq 0x2752
andl $0x0, 0x8(%rsp)
andq $0x0, 0x1b8(%rsp)
andl $0x0, 0x20(%rsp)
andq $0x0, 0x1b0(%rsp)
andl $0x0, 0x1c(%rsp)
andq $0x0, 0x1a8(%rsp)
andl $0x0, 0x18(%rsp)
andq $0x0, 0x1a0(%rsp)
andl $0x0, 0x64(%rsp)
andq $0x0, 0x198(%rsp)
andl $0x0, 0x60(%rsp)
andq $0x0, 0x190(%rsp)
andq $0x0, 0x188(%rsp)
andq $0x0, 0x180(%rsp)
andq $0x0, 0x178(%rsp)
andq $0x0, 0x170(%rsp)
andq $0x0, 0x168(%rsp)
xorl %ecx, %ecx
andq $0x0, 0x160(%rsp)
movb %cl, 0x80(%rax)
andq $0x0, 0x158(%rsp)
movq %rax, 0xb0(%rsp)
movb %cl, (%rax)
andl $0x0, 0x5c(%rsp)
andq $0x0, 0xa0(%rsp)
testq %r14, %r14
je 0xe3eb
leaq 0xa0(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0xd6cd
movl %eax, %ecx
movq %rcx, 0xa8(%rsp)
leaq 0x371e(%rip), %rsi      # 0x11b18
leaq 0x250(%rsp), %rdx
movq %rbx, %rdi
callq 0x2180
movq %rax, 0x80(%rsp)
movq 0x1f0(%rsp), %rdi
testq %rdi, %rdi
movq %r13, 0x30(%rsp)
je 0xe43f
leaq 0x36ed(%rip), %rsi      # 0x11b18
leaq 0x248(%rsp), %rdx
callq 0x2180
movq %rax, 0x38(%rsp)
jmp 0xe448
movq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %r14
movq %r12, 0xb8(%rsp)
movq %r15, 0x70(%rsp)
movl 0x300(%rsp), %eax
movl 0x2f8(%rsp), %ecx
addl %ecx, %eax
movq %rax, 0x238(%rsp)
xorl %eax, %eax
movq %rbp, 0x68(%rsp)
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
movl $0x0, %r13d
cmovgl %ebx, %r13d
movq 0x10(%rsp), %r12
cmpq $0x0, 0x80(%rsp)
je 0xee7b
movq %rax, 0x78(%rsp)
imulq $0x68, %r13, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xe4b9
movb $0x0, 0xd(%r12,%rcx)
addq $0x68, %rcx
jmp 0xe4a8
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rsp)
cmpl $0x2, %ebp
je 0xedc5
movq 0x80(%rsp), %r15
testl %ebp, %ebp
je 0xe504
cmpq $0x0, 0x38(%rsp)
je 0xed85
movq 0x38(%rsp), %r15
movq %r15, %rdi
leaq 0x360a(%rip), %rsi      # 0x11b01
callq 0x21a0
testl %eax, %eax
je 0xed85
movq %r15, 0x88(%rsp)
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0xd585
movq 0x50(%rsp), %rdi
movb %al, 0x48(%rsp)
movzbl %al, %ebx
movl %ebx, %esi
callq 0xd4d9
movl %eax, %r12d
cmpb $0x0, 0x340(%rsp)
jne 0xed48
movb 0x7(%rsp), %r15b
testb %r15b, %r15b
je 0xe598
testl %ebp, %ebp
movq 0x1d0(%rsp), %rdi
leaq 0x3920(%rip), %rdx      # 0x11e78
leaq 0x3911(%rip), %rax      # 0x11e70
cmovneq %rax, %rdx
movl 0x8(%rsp), %ecx
leaq 0x3917(%rip), %rsi      # 0x11e85
cmpb $0x0, 0x290(%rsp)
je 0xe589
movq 0x88(%rsp), %r8
xorl %eax, %eax
callq 0x20e0
jmp 0xe598
movq 0x88(%rsp), %r8
xorl %eax, %eax
callq 0x21c0
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
testl %eax, %eax
movl $0x0, %edx
cmovlel %edx, %eax
xorl %edx, %edx
cmpq %rax, %rdx
je 0xe5f2
imulq $0x68, %rdx, %rsi
movq 0x20(%rcx,%rsi), %rdi
testq %rdi, %rdi
je 0xe5ed
addq %rcx, %rsi
xorl %r8d, %r8d
movl 0x8(%rsi), %r9d
incl %r9d
cmpq %r9, %r8
jae 0xe5ed
movq (%rdi), %rdi
movb $0x0, (%rdi,%r8)
movq 0x20(%rsi), %rdi
movq 0x8(%rdi), %r9
andw $0x0, (%r9,%r8,2)
incq %r8
jmp 0xe5c6
incq %rdx
jmp 0xe5ad
andq $0x0, 0x98(%rsp)
andq $0x0, 0x150(%rsp)
andq $0x0, 0x148(%rsp)
andq $0x0, 0x140(%rsp)
andq $0x0, 0x138(%rsp)
andq $0x0, 0x130(%rsp)
andq $0x0, 0x128(%rsp)
andq $0x0, 0x120(%rsp)
andq $0x0, 0x118(%rsp)
andq $0x0, 0x110(%rsp)
andq $0x0, 0x108(%rsp)
andq $0x0, 0x100(%rsp)
andq $0x0, 0xf8(%rsp)
andq $0x0, 0xf0(%rsp)
andq $0x0, 0xe8(%rsp)
andq $0x0, 0xe0(%rsp)
andq $0x0, 0xd8(%rsp)
andq $0x0, 0xd0(%rsp)
andq $0x0, 0xc8(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x200(%rsp)
movq 0x1d0(%rsp), %r11
movzbl 0x310(%rsp), %r13d
movzbl 0x2f0(%rsp), %eax
movq %rax, 0x220(%rsp)
movzbl 0x2b0(%rsp), %eax
movq %rax, 0x218(%rsp)
movzbl 0x2a0(%rsp), %eax
movq %rax, 0x210(%rsp)
movzbl 0x298(%rsp), %eax
movq %rax, 0x208(%rsp)
movzbl 0x330(%rsp), %r14d
movzbl %r15b, %r10d
movzbl 0x308(%rsp), %eax
movq %rax, 0x1f8(%rsp)
movb %r12b, 0x90(%rsp)
testb %r12b, %r12b
movq %r13, 0x240(%rsp)
je 0xe9a3
xorl %r12d, %r12d
testl %ebp, %ebp
setne %r12b
xorl %ebx, %ebx
cmpq $0x0, 0x70(%rsp)
setne %bl
movq 0x50(%rsp), %r15
movl 0x8(%rsp), %eax
subq $0x8, %rsp
movq %r15, %rdi
movq 0xc0(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
leaq 0xd0(%rsp), %r8
leaq 0xa0(%rsp), %r9
movss 0x60(%rsp), %xmm0
pushq 0x48(%rsp)
pushq %r14
leaq 0xe8(%rsp), %r14
pushq %r14
leaq 0xf8(%rsp), %r14
pushq %r14
leaq 0x108(%rsp), %r14
pushq %r14
leaq 0x118(%rsp), %r14
pushq %r14
leaq 0x128(%rsp), %r14
pushq %r14
leaq 0x138(%rsp), %r14
pushq %r14
leaq 0x148(%rsp), %r14
pushq %r14
leaq 0xac(%rsp), %r14
pushq %r14
leaq 0x1b0(%rsp), %r14
pushq %r14
leaq 0x1c0(%rsp), %r14
pushq %r14
leaq 0x1d0(%rsp), %r14
pushq %r14
leaq 0x1e0(%rsp), %r14
pushq %r14
leaq 0x1f0(%rsp), %r14
pushq %r14
leaq 0x200(%rsp), %r14
pushq %r14
leaq 0x210(%rsp), %r14
pushq %r14
leaq 0x220(%rsp), %r14
pushq %r14
leaq 0xf8(%rsp), %r14
pushq %r14
leaq 0x238(%rsp), %r14
pushq %r14
leaq 0x10c(%rsp), %r14
pushq %r14
leaq 0x250(%rsp), %r14
pushq %r14
leaq 0xd0(%rsp), %r14
pushq %r14
leaq 0x268(%rsp), %r14
pushq %r14
leaq 0xe4(%rsp), %r14
pushq %r14
leaq 0x280(%rsp), %r14
pushq %r14
leaq 0xf8(%rsp), %r14
pushq %r14
leaq 0x298(%rsp), %r14
pushq %r14
pushq %r10
pushq %r11
pushq %r13
movq %rax, 0x178(%rsp)
pushq %rax
pushq %r12
pushq 0x140(%rsp)
pushq %rbx
pushq 0x320(%rsp)
pushq 0x320(%rsp)
movl 0x430(%rsp), %eax
pushq %rax
movl 0x430(%rsp), %eax
pushq %rax
movq 0x360(%rsp), %r12
pushq %r12
leaq 0x16c(%rsp), %rax
pushq %rax
leaq 0x310(%rsp), %rax
pushq %rax
movq 0x370(%rsp), %r14
pushq %r14
movl 0x408(%rsp), %eax
pushq %rax
movq 0x378(%rsp), %rbx
pushq %rbx
movq 0x378(%rsp), %r13
pushq %r13
leaq 0x188(%rsp), %rax
pushq %rax
leaq 0x18c(%rsp), %rax
pushq %rax
leaq 0x2c8(%rsp), %rax
pushq %rax
leaq 0x298(%rsp), %rax
pushq %rax
leaq 0x2a8(%rsp), %rax
pushq %rax
pushq 0x240(%rsp)
pushq 0x250(%rsp)
pushq 0x478(%rsp)
movl 0x478(%rsp), %eax
pushq %rax
movl 0x478(%rsp), %eax
pushq %rax
leaq 0x2e0(%rsp), %rax
pushq %rax
leaq 0x2f0(%rsp), %rax
pushq %rax
leaq 0x300(%rsp), %rax
pushq %rax
leaq 0x310(%rsp), %rax
pushq %rax
leaq 0x320(%rsp), %rax
pushq %rax
leaq 0x338(%rsp), %rax
pushq %rax
leaq 0x348(%rsp), %rax
pushq %rax
callq 0xcf43
jmp 0xebf5
xorl %r15d, %r15d
testl %ebp, %ebp
setne %r15b
xorl %r12d, %r12d
cmpq $0x0, 0x70(%rsp)
setne %r12b
movl 0x8(%rsp), %eax
movq 0x50(%rsp), %rdi
movl %ebx, %esi
movq 0xb8(%rsp), %rdx
leaq 0x1c8(%rsp), %rcx
movq 0xb0(%rsp), %r8
leaq 0xc8(%rsp), %r9
movss 0x58(%rsp), %xmm0
pushq 0x40(%rsp)
pushq %r14
leaq 0xe0(%rsp), %rbx
pushq %rbx
leaq 0xf0(%rsp), %rbx
pushq %rbx
leaq 0x100(%rsp), %rbx
pushq %rbx
leaq 0x110(%rsp), %rbx
pushq %rbx
leaq 0x120(%rsp), %rbx
pushq %rbx
leaq 0x130(%rsp), %rbx
pushq %rbx
leaq 0x140(%rsp), %rbx
pushq %rbx
leaq 0xa4(%rsp), %rbx
pushq %rbx
leaq 0x1a8(%rsp), %rbx
pushq %rbx
leaq 0x1b8(%rsp), %rbx
pushq %rbx
leaq 0x1c8(%rsp), %rbx
pushq %rbx
leaq 0x1d8(%rsp), %rbx
pushq %rbx
leaq 0x1e8(%rsp), %rbx
pushq %rbx
leaq 0x1f8(%rsp), %rbx
pushq %rbx
leaq 0x208(%rsp), %rbx
pushq %rbx
leaq 0x218(%rsp), %rbx
pushq %rbx
leaq 0xf0(%rsp), %rbx
pushq %rbx
leaq 0x230(%rsp), %rbx
pushq %rbx
leaq 0x104(%rsp), %rbx
pushq %rbx
leaq 0x248(%rsp), %rbx
pushq %rbx
leaq 0xc8(%rsp), %rbx
pushq %rbx
leaq 0x260(%rsp), %rbx
pushq %rbx
leaq 0xdc(%rsp), %rbx
pushq %rbx
leaq 0x278(%rsp), %rbx
pushq %rbx
leaq 0xf0(%rsp), %rbx
pushq %rbx
leaq 0x290(%rsp), %rbx
pushq %rbx
pushq %r10
pushq %r11
pushq %r13
movq %rax, 0x170(%rsp)
pushq %rax
pushq %r15
movq %rdi, %r15
pushq 0x138(%rsp)
pushq %r12
pushq 0x318(%rsp)
pushq 0x318(%rsp)
movl 0x428(%rsp), %eax
pushq %rax
movl 0x428(%rsp), %eax
pushq %rax
movq 0x358(%rsp), %r12
pushq %r12
leaq 0x164(%rsp), %rax
pushq %rax
leaq 0x308(%rsp), %rax
pushq %rax
movq 0x368(%rsp), %r14
pushq %r14
movl 0x400(%rsp), %eax
pushq %rax
movq 0x370(%rsp), %rbx
pushq %rbx
movq 0x370(%rsp), %r13
pushq %r13
leaq 0x180(%rsp), %rax
pushq %rax
leaq 0x184(%rsp), %rax
pushq %rax
leaq 0x2c0(%rsp), %rax
pushq %rax
leaq 0x290(%rsp), %rax
pushq %rax
leaq 0x2a0(%rsp), %rax
pushq %rax
pushq 0x238(%rsp)
pushq 0x248(%rsp)
pushq 0x470(%rsp)
movl 0x470(%rsp), %eax
pushq %rax
movl 0x470(%rsp), %eax
pushq %rax
leaq 0x2d8(%rsp), %rax
pushq %rax
leaq 0x2e8(%rsp), %rax
pushq %rax
leaq 0x2f8(%rsp), %rax
pushq %rax
leaq 0x308(%rsp), %rax
pushq %rax
leaq 0x318(%rsp), %rax
pushq %rax
leaq 0x330(%rsp), %rax
pushq %rax
leaq 0x340(%rsp), %rax
pushq %rax
leaq 0x290(%rsp), %rax
pushq %rax
callq 0xb861
addq $0x200, %rsp            # imm = 0x200
cmpb $0x0, 0x340(%rsp)
movb 0x90(%rsp), %dil
je 0xece0
movq 0x98(%rsp), %rsi
movq 0x128(%rsp), %rdx
movq 0x120(%rsp), %rcx
movq 0x10(%rsp), %r8
movl 0xc(%rsp), %r9d
movsd 0xc8(%rsp), %xmm0
movzbl %dil, %r10d
movq %rax, %rdi
pushq 0xd0(%rsp)
pushq 0xe0(%rsp)
pushq 0xf0(%rsp)
pushq 0x100(%rsp)
pushq 0x110(%rsp)
pushq 0x120(%rsp)
pushq 0x130(%rsp)
pushq 0x278(%rsp)
pushq 0x278(%rsp)
pushq %r12
pushq %r10
pushq %r14
movl 0x308(%rsp), %eax
pushq %rax
pushq %rbx
pushq %r13
pushq 0x1b0(%rsp)
pushq 0x1b0(%rsp)
pushq 0x190(%rsp)
pushq 0x1d8(%rsp)
pushq 0x1d8(%rsp)
pushq 0x1b0(%rsp)
pushq 0x1f8(%rsp)
pushq 0x1c8(%rsp)
movl 0x370(%rsp), %eax
pushq %rax
callq 0xdabf
addq $0xc0, %rsp
movq 0x10(%rsp), %r12
movl 0xc(%rsp), %ebx
testl %ebp, %ebp
movq 0x40(%rsp), %r14
movq %r12, %rdi
movl %ebx, %esi
je 0xed12
movsd 0xc0(%rsp), %xmm0
movq 0x338(%rsp), %rdx
movl %r14d, %ecx
callq 0x699c
jmp 0xed20
callq 0x6d79
movsd %xmm0, 0xc0(%rsp)
cmpb $0x0, 0x48(%rsp)
je 0xed31
movq %r15, %rdi
callq 0x2030
jmp 0xed39
movq %r15, %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf3ff
incl %ebp
jmp 0xe4c7
testl %ebp, %ebp
movq 0x82a7(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x311d(%rip), %rdx      # 0x11e78
leaq 0x310e(%rip), %rax      # 0x11e70
cmovneq %rax, %rdx
movl 0x8(%rsp), %ecx
leaq 0x30e3(%rip), %rsi      # 0x11e54
movq 0x88(%rsp), %r8
xorl %eax, %eax
callq 0x21c0
jmp 0xe53d
cmpb $0x0, 0x340(%rsp)
movq 0x68(%rsp), %rbp
jne 0xee59
movq %r12, %rdi
movl %ebx, %esi
movsd 0xc0(%rsp), %xmm0
movq 0x338(%rsp), %rdx
movl %r14d, %ecx
callq 0x6585
movq 0x10(%rsp), %r12
movl 0xc(%rsp), %ebx
movl 0x8(%rsp), %edx
jmp 0xedcf
movq 0x68(%rsp), %rbp
movq 0x78(%rsp), %rdx
xorl %r8d, %r8d
testq %rbp, %rbp
setne %r8b
movq 0x228(%rsp), %rcx
movq %r12, %rdi
movl %ebx, %esi
movq 0x80(%rsp), %r9
pushq 0x30(%rsp)
pushq 0x40(%rsp)
callq 0x601d
popq %rax
popq %rcx
xorl %edi, %edi
leaq 0x2d12(%rip), %rbx      # 0x11b18
movq %rbx, %rsi
leaq 0x250(%rsp), %rdx
callq 0x2180
movq %rax, 0x80(%rsp)
movl $0x0, %eax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x1f0(%rsp)
je 0xee4a
xorl %edi, %edi
movq %rbx, %rsi
leaq 0x248(%rsp), %rdx
callq 0x2180
movq %rax, 0x38(%rsp)
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
jmp 0xe479
movq 0x8198(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x2fc7(%rip), %rsi      # 0x11e31
movq 0x78(%rsp), %rdx
xorl %eax, %eax
callq 0x21c0
jmp 0xed98
xorl %r14d, %r14d
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
imulq $0x68, %rax, %r15
cmpq %r14, %r15
je 0xeec1
movq 0x20(%r12,%r14), %rax
testq %rax, %rax
je 0xeebb
movq (%rax), %rdi
callq 0x2040
movq 0x20(%r12,%r14), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0x20(%r12,%r14), %rdi
callq 0x2040
addq $0x68, %r14
jmp 0xee8c
cmpb $0x0, 0x320(%rsp)
je 0xeee2
leaq 0x50(%rsp), %rsi
movq 0x1e8(%rsp), %rdi
movq 0x30(%rsp), %rdx
callq 0xd384
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
movq 0x338(%rsp), %r11
je 0xef26
leaq 0x98(%rsp), %r14
movq %r14, %rsi
movq 0x30(%rsp), %r15
movl %r15d, %edx
callq 0xd384
movq 0x338(%rsp), %r11
movq 0x28(%rsp), %rdi
movq (%r14), %rsi
movq 0x2c8(%rsp), %r14
jmp 0xef33
movq 0x2c8(%rsp), %r14
movq 0x30(%rsp), %r15
xorl %edx, %edx
testq %rdi, %rdi
setne %dl
movq 0x50(%rsp), %rdi
subq $0x8, %rsp
movzbl 0x328(%rsp), %eax
leaq 0x10(%rsp), %r10
movq %rdi, 0x98(%rsp)
movq %rsi, 0x50(%rsp)
movl %r15d, %ecx
movq %r12, %r8
movl %ebx, %r9d
movss 0x1e8(%rsp), %xmm0
movss 0x1ec(%rsp), %xmm1
pushq 0x48(%rsp)
pushq %r11
pushq %rax
movl 0x308(%rsp), %eax
pushq %rax
movl 0x308(%rsp), %eax
pushq %rax
pushq 0x260(%rsp)
pushq %r10
callq 0x470d
addq $0x40, %rsp
movl 0x2c0(%rsp), %r15d
testl %r15d, %r15d
je 0xefd3
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
cmpq %rbx, %r15
je 0xefcb
movq (%r14,%rbx,8), %rdi
callq 0x2040
incq %rbx
jmp 0xefb8
movq %r14, %rdi
callq 0x2040
movq 0xa8(%rsp), %rax
testl %eax, %eax
je 0xf017
movq 0xa0(%rsp), %rbx
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %eax
shlq $0x4, %rax
cmpq %r14, %rax
je 0xf00f
movq 0x8(%rbx,%r14), %rdi
movq %rax, %r15
callq 0x2040
movq %r15, %rax
addq $0x10, %r14
jmp 0xeff4
movq %rbx, %rdi
callq 0x2040
cmpb $0x0, 0x2b0(%rsp)
movb 0x7(%rsp), %al
je 0xf05b
movl 0x24(%rsp), %r14d
movq 0x1c0(%rsp), %rbx
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0xf04f
movq (%rbx,%r15,8), %rdi
callq 0x2040
incq %r15
jmp 0xf03c
movq %rbx, %rdi
callq 0x2040
movb 0x7(%rsp), %al
cmpb $0x0, 0x310(%rsp)
je 0xf185
movl 0x20(%rsp), %r14d
movq 0x1b8(%rsp), %rbx
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0xf093
movq (%rbx,%r15,8), %rdi
callq 0x2040
incq %r15
jmp 0xf080
movq %rbx, %rdi
callq 0x2040
movl 0x1c(%rsp), %r14d
movq 0x1b0(%rsp), %rbx
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0xf0c5
movq (%rbx,%r15,8), %rdi
callq 0x2040
incq %r15
jmp 0xf0b2
movq %rbx, %rdi
callq 0x2040
movl 0x18(%rsp), %r14d
movq 0x1a8(%rsp), %rbx
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0xf0f7
movq (%rbx,%r15,8), %rdi
callq 0x2040
incq %r15
jmp 0xf0e4
movq %rbx, %rdi
callq 0x2040
movq 0x1a0(%rsp), %rdi
callq 0x2040
movq 0x198(%rsp), %rdi
callq 0x2040
movq 0x190(%rsp), %rdi
callq 0x2040
movq 0x188(%rsp), %rdi
callq 0x2040
movq 0x180(%rsp), %rdi
callq 0x2040
movq 0x178(%rsp), %rdi
callq 0x2040
movq 0x170(%rsp), %rdi
callq 0x2040
movq 0x168(%rsp), %rdi
callq 0x2040
movq 0x160(%rsp), %rdi
callq 0x2040
movq 0x158(%rsp), %rdi
callq 0x2040
movb 0x7(%rsp), %al
movl 0x8(%rsp), %ebx
xorl %ebp, %ebp
testl %ebx, %ebx
cmovlel %ebp, %ebx
cmpq %r13, %rbp
je 0xf294
imulq $0x68, %rbp, %rax
leaq (%r12,%rax), %r15
cmpb $0x0, 0xc(%r12,%rax)
jne 0xf26e
cmpl $0x0, 0x18(%r15)
je 0xf1bd
movq 0x10(%r15), %rdi
callq 0x2040
cmpb $0x0, 0x2d8(%rsp)
je 0xf1ee
movq 0x60(%r15), %rax
testq %rax, %rax
je 0xf1ee
movq (%rax), %rdi
callq 0x2040
movq 0x60(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0x60(%r15), %rdi
callq 0x2040
xorl %r14d, %r14d
movq 0x48(%r15), %rdi
cmpq %r14, %rbx
je 0xf22e
movq (%rdi,%r14,8), %rax
testq %rax, %rax
je 0xf229
movq (%rax), %rdi
callq 0x2040
movq 0x48(%r15), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0x48(%r15), %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
incq %r14
jmp 0xf1f1
callq 0x2040
movq 0x50(%r15), %rdi
callq 0x2040
movq 0x38(%r15), %rax
movq (%rax), %rdi
callq 0x2040
movq 0x38(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0x28(%r15), %rax
movq (%rax), %rdi
callq 0x2040
movq 0x28(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0x38(%r15), %rdi
callq 0x2040
movq 0x28(%r15), %rdi
callq 0x2040
movq (%r15), %rdi
callq 0x2040
incq %rbp
movb 0x7(%rsp), %al
jmp 0xf190
movl %eax, %ebp
movq %r12, %rdi
callq 0x2040
movq 0x1c8(%rsp), %rdi
callq 0x2040
movq 0xb0(%rsp), %rdi
callq 0x2040
movq 0xb8(%rsp), %rdi
callq 0x2040
cmpb $0x0, 0x320(%rsp)
je 0xf307
cmpb $0x0, 0x290(%rsp)
movq 0x70(%rsp), %rbx
movq 0x68(%rsp), %r14
je 0xf32f
movq 0x90(%rsp), %rdi
callq 0x2030
testl %eax, %eax
jne 0xf431
cmpq $0x0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
jne 0xf328
jmp 0xf35e
cmpq $0x0, 0x28(%rsp)
movq 0x70(%rsp), %rbx
movq 0x68(%rsp), %r14
movq 0x48(%rsp), %rdi
je 0xf35e
cmpb $0x0, 0x290(%rsp)
je 0xf351
callq 0x2030
jmp 0xf356
movq 0x90(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf431
cmpq $0x0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
je 0xf35e
callq 0x20d0
testl %eax, %eax
jne 0xf41f
testq %r14, %r14
je 0xf389
movq 0x228(%rsp), %rdi
cmpb $0x0, 0x290(%rsp)
je 0xf3a7
callq 0x2030
testl %eax, %eax
jne 0xf417
testq %rbx, %rbx
jne 0xf398
jmp 0xf3c6
testq %rbx, %rbx
je 0xf3c6
cmpb $0x0, 0x290(%rsp)
je 0xf3b5
movq 0x1d8(%rsp), %rdi
callq 0x2030
jmp 0xf3c2
callq 0x20d0
testl %eax, %eax
jne 0xf417
testq %rbx, %rbx
je 0xf3c6
movq 0x1d8(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf429
testb %bpl, %bpl
je 0xf3ed
movq 0x1d0(%rsp), %rdi
cmpb $0x0, 0x290(%rsp)
je 0xf3e4
callq 0x2030
jmp 0xf3e9
callq 0x20d0
testl %eax, %eax
jne 0xf43e
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x3
popq %rsi
movq 0x88(%rsp), %rdi
callq 0x2724
pushq $0x1
popq %rdi
callq 0x22a0
pushq $0x3
popq %rsi
movq %r14, %rdi
jmp 0xf40a
pushq $0x3
popq %rsi
movq 0x28(%rsp), %rdi
jmp 0xf40a
pushq $0x3
popq %rsi
movq %rbx, %rdi
jmp 0xf40a
pushq $0x3
popq %rsi
movq 0x1e8(%rsp), %rdi
jmp 0xf40a
pushq $0x3
popq %rsi
movq 0x318(%rsp), %rdi
jmp 0xf40a