// File: micahcc[P]polygon_skeleton/voronoi.cpp
// Function: Voronoi::Implementation::addTriplet(std::shared_ptr<Voronoi::Node>, std::shared_ptr<Voronoi::Node>, std::shared_ptr<Voronoi::Node>, std::shared_ptr<Voronoi::Node>)
void Voronoi::Implementation::addTriplet(Node::Ptr center, Node::Ptr nodeA,
        Node::Ptr nodeB, Node::Ptr nodeC)
{
    // edges
    std::shared_ptr<Edge> edgeA = addEdge(nodeA, center);
    std::shared_ptr<Edge> edgeB = addEdge(nodeB, center);
    std::shared_ptr<Edge> edgeC = addEdge(nodeC, center);

    nodeA->edges.insert(edgeA);
    nodeB->edges.insert(edgeB);
    nodeC->edges.insert(edgeC);

    center->edges.insert(edgeA);
    center->edges.insert(edgeB);
    center->edges.insert(edgeC);

    // neighbors
    nodeA->neighbors.insert(center);
    nodeB->neighbors.insert(center);
    nodeC->neighbors.insert(center);

    center->neighbors.insert(nodeA);
    center->neighbors.insert(nodeB);
    center->neighbors.insert(nodeC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdx, -0x1c8(%rbp)
movq %rsi, %rax
movq -0x1c8(%rbp), %rsi
movq %rax, -0x1a8(%rbp)
movq %rsi, -0x1c0(%rbp)
movq %rcx, -0x1b8(%rbp)
movq %r8, -0x1b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x114f0
movq -0x1a8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x114f0
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x190(%rbp), %rcx
leaq -0x38(%rbp), %rdi
callq 0xe380
jmp 0xc74e
leaq -0x58(%rbp), %rdi
callq 0x8a20
leaq -0x48(%rbp), %rdi
callq 0x8a20
movq -0x1b8(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x114f0
movq -0x1a8(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x114f0
movq -0x1a0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
movq -0x1d0(%rbp), %rcx
leaq -0x78(%rbp), %rdi
callq 0xe380
jmp 0xc7b4
leaq -0x98(%rbp), %rdi
callq 0x8a20
leaq -0x88(%rbp), %rdi
callq 0x8a20
movq -0x1b0(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x114f0
movq -0x1a8(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x114f0
movq -0x1a0(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
movq -0x1e0(%rbp), %rcx
leaq -0xa8(%rbp), %rdi
callq 0xe380
jmp 0xc823
leaq -0xc8(%rbp), %rdi
callq 0x8a20
leaq -0xb8(%rbp), %rdi
callq 0x8a20
movq -0x1c0(%rbp), %rdi
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0x38(%rbp), %rsi
callq 0x12270
movb %dl, -0x1f1(%rbp)
movq %rax, -0x1f0(%rbp)
jmp 0xc866
movq -0x1b8(%rbp), %rdi
movb -0x1f1(%rbp), %al
movq -0x1f0(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movb %al, -0xd0(%rbp)
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0x78(%rbp), %rsi
callq 0x12270
movb %dl, -0x201(%rbp)
movq %rax, -0x200(%rbp)
jmp 0xc8ab
movq -0x1b0(%rbp), %rdi
movb -0x201(%rbp), %al
movq -0x200(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movb %al, -0xe0(%rbp)
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x12270
movb %dl, -0x211(%rbp)
movq %rax, -0x210(%rbp)
jmp 0xc8f3
movq -0x1a8(%rbp), %rdi
movb -0x211(%rbp), %al
movq -0x210(%rbp), %rcx
movq %rcx, -0xf8(%rbp)
movb %al, -0xf0(%rbp)
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0x38(%rbp), %rsi
callq 0x12270
movb %dl, -0x221(%rbp)
movq %rax, -0x220(%rbp)
jmp 0xc938
movq -0x1a8(%rbp), %rdi
movb -0x221(%rbp), %al
movq -0x220(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movb %al, -0x100(%rbp)
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0x78(%rbp), %rsi
callq 0x12270
movb %dl, -0x231(%rbp)
movq %rax, -0x230(%rbp)
jmp 0xc97d
movq -0x1a8(%rbp), %rdi
movb -0x231(%rbp), %al
movq -0x230(%rbp), %rcx
movq %rcx, -0x118(%rbp)
movb %al, -0x110(%rbp)
callq 0x11430
movq %rax, %rdi
addq $0x38, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x12270
movb %dl, -0x241(%rbp)
movq %rax, -0x240(%rbp)
jmp 0xc9c5
movq -0x1c0(%rbp), %rdi
movb -0x241(%rbp), %al
movq -0x240(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movb %al, -0x120(%rbp)
callq 0x11430
movq -0x1a8(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x251(%rbp)
movq %rax, -0x250(%rbp)
jmp 0xca0d
movq -0x1b8(%rbp), %rdi
movb -0x251(%rbp), %al
movq -0x250(%rbp), %rcx
movq %rcx, -0x138(%rbp)
movb %al, -0x130(%rbp)
callq 0x11430
movq -0x1a8(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x261(%rbp)
movq %rax, -0x260(%rbp)
jmp 0xca55
movq -0x1b0(%rbp), %rdi
movb -0x261(%rbp), %al
movq -0x260(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movb %al, -0x140(%rbp)
callq 0x11430
movq -0x1a8(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x271(%rbp)
movq %rax, -0x270(%rbp)
jmp 0xca9d
movq -0x1a8(%rbp), %rdi
movb -0x271(%rbp), %al
movq -0x270(%rbp), %rcx
movq %rcx, -0x158(%rbp)
movb %al, -0x150(%rbp)
callq 0x11430
movq -0x1c0(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x281(%rbp)
movq %rax, -0x280(%rbp)
jmp 0xcae5
movq -0x1a8(%rbp), %rdi
movb -0x281(%rbp), %al
movq -0x280(%rbp), %rcx
movq %rcx, -0x168(%rbp)
movb %al, -0x160(%rbp)
callq 0x11430
movq -0x1b8(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x291(%rbp)
movq %rax, -0x290(%rbp)
jmp 0xcb2d
movq -0x1a8(%rbp), %rdi
movb -0x291(%rbp), %al
movq -0x290(%rbp), %rcx
movq %rcx, -0x178(%rbp)
movb %al, -0x170(%rbp)
callq 0x11430
movq -0x1b0(%rbp), %rsi
movq %rax, %rdi
addq $0x68, %rdi
callq 0x122c0
movb %dl, -0x2a1(%rbp)
movq %rax, -0x2a0(%rbp)
jmp 0xcb75
movb -0x2a1(%rbp), %al
movq -0x2a0(%rbp), %rcx
movq %rcx, -0x188(%rbp)
movb %al, -0x180(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x6ef0
leaq -0x78(%rbp), %rdi
callq 0x6ef0
leaq -0x38(%rbp), %rdi
callq 0x6ef0
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x8a20
leaq -0x48(%rbp), %rdi
callq 0x8a20
jmp 0xcc4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x8a20
leaq -0x88(%rbp), %rdi
callq 0x8a20
jmp 0xcc43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x8a20
leaq -0xb8(%rbp), %rdi
callq 0x8a20
jmp 0xcc3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x6ef0
leaq -0x78(%rbp), %rdi
callq 0x6ef0
leaq -0x38(%rbp), %rdi
callq 0x6ef0
movq -0x60(%rbp), %rdi
callq 0x3400
nopw %cs:(%rax,%rax)