// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: findPeaksOnly
void findPeaksOnly(char* logFile, char* outFile,
    bool gzOut, int xcount, char** xchrList, char* xFile,
    float pqvalue, bool qvalOpt, int minLen, int maxGap,
    float minAUC, uint64_t genomeLen, bool verbose) {

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

  // open files
  File in, out;
  bool gz = openRead(logFile, &in);
  openWrite(outFile, &out, gzOut);
  if (verbose)
    fprintf(stderr, "Peak-calling from log file: %s\n",
      logFile);

  // call peaks
  callPeaksLog(in, gz, out, gzOut, line, xcount, xchrList,
    xBedLen, xBed, pqvalue, qvalOpt, minLen, maxGap,
    minAUC, 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);
  }
  free(line);

  // close files
  if ( ( gz && gzclose(in.gzf) != Z_OK )
      || ( ! gz && fclose(in.f) ) )
    exit(error(logFile, ERRCLOSE));
  if ( ( gzOut && gzclose(out.gzf) != Z_OK )
      || ( ! gzOut && fclose(out.f) ) )
    exit(error(outFile, ERRCLOSE));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r15
movl $0xfff0, %edi           # imm = 0xFFF0
callq 0x3913
movq $0x0, 0x38(%rsp)
testq %r14, %r14
movq %rax, 0x30(%rsp)
je 0xf1b4
leaq 0x38(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xef23
movq %rax, 0x28(%rsp)
jmp 0xf1bd
movq $0x0, 0x28(%rsp)
leaq 0x50(%rsp), %rsi
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0xedce
movl %eax, %r14d
movl %ebp, 0x4(%rsp)
movzbl %bpl, %r15d
leaq 0x48(%rsp), %rsi
movq %r13, 0x40(%rsp)
movq %r13, %rdi
movl %r15d, %edx
callq 0xebe3
movb 0xb0(%rsp), %bpl
testb %bpl, %bpl
jne 0xf31c
movq 0x38(%rsp), %r13
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
movzbl %bpl, %eax
movzbl 0x90(%rsp), %r10d
movl %r14d, %ebp
movzbl %r14b, %esi
movq %rdi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %r15d, %ecx
movq 0x30(%rsp), %r8
movl %r12d, %r9d
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
pushq %rax
pushq 0xb0(%rsp)
movl 0xb0(%rsp), %eax
pushq %rax
movl 0xb0(%rsp), %eax
pushq %rax
pushq %r10
pushq %r13
movq 0x58(%rsp), %r14
pushq %r14
pushq %rbx
callq 0x611c
addq $0x40, %rsp
testl %r12d, %r12d
je 0xf297
jle 0xf28f
movl %r12d, %r15d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
callq 0x2040
incq %r12
cmpq %r12, %r15
jne 0xf27e
movq %rbx, %rdi
callq 0x2040
testl %r14d, %r14d
je 0xf2c3
jle 0xf2bb
movl %r14d, %ebx
shlq $0x4, %rbx
xorl %r14d, %r14d
movq 0x8(%r13,%r14), %rdi
callq 0x2040
addq $0x10, %r14
cmpq %r14, %rbx
jne 0xf2a8
movq %r13, %rdi
callq 0x2040
movq 0x30(%rsp), %rdi
callq 0x2040
testb %bpl, %bpl
je 0xf2de
movq 0x20(%rsp), %rdi
callq 0x2030
jmp 0xf2e8
movq 0x20(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf33e
cmpb $0x0, 0x4(%rsp)
je 0xf2ff
movq 0x18(%rsp), %rdi
callq 0x2030
jmp 0xf309
movq 0x18(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf348
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xacd5(%rip), %rax      # 0x19ff8
movq (%rax), %rdi
leaq 0x48aa(%rip), %rsi      # 0x13bd7
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x21d0
jmp 0xf200
movq 0x10(%rsp), %rdi
callq 0x3327
movq 0x40(%rsp), %rdi
callq 0x3338