// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: getArgs
void getArgs(int argc, char** argv) {

  // default parameters/filenames
  char* outFile = NULL, *inFile = NULL, *ctrlFile = NULL,
    *logFile = NULL, *pileFile = NULL, *bedFile = NULL,
    *xFile = NULL, *dupsFile = NULL;
  char* xchrom = NULL;
  uint64_t genomeLen = 0;
  int extend = 0, minMapQ = 0, minLen = DEFMINLEN,
    maxGap = DEFMAXGAP, atacLen5 = DEFATAC, atacLen3 = 0;
  float asDiff = 0.0f, pqvalue = DEFPVAL, minAUC = DEFAUC;
  bool singleOpt = false, extendOpt = false,
    avgExtOpt = false, atacOpt = false, atacAdj = true,
    gzOut = false, qvalOpt = false, dupsOpt = false,
    peaksOpt = true, peaksOnly = false, sortOpt = true;
  bool verbose = false;

  // parse argv
  int c;
  while ( (c = getopt_long(argc, argv, OPTIONS, long_options, NULL)) != -1 )
    switch (c) {
      case INFILE: inFile = optarg; break;
      case CTRLFILE: ctrlFile = optarg; break;
      case OUTFILE: outFile = optarg; break;
      case LOGFILE: logFile = optarg; break;
      case PILEFILE: pileFile = optarg; break;
      case BEDFILE: bedFile = optarg; break;
      case GZOPT: gzOut = true; break;
      case UNPAIROPT: singleOpt = true; break;
      case EXTENDOPT: extend = getInt(optarg); extendOpt = true; break;
      case AVGEXTOPT: avgExtOpt = true; break;
      case ATACOPT: atacOpt = true; break;
      case ATACLEN: atacLen5 = getInt(optarg); break;
      case DNASEOPT: atacAdj = false; break;
      case XCHROM: xchrom = optarg; break;
      case XFILE: xFile = optarg; break;
      case MINMAPQ: minMapQ = getInt(optarg); break;
      case ASDIFF: asDiff = getFloat(optarg); break;
      case PVALUE: pqvalue = getFloat(optarg); break;
      case QVALUE: pqvalue = getFloat(optarg); qvalOpt = true; break;
      case MINAUC: minAUC = getFloat(optarg); break;
      case MINLEN: minLen = getInt(optarg); break;
      case MAXGAP: maxGap = getInt(optarg); break;
      case DUPSOPT: dupsOpt = true; break;
      case DUPSFILE: dupsFile = optarg; break;
      case NOPEAKS: peaksOpt = false; break;
      case PEAKSONLY: peaksOnly = true; break;
      case SORTOPT: sortOpt = false; break;
      case GENOMELEN: genomeLen = getLong(optarg); break;
      case VERBOSE: verbose = true; break;
      case VERSOPT: printVersion(); break;
      case HELP: usage(); break;
      default: exit(EXIT_FAILURE);
    }
  if (optind < argc)
    exit(error(argv[optind], ERRPARAM));

  // check for argument errors
  if ((peaksOpt && outFile == NULL)
      || (peaksOnly && logFile == NULL)
      || (!peaksOnly && inFile == NULL)) {
    error("", ERRFILE);
    usage();
  }
  if (avgExtOpt) {
    singleOpt = true;
    extendOpt = false; // avgExtOpt takes precedence
  }
  if (extendOpt) {
    singleOpt = true;
    if (extend <= 0)
      exit(error("", ERREXTEND));
  }
  if (atacOpt) {
    avgExtOpt = extendOpt = false;  // no unpaired extensions in ATAC-seq mode
    if (atacLen5 <= 0)
      exit(error("", ERRATAC));
    // split atacLen into atacLen5 and atacLen3
    atacLen3 = (int) (atacLen5 / 2.0f + 0.5f);  // round up for 3' end
    atacLen5 /= 2;
  }
  if (minLen < 0)
    exit(error("", ERRMINLEN));
  if (minAUC < 0.0f)
    exit(error("", ERRMINAUC));
  if (asDiff < 0.0f)
    exit(error("", ERRASDIFF));
  if (genomeLen < 0)
    exit(error("", ERRGENLEN));

  // save list of chromosomes to exclude
  int xcount = 0;
  char** xchrList = NULL;
  if (xchrom != NULL)
    xcount = saveXChrom(xchrom, &xchrList);

  // adjust significance level to -log scale
  if (pqvalue <= 0.0f || pqvalue > 1.0f)
    exit(error("", ERRPQVAL));
  pqvalue = -log10f(pqvalue);

  // send arguments to runProgram()
  runProgram(inFile, ctrlFile, outFile, logFile, pileFile,
    bedFile, gzOut, singleOpt, extendOpt, extend,
    avgExtOpt, minMapQ, xcount, xchrList, xFile, pqvalue,
    qvalOpt, minLen, maxGap, minAUC, asDiff,
    atacOpt, atacLen5, atacLen3, atacAdj, dupsOpt,
    dupsFile, peaksOpt, peaksOnly, sortOpt, genomeLen,
    verbose);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edi, 0x1a4(%rsp)
movq %rsi, 0x198(%rsp)
movq $0x0, 0x190(%rsp)
movq $0x0, 0x188(%rsp)
movq $0x0, 0x180(%rsp)
movq $0x0, 0x178(%rsp)
movq $0x0, 0x170(%rsp)
movq $0x0, 0x168(%rsp)
movq $0x0, 0x160(%rsp)
movq $0x0, 0x158(%rsp)
movq $0x0, 0x150(%rsp)
movq $0x0, 0x148(%rsp)
movl $0x0, 0x144(%rsp)
movl $0x0, 0x140(%rsp)
movl $0x0, 0x13c(%rsp)
movl $0x64, 0x138(%rsp)
movl $0x64, 0x134(%rsp)
movl $0x0, 0x130(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x12c(%rsp)
movss 0x17f2(%rip), %xmm0     # 0x1e1c0
movss %xmm0, 0x128(%rsp)
movss 0x17dd(%rip), %xmm0     # 0x1e1bc
movss %xmm0, 0x124(%rsp)
movb $0x0, 0x123(%rsp)
movb $0x0, 0x122(%rsp)
movb $0x0, 0x121(%rsp)
movb $0x0, 0x120(%rsp)
movb $0x1, 0x11f(%rsp)
movb $0x0, 0x11e(%rsp)
movb $0x0, 0x11d(%rsp)
movb $0x0, 0x11c(%rsp)
movb $0x1, 0x11b(%rsp)
movb $0x0, 0x11a(%rsp)
movb $0x1, 0x119(%rsp)
movb $0x0, 0x118(%rsp)
movl 0x1a4(%rsp), %edi
movq 0x198(%rsp), %rsi
leaq 0x369d(%rip), %rdx      # 0x200fb
leaq 0x689b(%rip), %rcx      # 0x23300
xorl %eax, %eax
movl %eax, %r8d
callq 0x2100
movl %eax, 0x114(%rsp)
cmpl $-0x1, %eax
je 0x1cd31
movl 0x114(%rsp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, 0x100(%rsp)
subl $0x36, %eax
ja 0x1cd22
movq 0x100(%rsp), %rax
leaq 0x1a89(%rip), %rcx      # 0x1e534
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x651d(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x188(%rsp)
jmp 0x1cd2c
movq 0x6506(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x180(%rsp)
jmp 0x1cd2c
movq 0x64ef(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x190(%rsp)
jmp 0x1cd2c
movq 0x64d8(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x178(%rsp)
jmp 0x1cd2c
movq 0x64c1(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x170(%rsp)
jmp 0x1cd2c
movq 0x64aa(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x168(%rsp)
jmp 0x1cd2c
movb $0x1, 0x11e(%rsp)
jmp 0x1cd2c
movb $0x1, 0x123(%rsp)
jmp 0x1cd2c
movq 0x6479(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2980
movl %eax, 0x144(%rsp)
movb $0x1, 0x122(%rsp)
jmp 0x1cd2c
movb $0x1, 0x121(%rsp)
jmp 0x1cd2c
movb $0x1, 0x120(%rsp)
jmp 0x1cd2c
movq 0x643c(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2980
movl %eax, 0x134(%rsp)
jmp 0x1cd2c
movb $0x0, 0x11f(%rsp)
jmp 0x1cd2c
movq 0x6414(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x150(%rsp)
jmp 0x1cd2c
movq 0x63fd(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x160(%rsp)
jmp 0x1cd2c
movq 0x63e6(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2980
movl %eax, 0x140(%rsp)
jmp 0x1cd2c
movq 0x63cb(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2930
movss %xmm0, 0x12c(%rsp)
jmp 0x1cd2c
movq 0x63ae(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2930
movss %xmm0, 0x128(%rsp)
jmp 0x1cd2c
movq 0x6391(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2930
movss %xmm0, 0x128(%rsp)
movb $0x1, 0x11d(%rsp)
jmp 0x1cd2c
movq 0x636c(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2930
movss %xmm0, 0x124(%rsp)
jmp 0x1cd2c
movq 0x634f(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2980
movl %eax, 0x13c(%rsp)
jmp 0x1cd2c
movq 0x6334(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x2980
movl %eax, 0x138(%rsp)
jmp 0x1cd2c
movb $0x1, 0x11c(%rsp)
jmp 0x1cd2c
movq 0x6312(%rip), %rax      # 0x22fd8
movq (%rax), %rax
movq %rax, 0x158(%rsp)
jmp 0x1cd2c
movb $0x0, 0x11b(%rsp)
jmp 0x1cd2c
movb $0x1, 0x11a(%rsp)
jmp 0x1cd2c
movb $0x0, 0x119(%rsp)
jmp 0x1cd2c
movq 0x62e0(%rip), %rax      # 0x22fd8
movq (%rax), %rdi
callq 0x29d0
movq %rax, 0x148(%rsp)
jmp 0x1cd2c
movb $0x1, 0x118(%rsp)
jmp 0x1cd2c
callq 0x23e0
jmp 0x1cd2c
callq 0x2430
jmp 0x1cd2c
movl $0x1, %edi
callq 0x22b0
jmp 0x1ca48
movq 0x6298(%rip), %rax      # 0x22fd0
movl (%rax), %eax
cmpl 0x1a4(%rsp), %eax
jge 0x1cd6a
movq 0x198(%rsp), %rax
movq 0x627e(%rip), %rcx      # 0x22fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x7, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
testb $0x1, 0x11b(%rsp)
je 0x1cd7f
cmpq $0x0, 0x190(%rsp)
je 0x1cda9
testb $0x1, 0x11a(%rsp)
je 0x1cd94
cmpq $0x0, 0x178(%rsp)
je 0x1cda9
testb $0x1, 0x11a(%rsp)
jne 0x1cdbc
cmpq $0x0, 0x188(%rsp)
jne 0x1cdbc
leaq 0x2fc2(%rip), %rdi      # 0x1fd72
xorl %esi, %esi
callq 0x2840
callq 0x2430
testb $0x1, 0x121(%rsp)
je 0x1cdd6
movb $0x1, 0x123(%rsp)
movb $0x0, 0x122(%rsp)
testb $0x1, 0x122(%rsp)
je 0x1ce0c
movb $0x1, 0x123(%rsp)
cmpl $0x0, 0x144(%rsp)
jg 0x1ce0a
leaq 0x2f79(%rip), %rdi      # 0x1fd72
movl $0x8, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
jmp 0x1ce0c
testb $0x1, 0x120(%rsp)
je 0x1ce8a
movb $0x0, 0x122(%rsp)
movb $0x0, 0x121(%rsp)
cmpl $0x0, 0x134(%rsp)
jg 0x1ce48
leaq 0x2f3b(%rip), %rdi      # 0x1fd72
movl $0x9, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
cvtsi2ssl 0x134(%rsp), %xmm0
movss 0x136b(%rip), %xmm1     # 0x1e1c4
divss %xmm1, %xmm0
movss 0x1337(%rip), %xmm1     # 0x1e19c
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, 0x130(%rsp)
movl 0x134(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x134(%rsp)
cmpl $0x0, 0x13c(%rsp)
jge 0x1ceac
leaq 0x2ed7(%rip), %rdi      # 0x1fd72
movl $0xd, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
xorps %xmm0, %xmm0
ucomiss 0x124(%rsp), %xmm0
jbe 0x1ced1
leaq 0x2eb2(%rip), %rdi      # 0x1fd72
movl $0xc, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
xorps %xmm0, %xmm0
ucomiss 0x12c(%rsp), %xmm0
jbe 0x1cef6
leaq 0x2e8d(%rip), %rdi      # 0x1fd72
movl $0xb, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
cmpq $0x0, 0x148(%rsp)
jae 0x1cf19
leaq 0x2e6a(%rip), %rdi      # 0x1fd72
movl $0x2d, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
movl $0x0, 0x110(%rsp)
movq $0x0, 0x108(%rsp)
cmpq $0x0, 0x150(%rsp)
je 0x1cf57
movq 0x150(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x1c800
movl %eax, 0x110(%rsp)
xorps %xmm0, %xmm0
ucomiss 0x128(%rsp), %xmm0
jae 0x1cf7a
movss 0x128(%rsp), %xmm0
movss 0x1237(%rip), %xmm1     # 0x1e1ac
ucomiss %xmm1, %xmm0
jbe 0x1cf92
leaq 0x2df1(%rip), %rdi      # 0x1fd72
movl $0xa, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
movss 0x128(%rsp), %xmm0
callq 0x21d0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x128(%rsp)
movq 0x188(%rsp), %rdi
movq 0x180(%rsp), %rsi
movq 0x190(%rsp), %rdx
movq 0x178(%rsp), %rcx
movq 0x170(%rsp), %r8
movq 0x168(%rsp), %r9
movb 0x11e(%rsp), %al
movb %al, 0xbe(%rsp)
movb 0x123(%rsp), %al
movb %al, 0xbf(%rsp)
movb 0x122(%rsp), %al
movb %al, 0xc0(%rsp)
movl 0x144(%rsp), %eax
movl %eax, 0xc8(%rsp)
movb 0x121(%rsp), %al
movb %al, 0xc1(%rsp)
movl 0x140(%rsp), %eax
movl %eax, 0xd0(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0xd4(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0xe0(%rsp)
movss 0x128(%rsp), %xmm0
movb 0x11d(%rsp), %al
movb %al, 0xc2(%rsp)
movl 0x13c(%rsp), %eax
movl %eax, 0xec(%rsp)
movl 0x138(%rsp), %eax
movl %eax, 0xf0(%rsp)
movss 0x124(%rsp), %xmm1
movss 0x12c(%rsp), %xmm2
movb 0x120(%rsp), %al
movb %al, 0xc3(%rsp)
movl 0x134(%rsp), %eax
movl %eax, 0xf8(%rsp)
movl 0x130(%rsp), %r13d
movb 0x11f(%rsp), %r12b
movb 0x11c(%rsp), %r15b
movq 0x158(%rsp), %r14
movb 0x11b(%rsp), %bpl
movb 0x11a(%rsp), %bl
movb 0x119(%rsp), %r11b
movq 0x148(%rsp), %r10
movb 0x118(%rsp), %al
movb %al, 0xc4(%rsp)
movb 0xbe(%rsp), %al
andb $0x1, %al
movb %al, 0xc5(%rsp)
movb 0xbf(%rsp), %al
andb $0x1, %al
movb %al, 0xc6(%rsp)
movb 0xc0(%rsp), %al
andb $0x1, %al
movb %al, 0xc7(%rsp)
movb 0xc1(%rsp), %al
andb $0x1, %al
movb %al, 0xcf(%rsp)
movb 0xc2(%rsp), %al
andb $0x1, %al
movb %al, 0xeb(%rsp)
movb 0xc3(%rsp), %al
andb $0x1, %al
movb %al, 0xf7(%rsp)
movb 0xc4(%rsp), %al
andb $0x1, %r12b
andb $0x1, %r15b
andb $0x1, %bpl
andb $0x1, %bl
andb $0x1, %r11b
andb $0x1, %al
movb %al, 0xff(%rsp)
movb 0xc5(%rsp), %al
movzbl %al, %eax
movl %eax, (%rsp)
movb 0xc6(%rsp), %al
movzbl %al, %eax
movl %eax, 0x8(%rsp)
movb 0xc7(%rsp), %al
movzbl %al, %eax
movl %eax, 0x10(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, 0x18(%rsp)
movb 0xcf(%rsp), %al
movzbl %al, %eax
movl %eax, 0x20(%rsp)
movl 0xd0(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x40(%rsp)
movb 0xeb(%rsp), %al
movzbl %al, %eax
movl %eax, 0x48(%rsp)
movl 0xec(%rsp), %eax
movl %eax, 0x50(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0x58(%rsp)
movb 0xf7(%rsp), %al
movzbl %al, %eax
movl %eax, 0x60(%rsp)
movl 0xf8(%rsp), %eax
movl %eax, 0x68(%rsp)
movb 0xff(%rsp), %al
movl %r13d, 0x70(%rsp)
movzbl %r12b, %r12d
movl %r12d, 0x78(%rsp)
movzbl %r15b, %r15d
movl %r15d, 0x80(%rsp)
movq %r14, 0x88(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x90(%rsp)
movzbl %bl, %ebx
movl %ebx, 0x98(%rsp)
movzbl %r11b, %r11d
movl %r11d, 0xa0(%rsp)
movq %r10, 0xa8(%rsp)
movzbl %al, %eax
movl %eax, 0xb0(%rsp)
callq 0x1a780
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)