// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi2/correct.c
// Function: main_inspectk
int main_inspectk(int argc, char *argv[])
{
	rld_t *e;
	int j;
	if (argc < 3) {
		fprintf(stderr, "Usage: fermi2 inspectk <index.fmd> <kmer1> [...]\n");
		return 1;
	}
	e = rld_restore_mmap(argv[1]);
	for (j = 2; j < argc; ++j) {
		int i, len;
		rldintv_t s, t[6];
		char *aj = argv[j];
		len = strlen(aj);
		s.x[0] = s.x[1] = 0; s.x[2] = e->mcnt[0];
		printf("%d\t", len);
		for (i = len - 1; i >= 0; --i) {
			int c = seq_nt6_table[(int)aj[i]];
			rld_extend(e, &s, t, 1);
			if (t[c].x[2] == 0) break;
			s = t[c];
			rld_extend(e, &s, t, 1);
		}
		printf("%d\t", len - 1 - i);
		rld_extend(e, &s, t, 1);
		for (i = 1; i <= 4; ++i) {
			if (i != 1) putchar(':');
			printf("%ld", (long)t[i].x[2]);
		}
		printf("\t%s\t", aj);
		rld_extend(e, &s, t, 0);
		for (i = 4; i >= 1; --i) {
			if (i != 4) putchar(':');
			printf("%ld", (long)t[i].x[2]);
		}
		putchar('\n');
	}
	rld_destroy(e);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
cmpl $0x2, %edi
jle 0xae34
movq %rsi, %r12
movl %edi, %ebx
movq 0x8(%rsi), %rdi
callq 0x4598
movq %rax, %r14
movl %ebx, %eax
movq %rax, 0x20(%rsp)
movl $0x2, %eax
leaq 0x14694(%rip), %r13     # 0x1f2e6
leaq 0x50(%rsp), %rbx
movq %r12, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq (%r12,%rax,8), %rdi
movq %rdi, 0x18(%rsp)
callq 0x20e0
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x28(%r14), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq %r13, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2100
leal -0x1(%r15), %esi
movl %esi, %r13d
testl %r15d, %r15d
jle 0xad31
movl %esi, 0xc(%rsp)
movq %r14, %rbp
movq %rbx, %r14
leaq 0x30(%rsp), %rbx
leal -0x1(%r15), %r13d
movq 0x18(%rsp), %rax
movsbq (%rax,%r13), %rax
leaq 0x1a519(%rip), %rcx     # 0x251e0
movzbl (%rcx,%rax), %r12d
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x4ef6
shll $0x5, %r12d
cmpq $0x0, 0x60(%rsp,%r12)
je 0xad22
leaq (%rsp,%r12), %rax
addq $0x50, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x4ef6
decl %r15d
jg 0xacb2
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x10(%rsp), %r12
movq %r14, %rbx
movq %rbp, %r14
movl 0xc(%rsp), %esi
subl %r13d, %esi
leaq 0x145ab(%rip), %r13     # 0x1f2e6
movq %r13, %rdi
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x4ef6
xorl %r15d, %r15d
testq %r15, %r15
je 0xad6c
movl $0x3a, %edi
callq 0x2050
movq 0x80(%rsp,%r15), %rsi
leaq 0x1447b(%rip), %rdi     # 0x1f1f6
xorl %eax, %eax
callq 0x2100
addq $0x20, %r15
cmpq $0x80, %r15
jne 0xad5d
leaq 0x12e94(%rip), %rdi     # 0x1dc2a
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x2100
movq %r14, %rbp
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %r14
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4ef6
movl $0x5, %ebx
leaq 0xe0(%rsp), %r15
cmpq $0x5, %rbx
je 0xadd7
movl $0x3a, %edi
callq 0x2050
movq (%r15), %rsi
leaq 0x14415(%rip), %rdi     # 0x1f1f6
xorl %eax, %eax
callq 0x2100
decq %rbx
addq $-0x20, %r15
cmpq $0x1, %rbx
ja 0xadc7
movl $0xa, %edi
callq 0x2050
movq 0x28(%rsp), %rax
incq %rax
cmpq 0x20(%rsp), %rax
movq %r14, %rbx
movq %rbp, %r14
jne 0xac5c
movq %r14, %rdi
callq 0x36d4
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a1c
movl $0x1, %eax
jmp 0xae22