// File: srajangarg[P]raytracer/src/core/SceneData.hpp
// Function: GeneralTransform::getMatrix(int)
Mat4 getMatrix(int time)
    {
      Mat4 out(0.0);

      if (matrix.size() == 9) // 2d matrix
      {
        out[2][2] = 1;

        for (int i = 0; i < 3; i++)
        {
          int i_ind = i < 2 ? i : 3;

          for (int j = 0; j < 3; j++)
          {
            int j_ind = j < 2 ? j : 3;
            out[i_ind][j_ind] = matrix[i * 3 + j]->getValue(time);
          }
        }
      }
      else if (matrix.size() == 16)
      {
        for (int i = 0; i < 4; i++)
        {
          for (int j = 0; j < 4; j++)
          {
            out[i][j] = matrix[i * 4 + j]->getValue(time);
          }
        }
      }
      else
      {
        out = identity3D();
      }

      return out;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
xorps %xmm0, %xmm0
callq 0x15200
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x12d30
cmpq $0x9, %rax
jne 0x15047
movq -0xc8(%rbp), %rdi
movl $0x2, %esi
callq 0x152a0
movq %rax, %rdi
movl $0x2, %esi
callq 0x15310
movsd 0x321de(%rip), %xmm0    # 0x47138
movsd %xmm0, (%rax)
movl $0x0, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0x15042
cmpl $0x2, -0x18(%rbp)
jge 0x14f80
movl -0x18(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0x14f8d
movl $0x3, %eax
movl %eax, -0xcc(%rbp)
jmp 0x14f8d
movl -0xcc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0x15032
cmpl $0x2, -0x20(%rbp)
jge 0x14fb8
movl -0x20(%rbp), %eax
movl %eax, -0xd0(%rbp)
jmp 0x14fc5
movl $0x3, %eax
movl %eax, -0xd0(%rbp)
jmp 0x14fc5
movq -0xb8(%rbp), %rdi
movl -0xd0(%rbp), %eax
movl %eax, -0x24(%rbp)
addq $0x8, %rdi
imull $0x3, -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
movslq %eax, %rsi
callq 0x12fc0
movq (%rax), %rdi
cvtsi2sdl -0x14(%rbp), %xmm0
movq (%rdi), %rax
callq *0x8(%rax)
movq -0xc8(%rbp), %rdi
movsd %xmm0, -0xd8(%rbp)
movl -0x1c(%rbp), %esi
callq 0x152a0
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x15310
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x14f9d
jmp 0x15034
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x14f65
jmp 0x15115
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x12d30
cmpq $0x10, %rax
jne 0x150f4
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x150f2
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x150e2
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
movl -0x28(%rbp), %eax
shll $0x2, %eax
addl -0x2c(%rbp), %eax
movslq %eax, %rsi
callq 0x12fc0
movq (%rax), %rdi
cvtsi2sdl -0x14(%rbp), %xmm0
movq (%rdi), %rax
callq *0x8(%rax)
movq -0xc8(%rbp), %rdi
movsd %xmm0, -0xe0(%rbp)
movl -0x28(%rbp), %esi
callq 0x152a0
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x15310
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x15079
jmp 0x150e4
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x15068
jmp 0x15113
leaq -0xb0(%rbp), %rdi
callq 0x9f60
movq -0xc8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xa020
jmp 0x15115
movq -0xc0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop