// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi-lite/bfc.c
// Function: worker_ec
static void worker_ec(void *_data, long k, int tid)
{
	ec_step_t *es = (ec_step_t*)_data;
	bseq1_t *s = &es->seqs[k];
	if (es->flt_uniq) {
		uint64_t max;
		max = max_streak(es->opt->k, es->ch, s);
		if (max>>32 && (double)((max>>32) + es->opt->k - 1) / s->l_seq > es->opt->min_trim_frac) {
			int start = (uint32_t)max, end = start + (max>>32);
			start -= es->opt->k - 1;
			assert(start >= 0 && end <= s->l_seq);
			memmove(s->seq, s->seq + start, end - start);
			s->l_seq = end - start;
			s->seq[s->l_seq] = 0;
			if (s->qual) {
				memmove(s->qual, s->qual + start, s->l_seq);
				s->qual[s->l_seq] = 0;
			}
		} else {
			free(s->seq); free(s->qual);
			s->l_seq = 0, s->seq = s->qual = 0;
		}
	} else bfc_ec1(es->e[tid], s->seq, s->qual);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
imulq $0x18, %rsi, %r9
addq 0x28(%rdi), %r9
cmpl $0x0, 0x24(%rdi)
je 0x6178
movq (%rdi), %rax
movq %rdi, 0x20(%rsp)
movq 0x8(%rdi), %rcx
movq %rcx, 0x28(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
movups 0x152ef(%rip), %xmm0    # 0x1b290
leaq 0x30(%rsp), %r13
movaps %xmm0, 0x10(%r13)
movups 0x152ce(%rip), %xmm0    # 0x1b280
movaps %xmm0, (%r13)
leaq 0x8(%r9), %rax
movq %rax, 0x18(%rsp)
xorl %r14d, %r14d
leaq 0x151a6(%rip), %rsi     # 0x1b170
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r9, 0x8(%rsp)
movslq (%r9), %rcx
cmpq %rcx, %r14
jge 0x6088
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl (%rax,%r14), %eax
movzbl (%rsi,%rax), %edx
cmpl $0x4, %edx
ja 0x601e
decl %edx
movl 0x14(%rsp), %ebp
movl %ebp, %edi
movq %r13, %rsi
callq 0x4077
incl %r15d
cmpl %ebp, %r15d
jge 0x6041
incq %r14
movq %r14, %r12
movq 0x8(%rsp), %r9
jmp 0x6075
movups 0x1526b(%rip), %xmm0    # 0x1b290
movaps %xmm0, 0x40(%rsp)
movups 0x1524f(%rip), %xmm0    # 0x1b280
movaps %xmm0, 0x30(%rsp)
incq %r14
xorl %r15d, %r15d
movq %r14, %r12
jmp 0x607c
movq 0x28(%rsp), %rdi
movq %r13, %rbp
movq %r13, %rsi
callq 0x12195
testl %eax, %eax
jle 0x6067
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r12
incq %r14
jmp 0x606d
incq %r14
movq %r14, %r12
movq 0x8(%rsp), %r9
movq %rbp, %r13
leaq 0x150f4(%rip), %rsi     # 0x1b170
cmpq %r12, %rbx
cmovbeq %r12, %rbx
jmp 0x5fd7
movq %rbx, %rax
shrq $0x20, %rax
je 0x6146
movq 0x20(%rsp), %rdx
movq (%rdx), %rsi
movslq 0x8(%rsi), %rdx
leaq (%rax,%rdx), %rdi
decq %rdi
movq %rdi, %xmm0
punpckldq 0xe2cb(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe2d3(%rip), %xmm0     # 0x14390
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cvtsi2sd %ecx, %xmm0
divsd %xmm0, %xmm1
cvtss2sd 0x1c(%rsi), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x6146
movl %ebx, %r8d
subl %edx, %r8d
incl %r8d
js 0x619e
addl %ebx, %eax
cmpl %eax, %ecx
jl 0x619e
movq 0x8(%r9), %rdi
movl %r8d, %ebx
leaq (%rdi,%rbx), %rsi
subl %r8d, %eax
movslq %eax, %r14
movq %r14, %rdx
callq 0x2200
movq 0x8(%rsp), %rcx
movl %r14d, (%rcx)
movq 0x8(%rcx), %rax
movb $0x0, (%rax,%r14)
movq 0x10(%rcx), %rdi
testq %rdi, %rdi
je 0x6169
addq %rdi, %rbx
movslq (%rcx), %rdx
movq %rbx, %rsi
movq %rcx, %rbx
callq 0x2200
movq 0x10(%rbx), %rax
movslq (%rbx), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x6169
movq 0x8(%r9), %rdi
movq %r9, %rbx
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x2040
andl $0x0, (%rbx)
xorps %xmm0, %xmm0
movq 0x18(%rsp), %rax
movups %xmm0, (%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%r9), %rsi
movq 0x10(%r9), %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e61
leaq 0xe3ec(%rip), %rdi      # 0x14591
leaq 0xe32f(%rip), %rsi      # 0x144db
leaq 0xe3fc(%rip), %rcx      # 0x145af
movl $0x264, %edx            # imm = 0x264
callq 0x20e0