// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelPointGraph.cpp
// Function: gaps::R3SurfelPointGraph::R3SurfelPointGraph(gaps::R3SurfelPointGraph const&)
R3SurfelPointGraph::
R3SurfelPointGraph(const R3SurfelPointGraph& graph)
  : set(graph.set),
    neighbors(NULL),
    max_neighbors(graph.max_neighbors),
    max_distance(graph.max_distance)
{
  // Copy neighbors
  neighbors = new RNArray<R3SurfelPoint *> [ NPoints() ];
  for (int i = 0; i < NPoints(); i++) {
    neighbors[i].Resize(graph.neighbors[i].NEntries());
    for (int j = 0; j < graph.neighbors[i].NEntries(); j++) {
      neighbors[i].Insert(graph.neighbors[i][j]);
    }
  }
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x88(%rsp)
leaq 0x19199a(%rip), %rax    # 0x1ee998
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x80(%rsp)
movq 0xa8(%rsp), %rsi
addq $0x8, %rsi
callq 0x55ea0
movq 0x88(%rsp), %rdi
movq $0x0, 0x68(%rdi)
movq 0xa8(%rsp), %rax
movl 0x70(%rax), %eax
movl %eax, 0x70(%rdi)
movq 0xa8(%rsp), %rax
movsd 0x78(%rax), %xmm0
movsd %xmm0, 0x78(%rdi)
callq 0x43e20
movl %eax, 0x90(%rsp)
jmp 0x5d05c
movl 0x90(%rsp), %eax
cltq
movq %rax, 0x68(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
movq $-0x1, %rax
cmovbq %rax, %rdi
testb %cl, %cl
cmovneq %rax, %rdi
movq %rdi, 0x70(%rsp)
callq 0x13030
movq %rax, 0x78(%rsp)
jmp 0x5d09e
movq 0x68(%rsp), %rax
movq 0x78(%rsp), %rcx
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, 0x60(%rsp)
cmpq $0x0, %rax
je 0x5d101
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x43e70
jmp 0x5d0e9
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x58(%rsp)
jne 0x5d0d8
movq 0x88(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x68(%rax)
movl $0x0, 0x98(%rsp)
movq 0x88(%rsp), %rdi
movl 0x98(%rsp), %eax
movl %eax, 0x40(%rsp)
callq 0x43e20
movl %eax, 0x44(%rsp)
jmp 0x5d13b
movl 0x40(%rsp), %eax
movl 0x44(%rsp), %ecx
cmpl %ecx, %eax
jge 0x5d2db
movq 0x88(%rsp), %rax
movq 0x68(%rax), %rcx
movslq 0x98(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq 0xa8(%rsp), %rcx
movq 0x68(%rcx), %rdi
addq %rax, %rdi
callq 0x16d50
movl %eax, 0x3c(%rsp)
jmp 0x5d185
movl 0x3c(%rsp), %esi
movq 0x30(%rsp), %rdi
callq 0x1422a0
jmp 0x5d195
movl $0x0, 0x94(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movq 0x68(%rax), %rdi
movslq 0x98(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x16d50
movl %eax, 0x2c(%rsp)
jmp 0x5d1d1
movl 0x28(%rsp), %eax
movl 0x2c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x5d2c3
movq 0x88(%rsp), %rax
movq 0x68(%rax), %rcx
movslq 0x98(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq 0xa8(%rsp), %rcx
movq 0x68(%rcx), %rdi
addq %rax, %rdi
movl 0x94(%rsp), %esi
callq 0x45450
movq %rax, 0x20(%rsp)
jmp 0x5d223
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
callq 0x43e80
jmp 0x5d237
jmp 0x5d239
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x5d1a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x5d2e3
movq 0x60(%rsp), %rcx
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq %rsi, 0xa0(%rsp)
movl %edx, 0x9c(%rsp)
cmpq %rax, %rcx
movq %rax, 0x10(%rsp)
je 0x5d2b2
movq 0x10(%rsp), %rdi
addq $-0x10, %rdi
movq %rdi, 0x8(%rsp)
callq 0x43fb0
movq 0x60(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x5d28b
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdi
callq 0x13a90
jmp 0x5d2e3
jmp 0x5d2c5
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0x5d11d
addq $0xb8, %rsp
retq
movq 0x80(%rsp), %rdi
callq 0x56040
movq 0xa0(%rsp), %rdi
callq 0x13970
nopl (%rax)