// File: /workspace/github_c_makefile_star2_O0/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 %r12
pushq %rbx
subq $0xc0, %rsp
movl %ecx, 0x44(%rsp)
movl %edx, %eax
movl 0x44(%rsp), %edx
movq %rsi, 0x48(%rsp)
movq %rdi, %r10
movq 0x48(%rsp), %rdi
movb %al, %sil
movb 0x110(%rsp), %al
movq 0x108(%rsp), %rcx
movl 0x100(%rsp), %ecx
movl 0xf8(%rsp), %ecx
movb 0xf0(%rsp), %cl
movq %r10, 0xb8(%rsp)
movq %rdi, 0xb0(%rsp)
andb $0x1, %sil
movb %sil, 0xaf(%rsp)
movl %edx, 0xa8(%rsp)
movq %r8, 0xa0(%rsp)
movq %r9, 0x98(%rsp)
movss %xmm0, 0x94(%rsp)
andb $0x1, %cl
movb %cl, 0x93(%rsp)
movss %xmm1, 0x8c(%rsp)
andb $0x1, %al
movb %al, 0x8b(%rsp)
movl $0xfff0, %edi           # imm = 0xFFF0
callq 0x2890
movq %rax, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x19b11
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x196f0
movl %eax, 0x74(%rsp)
movq 0xb8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x194c0
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0xb0(%rsp), %rdi
movb 0xaf(%rsp), %al
leaq 0x60(%rsp), %rsi
andb $0x1, %al
movzbl %al, %edx
callq 0x19130
testb $0x1, 0x8b(%rsp)
je 0x19b71
movq 0x94a0(%rip), %rax      # 0x22ff8
movq (%rax), %rdi
movq 0xb8(%rsp), %rdx
leaq 0x6220(%rip), %rsi      # 0x1fd8a
movb $0x0, %al
callq 0x21c0
movb 0x5f(%rsp), %sil
movb 0xaf(%rsp), %cl
movq 0x80(%rsp), %r8
movl 0xa8(%rsp), %r9d
movq 0xa0(%rsp), %r12
movl 0x74(%rsp), %r15d
movq 0x78(%rsp), %r14
movss 0x94(%rsp), %xmm0
movb 0x93(%rsp), %bpl
movl 0xf8(%rsp), %ebx
movl 0x100(%rsp), %r11d
movss 0x8c(%rsp), %xmm1
movq 0x108(%rsp), %r10
movb 0x8b(%rsp), %al
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rdx
andb $0x1, %sil
andb $0x1, %cl
andb $0x1, %bpl
andb $0x1, %al
movzbl %sil, %esi
movzbl %cl, %ecx
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movzbl %al, %eax
movl %eax, 0x38(%rsp)
callq 0x7050
cmpl $0x0, 0xa8(%rsp)
je 0x19c74
movl $0x0, 0x58(%rsp)
movl 0x58(%rsp), %eax
cmpl 0xa8(%rsp), %eax
jge 0x19c67
movq 0xa0(%rsp), %rax
movslq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x19c37
movq 0xa0(%rsp), %rdi
callq 0x2040
cmpl $0x0, 0x74(%rsp)
je 0x19cbe
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
cmpl 0x74(%rsp), %eax
jge 0x19cb4
movq 0x78(%rsp), %rax
movslq 0x54(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x2040
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x19c83
movq 0x78(%rsp), %rdi
callq 0x2040
movq 0x80(%rsp), %rdi
callq 0x2040
testb $0x1, 0x5f(%rsp)
je 0x19ce1
movq 0x68(%rsp), %rdi
callq 0x2030
cmpl $0x0, %eax
jne 0x19cf7
testb $0x1, 0x5f(%rsp)
jne 0x19d10
movq 0x68(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x19d10
movq 0xb8(%rsp), %rdi
movl $0x3, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
testb $0x1, 0xaf(%rsp)
je 0x19d29
movq 0x60(%rsp), %rdi
callq 0x2030
cmpl $0x0, %eax
jne 0x19d42
testb $0x1, 0xaf(%rsp)
jne 0x19d5b
movq 0x60(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x19d5b
movq 0xb0(%rsp), %rdi
movl $0x3, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)