// File: /workspace/github_cpp_makefile_star2_O3/icemiliang[P]vot/src/vot/cell.cc
// Function: voro::voronoicell_base::output_pov_mesh_new(double, double, double, std::shared_ptr<std::vector<std::array<double, 3ul>, std::allocator<std::array<double, 3ul>>>>, std::shared_ptr<std::vector<std::array<int, 3ul>, std::allocator<std::array<int, 3ul>>>>)
void voronoicell_base::output_pov_mesh_new(double x, double y, double z, 
                                           std::shared_ptr<std::vector<std::array<double,3>>> pv, 
                                           std::shared_ptr<std::vector<std::array<int, 3>>>   pf) {
    int i, j, k, l, m, n;
    double *ptsp = pts;
    for (i = 0; i < p; i++, ptsp += 3){
        std::array<double, 3> tmp = { x + *ptsp*0.5, y + ptsp[1] * 0.5, z + ptsp[2] * 0.5 };
        pv->push_back(tmp);
        //v[i][0] = x + *ptsp*0.5; v[i][1] = y + ptsp[1] * 0.5; v[i][2] = z + ptsp[2] * 0.5;
    }
    // int numf = 0;
    for (i = 1; i<p; i++) for (j = 0; j<nu[i]; j++) {
        k = ed[i][j];
        if (k >= 0) {
            ed[i][j] = -1 - k;
            l = cycle_up(ed[i][nu[i] + j], k);
            m = ed[k][l]; ed[k][l] = -1 - m;
            while (m != i) {
                n = cycle_up(ed[k][nu[k] + l], m);
                std::array<int, 3> tmp = { i, k, m };
                pf->push_back(tmp);
                //f[numf][0] = i; f[numf][1] = k; f[numf++][2] = m;
                k = m; l = n;
                m = ed[k][l]; ed[k][l] = -1 - m;
            }
        }
    }
    reset_edges();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpl $0x0, 0x18(%rdi)
jle 0x1df1f
movq %rsi, %r15
movq %rdi, %rbx
movq 0x30(%rdi), %r13
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
xorl %ebp, %ebp
movapd 0x318bc(%rip), %xmm3    # 0x4f5c0
movsd 0x319dc(%rip), %xmm4    # 0x4f6e8
movq %rsp, %r12
movq %rdx, 0x20(%rsp)
movsd %xmm2, 0x28(%rsp)
movapd %xmm0, 0x30(%rsp)
movupd (%r13), %xmm1
mulpd %xmm3, %xmm1
addpd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movsd 0x10(%r13), %xmm1
mulsd %xmm4, %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x10(%rsp)
movq (%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1dd6d
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movapd (%rsp), %xmm1
movupd %xmm1, (%rsi)
addq $0x18, 0x8(%rdi)
jmp 0x1dd96
movq %r12, %rdx
callq 0x26120
movsd 0x3196b(%rip), %xmm4    # 0x4f6e8
movapd 0x3183b(%rip), %xmm3    # 0x4f5c0
movapd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movq 0x20(%rsp), %rdx
incl %ebp
addq $0x18, %r13
movl 0x18(%rbx), %ecx
cmpl %ecx, %ebp
jl 0x1dd20
cmpl $0x2, %ecx
jl 0x1dedb
movq 0x28(%rbx), %rax
movl $0x1, %r12d
xorl %r10d, %r10d
cmpl $0x0, (%rax,%r12,4)
jle 0x1decc
leaq (%rax,%r12,4), %r8
movq 0x20(%rbx), %rcx
xorl %ebp, %ebp
movq (%rcx,%r12,8), %rsi
movslq (%rsi,%rbp,4), %r15
testq %r15, %r15
js 0x1deb6
movl %r15d, %edi
notl %edi
movl %edi, (%rsi,%rbp,4)
movslq (%r8), %r8
movslq %ebp, %rdi
addq %r8, %rdi
movl (%rsi,%rdi,4), %edi
movl (%rax,%r15,4), %esi
decl %esi
leal 0x1(%rdi), %r13d
cmpl %edi, %esi
cmovel %r10d, %r13d
movq (%rcx,%r15,8), %rsi
movslq %r13d, %rdi
movl (%rsi,%rdi,4), %r9d
movl %r9d, %r8d
notl %r8d
movl %r8d, (%rsi,%rdi,4)
cmpq %r9, %r12
je 0x1deb6
movslq %r15d, %rax
movl %r9d, %r15d
movq (%rcx,%rax,8), %rcx
movq 0x28(%rbx), %r8
movslq (%r8,%rax,4), %rsi
movslq %r13d, %rdi
addq %rsi, %rdi
movl (%rcx,%rdi,4), %ecx
movslq %r9d, %r14
movl (%r8,%r14,4), %esi
decl %esi
leal 0x1(%rcx), %r13d
cmpl %ecx, %esi
cmovel %r10d, %r13d
movl %r12d, (%rsp)
movl %eax, 0x4(%rsp)
movl %r14d, 0x8(%rsp)
movq (%rdx), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1de82
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rdi)
jmp 0x1de92
movq %rsp, %rdx
callq 0x26298
xorl %r10d, %r10d
movq 0x20(%rsp), %rdx
movq 0x20(%rbx), %rcx
movq (%rcx,%r14,8), %rax
movslq %r13d, %rsi
movl (%rax,%rsi,4), %r9d
movl %r9d, %edi
notl %edi
movl %edi, (%rax,%rsi,4)
cmpq %r9, %r12
jne 0x1de25
movq 0x28(%rbx), %rax
incq %rbp
leaq (%rax,%r12,4), %r8
movslq (%r8), %rsi
cmpq %rsi, %rbp
jl 0x1ddd2
movl 0x18(%rbx), %ecx
incq %r12
movslq %ecx, %rsi
cmpq %rsi, %r12
jl 0x1ddbd
testl %ecx, %ecx
jle 0x1df1f
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rdx
xorl %esi, %esi
cmpl $0x0, (%rdx,%rsi,4)
jle 0x1df14
movq (%rax,%rsi,8), %rcx
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
testl %r8d, %r8d
jns 0x1df2e
notl %r8d
movl %r8d, (%rcx,%rdi,4)
incq %rdi
movslq (%rdx,%rsi,4), %r8
cmpq %r8, %rdi
jl 0x1def5
movl 0x18(%rbx), %ecx
incq %rsi
movslq %ecx, %rdi
cmpq %rdi, %rsi
jl 0x1dee9
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7c36
nop