// File: Luthaf[P]zeopp/network.cc
// Function: createAdvCell(voro::voronoicell&, std::vector<double, std::allocator<double>>, int*, VOR_CELL&)
void createAdvCell(voronoicell &cell, vector<double> coords, int *idMap, VOR_CELL &newCell) {
  int numFaces = cell.number_of_faces();
  vector<int> faceVertices;
  cell.face_vertices(faceVertices);
      
  int index = 0;
  for(int i = 0; i < numFaces; i++){
    vector<Point> faceCoords;
    vector<int>   faceIDs;
    int faceOrder = faceVertices[index];
    index++;
    for(int j = 0; j < faceOrder; j++){
      int verID = faceVertices[index];
      faceCoords.push_back(Point(coords[verID*3], coords[verID*3+1], coords[verID*3+2]));
      faceIDs.push_back(idMap[4*verID]);
      index++;
    }
    newCell.addFace(VOR_FACE(faceCoords, faceIDs));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rsi, -0x120(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1b09c0
movl %eax, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0xd0d0
movq -0x118(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0x1b1410
jmp 0x7410
movl $0x0, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7698
leaq -0x70(%rbp), %rdi
callq 0xed40
leaq -0x88(%rbp), %rdi
callq 0xd0d0
movslq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xed60
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jge 0x758b
movslq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xed60
movq -0x120(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rsi
callq 0xedb0
movq -0x120(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x130(%rbp)
movl -0x94(%rbp), %ecx
movl %ecx, %eax
leal 0x1(%rax,%rax,2), %eax
movslq %eax, %rsi
callq 0xedb0
movq -0x120(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x128(%rbp)
movl -0x94(%rbp), %ecx
movl %ecx, %eax
leal 0x2(%rax,%rax,2), %eax
movslq %eax, %rsi
callq 0xedb0
movsd -0x130(%rbp), %xmm0
movsd -0x128(%rbp), %xmm1
movsd (%rax), %xmm2
leaq -0xb0(%rbp), %rdi
callq 0xe9c70
jmp 0x7518
leaq -0x70(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xed80
jmp 0x752a
movq -0x18(%rbp), %rax
movl -0x94(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
leaq (%rax,%rcx,4), %rsi
leaq -0x88(%rbp), %rdi
callq 0xd1b0
jmp 0x754c
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x7467
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x76aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7681
movq -0x20(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xedd0
jmp 0x75a8
leaq -0x110(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xeec0
jmp 0x75bd
leaq -0xe0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0xbb780
jmp 0x75d9
movq -0x138(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xbc6d0
jmp 0x75ee
leaq -0xe0(%rbp), %rdi
callq 0xefb0
leaq -0x110(%rbp), %rdi
callq 0xec80
leaq -0xf8(%rbp), %rdi
callq 0xefe0
leaq -0x88(%rbp), %rdi
callq 0xec80
leaq -0x70(%rbp), %rdi
callq 0xefe0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x741e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7669
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xefb0
leaq -0x110(%rbp), %rdi
callq 0xec80
leaq -0xf8(%rbp), %rdi
callq 0xefe0
leaq -0x88(%rbp), %rdi
callq 0xec80
leaq -0x70(%rbp), %rdi
callq 0xefe0
jmp 0x76aa
leaq -0x40(%rbp), %rdi
callq 0xec80
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0xec80
movq -0x48(%rbp), %rdi
callq 0x58f0
nopl (%rax)