#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*/ show(double *, int, int);
int /*<<< orphan*/ vectores(double *, int, int, int);
void main() {
  int j;
  double A[4][3] = {{-1, -1, 1}, {1, 3, 3}, {-1, -1, 5}, {1, 3, 7}};
  show((double *)A, 4, 3);
  for (j = 0; j < 3; j++) {
    vectores((double *)A, 4, 3, j);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x60,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
call   1030 <show@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    1195 <main+0x65>
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x4,%esi
mov    $0x3,%edx
call   1040 <vectores@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <main+0x37>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movaps 0xf24(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
call   1030 <show@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1040 <vectores@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1040 <vectores@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1040 <vectores@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.A = [4 x [3 x double]] [[3 x double] [double -1.000000e+00, double -1.000000e+00, double 1.000000e+00], [3 x double] [double 1.000000e+00, double 3.000000e+00, double 3.000000e+00], [3 x double] [double -1.000000e+00, double -1.000000e+00, double 5.000000e+00], [3 x double] [double 1.000000e+00, double 3.000000e+00, double 7.000000e+00]]
define void @main() {
%1 = alloca i32
%2 = alloca [4 x [3 x double]]
%3 = bitcast [4 x [3 x double]]* %2 to i8*
%4 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %2, i64 0, i64 0
%5 = bitcast [3 x double]* %4 to double*
%6 = call i32 @show(double* %5, i32 4, i32 3)
store i32 0, i32* %1
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %2, i64 0, i64 0
%12 = bitcast [3 x double]* %11 to double*
%13 = load i32, i32* %1
%14 = call i32 @vectores(double* %12, i32 4, i32 3, i32 %13)
br label %15
15: ; preds = %10
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %7
18: ; preds = %7
ret void
}

LLVM IR (-O2):
@__const.main.A = [4 x [3 x double]] [[3 x double] [double -1.000000e+00, double -1.000000e+00, double 1.000000e+00], [3 x double] [double 1.000000e+00, double 3.000000e+00, double 3.000000e+00], [3 x double] [double -1.000000e+00, double -1.000000e+00, double 5.000000e+00], [3 x double] [double 1.000000e+00, double 3.000000e+00, double 7.000000e+00]]
define void @main() {
%1 = alloca [4 x [3 x double]]
%2 = bitcast [4 x [3 x double]]* %1 to i8*
%3 = getelementptr inbounds [4 x [3 x double]], [4 x [3 x double]]* %1, i64 0, i64 0, i64 0
%4 = call i32 @show(double* %3, i32 4, i32 3)
%5 = call i32 @vectores(double* %3, i32 4, i32 3, i32 0)
%6 = call i32 @vectores(double* %3, i32 4, i32 3, i32 1)
%7 = call i32 @vectores(double* %3, i32 4, i32 3, i32 2)
ret void
}