// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %rsp
leaq (%rsi,%rsi,2), %rbp
shlq $0x3, %rbp
addq 0x28(%rdi), %rbp
cmpl $0x0, 0x24(%rdi)
je 0x75e3
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x40(%rsp)
movl 0x8(%rax), %r14d
movups 0x15edd(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x10(%rsp)
movups 0x15ec1(%rip), %xmm0    # 0x1d280
movaps %xmm0, (%rsp)
cmpl $0x0, (%rbp)
jle 0x75b4
movq %rdi, 0x38(%rsp)
movq $-0x1, %rdi
movl %r14d, %ecx
shlq %cl, %rdi
notq %rdi
leal -0x1(%r14), %ecx
xorl %ebx, %ebx
leaq 0x15d81(%rip), %r10     # 0x1d170
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %r15d, %r15d
movq %rbp, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x8(%rbp), %rax
movzbl (%rax,%rbx), %eax
movzbl (%r10,%rax), %eax
cmpl $0x4, %eax
ja 0x747c
decl %eax
movl %eax, %edx
andl $0x1, %edx
movq (%rsp), %r9
movq 0x8(%rsp), %rsi
leaq (%rdx,%r9,2), %r9
andq %rdi, %r9
movq %r9, (%rsp)
addq %rsi, %rsi
sarl %eax
cltq
orq %rax, %rsi
andq %rdi, %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rsi
shrq %rsi
xorq $0x1, %rdx
shlq %cl, %rdx
orq %rsi, %rdx
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rdx
shrq %rdx
xorq $0x1, %rax
shlq %cl, %rax
orq %rdx, %rax
movq %rax, 0x18(%rsp)
incl %r15d
cmpl %r14d, %r15d
jge 0x749e
incq %rbx
jmp 0x7499
movups 0x15e0d(%rip), %xmm0    # 0x1d290
movaps %xmm0, 0x10(%rsp)
movups 0x15df1(%rip), %xmm0    # 0x1d280
movaps %xmm0, (%rsp)
incq %rbx
xorl %r15d, %r15d
movq %rbx, %r12
jmp 0x74de
movq %rdi, %rbp
movq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x14d3a
testl %eax, %eax
jle 0x74c4
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r12
incq %rbx
jmp 0x74ca
incq %rbx
movq %rbx, %r12
movq %rbp, %rdi
movq 0x30(%rsp), %rbp
movq 0x28(%rsp), %rcx
leaq 0x15c92(%rip), %r10     # 0x1d170
cmpq %r12, %r13
cmovbeq %r12, %r13
movslq (%rbp), %r9
cmpq %r9, %rbx
jl 0x7402
movq %r13, %rax
shrq $0x20, %rax
je 0x75b4
movq 0x38(%rsp), %rdx
movq (%rdx), %rsi
movslq 0x8(%rsi), %rdx
leaq (%rax,%rdx), %rdi
decq %rdi
movq %rdi, %xmm0
punpckldq 0xfe61(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xfe69(%rip), %xmm0     # 0x17390
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%rsi), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x75b4
movl %r13d, %r8d
subl %edx, %r8d
incl %r8d
js 0x7609
addl %r13d, %eax
cmpl %eax, %r9d
jl 0x7609
movq 0x8(%rbp), %rdi
movl %r8d, %ebx
leaq (%rdi,%rbx), %rsi
subl %r8d, %eax
movslq %eax, %r14
movq %r14, %rdx
callq 0x2200
movl %r14d, (%rbp)
movq 0x8(%rbp), %rax
movb $0x0, (%rax,%r14)
movq 0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x75d4
addq %rdi, %rbx
movslq (%rbp), %rdx
movq %rbx, %rsi
callq 0x2200
movq 0x10(%rbp), %rax
movslq (%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x75d4
movq 0x8(%rbp), %rdi
callq 0x2040
movq 0x10(%rbp), %rdi
callq 0x2040
movl $0x0, (%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbp)
addq $0x48, %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(%rbp), %rsi
movq 0x10(%rbp), %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5f18
leaq 0xff85(%rip), %rdi      # 0x17595
leaq 0xfec8(%rip), %rsi      # 0x174df
leaq 0xff95(%rip), %rcx      # 0x175b3
movl $0x264, %edx            # imm = 0x264
callq 0x20e0