// File: /workspace/github_c_makefile_star2_O1/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 0x394c
testq %rax, %rax
je 0x584d
movq %rax, %r12
callq 0x30d0
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x3b99
testl %eax, %eax
js 0x581d
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 0x5734
movl 0x28(%rsp), %edx
movl 0x2c(%rsp), %r8d
movl %r8d, %r10d
subl %edx, %r10d
cmpl %r15d, %r10d
jb 0x5734
movl 0x30(%rsp), %r11d
movl %r11d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl %ebp, %eax
jge 0x5748
movq %r12, %rdi
movq %r13, %rsi
callq 0x3b99
testl %eax, %eax
jns 0x56fc
jmp 0x581d
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 0x57b0
cmpl %ebx, %r8d
jg 0x5734
cmpl %ebx, %edi
jg 0x5734
movl %r10d, %r9d
xorps %xmm0, %xmm0
cvtsi2ss %r9, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x5734
subl %r8d, %ecx
cmpl (%rsp), %ecx
jle 0x5734
addl %edi, %esi
subl %esi, %edx
cmpl (%rsp), %edx
jle 0x5734
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %eax, %edx
jmp 0x5813
shrl %eax
cmpl %eax, %edx
setae %al
cmpl %ebx, %ecx
seta %r10b
orb %al, %r10b
jne 0x5734
movl %edx, %eax
subl %esi, %eax
cmpl %ebx, %eax
ja 0x5734
movl %r9d, %esi
xorps %xmm0, %xmm0
cvtsi2ss %rsi, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
mulss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x5734
subl %ecx, %r8d
cmpl (%rsp), %r8d
jle 0x5734
subl %eax, %edi
cmpl (%rsp), %edi
jle 0x5734
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3171
jmp 0x5734
movq %r12, %rdi
callq 0x39ef
leaq 0x990c(%rip), %rax      # 0xf138
cmpl $0x3, (%rax)
jge 0x5843
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1bc6
jmp 0x5831
movq %r14, %rdi
callq 0x1c04