#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void imprimirMatriz(float *m, int width, int height) {
  int i, j;
  for (j = 0; j < height; j++) {
    for (i = 0; i < width; i++) {
      fprintf(stderr, "%.2f  ", m[j * width + i]);
    }
    fprintf(stderr, "\n");
  }
}


x86 assembly (clang, -O0):
<imprimirMatriz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11ac <imprimirMatriz+0x9c>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1187 <imprimirMatriz+0x77>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8e(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113c <imprimirMatriz+0x2c>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
lea    0xe70(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <imprimirMatriz+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimirMatriz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,0x4(%rsp)
test   %edx,%edx
jle    11b2 <imprimirMatriz+0xa2>
mov    %rdi,%rbx
movslq 0x4(%rsp),%rax
mov    %edx,%ecx
mov    %rcx,0x8(%rsp)
mov    %eax,%r15d
shl    $0x2,%rax
mov    %rax,0x10(%rsp)
mov    0x2e94(%rip),%r14
lea    0xead(%rip),%rbp
xor    %r13d,%r13d
jmp    1181 <imprimirMatriz+0x71>
nopl   0x0(%rax,%rax,1)
mov    (%r14),%edi
lea    0xe9d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%r13
add    0x10(%rsp),%rbx
cmp    0x8(%rsp),%r13
je     11b2 <imprimirMatriz+0xa2>
cmpl   $0x0,0x4(%rsp)
jle    1160 <imprimirMatriz+0x50>
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    (%r14),%edi
movss  (%rbx,%r12,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
add    $0x1,%r12
cmp    %r12,%r15
jne    1190 <imprimirMatriz+0x80>
jmp    1160 <imprimirMatriz+0x50>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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