// File: /workspace/github_cpp_makefile_star2_O1/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, -0x20(%rsp)
orq %rcx, %rdx
je 0x1c19ac
testq %r8, %r8
je 0x1c19d2
xorl %eax, %eax
testq %rsi, %rsi
je 0x1c19c7
addq $0x1c, %rdi
movb (%rdi), %cl
andb $-0x41, %cl
orb %al, %cl
movb %cl, (%rdi)
addq $0x20, %rdi
decq %rsi
jne 0x1c19b5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, -0x20(%rsp)
je 0x1c19ac
leaq 0x18(%rdi), %rcx
movq %rcx, -0x18(%rsp)
xorl %r9d, %r9d
movsd 0x63b7a(%rip), %xmm0    # 0x225568
movsd 0x63a92(%rip), %xmm1    # 0x225488
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, -0x28(%rsp)
movq %r14, -0x30(%rsp)
cmpb $0x1, %cl
jne 0x1c1aca
movl $0x1, %r11d
movq -0x18(%rsp), %rcx
movq -0x30(%rsp), %r14
movq -0x28(%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 0x1c1aca
testq %rbx, %rbx
jle 0x1c1aca
incq %r11
addq $0x20, %rcx
testq %r14, %r14
jg 0x1c1a64
cmpq $0x101, %rbx            # imm = 0x101
jl 0x1c1af3
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdq -0x28(%rsp), %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1c19aa
cmpq $0x100, %rbx            # imm = 0x100
jg 0x1c1b1c
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdq -0x28(%rsp), %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1c19aa
cmpq $0x101, %r14            # imm = 0x101
jl 0x1c1b45
xorps %xmm2, %xmm2
cvtsi2sd %r14, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdq -0x30(%rsp), %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1c19aa
cmpq $0x100, %r14            # imm = 0x100
jg 0x1c1b6e
xorps %xmm2, %xmm2
cvtsi2sd %r14, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdq -0x30(%rsp), %xmm3
mulsd %xmm1, %xmm3
ucomisd %xmm3, %xmm2
ja 0x1c19aa
movq -0x8(%rsp), %r8
incq %r8
cmpq -0x20(%rsp), %r8
jne 0x1c19f9
jmp 0x1c19ac