// File: /workspace/github_c_makefile_star2_O1/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 $0x108, %rsp            # imm = 0x108
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x1462(%rip), %rsi      # 0x3020
callq 0x1090
testl %eax, %eax
je 0x1bd8
leaq 0x1454(%rip), %rsi      # 0x3022
movq %r12, %rdi
callq 0x1100
jmp 0x1bf5
movq 0x33f9(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
callq 0x10d0
leaq 0x1434(%rip), %rsi      # 0x3022
movl %eax, %edi
callq 0x1050
movq %rax, %rbx
testq %rax, %rax
je 0x2177
leaq 0x58(%rsp), %rdi
callq 0x125c
movl $0x1, %edi
movl $0x70, %esi
callq 0x1080
movq %rax, %r13
movl $0x1, %edi
movl $0x20, %esi
callq 0x1080
movq %rax, %r15
movq %rbx, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x10e0
movq %rax, (%r15)
movq %r15, 0x68(%r13)
leaq 0x48(%r13), %r14
leaq 0x30(%r13), %rbp
leaq 0x18(%r13), %rax
movq %rax, 0x20(%rsp)
leaq 0x13f3(%rip), %r15      # 0x304f
movq %r13, 0x30(%rsp)
movq %rbp, 0x8(%rsp)
movq %r12, 0x38(%rsp)
movq %r14, 0x28(%rsp)
movq 0x68(%r13), %rbx
cmpl $0x0, 0x60(%r13)
jne 0x1d01
jmp 0x1c88
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1ce1
cmpl $0x0, 0x10(%rbx)
je 0x1c9b
movl 0x8(%rbx), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl 0xc(%rbx), %eax
jge 0x1ce1
movl 0x8(%rbx), %eax
cmpl 0xc(%rbx), %eax
jl 0x1cd0
movl $0x0, 0x8(%rbx)
movq (%rbx), %rsi
movq 0x18(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x10a0
movl %eax, 0xc(%rbx)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1ccc
movl $0x1, 0x10(%rbx)
testl %eax, %eax
je 0x1c81
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movzbl (%rax,%rcx), %ebp
movl %ebp, 0x4(%rsp)
cmpl $-0x1, %ebp
je 0x1f63
cmpl $0x40, %ebp
je 0x1cf8
cmpl $0x3e, %ebp
jne 0x1c88
movl %ebp, 0x60(%r13)
movq 0x8(%rsp), %rbp
xorl %eax, %eax
movq %rax, 0x48(%r13)
movq %rax, 0x30(%r13)
movq %rax, 0x18(%r13)
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
leaq 0x4(%rsp), %rcx
xorl %r8d, %r8d
callq 0x217f
testl %eax, %eax
js 0x1e1b
cmpl $0xa, 0x4(%rsp)
je 0x1d4a
movq %rbx, %rdi
movl $0x2, %esi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x217f
cmpq $0x0, 0x40(%r13)
jne 0x1d67
movq $0x100, 0x38(%r13)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x10e0
movq %rax, 0x40(%r13)
cmpl $0x0, 0x10(%rbx)
je 0x1d7a
movl 0x8(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0xc(%rbx), %ecx
jge 0x1dc0
movl 0x8(%rbx), %eax
cmpl 0xc(%rbx), %eax
jl 0x1daf
movl $0x0, 0x8(%rbx)
movq (%rbx), %rsi
movq 0x18(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x10a0
movl %eax, 0xc(%rbx)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1dab
movl $0x1, 0x10(%rbx)
testl %eax, %eax
je 0x1e14
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movzbl (%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
cmpl $0x2a, %eax
jg 0x1dd5
cmpl $0xa, %eax
je 0x1d67
cmpl $-0x1, %eax
jne 0x1de4
jmp 0x1e29
cmpl $0x2b, %eax
je 0x1e29
cmpl $0x3e, %eax
je 0x1e25
cmpl $0x40, %eax
je 0x1e25
movq 0x30(%r13), %rcx
movq 0x40(%r13), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x30(%r13)
movb %al, (%rdx,%rcx)
movq %rbx, %rdi
movl $0x2, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x217f
jmp 0x1d67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1dc0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1f63
movl %eax, 0x60(%r13)
movq 0x30(%r13), %rbp
leaq 0x1(%rbp), %rax
cmpq 0x38(%r13), %rax
jb 0x1e7c
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x38(%r13)
movq 0x40(%r13), %rdi
callq 0x10f0
movq %rax, 0x40(%r13)
movq 0x40(%r13), %rax
movb $0x0, (%rax,%rbp)
cmpl $0x2b, 0x4(%rsp)
jne 0x1f63
movq 0x38(%r13), %rsi
cmpq %rsi, 0x50(%r13)
jae 0x1eaa
movq %rsi, 0x50(%r13)
movq 0x58(%r13), %rdi
callq 0x10f0
movq %rax, 0x58(%r13)
movq 0x8(%rsp), %rbp
cmpl $0x0, 0x10(%rbx)
je 0x1ec2
movl 0x8(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0xc(%rbx), %ecx
jge 0x1f08
movl 0x8(%rbx), %eax
cmpl 0xc(%rbx), %eax
jl 0x1ef7
movl $0x0, 0x8(%rbx)
movq (%rbx), %rsi
movq 0x18(%rbx), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x10a0
movl %eax, 0xc(%rbx)
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x1ef3
movl $0x1, 0x10(%rbx)
testl %eax, %eax
je 0x1f18
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movzbl (%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
je 0x1f5e
cmpl $0xa, %eax
jne 0x1eaf
jmp 0x1f1f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1f08
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x217f
testl %eax, %eax
js 0x1f44
movq (%r14), %rax
cmpq (%rbp), %rax
jb 0x1f1f
movl $0x0, 0x60(%r13)
movq 0x30(%r13), %rbp
cmpq 0x48(%r13), %rbp
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovnel %eax, %ebp
jmp 0x1f63
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testl %ebp, %ebp
js 0x2080
movq %r13, %rbx
movq 0x30(%r13), %r13
testq %r13, %r13
je 0x1fcd
callq 0x1120
movq %rax, %rbp
movq 0x40(%rbx), %r15
xorl %r14d, %r14d
xorl %ebx, %ebx
movq (%rbp), %rcx
movb (%r15,%r14), %al
movsbq %al, %r12
movzwl (%rcx,%r12,2), %ecx
btl $0x9, %ecx
jb 0x1fa7
btl $0x8, %ecx
jb 0x1fb3
jmp 0x1fbc
callq 0x1030
movq (%rax), %rax
movb (%rax,%r12,4), %al
movslq %ebx, %rcx
incl %ebx
movb %al, (%r15,%rcx)
leaq 0x1087(%rip), %r12      # 0x304a
incq %r14
cmpq %r14, %r13
jne 0x1f88
jmp 0x1fd6
xorl %ebx, %ebx
leaq 0x1074(%rip), %r12      # 0x304a
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
callq 0x125c
movq 0x30(%rsp), %r13
movq 0x40(%r13), %rbp
movq %r14, %rdi
movq %rbp, %rsi
movl %ebx, %edx
callq 0x126f
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1aca
xorl %r14d, %r14d
leaq 0x103c(%rip), %r15      # 0x304f
movzbl 0x10(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r15), %esi
andl $0xf, %eax
movsbl (%rax,%r15), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x1060
movb 0x10(%rsp,%r14), %al
xorb %al, 0x40(%rsp,%r14)
incq %r14
cmpq $0x10, %r14
jne 0x2013
movq 0x10(%r13), %rdx
leaq 0x100d(%rip), %rdi      # 0x3060
movq 0x38(%rsp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x58(%rsp), %rdi
movq %rbp, %rsi
movl %ebx, %edx
callq 0x126f
movq 0x28(%rsp), %r14
movq 0x8(%rsp), %rbp
jmp 0x1c70
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1aca
testq %r13, %r13
je 0x20d9
movq 0x10(%r13), %rdi
callq 0x1040
movq 0x28(%r13), %rdi
callq 0x1040
movq 0x40(%r13), %rdi
callq 0x1040
movq 0x58(%r13), %rdi
callq 0x1040
movq 0x68(%r13), %rbx
testq %rbx, %rbx
je 0x20d1
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1040
leaq 0xf6a(%rip), %rbx       # 0x304a
xorl %r14d, %r14d
movzbl 0x10(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r15), %esi
andl $0xf, %eax
movsbl (%rax,%r15), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
incq %r14
cmpq $0x10, %r14
jne 0x20e3
leaq 0xf55(%rip), %rdi       # 0x306a
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0xf24(%rip), %rbx       # 0x304a
xorl %r14d, %r14d
movzbl 0x40(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r15), %esi
andl $0xf, %eax
movsbl (%rax,%r15), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
incq %r14
cmpq $0x10, %r14
jne 0x2129
leaq 0xf1f(%rip), %rdi       # 0x307a
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x1140