// File: 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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x80(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x45ce5
movq -0x90(%rbp), %rdi
movsd -0x10(%rbp), %xmm1
movq -0x50(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x4e479(%rip), %xmm2    # 0x940e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x18(%rbp), %xmm1
movq -0x50(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x4e456(%rip), %xmm2    # 0x940e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x20(%rbp), %xmm1
movq -0x50(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd 0x4e433(%rip), %xmm2    # 0x940e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0x503c0
movq %rax, %rdi
leaq -0x68(%rbp), %rsi
callq 0x503e0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x50(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
jmp 0x45c3b
movl $0x1, -0x34(%rbp)
movq -0x80(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x45e8d
movl $0x0, -0x38(%rbp)
movq -0x80(%rbp), %rcx
movl -0x38(%rbp), %eax
movq 0x28(%rcx), %rcx
movslq -0x34(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x45e7d
movq -0x80(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x45e6d
movq -0x80(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x3c(%rbp), %edx
movq 0x20(%rdi), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20(%rdi), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rdi), %rcx
movslq -0x34(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x3c(%rbp), %edx
callq 0x4bf70
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, -0x40(%rbp)
movq 0x20(%rax), %rcx
movslq -0x3c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x40(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x44(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x44(%rbp), %edx
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %eax
cmpl -0x34(%rbp), %eax
je 0x45e6b
movq -0x80(%rbp), %rdi
movq 0x20(%rdi), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rdi), %rcx
movslq -0x3c(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x40(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movl -0x44(%rbp), %edx
callq 0x4bf70
movq -0x88(%rbp), %rdi
movl %eax, -0x48(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x6c(%rbp)
callq 0x50450
movq %rax, %rdi
leaq -0x74(%rbp), %rsi
callq 0x50470
movq -0x80(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, -0x3c(%rbp)
movl -0x48(%rbp), %ecx
movl %ecx, -0x40(%rbp)
movq 0x20(%rax), %rcx
movslq -0x3c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x40(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, -0x44(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x44(%rbp), %edx
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x45dc0
jmp 0x45e6d
jmp 0x45e6f
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x45d03
jmp 0x45e7f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x45cec
movq -0x80(%rbp), %rdi
callq 0x50210
addq $0x90, %rsp
popq %rbp
retq
nop