#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 atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "\n[ERROR] - Debe introducir introducir dimension. \n");
    exit(-1);
  }
  int i, k, N = atoi(argv[1]), VR[N], M[N][N], V[N];
  if (N > 4094) {
    fprintf(stderr, "\n[ERROR] - El tamaño maximo permitido para filas y "
                    "columnas es 4094. \n");
    exit(-1);
  }
  printf("\nInicializando vector...");
#pragma omp parallel for
  for (i = 0; i < N; i++) {
    printf("\nHebra %d: VR[%d], V[%d]", 0, i, i);
    VR[i] = 0;
    V[i] = i + 2;
  }
  printf("\n\nValores vector: ");
  for (i = 0; i < N; i++)
    printf("[%d]", V[i]);
  printf("\n\nInicializando matriz...");
  for (i = 0; i < N; i++) {
#pragma omp parallel for lastprivate(k)
    for (k = 0; k < N; k++) {
      printf("\nHebra %d, componente[%d][%d]", 0, i, k);
      M[i][k] = i + k + 1;
    }
  }
  printf("\n\nValores matriz: ");
  for (i = 0; i < N; i++) {
    printf("\n");
    for (k = 0; k < N; k++) {
      M[i][k] = i + k + 1;
      printf("[%d]", M[i][k]);
    }
  }
  printf("\n\nCalculando producto...");
  for (i = 0; i < N; i++) {
#pragma omp parallel for lastprivate(k)
    for (k = 0; k < N; k++) {
      VR[i] += M[i][k] * V[k];
      printf("\nHebra %d, componente %d, operacion %d: ->[%d]", 0, i, k, VR[i]);
    }
  }
  printf("\n\nValor primera componente resultado: %d", VR[0]);
  printf("\nValor ultima componente resultado: %d", VR[N - 1]);
  printf("\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    117f <main+0x3f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rax,-0x60(%rbp)
mov    %rax,%rcx
imul   %rcx,%rcx
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
cmpl   $0xffe,-0x1c(%rbp)
jle    1231 <main+0xf1>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
lea    0xe11(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1296 <main+0x156>
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe35(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rcx
mov    -0x50(%rbp),%rax
movslq -0x14(%rbp),%rdx
movl   $0x0,(%rcx,%rdx,4)
mov    -0x14(%rbp),%edx
add    $0x2,%edx
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1246 <main+0x106>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12de <main+0x19e>
mov    -0x50(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12ab <main+0x16b>
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1370 <main+0x230>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    135d <main+0x21d>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xdbb(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rsi
mov    -0x58(%rbp),%rax
mov    -0x14(%rbp),%edx
add    -0x18(%rbp),%edx
add    $0x1,%edx
movslq -0x14(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1306 <main+0x1c6>
jmp    1362 <main+0x222>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12f3 <main+0x1b3>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1421 <main+0x2e1>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    140e <main+0x2ce>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
mov    -0x14(%rbp),%edi
add    -0x18(%rbp),%edi
add    $0x1,%edi
movslq -0x14(%rbp),%rsi
imul   %rdx,%rsi
shl    $0x2,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
movslq -0x18(%rbp),%rsi
mov    %edi,(%rcx,%rsi,4)
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13a6 <main+0x266>
jmp    1413 <main+0x2d3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1385 <main+0x245>
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14cc <main+0x38c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14b9 <main+0x379>
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%rdx
mov    -0x60(%rbp),%rdi
movslq -0x14(%rbp),%rsi
imul   %rdi,%rsi
shl    $0x2,%rsi
add    %rsi,%rdx
movslq -0x18(%rbp),%rsi
mov    (%rdx,%rsi,4),%edx
movslq -0x18(%rbp),%rsi
imul   (%rcx,%rsi,4),%edx
movslq -0x14(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
movslq -0x14(%rbp),%rsi
mov    (%rax,%rsi,4),%r8d
lea    0xc82(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1449 <main+0x309>
jmp    14be <main+0x37e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1436 <main+0x2f6>
mov    -0x68(%rbp),%rax
mov    (%rax),%esi
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x1,%edi
jle    1487 <main+0x327>
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%r13d
mov    %rsp,%r12
lea    0xf(,%r13,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r12
mov    %r12,%rsp
mov    %r13,%rdx
imul   %r13,%rdx
mov    %rsp,%rsi
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%rsi
mov    %rsi,-0x40(%rbp)
mov    %rsi,%rsp
mov    %rsp,%r15
sub    %rcx,%r15
mov    %r15,%rsp
cmp    $0xfff,%eax
jge    1499 <main+0x339>
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    140a <main+0x2aa>
lea    0xea7(%rip),%r14
xor    %ebx,%ebx
nop
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,(%r12,%rbx,4)
lea    0x2(%rbx),%eax
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    11f0 <main+0x90>
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    1418 <main+0x2b8>
lea    0xf18(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1240 <main+0xe0>
lea    0xe62(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    1426 <main+0x2c6>
mov    %r15,-0x60(%rbp)
mov    %r12,-0x48(%rbp)
mov    %r13,-0x38(%rbp)
lea    0x0(,%r13,4),%rax
mov    %rax,-0x50(%rbp)
mov    $0x1,%r13d
lea    0xe47(%rip),%r12
mov    -0x40(%rbp),%r15
xor    %edx,%edx
mov    -0x38(%rbp),%r14
nopl   (%rax)
mov    %rdx,-0x30(%rbp)
add    $0x1,%rdx
mov    %rdx,-0x58(%rbp)
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r12,%rdi
xor    %esi,%esi
mov    -0x30(%rbp),%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rbx,%r13,1),%eax
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    12b0 <main+0x150>
add    -0x50(%rbp),%r15
add    $0x1,%r13
mov    -0x58(%rbp),%rdx
cmp    %r14,%rdx
jne    12a0 <main+0x140>
lea    0xe0d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x38(%rbp),%r13
test   %r13d,%r13d
mov    -0x48(%rbp),%r12
jle    1434 <main+0x2d4>
mov    $0x1,%r15d
lea    0xe3e(%rip),%r14
mov    -0x40(%rbp),%r13
xor    %ebx,%ebx
mov    -0x38(%rbp),%r12
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
mov    %rbx,-0x30(%rbp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%r15,%rbx,1),%esi
mov    %esi,0x0(%r13,%rbx,4)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1340 <main+0x1e0>
add    -0x50(%rbp),%r13
add    $0x1,%r15
mov    -0x30(%rbp),%rbx
cmp    %r12,%rbx
jne    1320 <main+0x1c0>
lea    0xd97(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x38(%rbp),%r13
test   %r13d,%r13d
mov    -0x48(%rbp),%r12
mov    -0x40(%rbp),%rcx
jle    1442 <main+0x2e2>
lea    0xd8d(%rip),%r14
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
nopl   (%rax)
mov    -0x30(%rbp),%rax
mov    (%r12,%rax,4),%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    -0x60(%rbp),%rax
mov    (%rax,%rbx,4),%eax
imul   (%rcx,%rbx,4),%eax
add    %eax,%r12d
mov    %r14,%rdi
xor    %esi,%esi
mov    -0x30(%rbp),%rdx
mov    %r13,%r15
mov    %rcx,%r13
mov    %ebx,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rcx
mov    %r15,%r13
add    $0x1,%rbx
cmp    %rbx,%r15
jne    13b0 <main+0x250>
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%rdx
mov    %r12d,(%rax,%rdx,4)
mov    %rax,%r12
add    $0x1,%rdx
add    -0x50(%rbp),%rcx
mov    %rdx,-0x30(%rbp)
cmp    %r13,%rdx
jne    13a0 <main+0x240>
jmp    1442 <main+0x2e2>
lea    0xc9c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xca1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xccb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcd0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%esi
lea    0xd06(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq %r13d,%rax
mov    -0x4(%r12,%rax,4),%esi
lea    0xd19(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc08(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b52(%rip),%rax
mov    (%rax),%edi
lea    0xb69(%rip),%rsi
jmp    14a9 <main+0x349>
mov    0x2b40(%rip),%rax
mov    (%rax),%edi
lea    0xb8a(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"\0A[ERROR] - Debe introducir introducir dimension. \0A\00"
@.str.1 = [72 x i8] c"\0A[ERROR] - El tama\C3\B1o maximo permitido para filas y columnas es 4094. \0A\00"
@.str.2 = [25 x i8] c"\0AInicializando vector...\00"
@.str.3 = [25 x i8] c"\0AHebra %d: VR[%d], V[%d]\00"
@.str.4 = [19 x i8] c"\0A\0AValores vector: \00"
@.str.5 = [5 x i8] c"[%d]\00"
@.str.6 = [26 x i8] c"\0A\0AInicializando matriz...\00"
@.str.7 = [30 x i8] c"\0AHebra %d, componente[%d][%d]\00"
@.str.8 = [19 x i8] c"\0A\0AValores matriz: \00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [25 x i8] c"\0A\0ACalculando producto...\00"
@.str.11 = [47 x i8] c"\0AHebra %d, componente %d, operacion %d: ->[%d]\00"
@.str.12 = [41 x i8] c"\0A\0AValor primera componente resultado: %d\00"
@.str.13 = [39 x i8] c"\0AValor ultima componente resultado: %d\00"
@.str.14 = [3 x i8] c"\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 -1)
unreachable
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
store i32 %24, i32* %8
%25 = load i32, i32* %8
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %9
%28 = alloca i32, i64 %26
store i64 %26, i64* %10
%29 = load i32, i32* %8
%30 = zext i32 %29 to i64
%31 = load i32, i32* %8
%32 = zext i32 %31 to i64
%33 = mul nuw i64 %30, %32
%34 = alloca i32, i64 %33
store i64 %30, i64* %11
store i64 %32, i64* %12
%35 = load i32, i32* %8
%36 = zext i32 %35 to i64
%37 = alloca i32, i64 %36
store i64 %36, i64* %13
%38 = load i32, i32* %8
%39 = icmp sgt i32 %38, 4094
br i1 %39, label %40, label %44
40: ; preds = %20
%41 = load i32, i32* @stderr
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%43 = call i32 @exit(i32 -1)
unreachable
44: ; preds = %20
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %46
46: ; preds = %62, %44
%47 = load i32, i32* %6
%48 = load i32, i32* %8
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %65
50: ; preds = %46
%51 = load i32, i32* %6
%52 = load i32, i32* %6
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %51, i32 %52)
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i32, i32* %28, i64 %55
store i32 0, i32* %56
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 2
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i32, i32* %37, i64 %60
store i32 %58, i32* %61
br label %62
62: ; preds = %50
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %46
65: ; preds = %46
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %67
67: ; preds = %77, %65
%68 = load i32, i32* %6
%69 = load i32, i32* %8
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %80
71: ; preds = %67
%72 = load i32, i32* %6
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %37, i64 %73
%75 = load i32, i32* %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %71
%78 = load i32, i32* %6
%79 = add nsw i32 %78, 1
store i32 %79, i32* %6
br label %67
80: ; preds = %67
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %82
82: ; preds = %110, %80
%83 = load i32, i32* %6
%84 = load i32, i32* %8
%85 = icmp slt i32 %83, %84
br i1 %85, label %86, label %113
86: ; preds = %82
store i32 0, i32* %7
br label %87
87: ; preds = %106, %86
%88 = load i32, i32* %7
%89 = load i32, i32* %8
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %109
91: ; preds = %87
%92 = load i32, i32* %6
%93 = load i32, i32* %7
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 %92, i32 %93)
%95 = load i32, i32* %6
%96 = load i32, i32* %7
%97 = add nsw i32 %95, %96
%98 = add nsw i32 %97, 1
%99 = load i32, i32* %6
%100 = sext i32 %99 to i64
%101 = mul nsw i64 %100, %32
%102 = getelementptr inbounds i32, i32* %34, i64 %101
%103 = load i32, i32* %7
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %102, i64 %104
store i32 %98, i32* %105
br label %106
106: ; preds = %91
%107 = load i32, i32* %7
%108 = add nsw i32 %107, 1
store i32 %108, i32* %7
br label %87
109: ; preds = %87
br label %110
110: ; preds = %109
%111 = load i32, i32* %6
%112 = add nsw i32 %111, 1
store i32 %112, i32* %6
br label %82
113: ; preds = %82
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %6
br label %115
115: ; preds = %150, %113
%116 = load i32, i32* %6
%117 = load i32, i32* %8
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %153
119: ; preds = %115
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %7
br label %121
121: ; preds = %146, %119
%122 = load i32, i32* %7
%123 = load i32, i32* %8
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %149
125: ; preds = %121
%126 = load i32, i32* %6
%127 = load i32, i32* %7
%128 = add nsw i32 %126, %127
%129 = add nsw i32 %128, 1
%130 = load i32, i32* %6
%131 = sext i32 %130 to i64
%132 = mul nsw i64 %131, %32
%133 = getelementptr inbounds i32, i32* %34, i64 %132
%134 = load i32, i32* %7
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %133, i64 %135
store i32 %129, i32* %136
%137 = load i32, i32* %6
%138 = sext i32 %137 to i64
%139 = mul nsw i64 %138, %32
%140 = getelementptr inbounds i32, i32* %34, i64 %139
%141 = load i32, i32* %7
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i32, i32* %140, i64 %142
%144 = load i32, i32* %143
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %144)
br label %146
146: ; preds = %125
%147 = load i32, i32* %7
%148 = add nsw i32 %147, 1
store i32 %148, i32* %7
br label %121
149: ; preds = %121
br label %150
150: ; preds = %149
%151 = load i32, i32* %6
%152 = add nsw i32 %151, 1
store i32 %152, i32* %6
br label %115
153: ; preds = %115
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %6
br label %155
155: ; preds = %194, %153
%156 = load i32, i32* %6
%157 = load i32, i32* %8
%158 = icmp slt i32 %156, %157
br i1 %158, label %159, label %197
159: ; preds = %155
store i32 0, i32* %7
br label %160
160: ; preds = %190, %159
%161 = load i32, i32* %7
%162 = load i32, i32* %8
%163 = icmp slt i32 %161, %162
br i1 %163, label %164, label %193
164: ; preds = %160
%165 = load i32, i32* %6
%166 = sext i32 %165 to i64
%167 = mul nsw i64 %166, %32
%168 = getelementptr inbounds i32, i32* %34, i64 %167
%169 = load i32, i32* %7
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i32, i32* %168, i64 %170
%172 = load i32, i32* %171
%173 = load i32, i32* %7
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i32, i32* %37, i64 %174
%176 = load i32, i32* %175
%177 = mul nsw i32 %172, %176
%178 = load i32, i32* %6
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds i32, i32* %28, i64 %179
%181 = load i32, i32* %180
%182 = add nsw i32 %181, %177
store i32 %182, i32* %180
%183 = load i32, i32* %6
%184 = load i32, i32* %7
%185 = load i32, i32* %6
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i32, i32* %28, i64 %186
%188 = load i32, i32* %187
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0), i32 0, i32 %183, i32 %184, i32 %188)
br label %190
190: ; preds = %164
%191 = load i32, i32* %7
%192 = add nsw i32 %191, 1
store i32 %192, i32* %7
br label %160
193: ; preds = %160
br label %194
194: ; preds = %193
%195 = load i32, i32* %6
%196 = add nsw i32 %195, 1
store i32 %196, i32* %6
br label %155
197: ; preds = %155
%198 = getelementptr inbounds i32, i32* %28, i64 0
%199 = load i32, i32* %198
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %199)
%201 = load i32, i32* %8
%202 = sub nsw i32 %201, 1
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds i32, i32* %28, i64 %203
%205 = load i32, i32* %204
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0), i32 %205)
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %3
%208 = load i8*, i8** %9
%209 = load i32, i32* %3
ret i32 %209
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"\0A[ERROR] - Debe introducir introducir dimension. \0A\00"
@.str.1 = [72 x i8] c"\0A[ERROR] - El tama\C3\B1o maximo permitido para filas y columnas es 4094. \0A\00"
@.str.2 = [25 x i8] c"\0AInicializando vector...\00"
@.str.3 = [25 x i8] c"\0AHebra %d: VR[%d], V[%d]\00"
@.str.4 = [19 x i8] c"\0A\0AValores vector: \00"
@.str.5 = [5 x i8] c"[%d]\00"
@.str.6 = [26 x i8] c"\0A\0AInicializando matriz...\00"
@.str.7 = [30 x i8] c"\0AHebra %d, componente[%d][%d]\00"
@.str.8 = [19 x i8] c"\0A\0AValores matriz: \00"
@.str.10 = [25 x i8] c"\0A\0ACalculando producto...\00"
@.str.11 = [47 x i8] c"\0AHebra %d, componente %d, operacion %d: ->[%d]\00"
@.str.12 = [41 x i8] c"\0A\0AValor primera componente resultado: %d\00"
@.str.13 = [39 x i8] c"\0AValor ultima componente resultado: %d\00"
@str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = zext i32 %11 to i64
%13 = alloca i32, i64 %12
%14 = mul nuw i64 %12, %12
%15 = alloca i32, i64 %14
%16 = alloca i32, i64 %12
%17 = icmp sgt i32 %11, 4094
br i1 %17, label %18, label %22
18: ; preds = %8
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @exit(i32 -1)
unreachable
22: ; preds = %8
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp sgt i32 %11, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %46
27: ; preds = %22, %27
%28 = phi i64 [ %35, %27 ], [ 0, %22 ]
%29 = trunc i64 %28 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %29, i32 %29)
%31 = getelementptr inbounds i32, i32* %13, i64 %28
store i32 0, i32* %31
%32 = getelementptr inbounds i32, i32* %16, i64 %28
%33 = trunc i64 %28 to i32
%34 = add i32 %33, 2
store i32 %34, i32* %32
%35 = add nuw nsw i64 %28, 1
%36 = icmp eq i64 %35, %12
br i1 %36, label %37, label %27
37: ; preds = %27
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br i1 %24, label %39, label %46
39: ; preds = %37, %39
%40 = phi i64 [ %44, %39 ], [ 0, %37 ]
%41 = getelementptr inbounds i32, i32* %16, i64 %40
%42 = load i32, i32* %41
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %42)
%44 = add nuw nsw i64 %40, 1
%45 = icmp eq i64 %44, %12
br i1 %45, label %48, label %39
46: ; preds = %25, %37
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %67
48: ; preds = %39
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br i1 %24, label %50, label %67
50: ; preds = %48, %65
%51 = phi i64 [ %52, %65 ], [ 0, %48 ]
%52 = add nuw nsw i64 %51, 1
%53 = mul nuw nsw i64 %51, %12
%54 = getelementptr inbounds i32, i32* %15, i64 %53
%55 = trunc i64 %51 to i32
br label %56
56: ; preds = %50, %56
%57 = phi i64 [ 0, %50 ], [ %63, %56 ]
%58 = trunc i64 %57 to i32
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 %55, i32 %58)
%60 = add nuw nsw i64 %52, %57
%61 = getelementptr inbounds i32, i32* %54, i64 %57
%62 = trunc i64 %60 to i32
store i32 %62, i32* %61
%63 = add nuw nsw i64 %57, 1
%64 = icmp eq i64 %63, %12
br i1 %64, label %65, label %56
65: ; preds = %56
%66 = icmp eq i64 %52, %12
br i1 %66, label %69, label %50
67: ; preds = %46, %48
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %87
69: ; preds = %65
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br i1 %24, label %71, label %87
71: ; preds = %69, %85
%72 = phi i64 [ %74, %85 ], [ 0, %69 ]
%73 = tail call i32 @putchar(i32 10)
%74 = add nuw nsw i64 %72, 1
%75 = mul nuw nsw i64 %72, %12
%76 = getelementptr inbounds i32, i32* %15, i64 %75
br label %77
77: ; preds = %71, %77
%78 = phi i64 [ 0, %71 ], [ %83, %77 ]
%79 = add nuw nsw i64 %74, %78
%80 = getelementptr inbounds i32, i32* %76, i64 %78
%81 = trunc i64 %79 to i32
store i32 %81, i32* %80
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %81)
%83 = add nuw nsw i64 %78, 1
%84 = icmp eq i64 %83, %12
br i1 %84, label %85, label %77
85: ; preds = %77
%86 = icmp eq i64 %74, %12
br i1 %86, label %89, label %71
87: ; preds = %67, %69
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
br label %114
89: ; preds = %85
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
br i1 %24, label %91, label %114
91: ; preds = %89, %111
%92 = phi i64 [ %112, %111 ], [ 0, %89 ]
%93 = mul nuw nsw i64 %92, %12
%94 = getelementptr inbounds i32, i32* %15, i64 %93
%95 = getelementptr inbounds i32, i32* %13, i64 %92
%96 = load i32, i32* %95
%97 = trunc i64 %92 to i32
br label %98
98: ; preds = %91, %98
%99 = phi i64 [ 0, %91 ], [ %109, %98 ]
%100 = phi i32 [ %96, %91 ], [ %106, %98 ]
%101 = getelementptr inbounds i32, i32* %94, i64 %99
%102 = load i32, i32* %101
%103 = getelementptr inbounds i32, i32* %16, i64 %99
%104 = load i32, i32* %103
%105 = mul nsw i32 %104, %102
%106 = add nsw i32 %100, %105
%107 = trunc i64 %99 to i32
%108 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0), i32 0, i32 %97, i32 %107, i32 %106)
%109 = add nuw nsw i64 %99, 1
%110 = icmp eq i64 %109, %12
br i1 %110, label %111, label %98
111: ; preds = %98
store i32 %106, i32* %95
%112 = add nuw nsw i64 %92, 1
%113 = icmp eq i64 %112, %12
br i1 %113, label %114, label %91
114: ; preds = %111, %87, %89
%115 = load i32, i32* %13
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %115)
%117 = add nsw i32 %11, -1
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %13, i64 %118
%120 = load i32, i32* %119
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0), i32 %120)
%122 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}