// File: /workspace/github_cpp_makefile_star2_O3/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/bamtk.c
// Function: main
int main(int argc, char *argv[])
{
#ifdef _WIN32
	setmode(fileno(stdout), O_BINARY);
	setmode(fileno(stdin),  O_BINARY);
#ifdef _USE_KNETFILE
	knet_win32_init();
#endif
#endif
	if (argc < 2) return usage();
	if (strcmp(argv[1], "view") == 0) return main_samview(argc-1, argv+1);
	else if (strcmp(argv[1], "import") == 0) return main_import(argc-1, argv+1);
	else if (strcmp(argv[1], "pileup") == 0) return bam_pileup(argc-1, argv+1);
	else if (strcmp(argv[1], "merge") == 0) return bam_merge(argc-1, argv+1);
	else if (strcmp(argv[1], "sort") == 0) return bam_sort(argc-1, argv+1);
	else if (strcmp(argv[1], "index") == 0) return bam_index(argc-1, argv+1);
	else if (strcmp(argv[1], "faidx") == 0) return faidx_main(argc-1, argv+1);
	else if (strcmp(argv[1], "fixmate") == 0) return bam_mating(argc-1, argv+1);
	else if (strcmp(argv[1], "rmdup") == 0) return bam_rmdup(argc-1, argv+1);
	else if (strcmp(argv[1], "glfview") == 0) return glf3_view_main(argc-1, argv+1);
	else if (strcmp(argv[1], "flagstat") == 0) return bam_flagstat(argc-1, argv+1);
	else if (strcmp(argv[1], "tagview") == 0) return bam_tagview(argc-1, argv+1);
	else if (strcmp(argv[1], "calmd") == 0) return bam_fillmd(argc-1, argv+1);
	else if (strcmp(argv[1], "fillmd") == 0) return bam_fillmd(argc-1, argv+1);
#if _CURSES_LIB != 0
	else if (strcmp(argv[1], "tview") == 0) return bam_tview_main(argc-1, argv+1);
#endif
	else {
		fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
		return 1;
	}
	return 0;	
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jle 0xe96a
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x14be2(%rip), %rsi     # 0x233aa
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe92a
leaq 0x15744(%rip), %rsi     # 0x23f23
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe93a
leaq 0x165ea(%rip), %rsi     # 0x24de0
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe94a
leaq 0x165da(%rip), %rsi     # 0x24de7
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe95a
leaq 0x165c9(%rip), %rsi     # 0x24ded
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe979
leaq 0x165b7(%rip), %rsi     # 0x24df2
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe989
leaq 0x165a6(%rip), %rsi     # 0x24df8
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe999
leaq 0x16595(%rip), %rsi     # 0x24dfe
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9a9
leaq 0x16586(%rip), %rsi     # 0x24e06
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9b9
leaq 0x16575(%rip), %rsi     # 0x24e0c
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9c9
leaq 0x16566(%rip), %rsi     # 0x24e14
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9d9
leaq 0x16558(%rip), %rsi     # 0x24e1d
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9f9
leaq 0x16549(%rip), %rsi     # 0x24e25
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9e9
leaq 0x16538(%rip), %rsi     # 0x24e2b
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe9e9
leaq 0x16528(%rip), %rsi     # 0x24e32
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
jne 0xea09
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x65a6
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xa8fc
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xb101
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x8ea4
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1e4d3
callq 0x3c5b
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1f3eb
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x169e5
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1bc5c
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xddb7
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xc805
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1aa61
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe07c
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x19fee
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe548
movq 0x1f5d8(%rip), %rax     # 0x2dfe8
movq (%rax), %rdi
leaq 0x1641e(%rip), %rsi     # 0x24e38
movq %r14, %rdx
xorl %eax, %eax
callq 0x3630
jmp 0xe96f
nopl (%rax)