// File: Luthaf[P]zeopp/cycle.cc
// Function: face_center(ATOM_NETWORK*, std::vector<XYZ, std::allocator<XYZ>>*)
void face_center(ATOM_NETWORK* atmnet, vector<XYZ>* face_centers)
{
    VORONOI_NETWORK vornet;
    vector<VOR_CELL> vcell;
    vector<BASIC_VCELL> bvcell;
    performVoronoiDecomp(true, atmnet, &vornet, &vcell, true, &bvcell);

    vector<VOR_CELL>::iterator vc_it;
    vector<VOR_FACE>::iterator vf_it;

    int vor_face_count = 0;
    int vor_cell_count = 0;

    for (vc_it = vcell.begin(); vc_it != vcell.end(); ++vc_it){
        for (vf_it = vc_it->faces.begin(); vf_it != vc_it->faces.end(); ++vf_it){
            ++vor_face_count;
            vector<int>::iterator iit;
            if (vf_it->nodeIDs.size() > 4) {
                continue;
            }
            vector<Point>::iterator ip_it;
            cout << "Orderd vertices in the face: " << endl;
            for (ip_it = vf_it->orderedVertices.begin(); ip_it != vf_it->orderedVertices.end(); ++ip_it){;
                //cout << "(";
                //ip_it->print(cout);
                //cout << ")  " ;
            }
            //cout <<  endl;
        }
    }
    cout << "VOR_FACE_COUNT " << vor_face_count << endl;
    vcell.clear();
    bvcell.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x99ba0
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0xfd00
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0xfce0
movq -0x138(%rbp), %rdx
movq -0x130(%rbp), %rcx
movq -0x128(%rbp), %r9
movq -0x8(%rbp), %rsi
movl $0x1, %r8d
movl %r8d, %edi
callq 0x72d0
jmp 0x170765
leaq -0xd0(%rbp), %rdi
callq 0x170b00
leaq -0xd8(%rbp), %rdi
callq 0x170b20
movl $0x0, -0xdc(%rbp)
movl $0x0, -0xe0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x19950
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x19650
movq %rax, -0xf0(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x102c70
testb $0x1, %al
jne 0x1707e1
jmp 0x17098a
leaq -0xd0(%rbp), %rdi
callq 0x170b40
movq %rax, %rdi
callq 0x1f850
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x170b40
movq %rax, %rdi
callq 0x1f880
movq %rax, -0x100(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x1f9b0
testb $0x1, %al
jne 0x170841
jmp 0x170977
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x170b60
leaq -0xd8(%rbp), %rdi
callq 0x170b80
movq %rax, %rdi
addq $0x18, %rdi
callq 0x10090
cmpq $0x4, %rax
jbe 0x1708ba
jmp 0x170966
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xfd80
leaq -0xa0(%rbp), %rdi
callq 0xfd20
leaq -0x88(%rbp), %rdi
callq 0xf8a0
jmp 0x170a1b
leaq -0x110(%rbp), %rdi
callq 0x170ba0
movq 0x1026f3(%rip), %rdi    # 0x272fc0
leaq 0x8e8b4(%rip), %rsi     # 0x1ff188
callq 0x5540
movq %rax, -0x140(%rbp)
jmp 0x1708e2
movq -0x140(%rbp), %rdi
movq 0x1026a8(%rip), %rsi    # 0x272f98
callq 0x55b0
jmp 0x1708f7
leaq -0xd8(%rbp), %rdi
callq 0x170b80
movq %rax, %rdi
callq 0x17ea0
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x170b80
movq %rax, %rdi
callq 0x17ed0
movq %rax, -0x120(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x170bc0
testb $0x1, %al
jne 0x170954
jmp 0x170964
jmp 0x170956
leaq -0x110(%rbp), %rdi
callq 0x170c00
jmp 0x170920
jmp 0x170966
leaq -0xd8(%rbp), %rdi
callq 0x1fa10
jmp 0x17080a
jmp 0x170979
leaq -0xd0(%rbp), %rdi
callq 0x102cd0
jmp 0x1707b2
movq 0x10262f(%rip), %rdi    # 0x272fc0
leaq 0x8e80e(%rip), %rsi     # 0x1ff1a6
callq 0x5540
movq %rax, -0x148(%rbp)
jmp 0x1709a6
movq -0x148(%rbp), %rdi
movl -0xdc(%rbp), %esi
callq 0x58d0
movq %rax, -0x150(%rbp)
jmp 0x1709c1
movq -0x150(%rbp), %rdi
movq 0x1025c9(%rip), %rsi    # 0x272f98
callq 0x55b0
jmp 0x1709d6
leaq -0xa0(%rbp), %rdi
callq 0x15be0
leaq -0xb8(%rbp), %rdi
callq 0x15bc0
leaq -0xb8(%rbp), %rdi
callq 0xfd80
leaq -0xa0(%rbp), %rdi
callq 0xfd20
leaq -0x88(%rbp), %rdi
callq 0xf8a0
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0x58f0
nopw (%rax,%rax)