// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movl %ecx, %r12d
movl %edx, %r11d
movq 0x30(%rdi), %rax
movslq %edx, %r13
movl (%rax,%r13,4), %r14d
leal -0x1(%r14), %edx
leal 0x1(%r12), %eax
xorl %r15d, %r15d
cmpl %ecx, %edx
cmovnel %eax, %r15d
testl %r8d, %r8d
cmovnel %ecx, %r15d
cmpl $0x1, %r14d
jle 0x1334e
movq %rdi, %rbx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rcx
movl %edx, %ebp
movl (%rcx,%rbp,4), %ecx
cmpl (%rax,%rbp,4), %ecx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %r14, 0x18(%rsp)
jne 0x130ab
movq %rbx, %rdi
movl %r11d, %r14d
callq 0x110e2
movl %r14d, %r11d
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x68(%rsi), %rax
movq 0xe8(%rsi), %rcx
movq %rax, 0x38(%rsp)
movl (%rax,%rbp,4), %eax
imull %edx, %eax
movslq %eax, %r8
shlq $0x2, %r8
movq %rcx, 0x40(%rsp)
addq (%rcx,%rbp,8), %r8
movq %r8, 0xf8(%rsi)
testl %r15d, %r15d
jle 0x13100
movq 0xf0(%rsi), %rax
movq (%rax,%r13,8), %rax
movl %r15d, %ecx
xorl %r9d, %r9d
movl (%rax,%r9,4), %edi
movl %edi, (%r8,%r9,4)
incq %r9
cmpq %r9, %rcx
jne 0x130ee
jmp 0x13103
xorl %r15d, %r15d
cmpl %edx, %r15d
jge 0x13126
movq 0xf0(%rsi), %rax
movq (%rax,%r13,8), %rax
movl %r15d, %ecx
movl 0x4(%rax,%rcx,4), %esi
movl %esi, (%r8,%rcx,4)
incq %rcx
cmpq %rcx, %rbp
jne 0x13116
movq 0x68(%rbx), %r8
movq 0x70(%rbx), %rax
movq %rax, 0x28(%rsp)
movq (%rax,%rbp,8), %r9
leal (%rdx,%rdx), %eax
leal 0x1(%rdx,%rdx), %ecx
movl (%r8,%rbp,4), %edi
leal 0x1(%rdi), %esi
movq %r8, 0x30(%rsp)
movl %esi, (%r8,%rbp,4)
imull %ecx, %edi
movslq %edi, %r10
leaq (%r9,%r10,4), %rdi
cltq
movl %r11d, (%rdi,%rax,4)
movq 0x30(%rbx), %rsi
movslq %edx, %r11
testl %r12d, %r12d
jle 0x131b1
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %r15
movl %r12d, %eax
movq %r11, 0x20(%rsp)
leaq (%rdi,%r11,4), %rcx
xorl %r8d, %r8d
leaq (%r15,%r8,4), %r11
movl (%r11), %r14d
movl %r14d, (%rdi,%r8,4)
movslq (%rsi,%r13,4), %r14
movl (%r11,%r14,4), %r11d
movl %r11d, (%rcx,%r8,4)
incq %r8
cmpq %r8, %rax
jne 0x13181
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %r11
jmp 0x131b4
xorl %r12d, %r12d
cmpl %edx, %r12d
jge 0x13216
movq 0x28(%rbx), %r15
movq (%r15,%r13,8), %rax
movl %r12d, %ecx
leaq (,%rcx,4), %r8
leaq (%r8,%r10,4), %r8
leaq (%r8,%r11,4), %r10
addq %r9, %r10
leaq (%rax,%rcx,4), %r11
addq $0x4, %r11
addq %r8, %r9
subq %rcx, %rbp
xorl %r12d, %r12d
leaq (%r11,%r12,4), %rax
movslq (%rax), %rcx
movl %ecx, (%r9,%r12,4)
movslq (%rsi,%r13,4), %r8
movslq (%rax,%r8,4), %rax
movl %eax, (%r10,%r12,4)
movq (%r15,%rcx,8), %r8
movslq (%rsi,%rcx,4), %rcx
addq %rax, %rcx
decl (%r8,%rcx,4)
incq %r12
cmpq %r12, %rbp
jne 0x131e8
movslq (%rsi,%r13,4), %rax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax,8), %r8
leal 0x1(,%rax,2), %ecx
movq 0x30(%rsp), %rdx
movl (%rdx,%rax,4), %r11d
decl %r11d
movl %r11d, (%rdx,%rax,4)
imull %r11d, %ecx
movslq %ecx, %rdx
movl (%rsi,%r13,4), %r9d
btl $0x1e, %r9d
jb 0x13287
addl %eax, %eax
movq 0x28(%rbx), %rcx
movq (%rcx,%r13,8), %r10
incl %eax
imull %eax, %r11d
movslq %r11d, %rax
leaq (%r8,%rax,4), %rax
movq $-0x1, %rcx
movl 0x4(%rax,%rcx,4), %r9d
movl %r9d, 0x4(%r10,%rcx,4)
movl (%rsi,%r13,4), %r9d
leal (%r9,%r9), %r11d
movslq %r11d, %r11
incq %rcx
cmpq %r11, %rcx
jl 0x1326a
leaq (%r8,%rdx,4), %rdx
movslq %r9d, %r10
movq 0x38(%rsp), %rax
movl (%rax,%r10,4), %eax
imull %r10d, %eax
movslq %eax, %r8
shlq $0x2, %r8
movq 0x40(%rsp), %rax
addq (%rax,%r10,8), %r8
movq 0x8(%rsp), %r11
movq %r8, 0x100(%r11)
movq 0xf0(%r11), %rax
movq (%rax,%r13,8), %rcx
testl %r10d, %r10d
jle 0x132e6
movl %r9d, %r9d
xorl %r10d, %r10d
movl (%r8,%r10,4), %r11d
movl %r11d, (%rcx,%r10,4)
incq %r10
cmpq %r10, %r9
jne 0x132cd
movl (%rsi,%r13,4), %r9d
movq 0x8(%rsp), %r11
addl %r9d, %r9d
movslq %r9d, %rsi
movslq (%rdx,%rsi,4), %rsi
movq %rcx, (%rax,%rsi,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 (%rdx,%rcx,4), %rcx
movq %rsi, (%rax,%rcx,8)
movq 0x28(%rbx), %rax
movq %rdi, (%rax,%r13,8)
movq 0x30(%rbx), %rax
movq 0x10(%rsp), %rcx
movl %ecx, (%rax,%r13,4)
cmpl $0x2, %r14d
setge %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x25f9
jmp 0x13338
nopl (%rax)