#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ MatrixMultiplyC44f(float *, float *);
int /*<<< orphan*/ rotation_matrix3f(float const, float const, float const,
                                     float const, float *);
void MatrixRotateC44f(float *m, const float angle, const float x, const float y,
                      const float z) {
  float m33[9];
  float m44[16];
  rotation_matrix3f(angle, x, y, z, m33);
  m44[0] = m33[0];
  m44[1] = m33[1];
  m44[2] = m33[2];
  m44[3] = 0.0F;
  m44[4] = m33[3];
  m44[5] = m33[4];
  m44[6] = m33[5];
  m44[7] = 0.0F;
  m44[8] = m33[6];
  m44[9] = m33[7];
  m44[10] = m33[8];
  m44[11] = 0.0F;
  m44[12] = 0.0F;
  m44[13] = 0.0F;
  m44[14] = 0.0F;
  m44[15] = 1.0F;
  MatrixMultiplyC44f(m44, m);
}


x86 assembly (clang, -O0):
<MatrixRotateC44f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
lea    -0x40(%rbp),%rdi
call   1040 <rotation_matrix3f@plt>
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  0xe0e(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <MatrixMultiplyC44f@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MatrixRotateC44f>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1040 <rotation_matrix3f@plt>
movss  (%rsp),%xmm0
movss  %xmm0,0x30(%rsp)
mov    0x4(%rsp),%rax
mov    %rax,0x34(%rsp)
movl   $0x0,0x3c(%rsp)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x40(%rsp)
mov    0x10(%rsp),%rax
mov    %rax,0x44(%rsp)
movl   $0x0,0x4c(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x50(%rsp)
movss  0x20(%rsp),%xmm0
movss  %xmm0,0x58(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x5c(%rsp)
movl   $0x3f800000,0x6c(%rsp)
3f
lea    0x30(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <MatrixMultiplyC44f@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @MatrixRotateC44f(float* %0, float %1, float %2, float %3, float %4) {
%6 = alloca float*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca [9 x float]
%12 = alloca [16 x float]
store float* %0, float** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load float, float* %9
%16 = load float, float* %10
%17 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%18 = call i32 @rotation_matrix3f(float %13, float %14, float %15, float %16, float* %17)
%19 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%20 = load float, float* %19
%21 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 0
store float %20, float* %21
%22 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 1
%23 = load float, float* %22
%24 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 1
store float %23, float* %24
%25 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 2
%26 = load float, float* %25
%27 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 2
store float %26, float* %27
%28 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 3
store float 0.000000e+00, float* %28
%29 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 3
%30 = load float, float* %29
%31 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 4
store float %30, float* %31
%32 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 4
%33 = load float, float* %32
%34 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 5
store float %33, float* %34
%35 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 5
%36 = load float, float* %35
%37 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 6
store float %36, float* %37
%38 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 7
store float 0.000000e+00, float* %38
%39 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 6
%40 = load float, float* %39
%41 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 8
store float %40, float* %41
%42 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 7
%43 = load float, float* %42
%44 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 9
store float %43, float* %44
%45 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 8
%46 = load float, float* %45
%47 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 10
store float %46, float* %47
%48 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 11
store float 0.000000e+00, float* %48
%49 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 12
store float 0.000000e+00, float* %49
%50 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 13
store float 0.000000e+00, float* %50
%51 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 14
store float 0.000000e+00, float* %51
%52 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 15
store float 1.000000e+00, float* %52
%53 = getelementptr inbounds [16 x float], [16 x float]* %12, i64 0, i64 0
%54 = load float*, float** %6
%55 = call i32 @MatrixMultiplyC44f(float* %53, float* %54)
ret void
}

LLVM IR (-O2):
define void @MatrixRotateC44f(float* %0, float %1, float %2, float %3, float %4) {
%6 = alloca [9 x float]
%7 = alloca [16 x float]
%8 = bitcast [9 x float]* %6 to i8*
%9 = bitcast [16 x float]* %7 to i8*
%10 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 0
%11 = call i32 @rotation_matrix3f(float %1, float %2, float %3, float %4, float* %10)
%12 = load float, float* %10
%13 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
store float %12, float* %13
%14 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 1
%15 = load float, float* %14
%16 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 1
store float %15, float* %16
%17 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 2
%18 = load float, float* %17
%19 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 2
store float %18, float* %19
%20 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 3
store float 0.000000e+00, float* %20
%21 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 3
%22 = load float, float* %21
%23 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 4
store float %22, float* %23
%24 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 4
%25 = load float, float* %24
%26 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 5
store float %25, float* %26
%27 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 5
%28 = load float, float* %27
%29 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 6
store float %28, float* %29
%30 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 7
store float 0.000000e+00, float* %30
%31 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 6
%32 = load float, float* %31
%33 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 8
store float %32, float* %33
%34 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 7
%35 = load float, float* %34
%36 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 9
store float %35, float* %36
%37 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 8
%38 = load float, float* %37
%39 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 10
store float %38, float* %39
%40 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 11
%41 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 15
%42 = bitcast float* %40 to i8*
store float 1.000000e+00, float* %41
%43 = call i32 @MatrixMultiplyC44f(float* %13, float* %0)
ret void
}