#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 int8_t;

/* Variables and functions */
void f3x3matrixAeqI(float A[][3]) {
  float *pAij;
  int8_t i, j;
  for (i = 0; i < 3; i++) {
    pAij = A[i];
    for (j = 0; j < 3; j++) {
      *(pAij++) = 0.0F;
    }
    A[i][i] = 1.0F;
  }
}


x86 assembly (clang, -O0):
<f3x3matrixAeqI>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    118f <f3x3matrixAeqI+0x8f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1161 <f3x3matrixAeqI+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1133 <f3x3matrixAeqI+0x33>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movss  0xe84(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <f3x3matrixAeqI+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3x3matrixAeqI>:
xorps  %xmm0,%xmm0
movups %xmm0,0x4(%rdi)
movl   $0x3f800000,(%rdi)
movl   $0x0,0x14(%rdi)
movl   $0x3f800000,0x10(%rdi)
movq   $0x0,0x18(%rdi)
movl   $0x3f800000,0x20(%rdi)
ret

LLVM IR (-O0):
define void @f3x3matrixAeqI([3 x float]* %0) {
%2 = alloca [3 x float]*
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store [3 x float]* %0, [3 x float]** %2
store i32 0, i32* %4
br label %6
6: ; preds = %32, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %35
9: ; preds = %6
%10 = load [3 x float]*, [3 x float]** %2
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 %12
%14 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 0
store float* %14, float** %3
store i32 0, i32* %5
br label %15
15: ; preds = %21, %9
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i32 1
store float* %20, float** %3
store float 0.000000e+00, float* %19
br label %21
21: ; preds = %18
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %15
24: ; preds = %15
%25 = load [3 x float]*, [3 x float]** %2
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3 x float], [3 x float]* %25, i64 %27
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [3 x float], [3 x float]* %28, i64 0, i64 %30
store float 1.000000e+00, float* %31
br label %32
32: ; preds = %24
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %6
35: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @f3x3matrixAeqI([3 x float]* nocapture writeonly %0) {
%2 = getelementptr [3 x float], [3 x float]* %0, i64 0, i64 0
%3 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 1
%4 = bitcast float* %3 to i64*
store i64 0, i64* %4
store float 1.000000e+00, float* %2
%5 = getelementptr [3 x float], [3 x float]* %0, i64 1, i64 0
%6 = bitcast float* %5 to i8*
%7 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
store float 1.000000e+00, float* %7
%8 = getelementptr [3 x float], [3 x float]* %0, i64 2, i64 0
%9 = bitcast float* %8 to i64*
store i64 0, i64* %9
%10 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
store float 1.000000e+00, float* %10
ret void
}