// File: chhylp123[P]hifiasm/inter.cpp
// Function: clean_contain_g(ug_opt_t const*, asg_t*, unsigned int)
uint32_t clean_contain_g(const ug_opt_t *uopt, asg_t *sg, uint32_t push_trans)
{
	mg_idxopt_t opt; uldat_t sl; int32_t cutoff, f = 0;
	init_aux_table(); ha_opt_update_cov(&asm_opt, asm_opt.hom_cov);
	cutoff = asm_opt.max_n_chain;
	init_mg_opt(&opt, !(asm_opt.flag&HA_F_NO_HPC), 19, 10, cutoff, asm_opt.max_n_chain, asm_opt.ul_error_rate, asm_opt.ul_error_rate, asm_opt.ul_error_rate_low, asm_opt.ul_error_rate_hpc, asm_opt.ul_ec_round);
	init_uldat_t(&sl, NULL, NULL, &opt, CHUNK_SIZE, asm_opt.thread_num, uopt, NULL); sl.rg = sg;
	
	if(push_trans) repush_contain_trans_archs(&sl);
	if(work_ul_gchains_consensus(&sl)) {
		free(UL_INF.ridx.idx.a); free(UL_INF.ridx.occ.a); memset(&(UL_INF.ridx), 0, sizeof(UL_INF.ridx));
		gen_ul_vec_rid_t(&UL_INF, &R_INF, NULL);
		// fprintf(stderr, "+[M::%s::]\n", __func__);
		kt_for(sl.n_thread, update_ovlp_src, &sl, R_INF.total_reads);
		// fprintf(stderr, "-[M::%s::]\n", __func__);
		kt_for(sl.n_thread, update_ovlp_src_bl, &sl, R_INF.total_reads);
		clean_contain_g0(&sl);
		f = 1;
	}
	if(push_trans) asg_arc_del_trans_ul(sg, sl.uopt->gap_fuzz);
	return f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x190(%rbp)
callq 0x9690
leaq 0xc53ec(%rip), %rax     # 0x3c47f8
movl 0xd0(%rax), %esi
leaq 0xc53df(%rip), %rdi     # 0x3c47f8
callq 0x3b60
leaq 0xc53d3(%rip), %rax     # 0x3c47f8
movl 0xe8(%rax), %eax
movl %eax, -0x18c(%rbp)
leaq 0xc53c0(%rip), %rax     # 0x3c47f8
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
movl -0x18c(%rbp), %r8d
leaq 0xc53a0(%rip), %rax     # 0x3c47f8
movl 0xe8(%rax), %r9d
leaq 0xc5392(%rip), %rax     # 0x3c47f8
movsd 0x228(%rax), %xmm0
leaq 0xc5383(%rip), %rax     # 0x3c47f8
movsd 0x228(%rax), %xmm1
leaq 0xc5374(%rip), %rax     # 0x3c47f8
movsd 0x230(%rax), %xmm2
leaq 0xc5365(%rip), %rax     # 0x3c47f8
movsd 0x238(%rax), %xmm3
leaq 0xc5356(%rip), %rax     # 0x3c47f8
movl 0x240(%rax), %eax
leaq -0xa0(%rbp), %rdi
movl $0x13, %edx
movl $0xa, %ecx
movl %eax, (%rsp)
callq 0x282cf0
leaq 0xc5330(%rip), %rax     # 0x3c47f8
movslq 0x7c(%rax), %r9
movq -0x8(%rbp), %rax
leaq -0x188(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
leaq -0xa0(%rbp), %rcx
movl $0x3b9aca00, %r8d       # imm = 0x3B9ACA00
movq %rdx, %rsi
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x2fd4f0
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x2ff51a
leaq -0x188(%rbp), %rdi
callq 0x2ff140
leaq -0x188(%rbp), %rdi
callq 0x2eda10
cmpq $0x0, %rax
je 0x2ff5e2
leaq 0xc5e81(%rip), %rax     # 0x3c53b8
movq 0x28(%rax), %rdi
callq 0x2210
leaq 0xc5e71(%rip), %rax     # 0x3c53b8
movq 0x40(%rax), %rdi
callq 0x2210
leaq 0xc5e61(%rip), %rdi     # 0x3c53b8
addq $0x18, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2100
leaq 0xc5e4a(%rip), %rdi     # 0x3c53b8
leaq 0xc5d5b(%rip), %rsi     # 0x3c52d0
xorl %eax, %eax
movl %eax, %edx
callq 0x2f0d10
movq -0x130(%rbp), %rax
movl %eax, %edi
leaq 0xc5d42(%rip), %rax     # 0x3c52d0
movq 0x50(%rax), %rcx
leaq -0x15d9(%rip), %rsi     # 0x2fdfc0
leaq -0x188(%rbp), %rdx
callq 0x16d710
movq -0x130(%rbp), %rax
movl %eax, %edi
leaq 0xc5d1b(%rip), %rax     # 0x3c52d0
movq 0x50(%rax), %rcx
leaq -0x14a0(%rip), %rsi     # 0x2fe120
leaq -0x188(%rbp), %rdx
callq 0x16d710
leaq -0x188(%rbp), %rdi
callq 0x2fe300
movl $0x1, -0x190(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x2ff5fe
movq -0x10(%rbp), %rdi
movq -0x160(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %esi
callq 0xda950
movl -0x190(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)