#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 *IdentityMatrix(void) {
  float *r;
  r = (float *)calloc(sizeof(float), 16);
  r[0] = 1.0;
  r[1] = 0.0;
  r[2] = 0.0;
  r[3] = 0.0;
  r[4] = 0.0;
  r[5] = 1.0;
  r[6] = 0.0;
  r[7] = 0.0;
  r[8] = 0.0;
  r[9] = 0.0;
  r[10] = 1.0;
  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):
<IdentityMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xec9(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movss  0xe89(%rip),%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
movss  0xe48(%rip),%xmm0
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  0xe07(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IdentityMatrix>:
push   %rax
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
movl   $0x3f800000,(%rax)
xorps  %xmm0,%xmm0
movups %xmm0,0x4(%rax)
movl   $0x3f800000,0x14(%rax)
movups %xmm0,0x18(%rax)
movl   $0x3f800000,0x28(%rax)
movups %xmm0,0x2c(%rax)
movl   $0x3f800000,0x3c(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define float* @IdentityMatrix() {
%1 = alloca float*
%2 = call i64 @calloc(i32 4, i32 16)
%3 = inttoptr i64 %2 to float*
store float* %3, float** %1
%4 = load float*, float** %1
%5 = getelementptr inbounds float, float* %4, i64 0
store float 1.000000e+00, float* %5
%6 = load float*, float** %1
%7 = getelementptr inbounds float, float* %6, i64 1
store float 0.000000e+00, float* %7
%8 = load float*, float** %1
%9 = getelementptr inbounds float, float* %8, i64 2
store float 0.000000e+00, float* %9
%10 = load float*, float** %1
%11 = getelementptr inbounds float, float* %10, i64 3
store float 0.000000e+00, float* %11
%12 = load float*, float** %1
%13 = getelementptr inbounds float, float* %12, i64 4
store float 0.000000e+00, float* %13
%14 = load float*, float** %1
%15 = getelementptr inbounds float, float* %14, i64 5
store float 1.000000e+00, float* %15
%16 = load float*, float** %1
%17 = getelementptr inbounds float, float* %16, i64 6
store float 0.000000e+00, float* %17
%18 = load float*, float** %1
%19 = getelementptr inbounds float, float* %18, i64 7
store float 0.000000e+00, float* %19
%20 = load float*, float** %1
%21 = getelementptr inbounds float, float* %20, i64 8
store float 0.000000e+00, float* %21
%22 = load float*, float** %1
%23 = getelementptr inbounds float, float* %22, i64 9
store float 0.000000e+00, float* %23
%24 = load float*, float** %1
%25 = getelementptr inbounds float, float* %24, i64 10
store float 1.000000e+00, float* %25
%26 = load float*, float** %1
%27 = getelementptr inbounds float, float* %26, i64 11
store float 0.000000e+00, float* %27
%28 = load float*, float** %1
%29 = getelementptr inbounds float, float* %28, i64 12
store float 0.000000e+00, float* %29
%30 = load float*, float** %1
%31 = getelementptr inbounds float, float* %30, i64 13
store float 0.000000e+00, float* %31
%32 = load float*, float** %1
%33 = getelementptr inbounds float, float* %32, i64 14
store float 0.000000e+00, float* %33
%34 = load float*, float** %1
%35 = getelementptr inbounds float, float* %34, i64 15
store float 1.000000e+00, float* %35
%36 = load float*, float** %1
ret float* %36
}

LLVM IR (-O2):
define float* @IdentityMatrix() {
%1 = tail call i64 @calloc(i32 4, i32 16)
%2 = inttoptr i64 %1 to float*
store float 1.000000e+00, float* %2
%3 = getelementptr inbounds float, float* %2, i64 1
%4 = getelementptr inbounds float, float* %2, i64 5
%5 = bitcast float* %3 to i8*
store float 1.000000e+00, float* %4
%6 = getelementptr inbounds float, float* %2, i64 6
%7 = getelementptr inbounds float, float* %2, i64 10
%8 = bitcast float* %6 to i8*
store float 1.000000e+00, float* %7
%9 = getelementptr inbounds float, float* %2, i64 11
%10 = getelementptr inbounds float, float* %2, i64 15
%11 = bitcast float* %9 to i8*
store float 1.000000e+00, float* %10
ret float* %2
}