// File: /workspace/github_c_makefile_star2_O1/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: mat4_rotation
void mat4_rotation( mat4 dest, float x, float y, float z ){
    mat4 mx, my, mz, tmp;
    mat4_create(tmp);
    mat4_create(dest);
    mat4_rotx(mx, x);
    mat4_roty(my, y);
    mat4_rotz(mz, z);
    mat4_mlt( my, mx, tmp );
    mat4_mlt( mz, tmp, dest );
    //mat4_print(mx);
    //mat4_print(my);
    //mat4_print(mz);
    //mat4_print(tmp);
    //mat4_print(dest);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movss %xmm2, 0x1c(%rsp)
movss %xmm1, 0x14(%rsp)
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm1, 0xb0(%rsp)
movaps %xmm1, 0xa0(%rsp)
movaps %xmm1, 0x90(%rsp)
movaps %xmm1, 0x80(%rsp)
movups %xmm1, 0x30(%rdi)
movups %xmm1, 0x20(%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm1, (%rdi)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1250
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
xorps 0x4287(%rip), %xmm0     # 0x8150
movaps %xmm0, 0x70(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1250
cvtsd2ss %xmm0, %xmm0
movl $0x3f800000, %ebp       # imm = 0x3F800000
leaq 0x100(%rsp), %r14
movl %ebp, (%r14)
xorps %xmm1, %xmm1
movups %xmm1, 0x4(%r14)
movss 0x20(%rsp), %xmm2
movss %xmm2, 0x14(%r14)
movss 0x18(%rsp), %xmm2
movss %xmm2, 0x18(%r14)
xorl %r15d, %r15d
movq %r15, 0x1c(%r14)
movaps 0x70(%rsp), %xmm2
movss %xmm2, 0x24(%r14)
movss %xmm0, 0x28(%r14)
movups %xmm1, 0x2c(%r14)
movl %ebp, 0x3c(%r14)
xorps %xmm0, %xmm0
cvtss2sd 0x14(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1250
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
xorps 0x41ee(%rip), %xmm0     # 0x8150
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1250
cvtsd2ss %xmm0, %xmm0
leaq 0xc0(%rsp), %r12
movss 0x14(%rsp), %xmm1
movss %xmm1, (%r12)
movl %r15d, 0x4(%r12)
movaps 0x20(%rsp), %xmm1
movss %xmm1, 0x8(%r12)
movaps 0x43c9(%rip), %xmm1     # 0x8380
movups %xmm1, 0xc(%r12)
movl %r15d, 0x1c(%r12)
movss 0x18(%rsp), %xmm1
movss %xmm1, 0x20(%r12)
movl %r15d, 0x24(%r12)
movss %xmm0, 0x28(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%r12)
movl %ebp, 0x3c(%r12)
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1250
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
xorps 0x411e(%rip), %xmm0     # 0x8150
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1250
cvtsd2ss %xmm0, %xmm0
movss 0x1c(%rsp), %xmm1
movss %xmm1, 0x30(%rsp)
movss 0x14(%rsp), %xmm1
movss %xmm1, 0x34(%rsp)
movq %r15, 0x38(%rsp)
movaps 0x20(%rsp), %xmm1
movss %xmm1, 0x40(%rsp)
movss %xmm0, 0x44(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movl %ebp, 0x58(%rsp)
movups %xmm0, 0x5c(%rsp)
movl %ebp, 0x6c(%rsp)
leaq (,%r15,4), %rax
movq %r14, %rcx
xorl %edx, %edx
movq %rdx, %rsi
orq %rax, %rsi
movss 0x80(%rsp,%rsi,4), %xmm0
xorl %edi, %edi
movss (%r12,%rdi), %xmm1
mulss (%rcx,%rdi,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x40a7
movss %xmm0, 0x80(%rsp,%rsi,4)
incq %rdx
addq $0x4, %rcx
cmpq $0x4, %rdx
jne 0x4096
incq %r15
addq $0x10, %r12
cmpq $0x4, %r15
jne 0x4089
leaq 0x30(%rsp), %rax
xorl %ecx, %ecx
leaq 0x80(%rsp), %rdx
leaq (,%rcx,4), %rsi
movq %rdx, %rdi
xorl %r8d, %r8d
movq %r8, %r9
orq %rsi, %r9
movss (%rbx,%r9,4), %xmm0
xorl %r10d, %r10d
movss (%rax,%r10), %xmm1
mulss (%rdi,%r10,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %r10
cmpq $0x10, %r10
jne 0x410f
movss %xmm0, (%rbx,%r9,4)
incq %r8
addq $0x4, %rdi
cmpq $0x4, %r8
jne 0x4100
incq %rcx
addq $0x10, %rax
cmpq $0x4, %rcx
jne 0x40f2
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq