// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: update_weak_by_contain(void*, long, int)
static void update_weak_by_contain(void *data, long i, int tid)
{
    sset_aux *sl = (sset_aux *)data;
    ma_hit_t_alloc *x = &(sl->src[i]);
    uint32_t k, qn, tn; int32_t idx;
    if(sl->ul_occ == 0) {
        for (k = 0; k < x->length; k++) {
            if(x->buffer[k].bl&((uint32_t)0x40000000)) x->buffer[k].del = 1;
        }
    } else if(sl->ul_occ == 1) {
        for (k = 0; k < x->length; k++) {
            qn = Get_qn(x->buffer[k]);
            tn = Get_tn(x->buffer[k]);
            if(qn > tn) continue;
            if((x->buffer[k].del) && (x->buffer[k].bl&((uint32_t)0x40000000))) {
                if(reset_weak_ovlp(sl->src, qn, tn)) {
                    idx = get_specific_overlap(&(sl->src[tn]), tn, qn);
                    sl->src[tn].buffer[idx].del = x->buffer[k].del = 0;
                }
            }            
        }
    } else {
        for (k = 0; k < x->length; k++) {
            if(x->buffer[k].bl&((uint32_t)0x40000000)) {
                x->buffer[k].bl -= ((uint32_t)0x40000000);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq (%rsi,%rsi,2), %rcx
movq 0x8(%rdi), %rdx
movq 0x30(%rdi), %rax
leaq (%rdx,%rcx,8), %r9
movl 0xc(%r9), %r13d
testq %rax, %rax
je 0xb8a6d
cmpq $0x1, %rax
jne 0xb8abc
testl %r13d, %r13d
je 0xb8b02
movabsq $-0x4000000000000001, %r8 # imm = 0xBFFFFFFFFFFFFFFF
xorl %ebx, %ebx
movq %r9, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq (%r9), %r15
leaq (%rbx,%rbx,4), %r12
movl 0x4(%r15,%r12,8), %ebp
movl 0xc(%r15,%r12,8), %r14d
cmpl %ebp, %r14d
jb 0xb8a59
leaq (%r15,%r12,8), %rax
movq 0x18(%rax), %rax
cmpq %r8, %rax
jbe 0xb8a59
movq %rax, 0x20(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xb85f8
movabsq $-0x4000000000000001, %r8 # imm = 0xBFFFFFFFFFFFFFFF
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r9
testl %eax, %eax
je 0xb8a59
leaq (%r14,%r14,2), %rax
movq 0x18(%rsp), %rdx
movl 0xc(%rdx,%rax,8), %ecx
testq %rcx, %rcx
je 0xb8a26
leaq (%rdx,%rax,8), %rdx
movq (%rdx), %rsi
xorl %edx, %edx
cmpl %ebp, 0xc(%rsi)
jne 0xb8a0e
cmpl 0x4(%rsi), %r14d
je 0xb8a21
incq %rdx
addq $0x28, %rsi
cmpq %rdx, %rcx
jne 0xb8a03
movq $-0x1, %rdx
movslq %edx, %rcx
jmp 0xb8a2d
movq $-0x1, %rcx
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movq 0x20(%rsp), %rdx
andq %rsi, %rdx
movq %rdx, 0x18(%r15,%r12,8)
movq 0x8(%rdi), %rdx
movq (%rdx,%rax,8), %rax
leaq (%rcx,%rcx,4), %rcx
andq %rsi, 0x18(%rax,%rcx,8)
movl 0xc(%r9), %r13d
incq %rbx
movl %r13d, %eax
cmpq %rax, %rbx
jb 0xb898a
jmp 0xb8b02
testl %r13d, %r13d
je 0xb8b02
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movl $0x18, %ecx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
xorl %esi, %esi
incq %rax
movq (%r9), %rdi
movq (%rdi,%rcx), %r8
testq %rdx, %r8
je 0xb8aab
orq %rax, %r8
movq %r8, (%rdi,%rcx)
movl 0xc(%r9), %r13d
incq %rsi
movl %r13d, %edi
addq $0x28, %rcx
cmpq %rdi, %rsi
jb 0xb8a94
jmp 0xb8b02
testl %r13d, %r13d
je 0xb8b02
movabsq $-0x4000000000000001, %rax # imm = 0xBFFFFFFFFFFFFFFF
movl $0x18, %ecx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
xorl %esi, %esi
movq (%r9), %rdi
movq (%rdi,%rcx), %r8
testq %rdx, %r8
je 0xb8af3
andq %rax, %r8
movq %r8, (%rdi,%rcx)
movl 0xc(%r9), %r13d
incq %rsi
movl %r13d, %edi
addq $0x28, %rcx
cmpq %rdi, %rsi
jb 0xb8adc
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq