// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/voro++/src/cell.cc
// Function: bool voro::voronoicell_base::delete_connection<voro::voronoicell_neighbor>(voro::voronoicell_neighbor&, 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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r11d
movq %rdi, %rbx
movslq %edx, %r13
movl %ecx, %r12d
testl %r8d, %r8d
jne 0x12e27
movq 0x30(%rbx), %rax
movl (%rax,%r13,4), %eax
decl %eax
leal 0x1(%rcx), %edx
xorl %r12d, %r12d
cmpl %ecx, %eax
cmovnel %edx, %r12d
movq 0x30(%rbx), %rax
movl (%rax,%r13,4), %r15d
cmpl $0x1, %r15d
jle 0x13119
leal -0x1(%r15), %edx
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdi
movl %edx, %ebp
movl (%rdi,%rbp,4), %edi
cmpl (%rax,%rbp,4), %edi
movq %rdx, (%rsp)
movq %rsi, 0x10(%rsp)
movq %r15, 0x30(%rsp)
jne 0x12e7a
movq %rbx, %rdi
movq %rcx, %r14
movl %r11d, %r15d
callq 0x11180
movl %r15d, %r11d
movq %r14, %rcx
movq 0x10(%rsp), %rsi
movq (%rsp), %rdx
movq 0x68(%rsi), %rax
movq 0xe8(%rsi), %rdi
movslq %edx, %r8
movq %rax, 0x20(%rsp)
movl (%rax,%r8,4), %eax
imull %edx, %eax
movslq %eax, %r9
shlq $0x2, %r9
movq %rdi, 0x28(%rsp)
movq %r8, 0x8(%rsp)
addq (%rdi,%r8,8), %r9
movq %r9, 0xf8(%rsi)
testl %r12d, %r12d
jle 0x12ed7
movq 0xf0(%rsi), %rax
movq (%rax,%r13,8), %r10
movl %r12d, %edi
xorl %eax, %eax
movl (%r10,%rax,4), %r8d
movl %r8d, (%r9,%rax,4)
incq %rax
cmpq %rax, %rdi
jne 0x12ec5
jmp 0x12ed9
xorl %eax, %eax
cmpl %edx, %eax
jge 0x12efa
movq 0xf0(%rsi), %rsi
movq (%rsi,%r13,8), %rsi
movl %eax, %eax
movl 0x4(%rsi,%rax,4), %edi
movl %edi, (%r9,%rax,4)
incq %rax
cmpq %rax, %rbp
jne 0x12eea
movq 0x68(%rbx), %rdi
movq 0x70(%rbx), %rax
movq %rax, 0x18(%rsp)
movq (%rax,%rbp,8), %r9
leal (%rdx,%rdx), %eax
leal 0x1(%rdx,%rdx), %r10d
movl (%rdi,%rbp,4), %esi
leal 0x1(%rsi), %r8d
movl %r8d, (%rdi,%rbp,4)
imull %r10d, %esi
movslq %esi, %r10
leaq (%r9,%r10,4), %r14
cltq
movl %r11d, (%r14,%rax,4)
testl %ecx, %ecx
jle 0x12f71
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %r11
movq (%rax,%r13,8), %r12
movl %ecx, %ecx
movq 0x8(%rsp), %rax
leaq (%r14,%rax,4), %r8
xorl %eax, %eax
leaq (%r12,%rax,4), %rsi
movl (%rsi), %r15d
movl %r15d, (%r14,%rax,4)
movslq (%r11,%r13,4), %r15
movl (%rsi,%r15,4), %esi
movl %esi, (%r8,%rax,4)
incq %rax
cmpq %rax, %rcx
jne 0x12f4c
movq (%rsp), %rdx
jmp 0x12f73
xorl %eax, %eax
cmpl %edx, %eax
jge 0x12fdd
movq 0x28(%rbx), %r11
movq 0x30(%rbx), %r12
movq (%r11,%r13,8), %rcx
movl %eax, %r8d
leaq (,%r8,4), %rax
leaq (%rax,%r10,4), %r10
movq 0x8(%rsp), %rax
leaq (%r10,%rax,4), %rsi
addq %r9, %rsi
leaq (%rcx,%r8,4), %rax
addq $0x4, %rax
addq %r10, %r9
subq %r8, %rbp
xorl %r10d, %r10d
leaq (%rax,%r10,4), %rcx
movslq (%rcx), %r8
movl %r8d, (%r9,%r10,4)
movslq (%r12,%r13,4), %r15
movslq (%rcx,%r15,4), %rcx
movl %ecx, (%rsi,%r10,4)
movq (%r11,%r8,8), %r15
movslq (%r12,%r8,4), %r8
addq %rcx, %r8
decl (%r15,%r8,4)
incq %r10
cmpq %r10, %rbp
jne 0x12faf
movq 0x30(%rbx), %rsi
movslq (%rsi,%r13,4), %rax
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %r8
leal 0x1(,%rax,2), %ecx
movl (%rdi,%rax,4), %r10d
decl %r10d
movl %r10d, (%rdi,%rax,4)
imull %r10d, %ecx
movslq %ecx, %rdi
movl (%rsi,%r13,4), %r9d
btl $0x1e, %r9d
jb 0x1304e
leal (%rax,%rax), %ecx
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %rax
incl %ecx
imull %ecx, %r10d
movslq %r10d, %rcx
leaq (%r8,%rcx,4), %rcx
movq $-0x1, %r10
movl 0x4(%rcx,%r10,4), %r9d
movl %r9d, 0x4(%rax,%r10,4)
movl (%rsi,%r13,4), %r9d
leal (%r9,%r9), %r11d
movslq %r11d, %r11
incq %r10
cmpq %r11, %r10
jl 0x13031
leaq (%r8,%rdi,4), %rdi
movslq %r9d, %rcx
movq 0x20(%rsp), %rax
movl (%rax,%rcx,4), %eax
imull %ecx, %eax
cltq
shlq $0x2, %rax
movq 0x28(%rsp), %rdx
addq (%rdx,%rcx,8), %rax
movq 0x10(%rsp), %r11
movq %rax, 0x100(%r11)
testl %ecx, %ecx
movq 0x30(%rsp), %r15
movq (%rsp), %rdx
jle 0x130a9
movq 0xf0(%r11), %rcx
movq (%rcx,%r13,8), %rcx
movl %r9d, %r8d
xorl %r9d, %r9d
movl (%rax,%r9,4), %r10d
movl %r10d, (%rcx,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x13099
movl (%rsi,%r13,4), %eax
addl %eax, %eax
cltq
movslq (%rdi,%rax,4), %rax
movq 0xf0(%r11), %rcx
movq (%rcx,%r13,8), %rsi
movq %rsi, (%rcx,%rax,8)
movq 0xf0(%r11), %rax
movq 0xf8(%r11), %rcx
movq %rcx, (%rax,%r13,8)
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%r13,8), %rsi
movl (%rcx,%r13,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
movslq (%rdi,%rcx,4), %rcx
movq %rsi, (%rax,%rcx,8)
movq 0x28(%rbx), %rax
movq %r14, (%rax,%r13,8)
movq 0x30(%rbx), %rax
movl %edx, (%rax,%r13,4)
cmpl $0x2, %r15d
setge %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x25d6
jmp 0x13103