// File: Luthaf[P]zeopp/voronoicell.cc
// Function: VOR_CELL::addEdge(Point, Point)
void VOR_CELL::addEdge(Point from, Point to){
  map<Point,int>::iterator iter1 = vertexIDs.find(from);
  map<Point,int>::iterator iter2 = vertexIDs.find(to);
  if((iter1 == vertexIDs.end()) || (iter2 == vertexIDs.end())){
    cerr << "Unable to add edge because nodes have not been added." << "\n"
	 << "Point 1: (" << from[0] <<  ", " << from[1] << ", " << from[2] << ")" << "\n"
	 << "Point 2: (" << to[0]   <<  ", " << to[1]   << ", " << to[2]   << ")" << "\n"
	 << "Exiting..." << "\n";
    exit(1);
  }
  
  if(edgeConnections[iter2->second].find(iter1->second) == edgeConnections[iter2->second].end())
    edgeConnections[iter1->second].insert(iter2->second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x10(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x20, %rdi
callq 0xbf910
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq %rax, -0x10(%rbp)
addq $0x20, %rdi
callq 0xbf910
movq -0x58(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x20, %rdi
callq 0xbf940
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xbf8e0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x49(%rbp)
jne 0xbc424
movq -0x58(%rbp), %rdi
addq $0x20, %rdi
callq 0xbf940
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xbf8e0
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xbc430
jmp 0xbc5d6
movq 0x1b6bb9(%rip), %rdi    # 0x272ff0
leaq 0x13eb17(%rip), %rsi    # 0x1faf55
callq 0x5540
movq %rax, %rdi
leaq 0x13d1d8(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x13eb2f(%rip), %rsi    # 0x1faf8b
callq 0x5540
movq -0x68(%rbp), %rdi
movq %rax, -0x98(%rbp)
xorl %esi, %esi
callq 0xe9d70
movq -0x98(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x138079(%rip), %rsi    # 0x1f4506
callq 0x5540
movq -0x68(%rbp), %rdi
movq %rax, -0x90(%rbp)
movl $0x1, %esi
callq 0xe9d70
movq -0x90(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x138045(%rip), %rsi    # 0x1f4506
callq 0x5540
movq -0x68(%rbp), %rdi
movq %rax, -0x88(%rbp)
movl $0x2, %esi
callq 0xe9d70
movq -0x88(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x13b2ba(%rip), %rsi    # 0x1f77af
callq 0x5540
movq %rax, %rdi
leaq 0x13d121(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x13ea83(%rip), %rsi    # 0x1faf96
callq 0x5540
movq -0x60(%rbp), %rdi
movq %rax, -0x80(%rbp)
xorl %esi, %esi
callq 0xe9d70
movq -0x80(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x137fc8(%rip), %rsi    # 0x1f4506
callq 0x5540
movq -0x60(%rbp), %rdi
movq %rax, -0x78(%rbp)
movl $0x1, %esi
callq 0xe9d70
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x137f9a(%rip), %rsi    # 0x1f4506
callq 0x5540
movq -0x60(%rbp), %rdi
movq %rax, -0x70(%rbp)
movl $0x2, %esi
callq 0xe9d70
movq -0x70(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x5980
movq %rax, %rdi
leaq 0x13b215(%rip), %rsi    # 0x1f77af
callq 0x5540
movq %rax, %rdi
leaq 0x13d07c(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x13ed62(%rip), %rsi    # 0x1fb31a
callq 0x5540
movq %rax, %rdi
leaq 0x13d05e(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x1, %edi
callq 0x67c0
movq -0x58(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0xb0(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xbfbe0
movq -0xb0(%rbp), %rdi
movslq 0x18(%rax), %rsi
callq 0x65640
movq %rax, -0xa8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xbfbe0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
addq $0x18, %rsi
callq 0xf4e0
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x30(%rbp)
addq $0xe0, %rax
movq %rax, -0xa0(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xbfbe0
movq -0xa0(%rbp), %rdi
movslq 0x18(%rax), %rsi
callq 0x65640
movq %rax, %rdi
callq 0xf520
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xbfbb0
testb $0x1, %al
jne 0xbc673
jmp 0xbc6c7
movq -0x58(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0xc0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xbfbe0
movq -0xc0(%rbp), %rdi
movslq 0x18(%rax), %rsi
callq 0x65640
movq %rax, -0xb8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xbfbe0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
addq $0x18, %rsi
callq 0xf300
movq %rax, -0x48(%rbp)
movb %dl, -0x40(%rbp)
addq $0xc0, %rsp
popq %rbp
retq