// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::operator=(gaps::R3SurfelImage const&)
R3SurfelImage& R3SurfelImage::
operator=(const R3SurfelImage& image)
{
  // Copy properties
  this->pose = image.pose;
  this->timestamp = image.timestamp;
  this->image_width = image.image_width; 
  this->image_height = image.image_height;
  this->image_center = image.image_center;
  this->xfocal = image.xfocal;
  this->yfocal = image.yfocal;
  this->distortion_type = image.distortion_type;
  this->radial_distortion[0] = image.radial_distortion[0];
  this->radial_distortion[1] = image.radial_distortion[1];
  this->radial_distortion[2] = image.radial_distortion[2];
  this->tangential_distortion[0] = image.tangential_distortion[0];
  this->tangential_distortion[1] = image.tangential_distortion[1];
  this->rolling_shutter_poses[0] = image.rolling_shutter_poses[0];
  this->rolling_shutter_poses[1] = image.rolling_shutter_poses[1];
  this->rolling_shutter_timestamps[0] = image.rolling_shutter_timestamps[0];
  this->rolling_shutter_timestamps[1] = image.rolling_shutter_timestamps[1];
  this->name = (image.name) ? RNStrdup(image.name) : NULL;
  this->flags = 0;

  // Copy all channels
  for (int i = 0; i < image.channels.NEntries(); i++) {
    R2Grid *channel = image.channels.Kth(i);
    if (channel) this->channels.Insert(new R2Grid(*channel));
    else this->channels.Insert(NULL);
  }

  // Return this
  return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x30, %rsi
addq $0x30, %rdi
callq 0x8412a
leaq 0x48(%rbx), %rdi
leaq 0x48(%r14), %rsi
callq 0x84fe2
leaq 0x60(%r14), %rsi
leaq 0x60(%rbx), %rdi
callq 0x84fe2
leaq 0x78(%r14), %rsi
leaq 0x78(%rbx), %rdi
callq 0x84fe2
movsd 0x90(%r14), %xmm0
movsd %xmm0, 0x90(%rbx)
movq 0x98(%r14), %rax
movq %rax, 0x98(%rbx)
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0xa267a
movups 0xb0(%r14), %xmm0
movups %xmm0, 0xb0(%rbx)
movl 0xc0(%r14), %eax
movl %eax, 0xc0(%rbx)
movsd 0xc8(%r14), %xmm0
movsd %xmm0, 0xc8(%rbx)
movsd 0xd0(%r14), %xmm0
movsd %xmm0, 0xd0(%rbx)
movsd 0xd8(%r14), %xmm0
movsd %xmm0, 0xd8(%rbx)
movsd 0xe0(%r14), %xmm0
movsd %xmm0, 0xe0(%rbx)
movsd 0xe8(%r14), %xmm0
movsd %xmm0, 0xe8(%rbx)
movl $0xf0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x8412a
movl $0x108, %esi            # imm = 0x108
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x84fe2
movl $0x120, %edi            # imm = 0x120
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x84fe2
movl $0x138, %edi            # imm = 0x138
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x84fe2
movl $0x150, %edi            # imm = 0x150
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x8412a
movl $0x168, %esi            # imm = 0x168
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x84fe2
movl $0x180, %edi            # imm = 0x180
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x84fe2
movl $0x198, %edi            # imm = 0x198
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x84fe2
movsd 0x1b0(%r14), %xmm0
movsd %xmm0, 0x1b0(%rbx)
movsd 0x1b8(%r14), %xmm0
movsd %xmm0, 0x1b8(%rbx)
movq 0x1c0(%r14), %rdi
testq %rdi, %rdi
je 0x3c269
callq 0xac67b
jmp 0x3c26b
xorl %eax, %eax
movq %rax, 0x1c0(%rbx)
movq $0x0, 0x1c8(%rbx)
cmpl $0x0, 0x2c(%r14)
jle 0x3c2d3
leaq 0x20(%rbx), %r15
xorl %ebp, %ebp
movq 0x20(%r14), %rax
movq (%rax,%rbp,8), %r13
testq %r13, %r13
je 0x3c2ba
movl $0xd0, %edi
callq 0x134e0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x91714
movl 0x2c(%rbx), %edx
movq %r15, %rdi
movq %r12, %rsi
jmp 0x3c2c2
movl 0x2c(%rbx), %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xa9d3e
incq %rbp
movslq 0x2c(%r14), %rax
cmpq %rax, %rbp
jl 0x3c28a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xd0, %esi
movq %r12, %rdi
callq 0x134f0
movq %rbx, %rdi
callq 0x138b0
nop