// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movss %xmm0, 0xc(%rsp)
movl %ecx, %r13d
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x1c10
testq %rax, %rax
je 0x3e8d
movq %rax, %r12
callq 0x145c
movq %rax, 0x10(%rsp)
movl %r13d, %ebp
sarl $0x2, %ebp
addl %r13d, %r13d
movl %r13d, %ebx
leaq 0x18(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1e42
testl %eax, %eax
js 0x3e2f
movl 0x2c(%rsp), %ecx
movl 0x30(%rsp), %esi
movl %esi, %r9d
subl %ecx, %r9d
cmpl %r15d, %r9d
jb 0x3d06
movl 0x38(%rsp), %edx
movl 0x3c(%rsp), %r8d
movl %r8d, %r10d
subl %edx, %r10d
cmpl %r15d, %r10d
jb 0x3d06
movl 0x40(%rsp), %r11d
movl %r11d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl %r14d, %eax
jl 0x3d06
movl 0x34(%rsp), %eax
movl %eax, %edi
subl %r8d, %edi
testl %r11d, %r11d
movl %edi, %r8d
cmovnsl %edx, %r8d
cmovsl %edx, %edi
movl 0x28(%rsp), %edx
movl %edx, %r11d
shrl %r11d
cmpl %eax, %r11d
jbe 0x3dc8
cmpl %ebp, %r8d
jg 0x3d06
cmpl %ebp, %edi
jg 0x3d06
movl %r10d, %r9d
cvtsi2ss %r9, %xmm0
cvtsi2ss %eax, %xmm1
mulss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x3d06
subl %r8d, %ecx
cmpl %ebx, %ecx
jle 0x3d06
addl %edi, %esi
subl %esi, %edx
cmpl %ebx, %edx
jle 0x3d06
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
movl %eax, %edx
callq 0x14fd
jmp 0x3d06
shrl %eax
cmpl %eax, %edx
setae %al
cmpl %ebp, %ecx
seta %r10b
orb %al, %r10b
jne 0x3d06
movl %edx, %eax
subl %esi, %eax
cmpl %ebp, %eax
ja 0x3d06
movl %r9d, %esi
cvtsi2ss %rsi, %xmm0
cvtsi2ss %edx, %xmm1
mulss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
ja 0x3d06
subl %ecx, %r8d
cmpl %ebx, %r8d
jle 0x3d06
subl %eax, %edi
cmpl %ebx, %edi
jle 0x3d06
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14fd
jmp 0x3d06
movq %r12, %rdi
callq 0x1ca9
leaq 0xa2fa(%rip), %rax      # 0xe138
cmpl $0x3, (%rax)
jge 0x3e57
movq 0x10(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa19a(%rip), %rax      # 0xdff8
movq (%rax), %r14
xorl %eax, %eax
callq 0x1412
movq 0x10(%rsp), %rcx
movl (%rcx), %r8d
leaq 0x54b0(%rip), %rsi      # 0x9327
leaq 0x549a(%rip), %rdx      # 0x9318
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x1120
jmp 0x3e43
movq 0xa164(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x5456(%rip), %rsi      # 0x92f4
leaq 0x5473(%rip), %rdx      # 0x9318
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1120
pushq $0x1
popq %rdi
callq 0x1200