// File: /workspace/github_c_makefile_star2_O1/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 0xed55
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x2f76a(%rip), %rsi     # 0x3e237
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed15
leaq 0x30992(%rip), %rsi     # 0x3f476
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed25
leaq 0x2fa47(%rip), %rsi     # 0x3e542
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed35
leaq 0x359b3(%rip), %rsi     # 0x444c5
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed45
leaq 0x319d3(%rip), %rsi     # 0x404fc
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed64
leaq 0x319c1(%rip), %rsi     # 0x40501
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed74
leaq 0x34711(%rip), %rsi     # 0x43268
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed84
leaq 0x31999(%rip), %rsi     # 0x40507
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xed94
leaq 0x31988(%rip), %rsi     # 0x4050d
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xeda4
leaq 0x31979(%rip), %rsi     # 0x40515
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xedb4
leaq 0x31968(%rip), %rsi     # 0x4051b
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xedd4
leaq 0x3195a(%rip), %rsi     # 0x40524
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xedc4
leaq 0x31949(%rip), %rsi     # 0x4052a
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xedc4
leaq 0x35e07(%rip), %rsi     # 0x449ff
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xede4
leaq 0x35e6d(%rip), %rsi     # 0x44a7c
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xedf4
leaq 0x3190b(%rip), %rsi     # 0x40531
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee04
leaq 0x318fe(%rip), %rsi     # 0x4053b
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee14
leaq 0x318ed(%rip), %rsi     # 0x40541
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee24
leaq 0x318dc(%rip), %rsi     # 0x40547
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee44
leaq 0x318cc(%rip), %rsi     # 0x4054e
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee34
leaq 0x318bf(%rip), %rsi     # 0x40558
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee34
leaq 0x318ae(%rip), %rsi     # 0x4055e
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee54
leaq 0x3189e(%rip), %rsi     # 0x40565
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee64
leaq 0x2f865(%rip), %rsi     # 0x3e543
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0xee74
leaq 0x318c5(%rip), %rsi     # 0x405ba
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
jne 0xee7e
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x6e82
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x98d8
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xa9da
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x75dd
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33ef4
callq 0x3fd3
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 0x35c8e
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x29be2
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x29c19
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2f632
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe2e1
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xc274
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2dfdc
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe526
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x37947
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x38cfb
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x173d4
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x18460
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1afd4
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c751
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xaa5d
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1cb38
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1e322
callq 0x3fb7
jmp 0xed5a
movq 0x40163(%rip), %rax     # 0x4efe8
movq (%rax), %rdi
leaq 0x31731(%rip), %rsi     # 0x405c0
movq %r14, %rdx
xorl %eax, %eax
callq 0x3750
jmp 0xed5a
nop