#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 */
scalar_t__ calloc(int, int);
float cos(float);
float sin(float);
float *YRotationMatrix(float angle) {
  float sin_value, cos_value;
  float *r;
  sin_value = sin(angle);
  cos_value = cos(angle);
  r = (float *)calloc(sizeof(float), 16);
  r[0] = cos_value;
  r[1] = 0.0;
  r[2] = -1.0 * sin_value;
  r[3] = 0.0;
  r[4] = 0.0;
  r[5] = 1.0;
  r[6] = 0.0;
  r[7] = 0.0;
  r[8] = sin_value;
  r[9] = 0.0;
  r[10] = cos_value;
  r[11] = 0.0;
  r[12] = 0.0;
  r[13] = 0.0;
  r[14] = 0.0;
  r[15] = 1.0;
  return r;
}


x86 assembly (clang, -O0):
<YRotationMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <sin@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cos@plt>
movss  %xmm0,-0xc(%rbp)
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe70(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movss  0xe33(%rip),%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
movss  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
mov    -0x18(%rbp),%rax
movss  0xdb2(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YRotationMatrix>:
sub    $0x28,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <sin@plt>
movaps %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1050 <cos@plt>
movss  %xmm0,0xc(%rsp)
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
movss  0xc(%rsp),%xmm2
movss  %xmm2,(%rax)
movl   $0x0,0x4(%rax)
movaps 0xe84(%rip),%xmm0
movaps 0x10(%rsp),%xmm1
xorps  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
movaps 0xe80(%rip),%xmm0
movups %xmm0,0xc(%rax)
movl   $0x0,0x1c(%rax)
movss  %xmm1,0x20(%rax)
movl   $0x0,0x24(%rax)
movss  %xmm2,0x28(%rax)
xorps  %xmm0,%xmm0
movups %xmm0,0x2c(%rax)
movl   $0x3f800000,0x3c(%rax)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float* @YRotationMatrix(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float*
store float %0, float* %2
%6 = load float, float* %2
%7 = call float @sin(float %6)
store float %7, float* %3
%8 = load float, float* %2
%9 = call float @cos(float %8)
store float %9, float* %4
%10 = call i64 @calloc(i32 4, i32 16)
%11 = inttoptr i64 %10 to float*
store float* %11, float** %5
%12 = load float, float* %4
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 0
store float %12, float* %14
%15 = load float*, float** %5
%16 = getelementptr inbounds float, float* %15, i64 1
store float 0.000000e+00, float* %16
%17 = load float, float* %3
%18 = fpext float %17 to double
%19 = fmul double -1.000000e+00, %18
%20 = fptrunc double %19 to float
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 2
store float %20, float* %22
%23 = load float*, float** %5
%24 = getelementptr inbounds float, float* %23, i64 3
store float 0.000000e+00, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 4
store float 0.000000e+00, float* %26
%27 = load float*, float** %5
%28 = getelementptr inbounds float, float* %27, i64 5
store float 1.000000e+00, float* %28
%29 = load float*, float** %5
%30 = getelementptr inbounds float, float* %29, i64 6
store float 0.000000e+00, float* %30
%31 = load float*, float** %5
%32 = getelementptr inbounds float, float* %31, i64 7
store float 0.000000e+00, float* %32
%33 = load float, float* %3
%34 = load float*, float** %5
%35 = getelementptr inbounds float, float* %34, i64 8
store float %33, float* %35
%36 = load float*, float** %5
%37 = getelementptr inbounds float, float* %36, i64 9
store float 0.000000e+00, float* %37
%38 = load float, float* %4
%39 = load float*, float** %5
%40 = getelementptr inbounds float, float* %39, i64 10
store float %38, float* %40
%41 = load float*, float** %5
%42 = getelementptr inbounds float, float* %41, i64 11
store float 0.000000e+00, float* %42
%43 = load float*, float** %5
%44 = getelementptr inbounds float, float* %43, i64 12
store float 0.000000e+00, float* %44
%45 = load float*, float** %5
%46 = getelementptr inbounds float, float* %45, i64 13
store float 0.000000e+00, float* %46
%47 = load float*, float** %5
%48 = getelementptr inbounds float, float* %47, i64 14
store float 0.000000e+00, float* %48
%49 = load float*, float** %5
%50 = getelementptr inbounds float, float* %49, i64 15
store float 1.000000e+00, float* %50
%51 = load float*, float** %5
ret float* %51
}

LLVM IR (-O2):
define float* @YRotationMatrix(float %0) {
%2 = tail call float @sin(float %0)
%3 = tail call float @cos(float %0)
%4 = tail call i64 @calloc(i32 4, i32 16)
%5 = inttoptr i64 %4 to float*
store float %3, float* %5
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = fneg float %2
%8 = getelementptr inbounds float, float* %5, i64 2
store float %7, float* %8
%9 = getelementptr inbounds float, float* %5, i64 3
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00>, <4 x float>* %10
%11 = getelementptr inbounds float, float* %5, i64 7
store float 0.000000e+00, float* %11
%12 = getelementptr inbounds float, float* %5, i64 8
store float %2, float* %12
%13 = getelementptr inbounds float, float* %5, i64 9
store float 0.000000e+00, float* %13
%14 = getelementptr inbounds float, float* %5, i64 10
store float %3, float* %14
%15 = getelementptr inbounds float, float* %5, i64 11
%16 = getelementptr inbounds float, float* %5, i64 15
%17 = bitcast float* %15 to i8*
store float 1.000000e+00, float* %16
ret float* %5
}