// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/mag.c
// Function: mag_g_clean
void mag_g_clean(mag_t *g, const magopt_t *opt)
{
	double t;
	int j;

	if ((opt->flag & MAG_F_CLEAN) == 0) return;
	if (g->min_ovlp < opt->min_ovlp) g->min_ovlp = opt->min_ovlp;
	for (j = 2; j <= opt->min_ensr; ++j)
		mag_g_rm_vext(g, opt->min_elen, j);
	mag_g_merge(g, 0, opt->min_merge_len);
	mag_g_rm_edge(g, g->min_ovlp, opt->min_dratio1, opt->min_elen, opt->min_ensr);
	mag_g_merge(g, 1, opt->min_merge_len);
	for (j = 2; j <= opt->min_ensr; ++j)
		mag_g_rm_vext(g, opt->min_elen, j);
	mag_g_merge(g, 0, opt->min_merge_len);
	if (opt->flag & MAG_F_AGGRESSIVE) {
		t = cputime();
		mag_g_pop_open(g, opt->min_elen);
		if (fm_verbose >= 3)
			fprintf(stderr, "[M::%s] popped open bubbles in %.3f sec.\n", __func__, cputime() - t);
	}
	if (!(opt->flag & MAG_F_NO_SIMPL)) {
		t = cputime();
		mag_g_simplify_bubble(g, opt->max_bvtx, opt->max_bdist);
		if (fm_verbose >= 3)
			fprintf(stderr, "[M::%s] simplified complex bubbles in %.3f sec.\n", __func__, cputime() - t);
	}
	mag_g_pop_simple(g, opt->max_bcov, opt->max_bfrac, opt->min_merge_len, opt->flag & MAG_F_AGGRESSIVE);
	mag_g_rm_vint(g, opt->min_elen, opt->min_insr, g->min_ovlp);
	mag_g_rm_edge(g, g->min_ovlp, opt->min_dratio1, opt->min_elen, opt->min_ensr);
	mag_g_merge(g, 1, opt->min_merge_len);
	mag_g_rm_vext(g, opt->min_elen, opt->min_ensr);
	mag_g_merge(g, 0, opt->min_merge_len);
	if (opt->flag & MAG_F_AGGRESSIVE) mag_g_pop_open(g, opt->min_elen);
	mag_g_rm_vext(g, opt->min_elen, opt->min_ensr);
	mag_g_merge(g, 0, opt->min_merge_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1f683
jmp 0x1f937
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1f6a1
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x2, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jg 0x1f6d2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %edx
callq 0x1edc0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1f6a8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x1b0f0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x10(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
callq 0x1f110
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movl $0x1, %esi
callq 0x1b0f0
movl $0x2, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jg 0x1f755
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %edx
callq 0x1edc0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1f72b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x1b0f0
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1f7ce
callq 0x4cd0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x266a0
leaq 0x13b2a(%rip), %rax     # 0x332c0
cmpl $0x3, (%rax)
jl 0x1f7cc
movq 0x13856(%rip), %rax     # 0x32ff8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x4cd0
movq -0x28(%rbp), %rdi
subsd -0x18(%rbp), %xmm0
leaq 0xdbff(%rip), %rsi      # 0x2d3bd
leaq 0xdc22(%rip), %rdx      # 0x2d3e7
movb $0x1, %al
callq 0x21d0
jmp 0x1f7ce
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x1f83e
callq 0x4cd0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
callq 0x25520
leaq 0x13aba(%rip), %rax     # 0x332c0
cmpl $0x3, (%rax)
jl 0x1f83c
movq 0x137e6(%rip), %rax     # 0x32ff8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x4cd0
movq -0x30(%rbp), %rdi
subsd -0x18(%rbp), %xmm0
leaq 0xdbc5(%rip), %rsi      # 0x2d3f3
leaq 0xdbb2(%rip), %rdx      # 0x2d3e7
movb $0x1, %al
callq 0x21d0
jmp 0x1f83e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0x38(%rax), %xmm1
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x10(%rbp), %rax
movl (%rax), %edx
andl $0x20, %edx
callq 0x25e00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
callq 0x1ef70
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x10(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
callq 0x1f110
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movl $0x1, %esi
callq 0x1b0f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x1edc0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x1b0f0
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1f90e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x266a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x1edc0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x1b0f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)