#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*/ printf(char *, ...);
void ImprimirMatriz(int DIM, float matriz[][DIM]) {
  int linha, coluna;
  for (linha = 0; linha < DIM; linha++) {
    for (coluna = 0; coluna < DIM; coluna++) {
      printf("%f   ", matriz[linha][coluna]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<ImprimirMatriz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11a8 <ImprimirMatriz+0x98>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    118c <ImprimirMatriz+0x7c>
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe89(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1140 <ImprimirMatriz+0x30>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <ImprimirMatriz+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ImprimirMatriz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1192 <ImprimirMatriz+0x72>
mov    %rsi,%rbx
mov    %edi,%r15d
lea    0x0(,%r15,4),%r12
xor    %r13d,%r13d
lea    0xeb9(%rip),%r14
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rbx,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1160 <ImprimirMatriz+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
add    %r12,%rbx
cmp    %r15,%r13
jne    1150 <ImprimirMatriz+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @ImprimirMatriz(i32 %0, float* %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store float* %1, float** %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
store i32 0, i32* %5
br label %9
9: ; preds = %35, %2
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %38
13: ; preds = %9
store i32 0, i32* %6
br label %14
14: ; preds = %30, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %3
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %33
18: ; preds = %14
%19 = load float*, float** %4
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = mul nsw i64 %21, %8
%23 = getelementptr inbounds float, float* %19, i64 %22
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds float, float* %23, i64 %25
%27 = load float, float* %26
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %28)
br label %30
30: ; preds = %18
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %14
33: ; preds = %14
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %9
38: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f \00"
define void @ImprimirMatriz(i32 %0, float* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %21
5: ; preds = %2, %17
%6 = phi i64 [ %19, %17 ], [ 0, %2 ]
%7 = mul nuw nsw i64 %6, %3
%8 = getelementptr inbounds float, float* %1, i64 %7
br label %9
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %15, %9 ]
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %13)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %3
br i1 %16, label %17, label %9
17: ; preds = %9
%18 = tail call i32 @putchar(i32 10)
%19 = add nuw nsw i64 %6, 1
%20 = icmp eq i64 %19, %3
br i1 %20, label %21, label %5
21: ; preds = %17, %2
ret void
}