// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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], "mpileup") == 0) return bam_mpileup(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], "idxstats") == 0) return bam_idxstats(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], "flagstat") == 0) return bam_flagstat(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);
	else if (strcmp(argv[1], "reheader") == 0) return main_reheader(argc-1, argv+1);
	else if (strcmp(argv[1], "cat") == 0) return main_cat(argc-1, argv+1);
	else if (strcmp(argv[1], "targetcut") == 0) return main_cut_target(argc-1, argv+1);
	else if (strcmp(argv[1], "phase") == 0) return main_phase(argc-1, argv+1);
	else if (strcmp(argv[1], "depth") == 0) return main_depth(argc-1, argv+1);
	else if (strcmp(argv[1], "bam2fq") == 0) return main_bam2fq(argc-1, argv+1);
	else if (strcmp(argv[1], "pad2unpad") == 0) return main_pad2unpad(argc-1, argv+1);
	else if (strcmp(argv[1], "depad") == 0) return main_pad2unpad(argc-1, argv+1);
	else if (strcmp(argv[1], "bedcov") == 0) return main_bedcov(argc-1, argv+1);
	else if (strcmp(argv[1], "bamshuf") == 0) return main_bamshuf(argc-1, argv+1);
	else if (strcmp(argv[1], "pileup") == 0) {
		fprintf(stderr, "[main] The `pileup' command has been removed. Please use `mpileup' instead.\n");
		return 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 0xf089
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x30456(%rip), %rsi     # 0x3f257
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf049
leaq 0x31696(%rip), %rsi     # 0x404ae
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf059
leaq 0x3074b(%rip), %rsi     # 0x3f57a
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf069
leaq 0x3675f(%rip), %rsi     # 0x455a5
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf079
leaq 0x326df(%rip), %rsi     # 0x4153c
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf098
leaq 0x326cd(%rip), %rsi     # 0x41541
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0a8
leaq 0x354bf(%rip), %rsi     # 0x4434a
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0b8
leaq 0x326a5(%rip), %rsi     # 0x41547
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0c8
leaq 0x32694(%rip), %rsi     # 0x4154d
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0d8
leaq 0x32685(%rip), %rsi     # 0x41555
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0e8
leaq 0x32674(%rip), %rsi     # 0x4155b
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf108
leaq 0x32666(%rip), %rsi     # 0x41564
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0f8
leaq 0x32655(%rip), %rsi     # 0x4156a
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf0f8
leaq 0x36bb3(%rip), %rsi     # 0x45adf
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf118
leaq 0x36c19(%rip), %rsi     # 0x45b5c
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf128
leaq 0x32617(%rip), %rsi     # 0x41571
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf138
leaq 0x3260a(%rip), %rsi     # 0x4157b
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf148
leaq 0x325f9(%rip), %rsi     # 0x41581
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf158
leaq 0x325e8(%rip), %rsi     # 0x41587
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf178
leaq 0x325d8(%rip), %rsi     # 0x4158e
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf168
leaq 0x325cb(%rip), %rsi     # 0x41598
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf168
leaq 0x325ba(%rip), %rsi     # 0x4159e
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf188
leaq 0x325aa(%rip), %rsi     # 0x415a5
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf198
leaq 0x30569(%rip), %rsi     # 0x3f57b
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xf1a8
leaq 0x325d1(%rip), %rsi     # 0x415fa
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
jne 0xf1b2
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x72aa
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x9ae0
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xadd9
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x77cc
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3480a
callq 0x3fd2
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 0x365bd
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a29a
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a2d1
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x301e4
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe604
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xc93f
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2e91d
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe841
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x381a3
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3949a
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x176b8
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x18756
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1b55c
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1ccb5
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xae55
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1d0d4
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1e8a9
callq 0x3fb6
jmp 0xf08e
movq 0x40e2f(%rip), %rax     # 0x4ffe8
movq (%rax), %rdi
leaq 0x3243d(%rip), %rsi     # 0x41600
movq %r14, %rdx
xorl %eax, %eax
callq 0x3750
jmp 0xf08e
nop