// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi-lite/bfc.c
// Function: worker_count
static void worker_count(void *_data, long k, int tid)
{
	cnt_step_t *cs = (cnt_step_t*)_data;
	const bseq1_t *s = &cs->seqs[k];
	int i, l;
	bfc_kmer_t x = bfc_kmer_null;
	uint64_t qmer = 0, mask = (1ULL<<cs->k) - 1;
	for (i = l = 0; i < s->l_seq; ++i) {
		int c = seq_nt6_table[(uint8_t)s->seq[i]] - 1;
		if (c < 4) {
			bfc_kmer_append(cs->k, x.x, c);
			qmer = (qmer<<1 | (s->qual == 0 || s->qual[i] - 33 >= cs->q)) & mask;
			if (++l >= cs->k) bfc_kmer_insert(cs, &x, (qmer == mask), tid);
		} else l = 0, qmer = 0, x = bfc_kmer_null;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
imulq $0x18, %rsi, %r15
addq 0x10(%rdi), %r15
movups 0x1767f(%rip), %xmm0    # 0x1b290
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x1765f(%rip), %xmm0    # 0x1b280
movaps %xmm0, (%rsi)
movq %rdi, (%rsp)
movb (%rdi), %cl
pushq $-0x1
popq %rax
shlq %cl, %rax
notq %rax
movq %rax, 0x50(%rsp)
movl %edx, 0x8(%rsp)
movslq %edx, %rax
movq %rax, 0x40(%rsp)
xorl %r14d, %r14d
leaq 0x17522(%rip), %rcx     # 0x1b170
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r15, 0x48(%rsp)
movslq (%r15), %rax
cmpq %rax, %r14
jge 0x3e07
movq 0x8(%r15), %rax
movzbl (%rax,%r14), %eax
movzbl (%rcx,%rax), %edx
cmpl $0x4, %edx
ja 0x3cce
decl %edx
movq (%rsp), %rax
movl (%rax), %ebp
movl %ebp, %edi
movq %rsi, %rbx
callq 0x4077
movq 0x10(%r15), %rcx
pushq $0x1
popq %rax
testq %rcx, %rcx
je 0x3ca9
movsbl (%rcx,%r14), %ecx
addl $-0x21, %ecx
xorl %eax, %eax
movq (%rsp), %rdx
cmpl 0x4(%rdx), %ecx
setge %al
addq %r13, %r13
orq %rax, %r13
movq 0x50(%rsp), %rax
andq %rax, %r13
incl %r12d
cmpl %ebp, %r12d
jge 0x3cf1
leaq 0x174aa(%rip), %rcx     # 0x1b170
movq %rbx, %rsi
jmp 0x3dff
movups 0x175bb(%rip), %xmm0    # 0x1b290
movaps %xmm0, 0x30(%rsp)
movups 0x1759f(%rip), %xmm0    # 0x1b280
movaps %xmm0, 0x20(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x3dff
movl %r12d, 0xc(%rsp)
xorl %r15d, %r15d
cmpq %rax, %r13
sete %r15b
movl %ebp, %eax
shrl %eax
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rdx
xorl %esi, %esi
btq %rax, %rcx
setb %sil
btq %rax, %rdx
sbbl $0x0, %esi
seta %al
pushq $-0x1
popq %r12
movl %ebp, %ecx
shlq %cl, %r12
notq %r12
movzbl %al, %eax
shll $0x4, %eax
movq 0x28(%rsp,%rax), %rbp
movq 0x20(%rsp,%rax), %rdi
addq %rbp, %rdi
andq %r12, %rdi
movq %r12, %rsi
callq 0x626a
movq %rax, %rbx
xorq %rax, %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x626a
movq %rax, 0x18(%rsp)
addq %rbx, %rax
movq (%rsp), %rcx
andq %r12, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rcx), %rdi
leaq 0x10(%rsp), %rsi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x11e67
testl %eax, %eax
jns 0x3de9
movq (%rsp), %rdi
xorl %esi, %esi
movl 0x8(%rsp), %edx
callq 0x61d6
cmpl $0x100, %eax            # imm = 0x100
jne 0x3dae
movq (%rsp), %rdi
pushq $0x1
popq %rsi
movl 0x8(%rsp), %edx
callq 0x61d6
movq (%rsp), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
movq 0x40(%rsp), %rdi
movq (%rcx,%rdi,8), %rcx
movslq (%rax,%rdi,4), %rdx
leal 0x1(%rdx), %esi
movl %esi, (%rax,%rdi,4)
imulq $0x18, %rdx, %rax
movq 0x10(%rsp), %rdx
movq %rdx, (%rcx,%rax)
movq 0x18(%rsp), %rdx
movq %rdx, 0x8(%rcx,%rax)
movl %r15d, 0x10(%rcx,%rax)
movq 0x48(%rsp), %r15
leaq 0x20(%rsp), %rsi
leaq 0x17376(%rip), %rcx     # 0x1b170
movl 0xc(%rsp), %r12d
incq %r14
jmp 0x3c59
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq