// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Union(gaps::R3OrientedBox const&)
void R3OrientedBox::
Union(const R3OrientedBox& box) 
{
  // Check boxes
  if (box.IsEmpty()) return;
  if (this->IsEmpty()) return;

  // Grow ranges
  R3Box r(-Radius(0), -Radius(1), -Radius(2), Radius(0), Radius(1), Radius(2));
  for (int i = 0; i < RN_NUM_OCTANTS; i++) {
    R3Vector v = box.Corner(i) - Center();
    RNLength r0 = v.Dot(Axis(0));
    RNLength r1 = v.Dot(Axis(1));
    RNLength r2 = v.Dot(Axis(2));
    r.Union(R3Point(r0, r1, r2));
  }

  // Compute center
  R3Point c = r.Centroid();
  R3Point center = cs.Origin() + Axis(0)*c[0] + Axis(1)*c[1] + Axis(2)*c[2];

  // Initialize everything
  Reset(center, Axis(0), Axis(1), r.XRadius(), r.YRadius(), r.ZRadius());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22b76
testl %eax, %eax
jne 0x4f52a
movq %rbx, %rdi
callq 0x22b76
testl %eax, %eax
jne 0x4f52a
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x43ccd(%rip), %xmm2    # 0x93030
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x40(%rsp), %rdi
callq 0x24bde
leaq 0x8(%rbx), %rbp
leaq 0x20(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x38(%rbx), %rax
movq %rax, (%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x50(%rbx), %r12
xorl %ebx, %ebx
leaq 0x78(%rsp), %r15
leaq 0x28(%rsp), %r14
cmpl $0x8, %ebx
je 0x4f429
movq %r15, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0x221da
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x37d29
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x38586
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x38586
movsd %xmm0, 0x18(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x38586
movapd %xmm0, %xmm2
movq %r15, %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x37b4c
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x254a4
incl %ebx
jmp 0x4f3b0
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2531a
movsd 0x28(%rsp), %xmm0
leaq 0xc0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x38a02
leaq 0xd8(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
movq %rbp, %rsi
callq 0x37e13
movsd 0x30(%rsp), %xmm0
leaq 0xa8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x38a02
leaq 0xf0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x37e13
movsd 0x38(%rsp), %xmm0
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x38a02
leaq 0x78(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x37e13
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
subsd 0x48(%rsp), %xmm0
movsd 0x43b2a(%rip), %xmm3    # 0x93010
mulsd %xmm3, %xmm0
subsd 0x50(%rsp), %xmm1
mulsd %xmm3, %xmm1
movsd 0x70(%rsp), %xmm2
subsd 0x58(%rsp), %xmm2
mulsd %xmm3, %xmm2
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
leaq 0x78(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
callq *0x268(%rax)
leaq 0x40(%rsp), %rdi
callq 0x25832
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
jmp 0x4f54e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x25832
movq %rbx, %rdi
callq 0xe810
nop