#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 printMtrFloat(int linha, int coluna, float **mtr) {
  printf("\t");
  for (size_t i = 0; i < coluna; i++) {
    printf("[%d]\t", i);
  }
  printf("\n");
  for (size_t j = 0; j < linha; j++) {
    printf("[%d]\t", j);
    for (size_t i = 0; i < coluna; i++) {
      printf(" %.1f\t", mtr[j][i]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printMtrFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    116c <printMtrFloat+0x5c>
mov    -0x18(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1138 <printMtrFloat+0x28>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x4(%rbp),%rcx
cmp    %rcx,%rax
jae    1215 <printMtrFloat+0x105>
mov    -0x20(%rbp),%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    11f6 <printMtrFloat+0xe6>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11ad <printMtrFloat+0x9d>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1182 <printMtrFloat+0x72>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMtrFloat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r13
mov    %esi,%ebx
mov    %edi,%r15d
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %ebx,0x4(%rsp)
movslq %ebx,%r14
test   %r14d,%r14d
je     1176 <printMtrFloat+0x56>
cmp    $0x2,%r14
mov    $0x1,%ebx
cmovae %r14,%rbx
lea    0xea3(%rip),%r12
xor    %ebp,%ebp
nop
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1160 <printMtrFloat+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r15d,%r15d
je     11f4 <printMtrFloat+0xd4>
cmp    $0x2,%r14
mov    $0x1,%ebx
cmovae %r14,%rbx
movslq %r15d,%r14
lea    0xe6a(%rip),%r12
xor    %ebp,%ebp
jmp    11b3 <printMtrFloat+0x93>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %r14,%rbp
je     11f4 <printMtrFloat+0xd4>
lea    0xe46(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0x4(%rsp)
je     11a0 <printMtrFloat+0x80>
xor    %r15d,%r15d
xchg   %ax,%ax
mov    0x0(%r13,%rbp,8),%rax
movss  (%rax,%r15,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%r15
cmp    %r15,%rbx
jne    11d0 <printMtrFloat+0xb0>
jmp    11a0 <printMtrFloat+0x80>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
@.str.1 = [6 x i8] c"[%d]\09\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c" %.1f\09\00"
define void @printMtrFloat(i32 %0, i32 %1, float** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store float** %2, float*** %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %7
br label %11
11: ; preds = %19, %3
%12 = load i64, i64* %7
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = icmp ult i64 %12, %14
br i1 %15, label %16, label %22
16: ; preds = %11
%17 = load i64, i64* %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %17)
br label %19
19: ; preds = %16
%20 = load i64, i64* %7
%21 = add i64 %20, 1
store i64 %21, i64* %7
br label %11
22: ; preds = %11
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i64 0, i64* %8
br label %24
24: ; preds = %52, %22
%25 = load i64, i64* %8
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = icmp ult i64 %25, %27
br i1 %28, label %29, label %55
29: ; preds = %24
%30 = load i64, i64* %8
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %30)
store i64 0, i64* %9
br label %32
32: ; preds = %47, %29
%33 = load i64, i64* %9
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = icmp ult i64 %33, %35
br i1 %36, label %37, label %50
37: ; preds = %32
%38 = load float**, float*** %6
%39 = load i64, i64* %8
%40 = getelementptr inbounds float*, float** %38, i64 %39
%41 = load float*, float** %40
%42 = load i64, i64* %9
%43 = getelementptr inbounds float, float* %41, i64 %42
%44 = load float, float* %43
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %45)
br label %47
47: ; preds = %37
%48 = load i64, i64* %9
%49 = add i64 %48, 1
store i64 %49, i64* %9
br label %32
50: ; preds = %32
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %52
52: ; preds = %50
%53 = load i64, i64* %8
%54 = add i64 %53, 1
store i64 %54, i64* %8
br label %24
55: ; preds = %24
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"[%d]\09\00"
@.str.3 = [7 x i8] c" %.1f\09\00"
define void @printMtrFloat(i32 %0, i32 %1, float** nocapture %2) {
%4 = tail call i32 @putchar(i32 9)
%5 = sext i32 %1 to i64
%6 = icmp eq i32 %1, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = call i64 @llvm.umax.i64(i64 %5, i64 1)
br label %15
9: ; preds = %15, %3
%10 = tail call i32 @putchar(i32 10)
%11 = icmp eq i32 %0, 0
br i1 %11, label %20, label %12
12: ; preds = %9
%13 = call i64 @llvm.umax.i64(i64 %5, i64 1)
%14 = sext i32 %0 to i64
br label %21
15: ; preds = %7, %15
%16 = phi i64 [ %18, %15 ], [ 0, %7 ]
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %16)
%18 = add nuw i64 %16, 1
%19 = icmp eq i64 %18, %8
br i1 %19, label %9, label %15
20: ; preds = %26, %9
ret void
21: ; preds = %12, %26
%22 = phi i64 [ 0, %12 ], [ %28, %26 ]
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %22)
br i1 %6, label %26, label %24
24: ; preds = %21
%25 = getelementptr inbounds float*, float** %2, i64 %22
br label %30
26: ; preds = %30, %21
%27 = tail call i32 @putchar(i32 10)
%28 = add nuw i64 %22, 1
%29 = icmp eq i64 %28, %14
br i1 %29, label %20, label %21
30: ; preds = %24, %30
%31 = phi i64 [ 0, %24 ], [ %37, %30 ]
%32 = load float*, float** %25
%33 = getelementptr inbounds float, float* %32, i64 %31
%34 = load float, float* %33
%35 = fpext float %34 to double
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %35)
%37 = add nuw i64 %31, 1
%38 = icmp eq i64 %37, %13
br i1 %38, label %26, label %30
}