// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/md5fa.c
// Function: md5_one
static void md5_one(const char *fn)
{
	MD5_CTX md5_one, md5_all;
	int l, i, k;
	gzFile fp;
	kseq_t *seq;
	unsigned char unordered[16], digest[16];

	for (l = 0; l < 16; ++l) unordered[l] = 0;
	fp = strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
	if (fp == 0) {
		fprintf(stderr, "md5fa: %s: No such file or directory\n", fn);
		exit(1);
	}
	
	MD5Init(&md5_all);
	seq = kseq_init(fp);
	while ((l = kseq_read(seq)) >= 0) {
		for (i = k = 0; i < seq->seq.l; ++i) {
			if (islower(seq->seq.s[i])) seq->seq.s[k++] = toupper(seq->seq.s[i]);
			else if (isupper(seq->seq.s[i])) seq->seq.s[k++] = seq->seq.s[i];
		}
		MD5Init(&md5_one);
		MD5Update(&md5_one, (unsigned char*)seq->seq.s, k);
		MD5Final(digest, &md5_one);
		for (l = 0; l < 16; ++l) {
			printf("%c%c", HEX_STR[digest[l]>>4&0xf], HEX_STR[digest[l]&0xf]);
			unordered[l] ^= digest[l];
		}
		printf("  %s  %s\n", fn, seq->name.s);
		MD5Update(&md5_all, (unsigned char*)seq->seq.s, k);
	}
	MD5Final(digest, &md5_all);
	kseq_destroy(seq);
	for (l = 0; l < 16; ++l)
		printf("%c%c", HEX_STR[digest[l]>>4&0xf], HEX_STR[digest[l]&0xf]);
	printf("  %s  >ordered\n", fn);
	for (l = 0; l < 16; ++l)
		printf("%c%c", HEX_STR[unordered[l]>>4&0xf], HEX_STR[unordered[l]&0xf]);
	printf("  %s  >unordered\n", fn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
cmpb $0x2d, (%rdi)
jne 0x1b7c
cmpb $0x0, 0x1(%r12)
je 0x210f
leaq 0x149f(%rip), %rsi      # 0x3022
movq %r12, %rdi
callq 0x10f0
movq %rax, %rbx
testq %rax, %rax
je 0x214c
leaq 0x68(%rsp), %rdi
callq 0x124c
movl $0x1, %edi
movl $0x70, %esi
callq 0x1080
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x1080
movq %rax, %r15
movq %rbx, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x10d0
movq %rax, (%r15)
movq %r15, 0x68(%r14)
leaq 0x48(%r14), %rbx
leaq 0x30(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x18(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x1458(%rip), %r13      # 0x304f
xorl %eax, %eax
movq %r12, 0x48(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x40(%rsp)
testl %eax, %eax
jne 0x1c7f
movl 0x8(%r15), %ecx
movl 0xc(%r15), %eax
cmpl $0x0, 0x10(%r15)
je 0x1c23
cmpl %eax, %ecx
jge 0x2018
cmpl %eax, %ecx
jl 0x1c5b
movl $0x0, 0x8(%r15)
movq (%r15), %rsi
movq 0x18(%r15), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x1090
movl %eax, 0xc(%r15)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1c5b
movl $0x1, 0x10(%r15)
testl %eax, %eax
je 0x2018
movq (%r15), %rdx
movslq 0x8(%r15), %rsi
leal 0x1(%rsi), %ecx
movl %ecx, 0x8(%r15)
movzbl (%rdx,%rsi), %edx
movl %edx, 0xc(%rsp)
cmpl $0x40, %edx
je 0x1c7b
cmpl $0x3e, %edx
jne 0x1c14
movl %edx, 0x60(%r14)
xorl %eax, %eax
movq %rax, 0x48(%r14)
movq %rax, 0x30(%r14)
movq %rax, 0x18(%r14)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
leaq 0xc(%rsp), %rcx
xorl %r8d, %r8d
callq 0x2154
testl %eax, %eax
movq 0x28(%rsp), %rbx
js 0x2131
cmpl $0xa, 0xc(%rsp)
je 0x1ccd
movq %r15, %rdi
movl $0x2, %esi
movq 0x38(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2154
cmpq $0x0, 0x40(%r14)
jne 0x1cea
movq $0x100, 0x38(%r14)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x10d0
movq %rax, 0x40(%r14)
cmpl $0x0, 0x10(%r15)
sete %dl
movl 0xc(%r15), %eax
cmpl %eax, 0x8(%r15)
setl %cl
orb %cl, %dl
testb $0x1, %dl
je 0x1dbb
testb $0x1, %cl
jne 0x1d3d
movl $0x0, 0x8(%r15)
movq (%r15), %rsi
movq 0x18(%r15), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x1090
movl %eax, 0xc(%r15)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1d3d
movl $0x1, 0x10(%r15)
testl %eax, %eax
je 0x1dbb
movq (%r15), %rcx
movslq 0x8(%r15), %rsi
leal 0x1(%rsi), %edx
movl %edx, 0x8(%r15)
movb (%rcx,%rsi), %cl
movzbl %cl, %esi
movl %esi, 0xc(%rsp)
cmpl $0x2a, %esi
jg 0x1d61
cmpl $0xa, %esi
je 0x1da3
jmp 0x1d70
cmpl $0x2b, %esi
je 0x1dc9
cmpl $0x3e, %esi
je 0x1dc5
cmpl $0x40, %esi
je 0x1dc5
movq 0x30(%r14), %rax
movq 0x40(%r14), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x30(%r14)
movb %cl, (%rdx,%rax)
movq %r15, %rdi
movl $0x2, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x2154
movl 0x8(%r15), %edx
movl 0xc(%r15), %eax
cmpl %eax, %edx
setl %cl
cmpl $0x0, 0x10(%r15)
je 0x1d08
cmpl %eax, %edx
jl 0x1d08
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
jmp 0x1dc9
movl %esi, 0x60(%r14)
movq 0x30(%r14), %rbp
movq 0x38(%r14), %rbx
leaq 0x1(%rbp), %rcx
movq 0x40(%r14), %rax
cmpq %rbx, %rcx
jb 0x1e25
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rbx
shrq $0x10, %rbx
orq %rcx, %rbx
incq %rbx
movq %rbx, 0x38(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x10e0
movq %rax, 0x40(%r14)
movb $0x0, (%rax,%rbp)
cmpl $0x2b, 0xc(%rsp)
jne 0x1f02
cmpq %rbx, 0x50(%r14)
jae 0x1e4e
movq %rbx, 0x50(%r14)
movq 0x58(%r14), %rdi
movq %rbx, %rsi
callq 0x10e0
movq %rax, 0x58(%r14)
movl 0x8(%r15), %ecx
movl 0xc(%r15), %eax
leaq 0x11f2(%rip), %r13      # 0x304f
movq 0x40(%rsp), %rbx
cmpl $0x0, 0x10(%r15)
je 0x1e71
cmpl %eax, %ecx
jge 0x2018
cmpl %eax, %ecx
jl 0x1ea9
movl $0x0, 0x8(%r15)
movq (%r15), %rsi
movq 0x18(%r15), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x1090
movl %eax, 0xc(%r15)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1ea9
movl $0x1, 0x10(%r15)
testl %eax, %eax
je 0x2018
movq (%r15), %rdx
movslq 0x8(%r15), %rsi
leal 0x1(%rsi), %ecx
movl %ecx, 0x8(%r15)
movzbl (%rdx,%rsi), %edx
movl %edx, 0xc(%rsp)
cmpl $0xa, %edx
jne 0x1e62
movq 0x28(%rsp), %r13
movq %r15, %rdi
movl $0x2, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x2154
movq (%r13), %rbp
movq (%rbx), %rcx
testl %eax, %eax
js 0x1ef1
cmpq %rbp, %rcx
jb 0x1ec9
movl $0x0, 0x60(%r14)
cmpq %rcx, %rbp
jne 0x2131
testl %ebp, %ebp
js 0x2131
testq %rbp, %rbp
je 0x1f5f
callq 0x1110
movq %rax, %rbx
movq 0x40(%r14), %r12
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rcx
movb (%r12,%r14), %al
movsbq %al, %r13
movzwl (%rcx,%r13,2), %ecx
btl $0x9, %ecx
jb 0x1f3f
btl $0x8, %ecx
jb 0x1f4b
jmp 0x1f55
callq 0x1030
movq (%rax), %rax
movb (%rax,%r13,4), %al
movslq %r15d, %rcx
incl %r15d
movb %al, (%r12,%rcx)
incq %r14
cmpq %r14, %rbp
jne 0x1f21
jmp 0x1f62
xorl %r15d, %r15d
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
callq 0x124c
movq 0x30(%rsp), %rax
movq 0x40(%rax), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x125f
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1a7b
xorl %r14d, %r14d
leaq 0x10af(%rip), %r13      # 0x304f
leaq 0x10a3(%rip), %r12      # 0x304a
movzbl 0x10(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
andl $0xf, %eax
movsbl (%rax,%r13), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x1060
movb 0x10(%rsp,%r14), %al
xorb %al, 0x50(%rsp,%r14)
incq %r14
cmpq $0x10, %r14
jne 0x1fa7
movq 0x30(%rsp), %r14
movq 0x10(%r14), %rdx
leaq 0x1074(%rip), %rdi      # 0x3060
movq 0x48(%rsp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x125f
movq 0x68(%r14), %r15
movl 0x60(%r14), %eax
jmp 0x1c08
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1a7b
testq %r14, %r14
je 0x2071
movq 0x10(%r14), %rdi
callq 0x1040
movq 0x28(%r14), %rdi
callq 0x1040
movq 0x40(%r14), %rdi
callq 0x1040
movq 0x58(%r14), %rdi
callq 0x1040
movq 0x68(%r14), %rbx
testq %rbx, %rbx
je 0x2069
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
leaq 0xfd2(%rip), %rbx       # 0x304a
xorl %r14d, %r14d
movzbl 0x10(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
andl $0xf, %eax
movsbl (%rax,%r13), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
incq %r14
cmpq $0x10, %r14
jne 0x207b
leaq 0xfbd(%rip), %rdi       # 0x306a
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0xf8c(%rip), %rbx       # 0x304a
xorl %r14d, %r14d
movzbl 0x50(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r13), %esi
andl $0xf, %eax
movsbl (%rax,%r13), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
incq %r14
cmpq $0x10, %r14
jne 0x20c1
leaq 0xf87(%rip), %rdi       # 0x307a
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2ec2(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
callq 0x10c0
leaq 0xefd(%rip), %rsi       # 0x3022
movl %eax, %edi
callq 0x1050
jmp 0x1b8b
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1a7b
leaq 0xf08(%rip), %r13       # 0x304f
jmp 0x202c
movq %r12, %rdi
callq 0x1130