// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/correct.c
// Function: kmer_lookup
static inline int kmer_lookup(int k, int suf_len, uint64_t kmer[2], fmc_hash_t **h, kmercache_t *cache)
{
	int absent, i = (kmer[0]>>(k>>1<<1)&3) < 2? 0 : 1;
	khint_t kh, kc;
	longcell_t x, *p;

	x.suf = kmer[i] & ((1<<(suf_len<<1)) - 1);
	x.x = kmer[i] >> (suf_len<<1) << 28;
	x.missing = 0; // This line suppresses a gcc warning. It has no effect.
	kc = kh_put(kache, cache, x, &absent);
	p = &kh_key(cache, kc);
	if (absent) {
		fmc_hash_t *g = h[x.suf];
		kh = kh_get(fmc, g, x.x);
		if (kh == kh_end(g)) p->missing = 1;
		else p->missing = 0, p->x = kh_key(g, kh);
	}
	if (fmc_verbose >= 6) {
		int i, which = (kmer[0]>>(k>>1<<1)&3) < 2? 0 : 1;
		int val = p->missing? -1 : fmc_cell_get_val(p->x, !which);
		fprintf(stderr, "?? ");
		for (i = k-1; i >= 0; --i) fputc("ACGT"[kmer[0]>>2*i&3], stderr); fprintf(stderr, " - ");
		for (i = k-1; i >= 0; --i) fputc("ACGT"[kmer[1]>>2*i&3], stderr);
		fprintf(stderr, " - [%c] %lx", "+-"[which], (long)kmer[which]);
		if (p->missing) fprintf(stderr, " - NOHIT\n");
		else fprintf(stderr, " - %c%d\n", "ACGTN"[fmc_cell_get_b1(val)], fmc_cell_get_q1(val));
	}
	return p->missing? -1 : fmc_cell_get_val(p->x, !i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl -0x4(%rbp), %eax
sarl %eax
shll %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdx
andq $0x3, %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x2, %rdx
cmovbl %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movl -0x8(%rbp), %ecx
shll %ecx
movl $0x1, %eax
shll %cl, %eax
movq -0x68(%rbp), %rcx
subl $0x1, %eax
cltq
andq %rax, %rcx
movq -0x40(%rbp), %rax
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
andq %rdx, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x8(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shrq %cl, %rax
shlq $0x1c, %rax
movq %rax, -0x38(%rbp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
andq -0x40(%rbp), %rax
orq $0x0, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0xeae0
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x30(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xde99
movq -0x18(%rbp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xeed0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xde68
movq -0x48(%rbp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq (%rax), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rcx
movq %rcx, (%rax)
jmp 0xde97
movq -0x48(%rbp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq (%rax), %rcx
orq $0x0, %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xde99
cmpl $0x6, 0x25340(%rip)     # 0x331e0
jl 0xe088
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl -0x4(%rbp), %eax
sarl %eax
shll %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdx
andq $0x3, %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x2, %rdx
cmovbl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0xdeed
movq $-0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0xdf1e
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, -0x58(%rbp)
setne %sil
xorb $-0x1, %sil
xorl %ecx, %ecx
movl $0xe, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl %eax, -0x5c(%rbp)
movq 0x250cc(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x1ebe5(%rip), %rsi     # 0x2cb1b
movb $0x0, %al
callq 0x21d0
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0xdf89
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x54(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, %rcx
andq $0x3, %rcx
leaq 0x1ebb4(%rip), %rax     # 0x2cb1f
movsbl (%rax,%rcx), %edi
movq 0x25082(%rip), %rax     # 0x32ff8
movq (%rax), %rsi
callq 0x2190
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xdf46
movq 0x25068(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x1eb8a(%rip), %rsi     # 0x2cb24
movb $0x0, %al
callq 0x21d0
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0xdfee
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, %rcx
andq $0x3, %rcx
leaq 0x1eb4f(%rip), %rax     # 0x2cb1f
movsbl (%rax,%rcx), %edi
movq 0x2501d(%rip), %rax     # 0x32ff8
movq (%rax), %rsi
callq 0x2190
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xdfaa
movq 0x25003(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movslq -0x58(%rbp), %rcx
leaq 0x1eb31(%rip), %rax     # 0x2cb34
movsbl (%rax,%rcx), %edx
movq -0x10(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x1eb0e(%rip), %rsi     # 0x2cb28
movb $0x0, %al
callq 0x21d0
movq -0x48(%rbp), %rax
movq (%rax), %rax
shrq $0x3f, %rax
cmpq $0x0, %rax
je 0xe04c
movq 0x24fbf(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x1eaf4(%rip), %rsi     # 0x2cb37
movb $0x0, %al
callq 0x21d0
jmp 0xe086
movq 0x24fa5(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movl -0x5c(%rbp), %eax
sarl $0xc, %eax
andl $0x3, %eax
movslq %eax, %rcx
leaq 0x1e332(%rip), %rax     # 0x2c39b
movsbl (%rax,%rcx), %edx
movl -0x5c(%rbp), %ecx
sarl $0x5, %ecx
andl $0x1f, %ecx
shll %ecx
leaq 0x1eac2(%rip), %rsi     # 0x2cb41
movb $0x0, %al
callq 0x21d0
jmp 0xe088
movq -0x48(%rbp), %rax
movq (%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0xe0a5
movq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xe0d6
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, -0x28(%rbp)
setne %sil
xorb $-0x1, %sil
xorl %ecx, %ecx
movl $0xe, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)