// File: Luthaf[P]zeopp/voro++/src/cell.cc
// Function: bool voro::voronoicell_base::collapse_order1<voro::voronoicell>(voro::voronoicell&)
bool voronoicell_base::collapse_order1(vc_class &vc) {
	int i,j,k;
	while(mec[1]>0) {
		up=0;
#if VOROPP_VERBOSE >=1
		fputs("Order one collapse\n",stderr);
#endif
		i=--mec[1];
		j=mep[1][3*i];k=mep[1][3*i+1];
		i=mep[1][3*i+2];
		if(!delete_connection(vc,j,k,false)) return false;
		--p;
		if(up==i) up=0;
		if(p!=i) {
			if(up==p) up=i;
			pts[i<<2]=pts[p<<2];
			pts[(i<<2)+1]=pts[(p<<2)+1];
			pts[(i<<2)+2]=pts[(p<<2)+2];
			for(k=0;k<nu[p];k++) ed[ed[p][k]][ed[p][nu[p]+k]]=i;
			vc.n_copy_pointer(i,p);
			ed[i]=ed[p];
			nu[i]=nu[p];
			ed[i][nu[i]<<1]=i;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x0, 0x4(%rax)
jle 0x1a65e
movq -0x30(%rbp), %rax
movl $0x0, 0x20(%rax)
movq 0x4bba4(%rip), %rax     # 0x65fe0
movq (%rax), %rsi
leaq 0x3d7e8(%rip), %rdi     # 0x57c2e
callq 0x2140
movq -0x30(%rbp), %rdi
movq 0x68(%rdi), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
movl %eax, -0x1c(%rbp)
movq 0x70(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movq 0x70(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq 0x70(%rdi), %rax
movq 0x8(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %ecx
xorl %r8d, %r8d
callq 0x1a670
testb $0x1, %al
jne 0x1a4c3
movb $0x0, -0x1(%rbp)
jmp 0x1a662
movq -0x30(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movl 0x20(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x1a4e3
movq -0x30(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x30(%rbp), %rax
movl 0x1c(%rax), %eax
cmpl -0x1c(%rbp), %eax
je 0x1a659
movq -0x30(%rbp), %rcx
movl 0x20(%rcx), %eax
cmpl 0x1c(%rcx), %eax
jne 0x1a509
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x20(%rax)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movl 0x1c(%rax), %edx
shll $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x40(%rax), %rcx
movl 0x1c(%rax), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rcx
movl -0x1c(%rbp), %edx
shll $0x2, %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x40(%rax), %rcx
movl 0x1c(%rax), %edx
shll $0x2, %edx
addl $0x2, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x40(%rax), %rax
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rdx
movl -0x24(%rbp), %eax
movq 0x30(%rdx), %rcx
movslq 0x1c(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x1a5f2
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq 0x28(%rdi), %rax
movq 0x28(%rdi), %rcx
movslq 0x1c(%rdi), %rsi
movq (%rcx,%rsi,8), %rcx
movslq -0x24(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rdi), %rcx
movslq 0x1c(%rdi), %rsi
movq (%rcx,%rsi,8), %rcx
movq 0x30(%rdi), %rsi
movslq 0x1c(%rdi), %rdi
movl (%rsi,%rdi,4), %esi
addl -0x24(%rbp), %esi
movslq %esi, %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1a58c
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl 0x1c(%rax), %edx
callq 0x119b0
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rax
movslq 0x1c(%rcx), %rdx
movq (%rax,%rdx,8), %rsi
movq 0x28(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x30(%rcx), %rax
movslq 0x1c(%rcx), %rdx
movl (%rax,%rdx,4), %esi
movq 0x30(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movl %esi, (%rax,%rdx,4)
movl -0x1c(%rbp), %edx
movq 0x28(%rcx), %rax
movslq -0x1c(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movq 0x30(%rcx), %rcx
movslq -0x1c(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
shll %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x1a418
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)