// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movl %ecx, %r12d
movq 0x30(%rdi), %rax
movl %edx, 0xc(%rsp)
movslq %edx, %r13
movl (%rax,%r13,4), %r14d
leal -0x1(%r14), %edx
leal 0x1(%r12), %eax
xorl %ebp, %ebp
cmpl %ecx, %edx
cmovnel %eax, %ebp
testl %r8d, %r8d
cmovnel %ecx, %ebp
cmpl $0x1, %r14d
jle 0xfbdc
movq %rsi, %r15
movq %rdi, %rbx
movq %r14, 0x20(%rsp)
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rcx
movl %edx, %r14d
movl (%rcx,%r14,4), %ecx
cmpl (%rax,%r14,4), %ecx
movq %rdx, 0x10(%rsp)
jne 0xf9db
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdb1c
movq 0x10(%rsp), %rdx
movq 0x68(%r15), %rax
movq 0xe8(%r15), %rsi
movl (%rax,%r14,4), %eax
imull %edx, %eax
movslq %eax, %rcx
shlq $0x2, %rcx
addq (%rsi,%r14,8), %rcx
movq %rcx, 0xf8(%r15)
movq 0xf0(%r15), %rax
xorl %edi, %edi
testl %ebp, %ebp
cmovlel %edi, %ebp
cmpq %rdi, %rbp
je 0xfa21
movq (%rax,%r13,8), %rsi
movl (%rsi,%rdi,4), %esi
movl %esi, (%rcx,%rdi,4)
incq %rdi
jmp 0xfa0d
movq 0xf0(%r15), %rdi
movslq %edx, %rax
cmpq %rax, %rbp
jge 0xfa40
movq (%rdi,%r13,8), %rsi
movl 0x4(%rsi,%rbp,4), %esi
movl %esi, (%rcx,%rbp,4)
incq %rbp
jmp 0xfa2b
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %r10
leal (%rdx,%rdx), %esi
leal 0x1(,%rdx,2), %edi
movl (%rcx,%r14,4), %r8d
leal 0x1(%r8), %r9d
imull %edi, %r8d
movslq %r8d, %rbp
shlq $0x2, %rbp
movq %r10, 0x18(%rsp)
addq (%r10,%r14,8), %rbp
movl %r9d, (%rcx,%r14,4)
movslq %esi, %rsi
movl 0xc(%rsp), %edx
movl %edx, (%rbp,%rsi,4)
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %r8
xorl %r9d, %r9d
testl %r12d, %r12d
cmovlel %r9d, %r12d
leaq (,%rax,4), %rsi
addq %rbp, %rsi
cmpq %r9, %r12
je 0xfac0
movq (%rdi,%r13,8), %r10
leaq (%r10,%r9,4), %r10
movl (%r10), %r11d
movl %r11d, (%rbp,%r9,4)
movslq (%r8,%r13,4), %r11
movl (%r10,%r11,4), %r10d
movl %r10d, (%rsi,%r9,4)
incq %r9
jmp 0xfa9a
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %r8
cmpq %rax, %r12
jge 0xfaff
movq (%rdi,%r13,8), %r9
leaq (%r9,%r12,4), %r9
movslq 0x4(%r9), %r10
movl %r10d, (%rbp,%r12,4)
movslq (%r8,%r13,4), %r11
movslq 0x4(%r9,%r11,4), %r9
movl %r9d, (%rsi,%r12,4)
incq %r12
movq (%rdi,%r10,8), %r11
movslq (%r8,%r10,4), %r10
addq %r9, %r10
decl (%r11,%r10,4)
jmp 0xfac8
movq 0x30(%rbx), %rax
movslq (%rax,%r13,4), %rsi
leal 0x1(,%rsi,2), %edi
movl (%rcx,%rsi,4), %r8d
decl %r8d
imull %r8d, %edi
movslq %edi, %r14
shlq $0x2, %r14
movq 0x18(%rsp), %rdx
addq (%rdx,%rsi,8), %r14
movl %r8d, (%rcx,%rsi,4)
movq 0x28(%rbx), %rcx
xorl %esi, %esi
movl (%rax,%r13,4), %edx
leal (%rdx,%rdx), %edi
movslq %edi, %rdi
cmpq %rdi, %rsi
jg 0xfb52
movl (%r14,%rsi,4), %edx
movq (%rcx,%r13,8), %rdi
movl %edx, (%rdi,%rsi,4)
incq %rsi
jmp 0xfb33
movq %r15, %rdi
movl 0xc(%rsp), %esi
callq 0xd0d2
movq 0x30(%rbx), %rax
movl (%rax,%r13,4), %eax
addl %eax, %eax
cltq
movslq (%r14,%rax,4), %rax
movq 0xf0(%r15), %rcx
movq (%rcx,%r13,8), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0xf0(%r15), %rax
movq 0xf8(%r15), %rcx
movq %rcx, (%rax,%r13,8)
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%r13,8), %rdx
movl (%rcx,%r13,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
movslq (%r14,%rcx,4), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x28(%rbx), %rax
movq %rbp, (%rax,%r13,8)
movq 0x30(%rbx), %rax
movq 0x10(%rsp), %rcx
movl %ecx, (%rax,%r13,4)
movq 0x20(%rsp), %r14
cmpl $0x2, %r14d
setge %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f3fd(%rip), %rax     # 0x3efe0
movq (%rax), %rsi
leaq 0x21349(%rip), %rdi     # 0x30f36
callq 0x2130
jmp 0xfbc6