#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 omp_get_thread_num();
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]", omp_get_thread_num(), 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...");
#pragma omp parallel for
  for (i = 0; i < N; i++) {
    printf("\nHebra %d, fila %d: ", omp_get_thread_num(), i);
    for (k = 0; k < N; k++) {
      M[i][k] = i + k + 1;
      printf("[%d]", M[i][k]);
    }
  }
  printf("\n\nCalculando producto...");
#pragma omp parallel for
  for (i = 0; i < N; i++) {
    printf("\nHebra %d calcula componente %d: ", omp_get_thread_num(), i);
    for (k = 0; k < N; k++) {
      VR[i] += M[i][k] * V[k];
      printf("->[%d]", 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    118f <main+0x3f>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
lea    0xe80(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <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    1241 <main+0xf1>
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
lea    0xe01(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12ad <main+0x15d>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <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    1256 <main+0x106>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12f5 <main+0x1a5>
mov    -0x50(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c2 <main+0x172>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13b2 <main+0x262>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    139f <main+0x24f>
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    0xda2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1337 <main+0x1e7>
jmp    13a4 <main+0x254>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    130a <main+0x1ba>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    146e <main+0x31e>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    145b <main+0x30b>
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)
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13f4 <main+0x2a4>
jmp    1460 <main+0x310>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13c7 <main+0x277>
mov    -0x68(%rbp),%rax
mov    (%rax),%esi
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x68(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1040 <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    141c <main+0x2bc>
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,%rbx
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%rbx
mov    %rbx,%rsp
mov    %rsp,%r15
sub    %rcx,%r15
mov    %r15,%rsp
cmp    $0xfff,%eax
jge    142e <main+0x2ce>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    13ad <main+0x24d>
mov    %rbx,-0x30(%rbp)
lea    0xea7(%rip),%r14
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
mov    %r14,%rdi
mov    %eax,%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    0xe87(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    13bb <main+0x25b>
lea    0xeef(%rip),%r14
xor    %ebx,%ebx
nop
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    13c9 <main+0x269>
mov    %r15,-0x58(%rbp)
mov    %r12,-0x40(%rbp)
lea    0x0(,%r13,4),%rax
mov    %rax,-0x48(%rbp)
mov    $0x1,%r12d
lea    0xe9d(%rip),%rbx
mov    -0x30(%rbp),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
lea    0xe2c(%rip),%rdi
mov    %eax,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
mov    %r15,-0x38(%rbp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%r12,%r15,1),%esi
mov    %esi,(%r14,%r15,4)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r13
jne    12d0 <main+0x170>
add    -0x48(%rbp),%r14
add    $0x1,%r12
mov    -0x38(%rbp),%r15
cmp    %r13,%r15
jne    12a0 <main+0x140>
lea    0xdec(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
mov    -0x40(%rbp),%r12
jle    13d7 <main+0x277>
xor    %ebx,%ebx
mov    %r13,-0x50(%rbp)
nopl   (%rax)
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
lea    0xdda(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,-0x38(%rbp)
mov    (%r12,%rbx,4),%r14d
xor    %ebx,%ebx
mov    -0x30(%rbp),%r15
mov    -0x58(%rbp),%r12
lea    0xdd8(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbx,4),%eax
imul   (%r15,%rbx,4),%eax
add    %eax,%r14d
mov    %r13,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,-0x50(%rbp)
jne    1360 <main+0x200>
mov    -0x40(%rbp),%r12
mov    -0x38(%rbp),%rbx
mov    %r14d,(%r12,%rbx,4)
add    $0x1,%rbx
add    -0x48(%rbp),%r15
mov    %r15,-0x30(%rbp)
mov    -0x50(%rbp),%rax
cmp    %rax,%rbx
mov    %rax,%r13
jne    1320 <main+0x1c0>
jmp    13d7 <main+0x277>
lea    0xcf9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcfe(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd1f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%esi
lea    0xd4f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq %r13d,%rax
mov    -0x4(%r12,%rax,4),%esi
lea    0xd62(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc73(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
lea    0xbd4(%rip),%rsi
jmp    143e <main+0x2de>
mov    0x2bab(%rip),%rax
mov    (%rax),%edi
lea    0xbf5(%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 = [21 x i8] c"\0AHebra %d, fila %d: \00"
@.str.8 = [25 x i8] c"\0A\0ACalculando producto...\00"
@.str.9 = [34 x i8] c"\0AHebra %d calcula componente %d: \00"
@.str.10 = [7 x i8] c"->[%d]\00"
@.str.11 = [41 x i8] c"\0A\0AValor primera componente resultado: %d\00"
@.str.12 = [39 x i8] c"\0AValor ultima componente resultado: %d\00"
@.str.13 = [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 = %63, %44
%47 = load i32, i32* %6
%48 = load i32, i32* %8
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %66
50: ; preds = %46
%51 = call i32 (...) @omp_get_thread_num()
%52 = load i32, i32* %6
%53 = load i32, i32* %6
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %51, i32 %52, i32 %53)
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %28, i64 %56
store i32 0, i32* %57
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 2
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %37, i64 %61
store i32 %59, i32* %62
br label %63
63: ; preds = %50
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %46
66: ; preds = %46
%67 = 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 %68
68: ; preds = %78, %66
%69 = load i32, i32* %6
%70 = load i32, i32* %8
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %81
72: ; preds = %68
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %37, i64 %74
%76 = load i32, i32* %75
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %72
%79 = load i32, i32* %6
%80 = add nsw i32 %79, 1
store i32 %80, i32* %6
br label %68
81: ; preds = %68
%82 = 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 %83
83: ; preds = %120, %81
%84 = load i32, i32* %6
%85 = load i32, i32* %8
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %123
87: ; preds = %83
%88 = call i32 (...) @omp_get_thread_num()
%89 = load i32, i32* %6
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %88, i32 %89)
store i32 0, i32* %7
br label %91
91: ; preds = %116, %87
%92 = load i32, i32* %7
%93 = load i32, i32* %8
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %119
95: ; preds = %91
%96 = load i32, i32* %6
%97 = load i32, i32* %7
%98 = add nsw i32 %96, %97
%99 = add nsw i32 %98, 1
%100 = load i32, i32* %6
%101 = sext i32 %100 to i64
%102 = mul nsw i64 %101, %32
%103 = getelementptr inbounds i32, i32* %34, i64 %102
%104 = load i32, i32* %7
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i32, i32* %103, i64 %105
store i32 %99, i32* %106
%107 = load i32, i32* %6
%108 = sext i32 %107 to i64
%109 = mul nsw i64 %108, %32
%110 = getelementptr inbounds i32, i32* %34, i64 %109
%111 = load i32, i32* %7
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %110, i64 %112
%114 = load i32, i32* %113
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %114)
br label %116
116: ; preds = %95
%117 = load i32, i32* %7
%118 = add nsw i32 %117, 1
store i32 %118, i32* %7
br label %91
119: ; preds = %91
br label %120
120: ; preds = %119
%121 = load i32, i32* %6
%122 = add nsw i32 %121, 1
store i32 %122, i32* %6
br label %83
123: ; preds = %83
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %6
br label %125
125: ; preds = %165, %123
%126 = load i32, i32* %6
%127 = load i32, i32* %8
%128 = icmp slt i32 %126, %127
br i1 %128, label %129, label %168
129: ; preds = %125
%130 = call i32 (...) @omp_get_thread_num()
%131 = load i32, i32* %6
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %130, i32 %131)
store i32 0, i32* %7
br label %133
133: ; preds = %161, %129
%134 = load i32, i32* %7
%135 = load i32, i32* %8
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %164
137: ; preds = %133
%138 = load i32, i32* %6
%139 = sext i32 %138 to i64
%140 = mul nsw i64 %139, %32
%141 = getelementptr inbounds i32, i32* %34, i64 %140
%142 = load i32, i32* %7
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i32, i32* %141, i64 %143
%145 = load i32, i32* %144
%146 = load i32, i32* %7
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32, i32* %37, i64 %147
%149 = load i32, i32* %148
%150 = mul nsw i32 %145, %149
%151 = load i32, i32* %6
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i32, i32* %28, i64 %152
%154 = load i32, i32* %153
%155 = add nsw i32 %154, %150
store i32 %155, i32* %153
%156 = load i32, i32* %6
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i32, i32* %28, i64 %157
%159 = load i32, i32* %158
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %159)
br label %161
161: ; preds = %137
%162 = load i32, i32* %7
%163 = add nsw i32 %162, 1
store i32 %163, i32* %7
br label %133
164: ; preds = %133
br label %165
165: ; preds = %164
%166 = load i32, i32* %6
%167 = add nsw i32 %166, 1
store i32 %167, i32* %6
br label %125
168: ; preds = %125
%169 = getelementptr inbounds i32, i32* %28, i64 0
%170 = load i32, i32* %169
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i32 %170)
%172 = load i32, i32* %8
%173 = sub nsw i32 %172, 1
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i32, i32* %28, i64 %174
%176 = load i32, i32* %175
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i32 %176)
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %3
%179 = load i8*, i8** %9
%180 = load i32, i32* %3
ret i32 %180
}

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 = [21 x i8] c"\0AHebra %d, fila %d: \00"
@.str.8 = [25 x i8] c"\0A\0ACalculando producto...\00"
@.str.9 = [34 x i8] c"\0AHebra %d calcula componente %d: \00"
@.str.10 = [7 x i8] c"->[%d]\00"
@.str.11 = [41 x i8] c"\0A\0AValor primera componente resultado: %d\00"
@.str.12 = [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 %47
27: ; preds = %22, %27
%28 = phi i64 [ %36, %27 ], [ 0, %22 ]
%29 = tail call i32 (...) @omp_get_thread_num()
%30 = trunc i64 %28 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %29, i32 %30, i32 %30)
%32 = getelementptr inbounds i32, i32* %13, i64 %28
store i32 0, i32* %32
%33 = getelementptr inbounds i32, i32* %16, i64 %28
%34 = trunc i64 %28 to i32
%35 = add i32 %34, 2
store i32 %35, i32* %33
%36 = add nuw nsw i64 %28, 1
%37 = icmp eq i64 %36, %12
br i1 %37, label %38, label %27
38: ; preds = %27
%39 = 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 %40, label %47
40: ; preds = %38, %40
%41 = phi i64 [ %45, %40 ], [ 0, %38 ]
%42 = getelementptr inbounds i32, i32* %16, i64 %41
%43 = load i32, i32* %42
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %43)
%45 = add nuw nsw i64 %41, 1
%46 = icmp eq i64 %45, %12
br i1 %46, label %49, label %40
47: ; preds = %25, %38
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %69
49: ; preds = %40
%50 = 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 %51, label %69
51: ; preds = %49, %67
%52 = phi i64 [ %56, %67 ], [ 0, %49 ]
%53 = tail call i32 (...) @omp_get_thread_num()
%54 = trunc i64 %52 to i32
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %53, i32 %54)
%56 = add nuw nsw i64 %52, 1
%57 = mul nuw nsw i64 %52, %12
%58 = getelementptr inbounds i32, i32* %15, i64 %57
br label %59
59: ; preds = %51, %59
%60 = phi i64 [ 0, %51 ], [ %65, %59 ]
%61 = add nuw nsw i64 %56, %60
%62 = getelementptr inbounds i32, i32* %58, i64 %60
%63 = trunc i64 %61 to i32
store i32 %63, i32* %62
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %63)
%65 = add nuw nsw i64 %60, 1
%66 = icmp eq i64 %65, %12
br i1 %66, label %67, label %59
67: ; preds = %59
%68 = icmp eq i64 %56, %12
br i1 %68, label %71, label %51
69: ; preds = %47, %49
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %97
71: ; preds = %67
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br i1 %24, label %73, label %97
73: ; preds = %71, %94
%74 = phi i64 [ %95, %94 ], [ 0, %71 ]
%75 = tail call i32 (...) @omp_get_thread_num()
%76 = trunc i64 %74 to i32
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %75, i32 %76)
%78 = mul nuw nsw i64 %74, %12
%79 = getelementptr inbounds i32, i32* %15, i64 %78
%80 = getelementptr inbounds i32, i32* %13, i64 %74
%81 = load i32, i32* %80
br label %82
82: ; preds = %73, %82
%83 = phi i64 [ 0, %73 ], [ %92, %82 ]
%84 = phi i32 [ %81, %73 ], [ %90, %82 ]
%85 = getelementptr inbounds i32, i32* %79, i64 %83
%86 = load i32, i32* %85
%87 = getelementptr inbounds i32, i32* %16, i64 %83
%88 = load i32, i32* %87
%89 = mul nsw i32 %88, %86
%90 = add nsw i32 %84, %89
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %90)
%92 = add nuw nsw i64 %83, 1
%93 = icmp eq i64 %92, %12
br i1 %93, label %94, label %82
94: ; preds = %82
store i32 %90, i32* %80
%95 = add nuw nsw i64 %74, 1
%96 = icmp eq i64 %95, %12
br i1 %96, label %97, label %73
97: ; preds = %94, %69, %71
%98 = load i32, i32* %13
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i32 %98)
%100 = add nsw i32 %11, -1
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i32, i32* %13, i64 %101
%103 = load i32, i32* %102
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i32 %103)
%105 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}