// File: /workspace/github_cpp_makefile_star2_O3/icemiliang[P]vot/src/vot/cell.cc
// Function: bool voro::voronoicell_base::delete_connection<voro::voronoicell_neighbor>(voro::voronoicell_neighbor&, int, int, bool)
inline 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,ds2);
    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_set_to_aux2(edd[nu[j]<<1]);
    vc.n_set_to_aux1(j);
    ed[edd[nu[j]<<1]]=edd;
    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 %ecx, %r12d
movl %edx, %r11d
movq %rsi, %rbx
movslq %edx, %r13
movq 0x28(%rdi), %rax
movslq (%rax,%r13,4), %rbp
leaq -0x1(%rbp), %rdx
leal 0x1(%r12), %r15d
xorl %r14d, %r14d
cmpl %ecx, %edx
cmovel %r14d, %r15d
movq 0x38(%rdi), %rax
testl %r8d, %r8d
cmovnel %ecx, %r15d
movq 0x40(%rdi), %rcx
movl -0x4(%rcx,%rbp,4), %ecx
cmpl -0x4(%rax,%rbp,4), %ecx
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
jne 0x272d1
movq 0x60(%rdi), %rcx
movq %rbx, %rsi
movl %r11d, (%rsp)
callq 0x25362
movl (%rsp), %r11d
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x40(%rbx), %rax
movq 0xa0(%rbx), %rsi
movq %rax, 0x28(%rsp)
movl -0x4(%rax,%rbp,4), %eax
imull %edx, %eax
movslq %eax, %rcx
shlq $0x2, %rcx
movq %rsi, 0x30(%rsp)
addq -0x8(%rsi,%rbp,8), %rcx
movq %rcx, 0xb0(%rbx)
testl %r15d, %r15d
jle 0x27329
movq 0xa8(%rbx), %rax
movq (%rax,%r13,8), %rax
movl %r15d, %esi
xorl %r9d, %r9d
movl (%rax,%r9,4), %r8d
movl %r8d, (%rcx,%r9,4)
incq %r9
cmpq %r9, %rsi
jne 0x27316
movl %r15d, %r14d
cmpl %edx, %r14d
jge 0x27350
movq 0xa8(%rbx), %rax
movq (%rax,%r13,8), %rsi
movl %r14d, %eax
movl %edx, %r9d
movl 0x4(%rsi,%rax,4), %r8d
movl %r8d, (%rcx,%rax,4)
incq %rax
cmpq %rax, %r9
jne 0x2733f
movq %rbx, (%rsp)
movq 0x40(%rdi), %r8
movq 0x48(%rdi), %rax
movq %rax, 0x18(%rsp)
movq -0x8(%rax,%rbp,8), %r9
leal (%rdx,%rdx), %eax
leal 0x1(%rdx,%rdx), %ecx
movl -0x4(%r8,%rbp,4), %esi
leal 0x1(%rsi), %r10d
movq %r8, 0x20(%rsp)
movl %r10d, -0x4(%r8,%rbp,4)
imull %ecx, %esi
movslq %esi, %r10
leaq (%r9,%r10,4), %rbx
cltq
movl %r11d, (%rbx,%rax,4)
movq 0x28(%rdi), %rsi
testl %r12d, %r12d
jle 0x273d0
movq 0x20(%rdi), %rax
movq (%rax,%r13,8), %r11
movl %r12d, %r14d
leaq (%rbx,%rdx,4), %r15
xorl %eax, %eax
leaq (%r11,%rax,4), %rcx
movl (%rcx), %r8d
movl %r8d, (%rbx,%rax,4)
movslq (%rsi,%r13,4), %r8
movl (%rcx,%r8,4), %ecx
movl %ecx, (%r15,%rax,4)
incq %rax
cmpq %rax, %r14
jne 0x273aa
movq 0x10(%rsp), %rdx
jmp 0x273d3
xorl %r12d, %r12d
cmpl %edx, %r12d
jge 0x27443
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r11
movq (%r11,%r13,8), %rax
movl %r12d, %r12d
movl 0x10(%rsp), %r14d
leaq (,%r12,4), %r15
leaq (%r15,%r10,4), %rcx
leaq (%rcx,%rbp,4), %r10
addq %r9, %r10
addq $-0x4, %r10
leaq (%rax,%r12,4), %r15
addq $0x4, %r15
addq %rcx, %r9
subq %r12, %r14
xorl %r12d, %r12d
leaq (%r15,%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 (%r11,%rcx,8), %r8
movslq (%rsi,%rcx,4), %rcx
addq %rax, %rcx
decl (%r8,%rcx,4)
incq %r12
cmpq %r12, %r14
jne 0x27415
movslq (%rsi,%r13,4), %r10
movq 0x18(%rsp), %rax
movq (%rax,%r10,8), %r8
leal 0x1(,%r10,2), %eax
movq 0x20(%rsp), %rcx
movl (%rcx,%r10,4), %r11d
decl %r11d
movl %r11d, (%rcx,%r10,4)
imull %r11d, %eax
movslq %eax, %rdi
movl (%rsi,%r13,4), %r9d
btl $0x1e, %r9d
jb 0x274bc
leal (%r10,%r10), %eax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq (%rcx,%r13,8), %r10
incl %eax
imull %eax, %r11d
movslq %r11d, %rax
leaq (%r8,%rax,4), %r11
movq $-0x1, %rax
movl 0x4(%r11,%rax,4), %ecx
movl %ecx, 0x4(%r10,%rax,4)
movl (%rsi,%r13,4), %r9d
leal (%r9,%r9), %ecx
movslq %ecx, %rcx
incq %rax
cmpq %rcx, %rax
jl 0x2749f
movslq %r9d, %r10
movq 0x28(%rsp), %rax
movl (%rax,%r10,4), %eax
imull %r10d, %eax
movslq %eax, %rcx
shlq $0x2, %rcx
movq 0x30(%rsp), %rax
addq (%rax,%r10,8), %rcx
leaq (%r8,%rdi,4), %rax
movq (%rsp), %rdx
movq %rcx, 0xb8(%rdx)
movq 0xa8(%rdx), %rdi
testl %r10d, %r10d
jle 0x27515
movq (%rdi,%r13,8), %r8
movl %r9d, %r9d
xorl %r10d, %r10d
movl (%rcx,%r10,4), %r11d
movl %r11d, (%r8,%r10,4)
incq %r10
cmpq %r10, %r9
jne 0x27501
movl (%rsi,%r13,4), %r9d
addl %r9d, %r9d
movslq %r9d, %rsi
movslq (%rax,%rsi,4), %rsi
movq %rcx, (%rdi,%rsi,8)
movq (%rsp), %rdx
movq 0xa8(%rdx), %rcx
movq 0xb0(%rdx), %rsi
movq %rsi, (%rcx,%r13,8)
movq 0x8(%rsp), %rdx
movq 0x20(%rdx), %rcx
movq 0x28(%rdx), %rsi
movl (%rsi,%r13,4), %esi
addl %esi, %esi
movslq %esi, %rsi
movslq (%rax,%rsi,4), %rsi
movq %rax, (%rcx,%rsi,8)
movq 0x20(%rdx), %rax
movq %rbx, (%rax,%r13,8)
movq 0x28(%rdx), %rax
movq 0x10(%rsp), %rcx
movl %ecx, (%rax,%r13,4)
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)