// File: /workspace/github_cpp_makefile_star2_O3/Altius[P]hotspot2/src/findVarWidthPeaks.cpp
// Function: main
int main(int argc, const char* argv[])
{
  if (2 != argc)
    {
      cerr << "Usage:  [stdin] | " << argv[0] << " minWidth | [stdout],\n"
	   << "where minWidth is the minimum width (in bp) that a variable-width peak must have to be reported.\n"
	   << "6-column input is required, NOT in sort-bed order, but instead, sorted by column 6, then by column 3.\n"
	   << "The input columns are:  chr, pos-1, pos, ID, score, posSummit,\n"
	   << "where \"score\" is the score (e.g., normalized density) at site \"pos\" on chromosome \"chr\"."
	   << "Rows MUST be grouped by column 6 (i.e., sorted by posSummit);\n"
	   << "the sort order of posSummit can be anything (typicaly numeric, but alphabetic would also work).\n"
	   << "All rows with the same posSummit value (column 6) MUST be sorted in ascending order by pos (column 3).\n"
	   << "There will be 7 columns of output:\n"
	   << "chr, beg, end, ID, maxScore, posWithMaxScore, posSummit,\n"
	   << "where (beg, end] are the coordinates of each output variable-width peak (0-based),\n"
	   << "ID and posSummit echo their input values, posWithMaxScore is the central bp within (beg,end]\n"
	   << "where the maximum score was found, and maxScore is that score.\n"
	   << "**YOU MUST CALL sort-bed ON THE OUTPUT BEFORE USING IT IN bedmap/bedops OPERATIONS**."
	   << endl << endl;
      return -1;
    }

  ios_base::sync_with_stdio(false); // calling this static method in this way turns off checks, and can speed up I/O
  
  if (!parseInputFindPeaksWriteOutput(argv[0], atol(argv[1])))
    return -1;

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x2, %edi
jne 0x3ddd
xorl %edi, %edi
callq 0x2090
movq (%r14), %rbx
movq 0x8(%r14), %rdi
callq 0x21e0
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x3136
movzbl %al, %eax
decl %eax
jmp 0x3fa1
movq 0x520c(%rip), %rbx      # 0x8ff0
leaq 0x2433(%rip), %rsi      # 0x621e
movl $0x12, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%r14), %r14
testq %r14, %r14
je 0x3e1c
movq %r14, %rdi
callq 0x20a0
movq 0x51e1(%rip), %rdi      # 0x8ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0x21c0
jmp 0x3e33
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x22b0
leaq 0x23f7(%rip), %rsi      # 0x6231
movl $0x16, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x23fa(%rip), %rsi      # 0x6248
movl $0x61, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x2448(%rip), %rsi      # 0x62aa
movl $0x66, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x249b(%rip), %rsi      # 0x6311
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x24c7(%rip), %rsi      # 0x6351
movl $0x58, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x250c(%rip), %rsi      # 0x63aa
movl $0x3e, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x2537(%rip), %rsi      # 0x63e9
movl $0x60, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x2584(%rip), %rsi      # 0x644a
movl $0x67, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x25d8(%rip), %rsi      # 0x64b2
movl $0x23, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x25e8(%rip), %rsi      # 0x64d6
movl $0x39, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x260e(%rip), %rsi      # 0x6510
movl $0x53, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x264e(%rip), %rsi      # 0x6564
movl $0x5d, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x2698(%rip), %rsi      # 0x65c2
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x26c4(%rip), %rsi      # 0x6602
movl $0x55, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop