// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::operator=(gaps::R3Polyline const&)
R3Polyline& R3Polyline::
operator=(const R3Polyline& polyline)
{
  // Delete previous everything
  if (vertex_positions) delete [] vertex_positions;
  if (vertex_parameters) delete [] vertex_parameters;
  if (vertex_datas) delete [] vertex_datas;
  this->vertex_positions = NULL;
  this->vertex_parameters = NULL;
  this->vertex_datas = NULL;
  
  // Copy properties
  this->nvertices = polyline.nvertices;
  this->bbox = polyline.BBox();

  // Copy vertex_positions and parameters
  if (nvertices > 0) {
    this->vertex_positions = new R3Point [ nvertices ];
    this->vertex_parameters = new RNScalar [ nvertices ];
    for (int i = 0; i < nvertices; i++) {
      this->vertex_positions[i] = polyline.vertex_positions[i];
      this->vertex_parameters[i] = polyline.vertex_parameters[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x8(%rax)
je 0x936bb
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0x936b9
movq 0x50(%rsp), %rdi
callq 0xf670
jmp 0x936bb
movq 0x58(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x936e7
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x936e5
movq 0x48(%rsp), %rdi
callq 0xf670
jmp 0x936e7
movq 0x58(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x93713
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, %rax
je 0x93711
movq 0x40(%rsp), %rdi
callq 0xf670
jmp 0x93713
movq 0x58(%rsp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq 0xa8(%rsp), %rcx
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq 0xa8(%rsp), %rsi
movq (%rsi), %rax
movq 0x88(%rax), %rax
leaq 0x70(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq *%rax
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x28, %rdi
callq 0x37500
jmp 0x93771
leaq 0x70(%rsp), %rdi
callq 0x36a80
movq 0x58(%rsp), %rax
cmpl $0x0, 0x20(%rax)
jle 0x93914
movq 0x58(%rsp), %rax
movslq 0x20(%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0x20(%rsp)
callq 0xf030
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
cmpq $0x0, %rax
je 0x93818
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x6eb40
jmp 0x93800
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x937ef
movq 0x58(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movslq 0x20(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movl 0x60(%rsp), %eax
cmpl 0x20(%rcx), %eax
jge 0x93912
movq 0x58(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq 0x8(%rcx), %rsi
movslq 0x60(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq 0x8(%rax), %rdi
movslq 0x60(%rsp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x6f1e0
movq 0x58(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x60(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x10(%rax), %rax
movslq 0x60(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x9385f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x36a80
jmp 0x93921
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
callq 0xf990
jmp 0x93921
jmp 0x93914
movq 0x58(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0xf890
nopl (%rax,%rax)