// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bgt.c
// Function: al_present
static int al_present(khash_t(str) *h, const bcf_hdr_t *hdr, const bcf1_t *b)
{
	int ret = 0;
	bgt_allele_t a, r;
	khint_t k;
	kstring_t s = {0,0,0};
	memset(&a, 0, sizeof(bgt_allele_t));
	memset(&r, 0, sizeof(bgt_allele_t));
	bgt_al_from_bcf(hdr, b, &a, &r);
	bgt_al_format(&a, &s);
	k = kh_get(str, h, s.s);
	if (k == kh_end(h)) {
		bgt_al_format(&r, &s);
		k = kh_get(str, h, s.s);
		if (k != kh_end(h)) ret = 2;
	} else ret = 1;
	free(s.s); free(a.chr.s); free(r.chr.s);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x70(%rsp), %r15
movaps %xmm0, (%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, 0x20(%r15)
leaq 0x40(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, 0x20(%rcx)
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x1a69d
movq %r15, %rdi
movq %r14, %rsi
callq 0x18791
movq 0x10(%r14), %r14
movq %rbx, 0x10(%rsp)
movl (%rbx), %eax
testl %eax, %eax
je 0x173ec
movq %rax, 0x18(%rsp)
leal -0x1(%rax), %edi
movsbl (%r14), %r13d
testl %r13d, %r13d
je 0x173f4
movb 0x1(%r14), %al
testb %al, %al
je 0x173f7
leaq 0x2(%r14), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x173d1
jmp 0x173f7
xorl %r15d, %r15d
jmp 0x17487
xorl %r13d, %r13d
movl %r13d, %edx
andl %edi, %edx
movl %r13d, %eax
shrl $0x3, %eax
shll $0x3, %r13d
xorl %eax, %r13d
orl $0x1, %r13d
andl %edi, %r13d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rbx
movl %edx, %r15d
movl %edi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x17475
testb $0x1, %al
jne 0x17468
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x2230
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %edi
testl %eax, %eax
je 0x17475
addl %r13d, %r15d
andl %edi, %r15d
cmpl %edx, %r15d
jne 0x17424
jmp 0x17495
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x18(%rsp), %rax
cmovnel %eax, %r15d
movl $0x1, %ebp
cmpl %eax, %r15d
jne 0x1759c
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x18791
movq 0x10(%r14), %r14
movq 0x10(%rsp), %rax
movl (%rax), %ecx
testl %ecx, %ecx
je 0x174ee
leal -0x1(%rcx), %edi
movsbl (%r14), %r13d
testl %r13d, %r13d
movq %rcx, 0x18(%rsp)
je 0x174f6
movb 0x1(%r14), %al
testb %al, %al
je 0x174f9
leaq 0x2(%r14), %rcx
movl %r13d, %edx
shll $0x5, %edx
subl %r13d, %edx
movsbl %al, %r13d
addl %edx, %r13d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x174d3
jmp 0x174f9
xorl %r15d, %r15d
jmp 0x17591
xorl %r13d, %r13d
movl %r13d, %edx
andl %edi, %edx
movl %r13d, %eax
shrl $0x3, %eax
shll $0x3, %r13d
xorl %eax, %r13d
orl $0x1, %r13d
andl %edi, %r13d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rbx
movl %edx, %r15d
movl %edi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x1757f
testb $0x1, %al
jne 0x1756a
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x2230
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %edi
testl %eax, %eax
je 0x1757f
addl %r13d, %r15d
andl %edi, %r15d
cmpl %edx, %r15d
jne 0x17526
movq 0x18(%rsp), %rcx
movl %ecx, %r15d
jmp 0x17591
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x18(%rsp), %rcx
cmovnel %ecx, %r15d
xorl %ebp, %ebp
cmpl %ecx, %r15d
setne %bpl
addl %ebp, %ebp
movq %r14, %rdi
callq 0x2050
movq 0x80(%rsp), %rdi
callq 0x2050
movq 0x50(%rsp), %rdi
callq 0x2050
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq