// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/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, %rbx
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 %rbx, %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, %r15
testq %rax, %rax
je 0x21c7
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, %r12
movq %r15, 0x18(%rax)
movl $0x1000, %edi           # imm = 0x1000
callq 0x10e0
movq %rax, (%r12)
movq %r12, 0x68(%r13)
leaq 0x18(%r13), %rax
movq %rax, 0x28(%rsp)
leaq 0x13fa(%rip), %r12      # 0x304f
movq %r13, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq 0x68(%r13), %rbp
cmpl $0x0, 0x60(%r13)
jne 0x1cf4
jmp 0x1c78
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1cd5
cmpl $0x0, 0x10(%rbp)
je 0x1c8c
movl 0x8(%rbp), %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl 0xc(%rbp), %eax
jge 0x1cd5
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
jl 0x1cc2
movl $0x0, 0x8(%rbp)
movq (%rbp), %rsi
movq 0x18(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x10a0
movl %eax, 0xc(%rbp)
cmpl $0xfff, %eax            # imm = 0xFFF
jg 0x1cbe
movl $0x1, 0x10(%rbp)
testl %eax, %eax
je 0x1c70
movq (%rbp), %rax
movslq 0x8(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbp)
movzbl (%rax,%rcx), %r15d
movl %r15d, 0xc(%rsp)
cmpl $-0x1, %r15d
je 0x1fc6
cmpl $0x40, %r15d
je 0x1cf0
cmpl $0x3e, %r15d
jne 0x1c78
movl %r15d, 0x60(%r13)
xorl %eax, %eax
movq %rax, 0x48(%r13)
movq %rax, 0x30(%r13)
movq %rax, 0x18(%r13)
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rdx
leaq 0xc(%rsp), %rcx
callq 0x21cf
testl %eax, %eax
js 0x1e55
cmpl $0xa, 0xc(%rsp)
je 0x1d37
movq %rbp, %rdi
movl $0xa, %esi
movq 0x28(%rsp), %rdx
xorl %ecx, %ecx
callq 0x21cf
cmpl $0x0, 0x10(%rbp)
je 0x1d4b
movl 0x8(%rbp), %eax
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl 0xc(%rbp), %eax
jge 0x1d98
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
jl 0x1d85
movl $0x0, 0x8(%rbp)
movq (%rbp), %rsi
movq 0x18(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x10a0
movl %eax, 0xc(%rbp)
cmpl $0xfff, %eax            # imm = 0xFFF
jg 0x1d7d
movl $0x1, 0x10(%rbp)
testl %eax, %eax
je 0x1e4a
movq (%rbp), %rax
movslq 0x8(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbp)
movzbl (%rax,%rcx), %r14d
movl %r14d, 0xc(%rsp)
cmpl $0x3d, %r14d
jg 0x1db8
cmpl $-0x1, %r14d
je 0x1e64
cmpl $0x2b, %r14d
jne 0x1dcc
jmp 0x1e64
cmpl $0x3e, %r14d
je 0x1e60
cmpl $0x40, %r14d
je 0x1e60
callq 0x1120
movq (%rax), %rax
movl %r14d, %ecx
cmpw $0x0, (%rax,%rcx,2)
jns 0x1d37
movq 0x30(%r13), %r14
leaq 0x1(%r14), %r15
cmpq 0x38(%r13), %r15
jb 0x1e35
movq %r15, %rax
shrq %rax
orq %r15, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x38(%r13)
movq 0x40(%r13), %rdi
callq 0x10f0
movq %rax, 0x40(%r13)
movb 0xc(%rsp), %al
movq 0x40(%r13), %rcx
movq %r15, 0x30(%r13)
movb %al, (%rcx,%r14)
jmp 0x1d37
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x1d98
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1fc6
movl %r14d, 0x60(%r13)
movq 0x30(%r13), %r15
movq 0x40(%r13), %rax
movb $0x0, (%rax,%r15)
cmpl $0x2b, 0xc(%rsp)
jne 0x1fc6
movq 0x38(%r13), %rsi
cmpq %rsi, 0x50(%r13)
jae 0x1e97
movq %rsi, 0x50(%r13)
movq 0x58(%r13), %rdi
callq 0x10f0
movq %rax, 0x58(%r13)
cmpl $0x0, 0x10(%rbp)
je 0x1eaa
movl 0x8(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0xc(%rbp), %ecx
jge 0x1ef2
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
jl 0x1ee0
movl $0x0, 0x8(%rbp)
movq (%rbp), %rsi
movq 0x18(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x10a0
movl %eax, 0xc(%rbp)
cmpl $0xfff, %eax            # imm = 0xFFF
jg 0x1edc
movl $0x1, 0x10(%rbp)
testl %eax, %eax
je 0x1f06
movq (%rbp), %rax
movslq 0x8(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbp)
movzbl (%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0x1fc0
cmpl $0xa, %eax
jne 0x1e97
jmp 0x1f2d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1ef2
leal -0x21(%rax), %edx
cmpl $0x5e, %edx
ja 0x1f2d
movq 0x58(%r13), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x48(%r13)
movb %al, (%rdx,%rcx)
jmp 0x1f2d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1f88
cmpl $0x0, 0x10(%rbp)
je 0x1f40
movl 0x8(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0xc(%rbp), %ecx
jge 0x1f88
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
jl 0x1f76
movl $0x0, 0x8(%rbp)
movq (%rbp), %rsi
movq 0x18(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x10a0
movl %eax, 0xc(%rbp)
cmpl $0xfff, %eax            # imm = 0xFFF
jg 0x1f72
movl $0x1, 0x10(%rbp)
testl %eax, %eax
je 0x1f26
movq (%rbp), %rax
movslq 0x8(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbp)
movzbl (%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0x1f9e
movq 0x48(%r13), %rcx
cmpq %r15, %rcx
jb 0x1f0d
movq 0x48(%r13), %rax
movq 0x58(%r13), %rcx
movb $0x0, (%rcx,%rax)
movl $0x0, 0x60(%r13)
cmpq %rax, %r15
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovnel %eax, %r15d
jmp 0x1fc6
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
testl %r15d, %r15d
js 0x20d0
movq %r13, %rbx
movq 0x30(%r13), %r13
testq %r13, %r13
je 0x2027
callq 0x1120
movq %rax, %r15
movq 0x40(%rbx), %r12
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%r15), %rcx
movb (%r12,%r14), %al
movsbq %al, %rbx
movzwl (%rcx,%rbx,2), %ecx
btl $0x9, %ecx
jb 0x2009
btl $0x8, %ecx
jb 0x2014
jmp 0x201d
callq 0x1030
movq (%rax), %rax
movb (%rax,%rbx,4), %al
movslq %ebp, %rcx
incl %ebp
movb %al, (%r12,%rcx)
incq %r14
cmpq %r14, %r13
jne 0x1fec
jmp 0x2029
xorl %ebp, %ebp
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
callq 0x125c
movq 0x30(%rsp), %r13
movq 0x40(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x126f
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1aca
xorl %r14d, %r14d
leaq 0xfe9(%rip), %r12       # 0x304f
leaq 0xfdd(%rip), %rbx       # 0x304a
movzbl 0x10(%rsp,%r14), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r12), %esi
andl $0xf, %eax
movsbl (%rax,%r12), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
movb 0x10(%rsp,%r14), %al
xorb %al, 0x40(%rsp,%r14)
incq %r14
cmpq $0x10, %r14
jne 0x206d
movq 0x10(%r13), %rdx
leaq 0xfb3(%rip), %rdi       # 0x3060
movq 0x38(%rsp), %rbx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x126f
jmp 0x1c5f
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1aca
testq %r13, %r13
je 0x2129
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), %r15
testq %r15, %r15
je 0x2121
movq (%r15), %rdi
callq 0x1040
movq %r15, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1040
leaq 0xf1a(%rip), %r14       # 0x304a
xorl %r15d, %r15d
movzbl 0x10(%rsp,%r15), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r12), %esi
andl $0xf, %eax
movsbl (%rax,%r12), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
incq %r15
cmpq $0x10, %r15
jne 0x2133
leaq 0xf05(%rip), %rdi       # 0x306a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0xed4(%rip), %r14       # 0x304a
xorl %r15d, %r15d
movzbl 0x40(%rsp,%r15), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r12), %esi
andl $0xf, %eax
movsbl (%rax,%r12), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
incq %r15
cmpq $0x10, %r15
jne 0x2179
leaq 0xecf(%rip), %rdi       # 0x307a
movq %rbx, %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 %rbx, %rdi
callq 0x1140