// File: /workspace/github_cpp_makefile_star2_O1/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 0xe3a7
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x1618d(%rip), %rsi     # 0x24392
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe367
leaq 0x16caf(%rip), %rsi     # 0x24ecb
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe377
leaq 0x17b5d(%rip), %rsi     # 0x25d90
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe387
leaq 0x17b4d(%rip), %rsi     # 0x25d97
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe397
leaq 0x17b3c(%rip), %rsi     # 0x25d9d
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe3b6
leaq 0x17b2a(%rip), %rsi     # 0x25da2
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe3c6
leaq 0x17b19(%rip), %rsi     # 0x25da8
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe3d6
leaq 0x17b08(%rip), %rsi     # 0x25dae
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe3e6
leaq 0x17af9(%rip), %rsi     # 0x25db6
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe3f6
leaq 0x17ae8(%rip), %rsi     # 0x25dbc
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe406
leaq 0x17ad9(%rip), %rsi     # 0x25dc4
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe416
leaq 0x17acb(%rip), %rsi     # 0x25dcd
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe436
leaq 0x17abc(%rip), %rsi     # 0x25dd5
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe426
leaq 0x17aab(%rip), %rsi     # 0x25ddb
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
je 0xe426
leaq 0x17a9b(%rip), %rsi     # 0x25de2
movq %r14, %rdi
callq 0x34e0
testl %eax, %eax
jne 0xe446
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x62f1
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xa548
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xad5d
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x8c1c
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1e556
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 0x1f7d6
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x16528
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1b3bc
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xd90e
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xbf79
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1a3ef
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xdb02
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x19974
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xdf84
movq 0x20b9b(%rip), %rax     # 0x2efe8
movq (%rax), %rdi
leaq 0x17991(%rip), %rsi     # 0x25de8
movq %r14, %rdx
xorl %eax, %eax
callq 0x3630
jmp 0xe3ac
nop