// File: Luthaf[P]zeopp/voro++/src/cell.cc
// Function: bool voro::voronoicell_base::delete_connection<voro::voronoicell>(voro::voronoicell&, int, int, bool)
bool voronoicell_base::delete_connection(vc_class &vc,int j,int k,bool hand) {
	int q=hand?k:cycle_up(k,j);
	int i=nu[j]-1,l,*edp,*edd,m;
#if VOROPP_VERBOSE >=1
	if(i<1) {
		fputs("Zero order vertex formed\n",stderr);
		return false;
	}
#endif
	if(mec[i]==mem[i]) add_memory(vc,i);
	vc.n_set_aux1(i);
	for(l=0;l<q;l++) vc.n_copy_aux1(j,l);
	while(l<i) {
		vc.n_copy_aux1_shift(j,l);
		l++;
	}
	edp=mep[i]+((i<<1)+1)*mec[i]++;
	edp[i<<1]=j;
	for(l=0;l<k;l++) {
		edp[l]=ed[j][l];
		edp[l+i]=ed[j][l+nu[j]];
	}
	while(l<i) {
		m=ed[j][l+1];
		edp[l]=m;
		k=ed[j][l+nu[j]+1];
		edp[l+i]=k;
		ed[m][nu[m]+k]--;
		l++;
	}

	edd=mep[nu[j]]+((nu[j]<<1)+1)*--mec[nu[j]];
	for(l=0;l<=(nu[j]<<1);l++) ed[j][l]=edd[l];
	vc.n_set_aux2_copy(j,nu[j]);
	vc.n_copy_pointer(edd[nu[j]<<1],j);
	vc.n_set_to_aux1(j);
	ed[edd[nu[j]<<1]]=ed[j];
	ed[j]=edp;
	nu[j]=i;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
testb $0x1, -0x21(%rbp)
je 0x1a6a4
movl -0x20(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x1a6b6
movq -0x50(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x15f00
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movl -0x54(%rbp), %ecx
movl %ecx, -0x28(%rbp)
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x1, -0x2c(%rbp)
jge 0x1a6f6
movq 0x4b902(%rip), %rax     # 0x65fe0
movq (%rax), %rsi
leaq 0x3d55a(%rip), %rdi     # 0x57c42
callq 0x2140
movb $0x0, -0x1(%rbp)
jmp 0x1aa1f
movq -0x50(%rbp), %rcx
movq 0x68(%rcx), %rax
movslq -0x2c(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movq 0x60(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x1a722
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x14dc0
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x1a330
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x1a757
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x1a340
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1a735
jmp 0x1a759
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1a77b
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x1aa30
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1a759
movq -0x50(%rbp), %rdx
movq 0x70(%rdx), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movq 0x68(%rdx), %rsi
movslq -0x2c(%rbp), %rdi
movl (%rsi,%rdi,4), %edx
movl %edx, %r8d
addl $0x1, %r8d
movl %r8d, (%rsi,%rdi,4)
imull %edx, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %edx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x1a838
movq -0x50(%rbp), %rdx
movq 0x28(%rdx), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %esi, (%rax,%rcx,4)
movq 0x28(%rdx), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
movq 0x30(%rdx), %rdx
movslq -0x1c(%rbp), %rsi
addl (%rdx,%rsi,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1a7d3
jmp 0x1a83a
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1a8e0
movq -0x50(%rbp), %rcx
movq 0x28(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rdx
movl %esi, (%rax,%rdx,4)
movq 0x28(%rcx), %rax
movslq -0x1c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl -0x30(%rbp), %edx
movq 0x30(%rcx), %rsi
movslq -0x1c(%rbp), %rdi
addl (%rsi,%rdi,4), %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %esi
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %edx
addl -0x2c(%rbp), %edx
movslq %edx, %rdx
movl %esi, (%rax,%rdx,4)
movq 0x28(%rcx), %rax
movslq -0x44(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movslq -0x44(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1a83a
movq -0x50(%rbp), %rdx
movq 0x70(%rdx), %rax
movq 0x30(%rdx), %rcx
movslq -0x1c(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rdx), %rcx
movslq -0x1c(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
shll %ecx
addl $0x1, %ecx
movq 0x68(%rdx), %rsi
movq 0x30(%rdx), %rdx
movslq -0x1c(%rbp), %rdi
movslq (%rdx,%rdi,4), %rdi
movl (%rsi,%rdi,4), %edx
addl $-0x1, %edx
movl %edx, (%rsi,%rdi,4)
imull %edx, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movl -0x30(%rbp), %eax
movq 0x30(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
shll %ecx
cmpl %ecx, %eax
jg 0x1a97e
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1a939
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x119a0
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x30(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
shll %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x1c(%rbp), %edx
callq 0x119b0
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1a350
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x28(%rax), %rcx
movq -0x40(%rbp), %rdx
movq 0x30(%rax), %rdi
movslq -0x1c(%rbp), %r8
movl (%rdi,%r8,4), %edi
shll %edi
movslq %edi, %rdi
movslq (%rdx,%rdi,4), %rdx
movq %rsi, (%rcx,%rdx,8)
movq -0x38(%rbp), %rsi
movq 0x28(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq %rsi, (%rcx,%rdx,8)
movl -0x2c(%rbp), %edx
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)