// File: /workspace/github_c_makefile_star2_O2/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 0x951c
movq %rsi, %r12
movl %edi, %ebx
movq 0x8(%rsi), %rdi
callq 0x32b2
movq %rax, %r14
movl %ebx, %eax
movq %rax, 0x18(%rsp)
pushq $0x2
popq %rax
leaq 0x11e8a(%rip), %rbp     # 0x1b1d9
movq %r12, 0x10(%rsp)
movq %r14, (%rsp)
cmpq 0x18(%rsp), %rax
je 0x9500
movq %rax, 0x20(%rsp)
movq (%r12,%rax,8), %rdi
movq %rdi, 0x8(%rsp)
callq 0x20e0
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x28(%r14), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
xorl %r13d, %r13d
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x2100
decl %ebx
movq %rbx, 0x28(%rsp)
movq 0x28(%rsp), %rax
addl %r13d, %eax
leaq 0x30(%rsp), %r14
movq (%rsp), %r15
leaq 0x50(%rsp), %rbx
pushq $0x1
popq %r12
js 0x9421
movl %eax, %eax
movq 0x8(%rsp), %rcx
movsbq (%rcx,%rax), %rax
leaq 0x18e0e(%rip), %rcx     # 0x221e0
movzbl (%rcx,%rax), %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x39db
shll $0x5, %ebp
cmpq $0x0, 0x60(%rsp,%rbp)
je 0x9421
leaq (%rsp,%rbp), %rax
addq $0x50, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x39db
decl %r13d
jmp 0x93a3
negl %r13d
leaq 0x11dae(%rip), %rbp     # 0x1b1d9
movq %rbp, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x2100
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x39db
leaq 0x80(%rsp), %r12
pushq $0x1
popq %r13
leaq 0x11c8a(%rip), %r15     # 0x1b0e6
cmpq $0x1, %r13
je 0x9470
cmpq $0x5, %r13
je 0x9487
pushq $0x3a
popq %rdi
callq 0x2050
movq (%r12), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2100
incq %r13
addq $0x20, %r12
jmp 0x945c
leaq 0x106ec(%rip), %rdi     # 0x19b7a
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x2100
movq (%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x39db
leaq 0xe0(%rsp), %r12
pushq $0x4
popq %r13
cmpq $0x4, %r13
je 0x94cf
testq %r13, %r13
je 0x94e6
pushq $0x3a
popq %rdi
callq 0x2050
movq (%r12), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2100
decq %r13
addq $-0x20, %r12
jmp 0x94bc
pushq $0xa
popq %rdi
callq 0x2050
movq 0x20(%rsp), %rax
incq %rax
movq 0x10(%rsp), %r12
jmp 0x9358
movq %r14, %rdi
callq 0x26e6
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18ad5(%rip), %rax     # 0x21ff8
movq (%rax), %rcx
leaq 0x1061b(%rip), %rdi     # 0x19b48
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x2310
pushq $0x1
popq %rax
jmp 0x950a