// File: /workspace/github_c_makefile_star2_O1/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 0x19f79
movq %r15, %rdi
movq %r14, %rsi
callq 0x17f13
movq %rbx, 0x10(%rsp)
movl (%rbx), %eax
testl %eax, %eax
je 0x16d75
movq 0x30(%rsp), %r14
movq %rax, 0x8(%rsp)
leal -0x1(%rax), %esi
movsbl (%r14), %r13d
testl %r13d, %r13d
je 0x16d7d
movb 0x1(%r14), %al
testb %al, %al
je 0x16d80
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 0x16d5a
jmp 0x16d80
xorl %r15d, %r15d
jmp 0x16e1a
xorl %r13d, %r13d
movl %r13d, %ebx
andl %esi, %ebx
movl %r13d, %eax
shrl $0x3, %eax
shll $0x3, %r13d
xorl %eax, %r13d
orl $0x1, %r13d
andl %esi, %r13d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movl %ebx, %r15d
movl %esi, 0x4(%rsp)
movq %rdi, 0x18(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x16e08
testb $0x1, %al
jne 0x16df3
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x2230
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
testl %eax, %eax
je 0x16e08
addl %r13d, %r15d
andl %esi, %r15d
cmpl %ebx, %r15d
jne 0x16dae
movq 0x8(%rsp), %rax
movl %eax, %r15d
jmp 0x16e1a
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x8(%rsp), %rax
cmovnel %eax, %r15d
movl $0x1, %ebp
cmpl %eax, %r15d
jne 0x16f2f
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x17f13
movq 0x10(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x16e7f
movq 0x30(%rsp), %r14
movq %rax, 0x8(%rsp)
leal -0x1(%rax), %esi
movsbl (%r14), %r13d
testl %r13d, %r13d
je 0x16e87
movb 0x1(%r14), %al
testb %al, %al
je 0x16e8a
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 0x16e64
jmp 0x16e8a
xorl %r15d, %r15d
jmp 0x16f24
xorl %r13d, %r13d
movl %r13d, %ebx
andl %esi, %ebx
movl %r13d, %eax
shrl $0x3, %eax
shll $0x3, %r13d
xorl %eax, %r13d
orl $0x1, %r13d
andl %esi, %r13d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movl %ebx, %r15d
movl %esi, 0x4(%rsp)
movq %rdi, 0x18(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x16f12
testb $0x1, %al
jne 0x16efd
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x2230
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
testl %eax, %eax
je 0x16f12
addl %r13d, %r15d
andl %esi, %r15d
cmpl %ebx, %r15d
jne 0x16eb8
movq 0x8(%rsp), %rax
movl %eax, %r15d
jmp 0x16f24
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x8(%rsp), %rax
cmovnel %eax, %r15d
xorl %ebp, %ebp
cmpl %eax, %r15d
setne %bpl
addl %ebp, %ebp
movq 0x30(%rsp), %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