// File: /workspace/github_cpp_makefile_star2_O1/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 $0x18, %rsp
leaq (%rsi,%rsi,2), %rax
movq 0x8(%rdi), %rdx
movq 0x30(%rdi), %rcx
leaq (%rdx,%rax,8), %r12
movl 0xc(%r12), %eax
testq %rcx, %rcx
je 0xb7ada
cmpq $0x1, %rcx
jne 0xb7b27
testl %eax, %eax
je 0xb7b6b
movabsq $-0x4000000000000001, %r8 # imm = 0xBFFFFFFFFFFFFFFF
xorl %r13d, %r13d
movq %rdi, 0x8(%rsp)
movq (%r12), %rbx
leaq (,%r13,4), %r15
addq %r13, %r15
movl 0x4(%rbx,%r15,8), %ebp
movl 0xc(%rbx,%r15,8), %r14d
cmpl %ebp, %r14d
jb 0xb7ac4
leaq (%rbx,%r15,8), %rax
cmpq %r8, 0x18(%rax)
jbe 0xb7ac4
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xb768a
movabsq $-0x4000000000000001, %r8 # imm = 0xBFFFFFFFFFFFFFFF
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0xb7ac4
leaq (%r14,%r14,2), %rax
movq 0x10(%rsp), %rdx
movl 0xc(%rdx,%rax,8), %ecx
testq %rcx, %rcx
je 0xb7a9d
leaq (%rdx,%rax,8), %rdx
movq (%rdx), %rsi
xorl %edx, %edx
cmpl %ebp, 0xc(%rsi)
jne 0xb7a85
cmpl 0x4(%rsi), %r14d
je 0xb7a98
incq %rdx
addq $0x28, %rsi
cmpq %rdx, %rcx
jne 0xb7a7a
movq $-0x1, %rdx
movslq %edx, %rcx
jmp 0xb7aa4
movq $-0x1, %rcx
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
andq %rsi, 0x18(%rbx,%r15,8)
movq 0x8(%rdi), %rdx
movq (%rdx,%rax,8), %rax
leaq (%rcx,%rcx,4), %rcx
andq %rsi, 0x18(%rax,%rcx,8)
incq %r13
movl 0xc(%r12), %eax
cmpq %rax, %r13
jb 0xb7a06
jmp 0xb7b6b
testl %eax, %eax
je 0xb7b6b
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movl $0x18, %ecx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
xorl %esi, %esi
incq %rax
movq (%r12), %rdi
movq (%rdi,%rcx), %r8
testq %rdx, %r8
je 0xb7b14
orq %rax, %r8
movq %r8, (%rdi,%rcx)
incq %rsi
movl 0xc(%r12), %edi
addq $0x28, %rcx
cmpq %rdi, %rsi
jb 0xb7b00
jmp 0xb7b6b
testl %eax, %eax
je 0xb7b6b
movabsq $-0x4000000000000001, %rax # imm = 0xBFFFFFFFFFFFFFFF
movl $0x18, %ecx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
xorl %esi, %esi
movq (%r12), %rdi
movq (%rdi,%rcx), %r8
testq %rdx, %r8
je 0xb7b5a
andq %rax, %r8
movq %r8, (%rdi,%rcx)
incq %rsi
movl 0xc(%r12), %edi
addq $0x28, %rcx
cmpq %rdi, %rsi
jb 0xb7b46
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq