// File: /workspace/github_c_makefile_star2_O1/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
movl %edx, 0xc(%rsp)
movq 0x10(%rdi), %rax
movups 0x18cac(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x20(%rsp)
movups 0x18c90(%rip), %xmm0    # 0x1d280
movaps %xmm0, 0x10(%rsp)
movb (%rdi), %cl
movq $-0x1, %r10
shlq %cl, %r10
leaq (%rsi,%rsi,2), %rcx
cmpl $0x0, (%rax,%rcx,8)
jle 0x488a
movq %rdi, %r14
leaq (%rax,%rcx,8), %r13
notq %r10
movslq 0xc(%rsp), %rax
movq %rax, 0x48(%rsp)
xorl %r15d, %r15d
leaq 0x18b43(%rip), %r11     # 0x1d170
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r10, 0x50(%rsp)
movq 0x8(%r13), %rax
movzbl (%rax,%r15), %eax
movzbl (%r11,%rax), %edi
cmpl $0x4, %edi
ja 0x46e0
movl (%r14), %eax
movq $-0x1, %rdx
movl %eax, %ecx
shlq %cl, %rdx
decl %edi
notq %rdx
movl %edi, %r8d
andl $0x1, %r8d
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rsi
leaq (%r8,%rcx,2), %rcx
andq %rdx, %rcx
movq %rcx, 0x10(%rsp)
addq %rsi, %rsi
sarl %edi
movslq %edi, %rdi
orq %rdi, %rsi
andq %rdx, %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %r9
shrq %r9
xorq $0x1, %r8
leal -0x1(%rax), %ecx
shlq %cl, %r8
orq %r9, %r8
movq %r8, 0x20(%rsp)
movq 0x28(%rsp), %r8
shrq %r8
xorq $0x1, %rdi
shlq %cl, %rdi
orq %r8, %rdi
movq %rdi, 0x28(%rsp)
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0x4702
movsbl (%rcx,%r15), %r8d
addl $-0x21, %r8d
xorl %ecx, %ecx
cmpl 0x4(%r14), %r8d
setge %cl
jmp 0x4707
movups 0x18ba9(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x20(%rsp)
movups 0x18b8d(%rip), %xmm0    # 0x1d280
movaps %xmm0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x487a
movl $0x1, %ecx
addq %rbx, %rbx
orq %rcx, %rbx
andq %r10, %rbx
incl %r12d
cmpl %eax, %r12d
jl 0x487a
xorl %ebp, %ebp
cmpq %r10, %rbx
sete %bpl
shrl %eax
xorl %ecx, %ecx
btq %rax, %rsi
setb %cl
btq %rax, %rdi
sbbl $0x0, %ecx
seta %al
movzbl %al, %ecx
shll $0x4, %ecx
movq 0x18(%rsp,%rcx), %rax
movq 0x10(%rsp,%rcx), %rcx
addq %rax, %rcx
andq %rdx, %rcx
movq %rcx, %rsi
notq %rsi
shlq $0x15, %rcx
addq %rsi, %rcx
andq %rdx, %rcx
movq %rcx, %rsi
shrq $0x18, %rsi
xorq %rcx, %rsi
imulq $0x109, %rsi, %rcx      # imm = 0x109
andq %rdx, %rcx
movq %rcx, %rsi
shrq $0xe, %rsi
xorq %rcx, %rsi
leaq (%rsi,%rsi,4), %rcx
leaq (%rsi,%rcx,4), %rsi
andq %rdx, %rsi
movq %rsi, %rcx
shrq $0x1c, %rcx
xorq %rsi, %rcx
movl $0x80000001, %edi       # imm = 0x80000001
imulq %rdi, %rcx
andq %rdx, %rcx
xorq %rcx, %rax
movq %rax, %rsi
notq %rsi
shlq $0x15, %rax
addq %rsi, %rax
andq %rdx, %rax
movq %rax, %rsi
shrq $0x18, %rsi
xorq %rax, %rsi
imulq $0x109, %rsi, %rax      # imm = 0x109
andq %rdx, %rax
movq %rax, %rsi
shrq $0xe, %rsi
xorq %rax, %rsi
leaq (%rsi,%rsi,4), %rax
leaq (%rsi,%rax,4), %rax
andq %rdx, %rax
movq %rax, %rsi
shrq $0x1c, %rsi
xorq %rax, %rsi
imulq %rdi, %rsi
andq %rdx, %rsi
movq %rsi, 0x38(%rsp)
addq %rcx, %rsi
andq %rdx, %rsi
movq %rsi, 0x30(%rsp)
movq 0x18(%r14), %rdi
leaq 0x30(%rsp), %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x14279
testl %eax, %eax
jns 0x486e
movq %r14, %rdi
xorl %esi, %esi
movl 0xc(%rsp), %edx
callq 0x7295
cmpl $0x100, %eax            # imm = 0x100
jne 0x4838
movq %r14, %rdi
movl $0x1, %esi
movl 0xc(%rsp), %edx
callq 0x7295
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
movq 0x48(%rsp), %rdi
movq (%rcx,%rdi,8), %rcx
movslq (%rax,%rdi,4), %rdx
leal 0x1(%rdx), %esi
movl %esi, (%rax,%rdi,4)
leaq (%rdx,%rdx,2), %rax
movq 0x30(%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0x38(%rsp), %rdx
movq %rdx, 0x8(%rcx,%rax,8)
movl %ebp, 0x10(%rcx,%rax,8)
movq 0x50(%rsp), %r10
leaq 0x188f6(%rip), %r11     # 0x1d170
incq %r15
movslq (%r13), %rax
cmpq %rax, %r15
jl 0x4637
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq