// File: chhylp123[P]hifiasm/Purge_Dups.cpp
// Function: filter_ovlp_vecs(hap_overlaps_list*, unsigned int*, unsigned int)
void filter_ovlp_vecs(hap_overlaps_list* ha, uint32_t *a, uint32_t a_n)
{
    uint32_t st, k, i, m, v, w;
    int idx;
    radix_sort_ru32(a, a + a_n);
    for (st = 0, m = 0, k = 1; k <= a_n; k++){
        if(k == a_n || a[k] != a[st]){
            a[m++] = a[st];
            st = k;
        }
    }
    a_n = m;
    if(a_n < 2) return;
    for (k = 0; k < a_n; k++){
        v = a[k];
        for (i = k+1; i < a_n; i++) {
            w = a[i];
            idx = get_specific_hap_overlap(&(ha->x[v]), v, w);
            if(idx != -1) ha->x[v].a.a[idx].status = DELETE;
            idx = get_specific_hap_overlap(&(ha->x[w]), w, v);
            if(idx != -1) ha->x[w].a.a[idx].status = DELETE;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x176b70
movl $0x0, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
ja 0x1846f6
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x1846c5
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movl -0x18(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
je 0x1846e9
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1846eb
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18469f
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jae 0x184707
jmp 0x1847fb
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x1847fb
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x1847eb
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x28(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x17a150
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x30(%rbp)
je 0x184792
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movb $0x2, 0x2(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x2c(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x17a150
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x30(%rbp)
je 0x1847db
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movb $0x2, 0x2(%rax)
jmp 0x1847dd
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x184730
jmp 0x1847ed
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18470e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)