// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_sg_contain(void*, long, int)
static void update_sg_contain(void *data, long i, int tid)
{
    sset_aux *sl = (sset_aux *)data; ma_hit_t *h, *z; asg_arc_t t;
	ma_hit_t_alloc *src = sl->src; asg_t *g = sl->g; int64_t r, idx;
    R_to_U *ridx = sl->ruIndex; uint32_t k, rr, qn, tn, is_u;
    g->seq_vis[i] = 0; 
    if(!(g->seq[i].del)) return;
    get_R_to_U(ridx, i, &rr, &is_u);
    if(rr == (uint32_t)-1 || is_u == 1) return;
    ma_hit_t_alloc *x = &(src[i]);
    for (k = 0; k < x->length; k++) {
        h = &(x->buffer[k]);
		qn = Get_qn((*h)); tn = Get_tn((*h));
        if(h->bl < sl->ul_occ) continue;
        if(g->seq[tn].del) {
            get_R_to_U(ridx, tn, &rr, &is_u);
            if(rr == (uint32_t)-1 || is_u == 1) continue;
        }
        r = ma_hit2arc(h, g->seq[qn].len, g->seq[tn].len, sl->max_hang, asm_opt.max_hang_rate, sl->min_ovlp, &t);
        if(r < 0) continue;
        idx = get_specific_overlap(&(src[tn]), tn, qn);
        z = &(src[tn].buffer[idx]);
        assert(z->bl == h->bl);
		r = ma_hit2arc(z, g->seq[tn].len, g->seq[qn].len, sl->max_hang, asm_opt.max_hang_rate, sl->min_ovlp, &t);
        if(r < 0) continue;
        h->del = 0; if(!(g->seq[tn].del)) z->del = 0;
        g->seq_vis[i] = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x312ebd
jmp 0x31316d
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
leaq -0x78(%rbp), %rdx
leaq -0x84(%rbp), %rcx
callq 0xd3d50
cmpl $-0x1, -0x78(%rbp)
je 0x312ee6
cmpl $0x1, -0x84(%rbp)
jne 0x312eeb
jmp 0x31316d
movq -0x50(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x31316d
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x74(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x7c(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jge 0x312f6b
jmp 0x31315f
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x312fae
movq -0x70(%rbp), %rdi
movl -0x80(%rbp), %esi
leaq -0x78(%rbp), %rdx
leaq -0x84(%rbp), %rcx
callq 0xd3d50
cmpl $-0x1, -0x78(%rbp)
je 0x312fa7
cmpl $0x1, -0x84(%rbp)
jne 0x312fac
jmp 0x31315f
jmp 0x312fae
movq -0x28(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %ecx
leaq 0xb180d(%rip), %rax     # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %r8d
leaq -0x48(%rbp), %r9
callq 0x31a080
cltq
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jge 0x313019
jmp 0x31315f
movq -0x50(%rbp), %rdi
movl -0x80(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x80(%rbp), %esi
movl -0x7c(%rbp), %edx
callq 0xce1b0
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x31307e
jmp 0x31309d
leaq 0x880b5(%rip), %rdi     # 0x39b13a
leaq 0x8312d(%rip), %rsi     # 0x3961b9
movl $0x2c3, %edx            # imm = 0x2C3
leaq 0x880b1(%rip), %rcx     # 0x39b149
callq 0x2130
movq -0x30(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x7c(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %ecx
leaq 0xb171e(%rip), %rax     # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %r8d
leaq -0x48(%rbp), %r9
callq 0x31a080
cltq
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jge 0x313105
jmp 0x31315f
movq -0x28(%rbp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x18(%rax), %rcx
orq $0x0, %rcx
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x31314f
movq -0x30(%rbp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x18(%rax), %rcx
orq $0x0, %rcx
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x312f05
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)