// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bamshuf.c
// Function: main_bamshuf
int main_bamshuf(int argc, char *argv[])
{
	int c, n_files = 64, clevel = DEF_CLEVEL, is_stdout = 0, is_un = 0;
	while ((c = getopt(argc, argv, "n:l:uO")) >= 0) {
		switch (c) {
		case 'n': n_files = atoi(optarg); break;
		case 'l': clevel = atoi(optarg); break;
		case 'u': is_un = 1; break;
		case 'O': is_stdout = 1; break;
		}
	}
	if (is_un) clevel = 0;
	if (optind + 2 > argc) {
		fprintf(stderr, "\nUsage:   bamshuf [-Ou] [-n nFiles] [-c cLevel] <in.bam> <out.prefix>\n\n");
		fprintf(stderr, "Options: -O      output to stdout\n");
		fprintf(stderr, "         -u      uncompressed BAM output\n");
		fprintf(stderr, "         -l INT  compression level [%d]\n", DEF_CLEVEL);
		fprintf(stderr, "         -n INT  number of temporary files [%d]\n", n_files);
		fprintf(stderr, "\n");
		return 1;
	}
	bamshuf(argv[optind], n_files, argv[optind+1], clevel, is_stdout);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x23b73(%rip), %rdx     # 0x41eaf
callq 0x3210
testl %eax, %eax
js 0x1e3db
movl $0x40, 0xc(%rsp)
movl $0x1, %r14d
xorl %r12d, %r12d
leaq 0x23b4e(%rip), %r15     # 0x41eaf
xorl %r13d, %r13d
cmpl $0x6d, %eax
jg 0x1e387
cmpl $0x4f, %eax
je 0x1e3a6
cmpl $0x6c, %eax
jne 0x1e3b4
movq 0x30c66(%rip), %rax     # 0x4efe0
movq (%rax), %rdi
callq 0x34c0
movl %eax, %r14d
jmp 0x1e3b4
cmpl $0x75, %eax
je 0x1e3ae
cmpl $0x6e, %eax
jne 0x1e3b4
movq 0x30c48(%rip), %rax     # 0x4efe0
movq (%rax), %rdi
callq 0x34c0
movl %eax, 0xc(%rsp)
jmp 0x1e3b4
movl $0x1, %r13d
jmp 0x1e3b4
movl $0x1, %r12d
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3210
testl %eax, %eax
jns 0x1e364
xorl %esi, %esi
testl %r12d, %r12d
cmovel %r14d, %esi
testl %r13d, %r13d
sete %dl
movl 0xc(%rsp), %r15d
jmp 0x1e3e8
movl $0x1, %esi
movb $0x1, %dl
movl $0x40, %r15d
movq 0x30bc9(%rip), %rax     # 0x4efb8
movslq (%rax), %rax
leal 0x2(%rax), %ecx
cmpl %ebp, %ecx
jg 0x1e8b2
movl %esi, 0x2c(%rsp)
movb %dl, 0xb(%rsp)
movq (%rbx,%rax,8), %r14
movq 0x8(%rbx,%rax,8), %r12
leaq 0x20a43(%rip), %rsi     # 0x3ee58
movq %r14, %rdi
callq 0x35a0
testl %eax, %eax
je 0x1e432
leaq 0x26847(%rip), %rsi     # 0x44c6f
movq %r14, %rdi
callq 0x1fdb8
jmp 0x1e44f
movq 0x30b97(%rip), %rax     # 0x4efd0
movq (%rax), %rdi
callq 0x3030
leaq 0x26827(%rip), %rsi     # 0x44c6f
movl %eax, %edi
callq 0x1ff6b
testq %rax, %rax
je 0x1e8e0
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x22efa
movq %rax, 0x10(%rsp)
movslq %r15d, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movl %r15d, %r14d
movq %rax, %r15
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, %rbp
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0x20(%rsp)
movq %r12, %rdi
callq 0x3360
movq %rax, 0x30(%rsp)
movl %r14d, 0xc(%rsp)
movl %r14d, %r13d
testl %ebx, %ebx
movq %r13, 0x40(%rsp)
jle 0x1e527
movq 0x30(%rsp), %rax
addl $0xa, %eax
movslq %eax, %rbx
xorl %r14d, %r14d
movl $0x1, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, %r13
movq %rax, (%r15,%r14,8)
movq %rax, %rdi
leaq 0x23afb(%rip), %rsi     # 0x41fe7
movq %r12, %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3400
movq %r13, %rdi
movq 0x40(%rsp), %r13
leaq 0x23aeb(%rip), %rsi     # 0x41ff3
callq 0x1fdb8
movq %rax, (%rbp,%r14,8)
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x230c9
incq %r14
cmpq %r14, %r13
jne 0x1e4ce
movq %r12, 0x50(%rsp)
movq %r15, 0x38(%rsp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x3610
movq %rax, %rbx
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x23238
testl %eax, %eax
movq 0x20(%rsp), %r12
movl 0xc(%rsp), %r15d
js 0x1e5ea
movq 0x30(%rbx), %rdx
movsbl (%rdx), %ecx
movl $0x0, %eax
testl %ecx, %ecx
je 0x1e5bc
movb 0x1(%rdx), %al
testb %al, %al
je 0x1e592
addq $0x2, %rdx
movl %ecx, %esi
shll $0x5, %esi
subl %ecx, %esi
movsbl %al, %ecx
addl %esi, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x1e57d
movl %ecx, %eax
shll $0xf, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %edx
shll $0xb, %edx
notl %edx
addl %ecx, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
xorl %edx, %edx
divl %r15d
movl %edx, %r14d
movq (%rbp,%r14,8), %rdi
movq %rbx, %rsi
callq 0x23ccf
incq (%r12,%r14,8)
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x23238
testl %eax, %eax
jns 0x1e562
testq %rbx, %rbx
je 0x1e600
movq 0x30(%rbx), %rdi
callq 0x3350
movq %rbx, %rdi
callq 0x3350
testl %r15d, %r15d
movq 0x38(%rsp), %r14
jle 0x1e61e
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rdi
callq 0x20aae
incq %rbx
cmpq %rbx, %r13
jne 0x1e60c
movq %rbp, %rdi
callq 0x3350
movq 0x18(%rsp), %rdi
callq 0x20aae
movl 0x2c(%rsp), %eax
cmpl $0xa, %eax
movl $0x1, %edx
cmovbl %eax, %edx
leaq 0x239b0(%rip), %rsi     # 0x41ff6
leaq 0x48(%rsp), %rdi
xorl %eax, %eax
callq 0x3400
cmpb $0x0, 0xb(%rsp)
je 0x1e6a1
movq 0x30(%rsp), %rax
addl $0x5, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x3610
movq %rax, %rbx
leaq 0x23982(%rip), %rsi     # 0x41ffa
movq %rax, %rdi
movq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x3400
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x1fdb8
movq %rax, %r15
movq %rbx, %rdi
callq 0x3350
jmp 0x1e6bf
movq 0x30950(%rip), %rax     # 0x4eff8
movq (%rax), %rdi
callq 0x3030
leaq 0x48(%rsp), %rsi
movl %eax, %edi
callq 0x1ff6b
movq %rax, %r15
movq 0x10(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x230c9
movq %rbx, %rdi
callq 0x22e78
cmpl $0x0, 0xc(%rsp)
jle 0x1e889
xorl %eax, %eax
movq (%r12,%rax,8), %r13
movq %rax, 0x18(%rsp)
movq %r14, %r12
movq (%r14,%rax,8), %r14
movq %r14, %rdi
leaq 0x26571(%rip), %rsi     # 0x44c6f
callq 0x1fdb8
movq %rax, %rbx
movq %rax, %rdi
callq 0x22efa
movq %rax, %rdi
callq 0x22e78
movl $0x10, %esi
movq %r13, %rdi
callq 0x3610
movq %rax, %rbp
testq %r13, %r13
jle 0x1e843
movq %r14, 0x10(%rsp)
xorl %r14d, %r14d
movl $0x1, %edi
movl $0x38, %esi
callq 0x3610
movq %r14, %r12
shlq $0x4, %r12
movq %rax, 0x8(%rbp,%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x23238
testl %eax, %eax
js 0x1e8c1
addq %rbp, %r12
movq 0x8(%r12), %rax
movq 0x30(%rax), %rcx
movsbl (%rcx), %eax
testl %eax, %eax
je 0x1e7c4
movb 0x1(%rcx), %dl
testb %dl, %dl
je 0x1e798
addq $0x2, %rcx
movl %eax, %esi
shll $0x5, %esi
subl %eax, %esi
movsbl %dl, %eax
addl %esi, %eax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x1e783
movl %eax, %ecx
shll $0xf, %ecx
notl %ecx
addl %eax, %ecx
movl %ecx, %eax
shrl $0xa, %eax
xorl %ecx, %eax
leal (%rax,%rax,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %edx
shll $0xb, %edx
notl %edx
addl %ecx, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
jmp 0x1e7c6
xorl %eax, %eax
movl %eax, (%r12)
incq %r14
cmpq %r13, %r14
jne 0x1e737
movq %rbx, %rdi
callq 0x20aae
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x3250
movq %rbx, %rdi
callq 0x3350
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1db20
testq %r13, %r13
movq 0x38(%rsp), %r14
movq 0x20(%rsp), %r12
jle 0x1e86e
movq %rbp, %rbx
addq $0x8, %rbx
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x23ccf
movq (%rbx), %rax
testq %rax, %rax
je 0x1e838
movq 0x30(%rax), %rdi
callq 0x3350
movq (%rbx), %rdi
callq 0x3350
addq $0x10, %rbx
decq %r13
jne 0x1e814
jmp 0x1e86e
movq %rbx, %rdi
callq 0x20aae
movq %r14, %rdi
callq 0x3250
movq %r14, %rdi
callq 0x3350
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1db20
movq %r12, %r14
movq 0x20(%rsp), %r12
movq %rbp, %rdi
callq 0x3350
movq 0x18(%rsp), %rax
incq %rax
cmpq 0x40(%rsp), %rax
jne 0x1e6e4
movq %r15, %rdi
callq 0x20aae
movq %r14, %rdi
callq 0x3350
movq %r12, %rdi
callq 0x3350
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %edi
callq 0x46fe
movl $0x1, %eax
jmp 0x1e8a3
leaq 0x23739(%rip), %rdi     # 0x42001
leaq 0x236d6(%rip), %rsi     # 0x41fa5
leaq 0x236d9(%rip), %rcx     # 0x41faf
movl $0x65, %edx
callq 0x31b0
leaq 0x1f872(%rip), %rdi     # 0x3e159
leaq 0x236b7(%rip), %rsi     # 0x41fa5
leaq 0x236ba(%rip), %rcx     # 0x41faf
movl $0x3c, %edx
callq 0x31b0
nop