// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/SceneInstance.cpp
// Function: SceneInstance::computeTransform(Mat4&, int)
bool SceneInstance::computeTransform(Mat4 & mat, int time)
{
  mat = identity3D();

  if (transforms_.empty())
    return false;
  else
  {
    for (vector<Transform *>::reverse_iterator it = transforms_.rbegin(); it != transforms_.rend(); ++it)
    {
      mat = mat * (**it).getMatrix(time);
    }
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rsi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsi)
movupd %xmm0, 0x18(%rsi)
movq %rax, 0x28(%rsi)
movupd %xmm0, 0x30(%rsi)
movupd %xmm0, 0x40(%rsi)
movq %rax, 0x50(%rsi)
movupd %xmm0, 0x58(%rsi)
movupd %xmm0, 0x68(%rsi)
movq %rax, 0x78(%rsi)
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %r13
movq %rax, 0x8(%rsp)
cmpq %r13, %rax
je 0x69c3
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xa0(%rsp), %r12
movq %r13, %rbp
movq -0x8(%rbp), %rsi
addq $-0x8, %rbp
movq (%rsi), %rax
movq %r12, %rdi
movl %ebx, %edx
callq *(%rax)
movupd (%r14), %xmm0
movupd 0x8(%r14), %xmm4
movupd 0x10(%r14), %xmm2
movupd 0x18(%r14), %xmm3
movupd 0x20(%r14), %xmm5
movupd 0x28(%r14), %xmm8
movupd 0x30(%r14), %xmm6
movupd 0x38(%r14), %xmm7
movupd 0x40(%r14), %xmm11
movups 0x48(%r14), %xmm1
movaps %xmm1, 0x80(%rsp)
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
movapd 0xa0(%rsp), %xmm13
movapd 0xc0(%rsp), %xmm10
movapd %xmm10, 0x10(%rsp)
movapd 0xe0(%rsp), %xmm1
movapd %xmm1, 0x60(%rsp)
movapd 0x100(%rsp), %xmm12
movapd %xmm12, 0x70(%rsp)
movapd %xmm4, %xmm9
mulpd %xmm10, %xmm9
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, %xmm10
mulpd %xmm13, %xmm10
addpd %xmm9, %xmm10
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movapd %xmm2, %xmm9
mulpd %xmm1, %xmm9
addpd %xmm10, %xmm9
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
movapd %xmm3, %xmm1
mulpd %xmm12, %xmm1
addpd %xmm9, %xmm1
movupd 0x50(%r14), %xmm14
movupd 0x58(%r14), %xmm15
movupd 0x60(%r14), %xmm9
movups 0x68(%r14), %xmm10
movaps %xmm10, 0x90(%rsp)
movupd 0x70(%r14), %xmm10
movsd 0x78(%r14), %xmm12
movupd %xmm1, (%r14)
movapd 0xd0(%rsp), %xmm1
movapd %xmm1, 0x30(%rsp)
mulpd %xmm1, %xmm4
movapd 0xb0(%rsp), %xmm1
movapd %xmm1, 0x20(%rsp)
mulpd %xmm1, %xmm0
addpd %xmm4, %xmm0
movapd 0xf0(%rsp), %xmm1
movapd %xmm1, 0x50(%rsp)
mulpd %xmm1, %xmm2
addpd %xmm0, %xmm2
movapd 0x110(%rsp), %xmm0
movapd %xmm0, 0x40(%rsp)
mulpd %xmm0, %xmm3
addpd %xmm2, %xmm3
movupd %xmm3, 0x10(%r14)
unpcklpd %xmm8, %xmm8            # xmm8 = xmm8[0,0]
movapd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm0
mulpd %xmm8, %xmm0
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
movapd %xmm5, %xmm1
mulpd %xmm13, %xmm1
addpd %xmm0, %xmm1
unpcklpd %xmm6, %xmm6            # xmm6 = xmm6[0,0]
movapd %xmm6, %xmm0
movapd 0x60(%rsp), %xmm4
mulpd %xmm4, %xmm0
addpd %xmm1, %xmm0
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
movapd %xmm7, %xmm1
movapd 0x70(%rsp), %xmm3
mulpd %xmm3, %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, 0x20(%r14)
mulpd 0x30(%rsp), %xmm8
mulpd 0x20(%rsp), %xmm5
addpd %xmm8, %xmm5
movapd 0x50(%rsp), %xmm8
mulpd %xmm8, %xmm6
addpd %xmm5, %xmm6
movapd 0x40(%rsp), %xmm5
mulpd %xmm5, %xmm7
addpd %xmm6, %xmm7
movupd %xmm7, 0x30(%r14)
movapd 0x80(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd %xmm2, %xmm0
mulpd %xmm1, %xmm0
movapd %xmm1, %xmm2
unpcklpd %xmm11, %xmm11          # xmm11 = xmm11[0,0]
movapd %xmm11, %xmm1
mulpd %xmm13, %xmm1
addpd %xmm0, %xmm1
unpcklpd %xmm14, %xmm14          # xmm14 = xmm14[0,0]
movapd %xmm14, %xmm0
mulpd %xmm4, %xmm0
addpd %xmm1, %xmm0
unpcklpd %xmm15, %xmm15          # xmm15 = xmm15[0,0]
movapd %xmm15, %xmm1
mulpd %xmm3, %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, 0x40(%r14)
movapd 0x30(%rsp), %xmm6
mulpd %xmm6, %xmm2
movapd 0x20(%rsp), %xmm7
mulpd %xmm7, %xmm11
addpd %xmm2, %xmm11
mulpd %xmm8, %xmm14
addpd %xmm11, %xmm14
mulpd %xmm5, %xmm15
addpd %xmm14, %xmm15
movupd %xmm15, 0x50(%r14)
movapd 0x90(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x10(%rsp), %xmm0
mulpd %xmm1, %xmm0
movapd %xmm1, %xmm2
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
mulpd %xmm9, %xmm13
addpd %xmm0, %xmm13
unpcklpd %xmm10, %xmm10          # xmm10 = xmm10[0,0]
movapd %xmm4, %xmm0
mulpd %xmm10, %xmm0
addpd %xmm13, %xmm0
unpcklpd %xmm12, %xmm12          # xmm12 = xmm12[0,0]
movapd %xmm3, %xmm1
mulpd %xmm12, %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, 0x60(%r14)
mulpd %xmm6, %xmm2
mulpd %xmm7, %xmm9
addpd %xmm2, %xmm9
mulpd %xmm8, %xmm10
addpd %xmm9, %xmm10
mulpd %xmm5, %xmm12
addpd %xmm10, %xmm12
movupd %xmm12, 0x70(%r14)
cmpq 0x28(%r15), %rbp
jne 0x66c1
cmpq %r13, 0x8(%rsp)
setne %al
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)