#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 *, int, int, double);
void imprimeM(double data[10][8]) {
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 8; j++) {
      printf("Datos[%d][%d] es: %f\n", i, j, data[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<imprimeM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1189 <imprimeM+0x79>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1176 <imprimeM+0x66>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <imprimeM+0x24>
jmp    117b <imprimeM+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <imprimeM+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeM>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
add    $0x38,%r14
xor    %ebx,%ebx
lea    0xedb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x38(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <printf@plt>
movsd  -0x30(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
movsd  -0x28(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
movsd  -0x20(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
movsd  -0x18(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
movsd  -0x10(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
movsd  -0x8(%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
movsd  (%r14),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
add    $0x1,%rbx
add    $0x40,%r14
cmp    $0xa,%rbx
jne    1130 <imprimeM+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

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