// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: mem_flt_chained_seeds
void mem_flt_chained_seeds(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, int l_query, const uint8_t *query, int n_chn, mem_chain_t *a)
{
	double min_l = opt->min_chain_weight? MEM_HSP_COEF * opt->min_chain_weight : MEM_MINSC_COEF * log(l_query);
	int i, j, k, min_HSP_score = (int)(opt->a * min_l + .499);
	if (min_l > MEM_SEEDSW_COEF * l_query) return; // don't run the following for short reads
	for (i = 0; i < n_chn; ++i) {
		mem_chain_t *c = &a[i];
		for (j = k = 0; j < c->n; ++j) {
			mem_seed_t *s = &c->seeds[j];
			s->score = mem_seed_sw(opt, bns, pac, l_query, query, s);
			if (s->score < 0 || s->score >= min_HSP_score) {
				s->score = s->score < 0? s->len * opt->a : s->score;
				c->seeds[k++] = *s;
			}
		}
		c->n = k;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
je 0x27bcd
movq -0x8(%rbp), %rax
cvtsi2ssl 0x7c(%rax), %xmm1
movss 0x12aa6(%rip), %xmm0    # 0x3a664
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0x27beb
cvtsi2sdl -0x1c(%rbp), %xmm0
callq 0x3240
movaps %xmm0, %xmm1
movsd 0x12aa6(%rip), %xmm0    # 0x3a688
mulsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
cvtsi2sdl (%rax), %xmm0
movsd -0x38(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xfb9a(%rip), %xmm1     # 0x377a8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x48(%rbp)
movsd -0x38(%rbp), %xmm0
cvtsi2ssl -0x1c(%rbp), %xmm2
movss 0x12a3d(%rip), %xmm1    # 0x3a668
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x27c3e
jmp 0x27d62
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x27d62
movq 0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x27d4b
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x40(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
movq -0x58(%rbp), %r9
callq 0x278a0
movl %eax, %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x58(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x27cd3
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x48(%rbp), %eax
jl 0x27d3b
movq -0x58(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x27cf0
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
imull (%rcx), %eax
movl %eax, -0x64(%rbp)
jmp 0x27cfa
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x44(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x27d3d
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x27c72
movl -0x44(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x27c45
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)