// File: Luthaf[P]zeopp/voronoicell.cc
// Function: VOR_CELL::addNode(int, Point)
void VOR_CELL::addNode(int nodeID, Point coord){
  if(vertexIDs.find(coord) == vertexIDs.end()){
    idMappings.insert(pair<int,int> (numVertices, nodeID));
    
    map<int, vector<int> >::iterator revMap = reverseIDMappings.find(nodeID);      
    if(revMap == reverseIDMappings.end()){
      vector<int> newList = vector<int> ();
      newList.push_back(numVertices);
      reverseIDMappings.insert(pair<int, vector<int> > (nodeID, newList));
    }
    else {
      revMap->second.push_back(numVertices);
    }
    vertexIDs.insert(pair<Point,int> (coord, numVertices));
    vertexCoords.insert(pair<int,Point> (numVertices, coord));
    edgeConnections.push_back(set<int>());
    numVertices++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movl %esi, %eax
leaq 0x10(%rbp), %rsi
movq %rsi, -0x140(%rbp)
movq %rdi, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x138(%rbp)
addq $0x20, %rdi
callq 0xbf910
movq -0x138(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x20, %rdi
callq 0xbf940
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xbf8e0
testb $0x1, %al
jne 0xbc0a1
jmp 0xbc370
movq -0x138(%rbp), %rsi
movq %rsi, %rax
addq $0x50, %rax
movq %rax, -0x148(%rbp)
addq $0x18, %rsi
leaq -0x28(%rbp), %rdi
leaq -0xc(%rbp), %rdx
callq 0xf590
movq -0x148(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xf550
movq -0x138(%rbp), %rdi
movq %rax, -0x38(%rbp)
movb %dl, -0x30(%rbp)
addq $0x80, %rdi
leaq -0xc(%rbp), %rsi
callq 0xbf970
movq -0x138(%rbp), %rdi
movq %rax, -0x40(%rbp)
addq $0x80, %rdi
callq 0xbf9d0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xbf9a0
testb $0x1, %al
jne 0xbc126
jmp 0xbc20d
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xd0d0
movq -0x138(%rbp), %rsi
movq -0x150(%rbp), %rdi
addq $0x18, %rsi
callq 0xd1b0
jmp 0xbc15e
movq -0x138(%rbp), %rax
subq $-0x80, %rax
movq %rax, -0x158(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0xc(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0xbfa40
jmp 0xbc186
movq -0x158(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xbfa00
movb %dl, -0x161(%rbp)
movq %rax, -0x160(%rbp)
jmp 0xbc1a8
movb -0x161(%rbp), %al
movq -0x160(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movb %al, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xbfa80
leaq -0x60(%rbp), %rdi
callq 0xec80
jmp 0xbc22d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xbc1ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xbfa80
leaq -0x60(%rbp), %rdi
callq 0xec80
jmp 0xbc379
leaq -0x40(%rbp), %rdi
callq 0xbfaa0
movq -0x138(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rdi
addq $0x18, %rsi
callq 0xd1b0
movq -0x138(%rbp), %rdx
movq -0x140(%rbp), %rsi
movq %rdx, %rax
addq $0x20, %rax
movq %rax, -0x1a0(%rbp)
addq $0x18, %rdx
movq %rdx, -0x190(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0xbfb00
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0xbfac0
movq -0x190(%rbp), %rsi
movq %rax, %rdi
movq -0x138(%rbp), %rax
movb %dl, %cl
movq -0x140(%rbp), %rdx
movq %rdi, -0xd0(%rbp)
movb %cl, -0xc8(%rbp)
addq $0xb0, %rax
movq %rax, -0x188(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x84e40
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rsi
callq 0xbfb40
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x100(%rbp)
movb %dl, -0xf8(%rbp)
addq $0xe0, %rax
movq %rax, -0x178(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0xf690
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
callq 0xbfb80
jmp 0xbc338
leaq -0x130(%rbp), %rdi
callq 0xf880
movq -0x138(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0xbc370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xf880
jmp 0xbc379
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x58f0
nopw %cs:(%rax,%rax)