// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::operator=(poly const&)
void poly::operator= ( const poly &q ) {
  int i;
  typedef point *pp;

  // out with the old
  for( i = 0; i < np; i++ )
    if( p[i] )
      delete p[i];
  delete p;
  if( cnormal )
    delete cnormal;
  // in with the new
  np = q.np;
  dp = q.dp;
  p = new pp[ np ];
  for( i = 0; i < np; i++ )
    if( q.p[i] )
      p[i] = new point( *q.p[i] );
    else
      p[i] = 0;
  cnormal = 0;
  if( q.cnormal )
    cnormal = new point( *q.cnormal );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x4e21
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x4e14
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x4e12
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x4e14
jmp 0x4e16
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4dcf
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x4e41
movq -0x40(%rbp), %rdi
movl $0x8, %esi
callq 0x2120
movq -0x30(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x4e70
movq -0x30(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x4e6e
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x4e70
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, 0x1c(%rax)
movslq 0x18(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x4f66
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x4f42
movl $0x20, %edi
callq 0x2110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2ef0
jmp 0x4f0d
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x4f56
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x20, %esi
callq 0x2120
jmp 0x4fdc
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x4f58
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4ebf
movq -0x30(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x4fd6
movl $0x20, %edi
callq 0x2110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rsi
callq 0x2ef0
jmp 0x4fa9
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0x158(%rax)
jmp 0x4fd6
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x20, %esi
callq 0x2120
jmp 0x4fdc
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)