// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movl %ecx, %r11d
movl %edx, %r10d
movq %rdi, %rbx
movslq %edx, %r13
movl %ecx, %r12d
testl %r8d, %r8d
jne 0x26bfe
movq 0x28(%rbx), %rax
movl (%rax,%r13,4), %eax
decl %eax
leal 0x1(%r11), %ecx
xorl %r12d, %r12d
cmpl %r11d, %eax
cmovnel %ecx, %r12d
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rcx
movslq (%rax,%r13,4), %rbp
leaq -0x1(%rbp), %r15
movq 0x40(%rbx), %rax
movl -0x4(%rax,%rbp,4), %eax
cmpl -0x4(%rcx,%rbp,4), %eax
jne 0x26c45
movq 0x60(%rbx), %rcx
movq %rbx, %rdi
movl %r15d, %edx
movq %rsi, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, %r14d
callq 0x250b4
movl %r14d, %r10d
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %rsi
movq 0x40(%rsi), %rax
movq 0xa0(%rsi), %rcx
movq %rax, 0x20(%rsp)
movl -0x4(%rax,%rbp,4), %eax
imull %r15d, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
movq %rcx, 0x10(%rsp)
addq -0x8(%rcx,%rbp,8), %rdx
movq %rdx, 0xb0(%rsi)
testl %r12d, %r12d
jle 0x26c9d
movq 0xa8(%rsi), %rax
movq (%rax,%r13,8), %rax
movl %r12d, %ecx
xorl %r8d, %r8d
movl (%rax,%r8,4), %edi
movl %edi, (%rdx,%r8,4)
incq %r8
cmpq %r8, %rcx
jne 0x26c8b
jmp 0x26ca0
xorl %r8d, %r8d
cmpl %r15d, %r8d
jge 0x26cc5
movq 0xa8(%rsi), %rax
movq (%rax,%r13,8), %rax
movl %r8d, %ecx
movl %r15d, %r8d
movl 0x4(%rax,%rcx,4), %edi
movl %edi, (%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %r8
jne 0x26cb6
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %rax
movq %rax, 0x18(%rsp)
movq -0x8(%rax,%rbp,8), %r8
leal (%r15,%r15), %eax
leal 0x1(%r15,%r15), %ecx
movl -0x4(%r14,%rbp,4), %edx
leal 0x1(%rdx), %r9d
movl %r9d, -0x4(%r14,%rbp,4)
imull %ecx, %edx
movslq %edx, %r9
leaq (%r8,%r9,4), %rdx
cltq
movl %r10d, (%rdx,%rax,4)
testl %r11d, %r11d
movq %r15, 0x8(%rsp)
jle 0x26d47
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rax
movq (%rcx,%r13,8), %r10
movslq %r15d, %rcx
movl %r11d, %r11d
leaq (%rdx,%rcx,4), %rcx
xorl %r12d, %r12d
leaq (%r10,%r12,4), %rdi
movl (%rdi), %r15d
movl %r15d, (%rdx,%r12,4)
movslq (%rax,%r13,4), %r15
movl (%rdi,%r15,4), %edi
movl %edi, (%rcx,%r12,4)
incq %r12
cmpq %r12, %r11
jne 0x26d21
movq 0x8(%rsp), %r15
jmp 0x26d4a
xorl %r12d, %r12d
cmpl %r15d, %r12d
jge 0x26dbf
movq 0x20(%rbx), %r10
movq 0x28(%rbx), %r11
movq (%r10,%r13,8), %rax
movl %r12d, %ecx
movl 0x8(%rsp), %r12d
leaq (,%rcx,4), %rdi
leaq (%rdi,%r9,4), %rdi
leaq (%rdi,%rbp,4), %r9
addq %r8, %r9
addq $-0x4, %r9
leaq (%rax,%rcx,4), %rbp
addq $0x4, %rbp
addq %rdi, %r8
subq %rcx, %r12
xorl %eax, %eax
leaq (,%rax,4), %rcx
addq %rbp, %rcx
movslq (%rcx), %rdi
movl %edi, (%r8,%rax,4)
movslq (%r11,%r13,4), %r15
movslq (%rcx,%r15,4), %rcx
movl %ecx, (%r9,%rax,4)
movq (%r10,%rdi,8), %r15
movslq (%r11,%rdi,4), %rdi
addq %rcx, %rdi
decl (%r15,%rdi,4)
incq %rax
cmpq %rax, %r12
jne 0x26d8a
movq 0x28(%rbx), %r8
movslq (%r8,%r13,4), %rax
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
leal 0x1(,%rax,2), %ecx
movl (%r14,%rax,4), %r10d
decl %r10d
movl %r10d, (%r14,%rax,4)
imull %r10d, %ecx
movslq %ecx, %r14
movl (%r8,%r13,4), %r9d
btl $0x1e, %r9d
jb 0x26e30
leal (%rax,%rax), %ecx
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
incl %ecx
imull %ecx, %r10d
movslq %r10d, %rcx
leaq (%rdi,%rcx,4), %rcx
movq $-0x1, %r10
movl 0x4(%rcx,%r10,4), %r9d
movl %r9d, 0x4(%rax,%r10,4)
movl (%r8,%r13,4), %r9d
leal (%r9,%r9), %r11d
movslq %r11d, %r11
incq %r10
cmpq %r11, %r10
jl 0x26e13
leaq (%rdi,%r14,4), %r14
movslq %r9d, %rax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
imull %eax, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
movq 0x10(%rsp), %rdi
addq (%rdi,%rax,8), %rcx
movq %rcx, 0xb8(%rsi)
testl %eax, %eax
movq 0x8(%rsp), %r11
jle 0x26e83
movq 0xa8(%rsi), %rax
movq (%rax,%r13,8), %rax
movl %r9d, %edi
xorl %r9d, %r9d
movl (%rcx,%r9,4), %r10d
movl %r10d, (%rax,%r9,4)
incq %r9
cmpq %r9, %rdi
jne 0x26e73
movl (%r8,%r13,4), %eax
addl %eax, %eax
cltq
movslq (%r14,%rax,4), %rax
movq 0xa8(%rsi), %rdi
movq %rcx, (%rdi,%rax,8)
movq 0xa8(%rsi), %rax
movq 0xb0(%rsi), %rcx
movq %rcx, (%rax,%r13,8)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movl (%rcx,%r13,4), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
movslq (%r14,%rcx,4), %rcx
movq %r14, (%rax,%rcx,8)
movq 0x20(%rbx), %rax
movq %rdx, (%rax,%r13,8)
movq 0x28(%rbx), %rax
movl %r11d, (%rax,%r13,4)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop