// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gfa-base.c
// Function: gfa_arc_rm
void gfa_arc_rm(gfa_t *g)
{
	uint32_t e, n;
	for (e = n = 0; e < g->n_arc; ++e) {
		uint32_t u = g->arc[e].v_lv>>32, v = g->arc[e].w;
		if (!g->arc[e].del && !g->seg[u>>1].del && !g->seg[v>>1].del)
			g->arc[n++] = g->arc[e];
		else {
			gfa_aux_t *aux = g->arc[e].link_id < g->n_arc? &g->link_aux[g->arc[e].link_id] : 0;
			if (aux) {
				free(aux->aux);
				aux->aux = 0, aux->l_aux = aux->m_aux = 0;
			}
		}
	}
	if (n < g->n_arc) { // arc index is out of sync
		if (g->idx) free(g->idx);
		g->idx = 0;
	}
	g->n_arc = n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6c54
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3e, %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x6b9e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x6b9e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x6b9e
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x10(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x10(%rbp)
movl %ecx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x6c44
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movl -0xc(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rcx
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
andq 0x18(%rcx), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6bfd
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rdx
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rdx
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
andq 0x18(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x6c05
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x6c05
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6c42
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x6c44
jmp 0x6c46
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6a9a
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6c85
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x6c79
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movl -0x10(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)