// File: /workspace/github_c_makefile_star2_O0/rikuu[P]kermit/miniasm/hit.c
// Function: ma_hit_flt
size_t ma_hit_flt(const ma_sub_t *sub, int max_hang, int min_ovlp, size_t n, ma_hit_t *a, float *cov)
{
	size_t i, m;
	asg_arc_t t;
	uint64_t tot_dp = 0, tot_len = 0;
	for (i = m = 0; i < n; ++i) {
		ma_hit_t *h = &a[i];
		const ma_sub_t *sq = &sub[h->qns>>32], *st = &sub[h->tn];
		int r;
		if (sq->del || st->del) continue;
		r = ma_hit2arc(h, sq->e - sq->s, st->e - st->s, max_hang, .5, min_ovlp, &t);
		if (r >= 0 || r == MA_HT_QCONT || r == MA_HT_TCONT)
			a[m++] = *h, tot_dp += r >= 0? r : r == MA_HT_QCONT? sq->e - sq->s : st->e - st->s;
	}
	for (i = 1; i <= m; ++i)
		if (i == m || a[i].qns>>32 != a[i-1].qns>>32)
			tot_len += sub[a[i-1].qns>>32].e - sub[a[i-1].qns>>32].s;
	*cov = (double)tot_dp / tot_len;
	if (ma_verbose >= 3)
		fprintf(stderr, "[M::%s::%s] %ld hits remain after filtering; crude coverage after filtering: %.2f\n", __func__, sys_timestamp(), m, *cov);
	return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x75b8
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq -0x60(%rbp), %rcx
movl 0xc(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x74ae
movq -0x70(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x74b3
jmp 0x75a7
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x68(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subl %eax, %esi
movq -0x70(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x70(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subl %eax, %edx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
movss 0x7db6(%rip), %xmm0     # 0xf2a4
leaq -0x48(%rbp), %r9
callq 0x7730
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jge 0x7510
cmpl $-0x2, -0x74(%rbp)
je 0x7510
cmpl $-0x3, -0x74(%rbp)
jne 0x75a5
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
cmpl $0x0, -0x74(%rbp)
jl 0x755a
movl -0x74(%rbp), %eax
movl %eax, -0x78(%rbp)
jmp 0x7598
cmpl $-0x2, -0x74(%rbp)
jne 0x757a
movq -0x68(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x68(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
jmp 0x7592
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x70(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, %eax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x75a7
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7441
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x7675
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x760d
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rdx
subq $0x1, %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x7662
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rdx
subq $0x1, %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
movl 0x4(%rax,%rcx,8), %eax
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rsi
subq $0x1, %rsi
shlq $0x5, %rsi
addq %rsi, %rdx
movq (%rdx), %rdx
shrq $0x20, %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x7664
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x75c0
movq -0x50(%rbp), %xmm0
movaps 0x7c3f(%rip), %xmm3     # 0xf2c0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x7c43(%rip), %xmm2     # 0xf2d0
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x58(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, (%rax)
leaq 0xba65(%rip), %rax      # 0x13130
cmpl $0x3, (%rax)
jl 0x7717
movq 0xb921(%rip), %rax      # 0x12ff8
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movb $0x0, %al
callq 0x1430
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x7d55(%rip), %rsi      # 0xf45e
leaq 0x7da1(%rip), %rdx      # 0xf4b1
movb $0x1, %al
callq 0x1110
movq -0x38(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)