// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: full_lst_set(emask_t*, unsigned long, ul_ov_t*, unsigned long, unsigned long)
void full_lst_set(emask_t *a, uint64_t a_n, ul_ov_t *sa, uint64_t sn, uint64_t skip_n)
{
	uint64_t ff = 0, k, i; int64_t sql, stl, os, oe, ovlp;
	if(sn == 0 && skip_n == 0) {
		ff = 1;
	} else if(skip_n > 0) {
		ff = 0;
	} else {///sn > 0 && skip_n == 0
		for (k = 0; k < sn; k++) {
			sql = sa[k].qe - sa[k].qs;
			stl = sa[k].te - sa[k].ts;
			for (i = 0; i < a_n && sql > 0 && stl > 0; i++) {
				os = MAX(sa[k].qs, a[i].qs); oe = MIN(sa[k].qe, a[i].qe);
				ovlp = ((oe>os)?(oe-os):(0)); sql -= ovlp;

				os = MAX(sa[k].ts, a[i].ts); oe = MIN(sa[k].te, a[i].te);
				ovlp = ((oe>os)?(oe-os):(0)); stl -= ovlp;
			}
			if((sql > 256) && (sql > ((sa[k].qe - sa[k].qs)*0.06))) break;
			if((sql <= 256) && (sql > ((sa[k].qe - sa[k].qs)*0.6))) break;
			if((stl > 256) && (stl > ((sa[k].te - sa[k].ts)*0.06))) break;
			if((stl <= 256) && (stl > ((sa[k].te - sa[k].ts)*0.6))) break;
		}
		if(k < sn) ff = 0;
		else ff = 1;
	}
	for (k = 0; k < a_n; k++) a[k].full = ff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, -0x10(%rsp)
movb $0x40, %al
movq %r8, %rdx
movq %rcx, -0x30(%rsp)
orq %rcx, %rdx
je 0x1cba80
testq %r8, %r8
je 0x1cbaa6
xorl %eax, %eax
testq %rsi, %rsi
je 0x1cba9b
addq $0x1c, %rdi
movb (%rdi), %cl
andb $-0x41, %cl
orb %al, %cl
movb %cl, (%rdi)
addq $0x20, %rdi
decq %rsi
jne 0x1cba89
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, -0x30(%rsp)
je 0x1cba80
leaq 0x18(%rdi), %rcx
movq %rcx, -0x18(%rsp)
xorl %r9d, %r9d
movsd 0x65ba6(%rip), %xmm0    # 0x231668
movsd 0x65abe(%rip), %xmm1    # 0x231588
xorl %r8d, %r8d
testq %rsi, %rsi
setne %cl
leaq (%r8,%r8,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movq %r8, -0x8(%rsp)
addq %r8, %rdx
movq -0x10(%rsp), %r8
movl 0x4(%r8,%rdx), %ebp
movl 0x8(%r8,%rdx), %r15d
movl %r15d, %ebx
subl %ebp, %ebx
movl 0x14(%r8,%rdx), %r12d
movl 0x10(%r8,%rdx), %r13d
setne %r11b
andb %cl, %r11b
movl %r12d, %r14d
subl %r13d, %r14d
setne %cl
andb %r11b, %cl
movq %rbx, -0x20(%rsp)
movq %r14, -0x28(%rsp)
cmpb $0x1, %cl
jne 0x1cbb9e
movl $0x1, %r11d
movq -0x18(%rsp), %rcx
movq -0x28(%rsp), %r14
movq -0x20(%rsp), %rbx
movq %rbx, %rdx
movl -0xc(%rcx), %r8d
movl -0x8(%rcx), %r10d
cmpl %r8d, %ebp
cmoval %ebp, %r8d
cmpl %r10d, %r15d
cmovbl %r15d, %r10d
movq %r8, %rbx
subq %r10, %rbx
cmpl %r8d, %r10d
cmovbeq %r9, %rbx
addq %rdx, %rbx
movl -0x4(%rcx), %edx
cmpl %edx, %r13d
cmoval %r13d, %edx
movq %r14, %r8
movl (%rcx), %r10d
cmpl %r10d, %r12d
cmovbl %r12d, %r10d
movq %rdx, %r14
subq %r10, %r14
cmpl %edx, %r10d
cmovbeq %r9, %r14
addq %r8, %r14
cmpq %rsi, %r11
jae 0x1cbb9e
testq %rbx, %rbx
jle 0x1cbb9e
incq %r11
addq $0x20, %rcx
testq %r14, %r14
jg 0x1cbb38
xorps %xmm2, %xmm2
cvtsi2sdq -0x20(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rbx, %xmm3
cmpq $0x101, %rbx            # imm = 0x101
jl 0x1cbbbf
mulsd %xmm0, %xmm2
jmp 0x1cbbc3
mulsd %xmm1, %xmm2
ucomisd %xmm2, %xmm3
ja 0x1cba7e
xorps %xmm2, %xmm2
cvtsi2sdq -0x28(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %r14, %xmm3
cmpq $0x101, %r14            # imm = 0x101
jl 0x1cbbee
mulsd %xmm0, %xmm2
jmp 0x1cbbf2
mulsd %xmm1, %xmm2
ucomisd %xmm2, %xmm3
ja 0x1cba7e
movq -0x8(%rsp), %r8
incq %r8
cmpq -0x30(%rsp), %r8
jne 0x1cbacd
jmp 0x1cba80