// File: /workspace/github_c_makefile_star2_O1/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, 0x20(%rsp)
movss %xmm0, 0x1c(%rsp)
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
movl $0xfff0, %edi           # imm = 0xFFF0
callq 0x3903
movq $0x0, 0x30(%rsp)
testq %r14, %r14
movq %rax, 0x28(%rsp)
je 0xf1c1
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xef3b
movl %eax, %ebp
jmp 0xf1c3
xorl %ebp, %ebp
leaq 0x50(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xedd9
movl %eax, %r14d
movl %r13d, 0x24(%rsp)
movzbl %r13b, %r13d
leaq 0x48(%rsp), %rsi
movq %r15, 0x38(%rsp)
movq %r15, %rdi
movl %r13d, %edx
callq 0xebde
movb 0xb0(%rsp), %al
testb %al, %al
jne 0xf328
movq 0x30(%rsp), %r15
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rdx
movzbl %al, %eax
movzbl 0x90(%rsp), %r10d
movb %r14b, 0xf(%rsp)
movzbl %r14b, %esi
movq %rcx, %r14
movq %rcx, %rdi
movq %rdx, 0x40(%rsp)
movl %r13d, %ecx
movq 0x28(%rsp), %r8
movl %r12d, %r9d
movss 0x1c(%rsp), %xmm0
movss 0x20(%rsp), %xmm1
pushq %rax
pushq 0xb0(%rsp)
movl 0xb0(%rsp), %eax
pushq %rax
movl 0xb0(%rsp), %eax
pushq %rax
pushq %r10
pushq %r15
pushq %rbp
pushq %rbx
callq 0x61c4
addq $0x40, %rsp
testl %r12d, %r12d
je 0xf295
jle 0xf28d
movl %r12d, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
callq 0x2040
incq %r13
cmpq %r13, %r12
jne 0xf27c
movq %rbx, %rdi
callq 0x2040
testl %ebp, %ebp
movl 0x24(%rsp), %r13d
je 0xf2c4
jle 0xf2bc
movl %ebp, %ebx
shlq $0x4, %rbx
xorl %r12d, %r12d
movq 0x8(%r15,%r12), %rdi
callq 0x2040
addq $0x10, %r12
cmpq %r12, %rbx
jne 0xf2a9
movq %r15, %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
movb 0xf(%rsp), %bl
testb %bl, %bl
je 0xf2e6
movq %r14, %rdi
callq 0x2030
testl %eax, %eax
jne 0xf351
testb %bl, %bl
jne 0xf2f2
movq %r14, %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf351
testb %r13b, %r13b
movq 0x40(%rsp), %rbx
je 0xf30d
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
jne 0xf35b
testb %r13b, %r13b
jne 0xf319
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
jne 0xf35b
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xacc9(%rip), %rax      # 0x19ff8
movq (%rax), %rdi
leaq 0x48aa(%rip), %rsi      # 0x13be3
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x21d0
movb 0xb0(%rsp), %al
jmp 0xf202
movq 0x10(%rsp), %rdi
callq 0x3301
movq 0x38(%rsp), %rdi
callq 0x3312