// File: /workspace/github_c_makefile_star2_O3/rikuu[P]kermit/miniasm/hit.c
// Function: ma_hit_no_cont
sdict_t *ma_hit_no_cont(const char *fn, int min_span, int min_match, int max_hang, float int_frac)
{
	paf_file_t *fp;
	paf_rec_t r;
	sdict_t *d;

	fp = paf_open(fn);
	if (!fp) {
		fprintf(stderr, "[E::%s] could not open PAF file %s\n", __func__, fn);
		exit(1);
	}
	d = sd_init();
	while (paf_read(fp, &r) >= 0) {
		int l5, l3;
		if (r.qe - r.qs < min_span || r.te - r.ts < min_span || r.ml < min_match) continue;
		l5 = r.rev? r.tl - r.te : r.ts;
		l3 = r.rev? r.ts : r.tl - r.te;
		if (r.ql>>1 > r.tl) {
			if (l5 > max_hang>>2 || l3 > max_hang>>2 || r.te - r.ts < r.tl * int_frac) continue; // internal match
			if ((int)r.qs - l5 > max_hang<<1 && (int)(r.ql - r.qe) - l3 > max_hang<<1)
				sd_put(d, r.tn, r.tl);
		} else if (r.ql < r.tl>>1) {
			if (r.qs > max_hang>>2 || r.ql - r.qe > max_hang>>2 || r.qe - r.qs < r.ql * int_frac) continue; // internal
			if (l5 - (int)r.qs > max_hang<<1 && l3 - (int)(r.ql - r.qe) > max_hang<<1)
				sd_put(d, r.qn, r.ql);
		}
	}
	paf_close(fp);
	if (ma_verbose >= 3) fprintf(stderr, "[M::%s::%s] dropped %d contained reads\n", __func__, sys_timestamp(), d->n_seq);
	return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm0, 0x4(%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
callq 0x3850
testq %rax, %rax
je 0x55de
movq %rax, %r12
callq 0x2ff0
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x3a85
testl %eax, %eax
js 0x55ae
movl %ebx, %eax
sarl $0x2, %ebx
addl %eax, %eax
movl %eax, (%rsp)
leaq 0x8(%rsp), %r13
movl 0x1c(%rsp), %ecx
movl 0x20(%rsp), %esi
movl %esi, %r9d
subl %ecx, %r9d
cmpl %r15d, %r9d
jb 0x54c5
movl 0x28(%rsp), %edx
movl 0x2c(%rsp), %r8d
movl %r8d, %r10d
subl %edx, %r10d
cmpl %r15d, %r10d
jb 0x54c5
movl 0x30(%rsp), %r11d
movl %r11d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl %ebp, %eax
jge 0x54d9
movq %r12, %rdi
movq %r13, %rsi
callq 0x3a85
testl %eax, %eax
jns 0x548d
jmp 0x55ae
movl 0x24(%rsp), %eax
movl %eax, %edi
subl %r8d, %edi
testl %r11d, %r11d
movl %edi, %r8d
cmovnsl %edx, %r8d
cmovsl %edx, %edi
movl 0x18(%rsp), %edx
movl %edx, %r11d
shrl %r11d
cmpl %eax, %r11d
jbe 0x5541
cmpl %ebx, %r8d
jg 0x54c5
cmpl %ebx, %edi
jg 0x54c5
movl %r10d, %r9d
xorps %xmm0, %xmm0
cvtsi2ss %r9, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x54c5
subl %r8d, %ecx
cmpl (%rsp), %ecx
jle 0x54c5
addl %edi, %esi
subl %esi, %edx
cmpl (%rsp), %edx
jle 0x54c5
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %eax, %edx
jmp 0x55a4
shrl %eax
cmpl %eax, %edx
setae %al
cmpl %ebx, %ecx
seta %r10b
orb %al, %r10b
jne 0x54c5
movl %edx, %eax
subl %esi, %eax
cmpl %ebx, %eax
ja 0x54c5
movl %r9d, %esi
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
mulss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x54c5
subl %ecx, %r8d
cmpl (%rsp), %r8d
jle 0x54c5
subl %eax, %edi
cmpl (%rsp), %edi
jle 0x54c5
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3091
jmp 0x54c5
movq %r12, %rdi
callq 0x38e0
leaq 0x8b7b(%rip), %rax      # 0xe138
cmpl $0x3, (%rax)
jge 0x55d4
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1be1
jmp 0x55c2
movq %r14, %rdi
callq 0x1c1f