#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*/ vec3_normalize(float const *, float *);
void mat3_normalize_(const float m[3][3], float out[3][3]) {
  int i;
  for (i = 0; i < 3; i++)
    vec3_normalize(m[i], out[i]);
}


x86 assembly (clang, -O0):
<mat3_normalize_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1162 <mat3_normalize_+0x52>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
imul   $0xc,%rax,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
imul   $0xc,%rax,%rax
add    %rax,%rsi
call   1030 <vec3_normalize@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <mat3_normalize_+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3_normalize_>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <vec3_normalize@plt>
lea    0xc(%rbx),%rdi
lea    0xc(%r14),%rsi
call   1030 <vec3_normalize@plt>
add    $0x18,%rbx
add    $0x18,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <vec3_normalize@plt>

LLVM IR (-O0):
define void @mat3_normalize_([3 x float]* %0, [3 x float]* %1) {
%3 = alloca [3 x float]*
%4 = alloca [3 x float]*
%5 = alloca i32
store [3 x float]* %0, [3 x float]** %3
store [3 x float]* %1, [3 x float]** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load [3 x float]*, [3 x float]** %3
%11 = load i32, i32* %5
%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
%15 = load [3 x float]*, [3 x float]** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 %17
%19 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 0, i64 0
%20 = call i32 @vec3_normalize(float* %14, float* %19)
br label %21
21: ; preds = %9
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mat3_normalize_([3 x float]* %0, [3 x float]* %1) {
%3 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 0, i64 0
%4 = getelementptr inbounds [3 x float], [3 x float]* %1, i64 0, i64 0
%5 = tail call i32 @vec3_normalize(float* %3, float* %4)
%6 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 0
%7 = getelementptr inbounds [3 x float], [3 x float]* %1, i64 1, i64 0
%8 = tail call i32 @vec3_normalize(float* %6, float* %7)
%9 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 0
%10 = getelementptr inbounds [3 x float], [3 x float]* %1, i64 2, i64 0
%11 = tail call i32 @vec3_normalize(float* %9, float* %10)
ret void
}