#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*/ rotation_matrix3f(float const, float const, float const,
                                     float const, float *);
void MatrixGetRotationC44f(float *m44, const float angle, const float x,
                           const float y, const float z) {
  float m33[9];
  rotation_matrix3f(angle, x, y, z, m33);
  m44[0] = m33[0];
  m44[1] = m33[3];
  m44[2] = m33[6];
  m44[3] = 0.0F;
  m44[4] = m33[1];
  m44[5] = m33[4];
  m44[6] = m33[7];
  m44[7] = 0.0F;
  m44[8] = m33[2];
  m44[9] = m33[5];
  m44[10] = m33[8];
  m44[11] = 0.0F;
  m44[12] = 0.0F;
  m44[13] = 0.0F;
  m44[14] = 0.0F;
  m44[15] = 1.0F;
}


x86 assembly (clang, -O0):
<MatrixGetRotationC44f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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   1030 <rotation_matrix3f@plt>
movss  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
movss  -0x3c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x24(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
movss  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x2c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movss  0xde2(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MatrixGetRotationC44f>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1030 <rotation_matrix3f@plt>
movss  (%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x4(%rbx)
movss  0x18(%rsp),%xmm0
movss  %xmm0,0x8(%rbx)
movl   $0x0,0xc(%rbx)
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x10(%rbx)
movss  0x10(%rsp),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0x1c(%rsp),%xmm0
movss  %xmm0,0x18(%rbx)
movl   $0x0,0x1c(%rbx)
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x20(%rbx)
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x24(%rbx)
movss  0x20(%rsp),%xmm0
movss  %xmm0,0x28(%rbx)
xorps  %xmm0,%xmm0
movups %xmm0,0x2c(%rbx)
movl   $0x3f800000,0x3c(%rbx)
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @MatrixGetRotationC44f(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]
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
%12 = load float, float* %7
%13 = load float, float* %8
%14 = load float, float* %9
%15 = load float, float* %10
%16 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%17 = call i32 @rotation_matrix3f(float %12, float %13, float %14, float %15, float* %16)
%18 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%19 = load float, float* %18
%20 = load float*, float** %6
%21 = getelementptr inbounds float, float* %20, i64 0
store float %19, float* %21
%22 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 3
%23 = load float, float* %22
%24 = load float*, float** %6
%25 = getelementptr inbounds float, float* %24, i64 1
store float %23, float* %25
%26 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 6
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
store float %27, float* %29
%30 = load float*, float** %6
%31 = getelementptr inbounds float, float* %30, i64 3
store float 0.000000e+00, float* %31
%32 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 1
%33 = load float, float* %32
%34 = load float*, float** %6
%35 = getelementptr inbounds float, float* %34, i64 4
store float %33, float* %35
%36 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 4
%37 = load float, float* %36
%38 = load float*, float** %6
%39 = getelementptr inbounds float, float* %38, i64 5
store float %37, float* %39
%40 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 7
%41 = load float, float* %40
%42 = load float*, float** %6
%43 = getelementptr inbounds float, float* %42, i64 6
store float %41, float* %43
%44 = load float*, float** %6
%45 = getelementptr inbounds float, float* %44, i64 7
store float 0.000000e+00, float* %45
%46 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 2
%47 = load float, float* %46
%48 = load float*, float** %6
%49 = getelementptr inbounds float, float* %48, i64 8
store float %47, float* %49
%50 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 5
%51 = load float, float* %50
%52 = load float*, float** %6
%53 = getelementptr inbounds float, float* %52, i64 9
store float %51, float* %53
%54 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 8
%55 = load float, float* %54
%56 = load float*, float** %6
%57 = getelementptr inbounds float, float* %56, i64 10
store float %55, float* %57
%58 = load float*, float** %6
%59 = getelementptr inbounds float, float* %58, i64 11
store float 0.000000e+00, float* %59
%60 = load float*, float** %6
%61 = getelementptr inbounds float, float* %60, i64 12
store float 0.000000e+00, float* %61
%62 = load float*, float** %6
%63 = getelementptr inbounds float, float* %62, i64 13
store float 0.000000e+00, float* %63
%64 = load float*, float** %6
%65 = getelementptr inbounds float, float* %64, i64 14
store float 0.000000e+00, float* %65
%66 = load float*, float** %6
%67 = getelementptr inbounds float, float* %66, i64 15
store float 1.000000e+00, float* %67
ret void
}

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