#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 */
typedef int GLdouble;

/* Variables and functions */
scalar_t__ malloc(int);
GLdouble *identitatea() {
  GLdouble *mat = (GLdouble *)malloc(sizeof(GLdouble) * 4 * 4);
  mat[0] = 1;
  mat[4] = 0;
  mat[8] = 0;
  mat[12] = 0;
  mat[1] = 0;
  mat[5] = 1;
  mat[9] = 0;
  mat[13] = 0;
  mat[2] = 0;
  mat[6] = 0;
  mat[10] = 1;
  mat[14] = 0;
  mat[3] = 0;
  mat[7] = 0;
  mat[11] = 0;
  mat[15] = 1;
  return mat;
}


x86 assembly (clang, -O0):
<identitatea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x40,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x20(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x30(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x14(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x24(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x34(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x18(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x28(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x38(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x1c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x2c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x3c(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<identitatea>:
push   %rax
mov    $0x40,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movaps 0xee4(%rip),%xmm0
movups %xmm0,0x10(%rax)
movaps 0xee9(%rip),%xmm0
movups %xmm0,0x20(%rax)
movaps 0xeee(%rip),%xmm0
movups %xmm0,0x30(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define i32* @identitatea() {
%1 = tail call i64 @malloc(i32 64)
%2 = inttoptr i64 %1 to i32*
%3 = getelementptr inbounds i32, i32* %2, i64 4
%4 = getelementptr inbounds i32, i32* %2, i64 8
%5 = getelementptr inbounds i32, i32* %2, i64 12
%6 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %6
%7 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 0, i32 0>, <4 x i32>* %7
%8 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 0, i32 0, i32 1, i32 0>, <4 x i32>* %8
%9 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 0, i32 0, i32 0, i32 1>, <4 x i32>* %9
ret i32* %2
}