#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], producto = 0;
  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 reduction(+ : producto)
  for (i = 0; i < N; i++) {
    producto = 0;
    printf("\nHebra %d calcula componente %d: ", omp_get_thread_num(), i);
    for (k = 0; k < N; k++) {
      producto += M[i][k] * V[k];
      printf("->[%d]", producto);
    }
    VR[i] = producto;
  }
  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,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rax,-0x68(%rbp)
mov    %rax,%rcx
imul   %rcx,%rcx
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%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,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0xffe,-0x1c(%rbp)
jle    1248 <main+0xf8>
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12b4 <main+0x164>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rcx
mov    -0x58(%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    125d <main+0x10d>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12fc <main+0x1ac>
mov    -0x58(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c9 <main+0x179>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13b9 <main+0x269>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13a6 <main+0x256>
mov    -0x60(%rbp),%rax
mov    -0x68(%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    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    133e <main+0x1ee>
jmp    13ab <main+0x25b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1311 <main+0x1c1>
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1479 <main+0x329>
movl   $0x0,-0x4c(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    145d <main+0x30d>
mov    -0x58(%rbp),%rcx
mov    -0x60(%rbp),%rax
mov    -0x68(%rbp),%rsi
movslq -0x14(%rbp),%rdx
imul   %rsi,%rdx
shl    $0x2,%rdx
add    %rdx,%rax
movslq -0x18(%rbp),%rdx
mov    (%rax,%rdx,4),%eax
movslq -0x18(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%esi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1402 <main+0x2b2>
mov    -0x70(%rbp),%rax
mov    -0x4c(%rbp),%edx
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13ce <main+0x27e>
mov    -0x70(%rbp),%rax
mov    (%rax),%esi
lea    0xcab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xccf(%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    %rbx,-0x38(%rbp)
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %ebx,%ebx
xor    %r14d,%r14d
mov    -0x30(%rbp),%r15
mov    -0x58(%rbp),%r12
lea    0xdd9(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
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
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 -1)
unreachable
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @atoi(i8* %24)
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = zext i32 %26 to i64
%28 = call i8* @llvm.stacksave()
store i8* %28, i8** %9
%29 = alloca i32, i64 %27
store i64 %27, i64* %10
%30 = load i32, i32* %8
%31 = zext i32 %30 to i64
%32 = load i32, i32* %8
%33 = zext i32 %32 to i64
%34 = mul nuw i64 %31, %33
%35 = alloca i32, i64 %34
store i64 %31, i64* %11
store i64 %33, i64* %12
%36 = load i32, i32* %8
%37 = zext i32 %36 to i64
%38 = alloca i32, i64 %37
store i64 %37, i64* %13
store i32 0, i32* %14
%39 = load i32, i32* %8
%40 = icmp sgt i32 %39, 4094
br i1 %40, label %41, label %45
41: ; preds = %21
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%44 = call i32 @exit(i32 -1)
unreachable
45: ; preds = %21
%46 = 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 %47
47: ; preds = %64, %45
%48 = load i32, i32* %6
%49 = load i32, i32* %8
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %67
51: ; preds = %47
%52 = call i32 (...) @omp_get_thread_num()
%53 = load i32, i32* %6
%54 = load i32, i32* %6
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %52, i32 %53, i32 %54)
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %29, i64 %57
store i32 0, i32* %58
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 2
%61 = load i32, i32* %6
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %38, i64 %62
store i32 %60, i32* %63
br label %64
64: ; preds = %51
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %47
67: ; preds = %47
%68 = 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 %69
69: ; preds = %79, %67
%70 = load i32, i32* %6
%71 = load i32, i32* %8
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %82
73: ; preds = %69
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %38, i64 %75
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %77)
br label %79
79: ; preds = %73
%80 = load i32, i32* %6
%81 = add nsw i32 %80, 1
store i32 %81, i32* %6
br label %69
82: ; preds = %69
%83 = 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 %84
84: ; preds = %121, %82
%85 = load i32, i32* %6
%86 = load i32, i32* %8
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %124
88: ; preds = %84
%89 = call i32 (...) @omp_get_thread_num()
%90 = load i32, i32* %6
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %89, i32 %90)
store i32 0, i32* %7
br label %92
92: ; preds = %117, %88
%93 = load i32, i32* %7
%94 = load i32, i32* %8
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %120
96: ; preds = %92
%97 = load i32, i32* %6
%98 = load i32, i32* %7
%99 = add nsw i32 %97, %98
%100 = add nsw i32 %99, 1
%101 = load i32, i32* %6
%102 = sext i32 %101 to i64
%103 = mul nsw i64 %102, %33
%104 = getelementptr inbounds i32, i32* %35, i64 %103
%105 = load i32, i32* %7
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i32, i32* %104, i64 %106
store i32 %100, i32* %107
%108 = load i32, i32* %6
%109 = sext i32 %108 to i64
%110 = mul nsw i64 %109, %33
%111 = getelementptr inbounds i32, i32* %35, i64 %110
%112 = load i32, i32* %7
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i32, i32* %111, i64 %113
%115 = load i32, i32* %114
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %115)
br label %117
117: ; preds = %96
%118 = load i32, i32* %7
%119 = add nsw i32 %118, 1
store i32 %119, i32* %7
br label %92
120: ; preds = %92
br label %121
121: ; preds = %120
%122 = load i32, i32* %6
%123 = add nsw i32 %122, 1
store i32 %123, i32* %6
br label %84
124: ; preds = %84
%125 = 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 %126
126: ; preds = %164, %124
%127 = load i32, i32* %6
%128 = load i32, i32* %8
%129 = icmp slt i32 %127, %128
br i1 %129, label %130, label %167
130: ; preds = %126
store i32 0, i32* %14
%131 = call i32 (...) @omp_get_thread_num()
%132 = load i32, i32* %6
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %131, i32 %132)
store i32 0, i32* %7
br label %134
134: ; preds = %156, %130
%135 = load i32, i32* %7
%136 = load i32, i32* %8
%137 = icmp slt i32 %135, %136
br i1 %137, label %138, label %159
138: ; preds = %134
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = mul nsw i64 %140, %33
%142 = getelementptr inbounds i32, i32* %35, i64 %141
%143 = load i32, i32* %7
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i32, i32* %142, i64 %144
%146 = load i32, i32* %145
%147 = load i32, i32* %7
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i32, i32* %38, i64 %148
%150 = load i32, i32* %149
%151 = mul nsw i32 %146, %150
%152 = load i32, i32* %14
%153 = add nsw i32 %152, %151
store i32 %153, i32* %14
%154 = load i32, i32* %14
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %154)
br label %156
156: ; preds = %138
%157 = load i32, i32* %7
%158 = add nsw i32 %157, 1
store i32 %158, i32* %7
br label %134
159: ; preds = %134
%160 = load i32, i32* %14
%161 = load i32, i32* %6
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i32, i32* %29, i64 %162
store i32 %160, i32* %163
br label %164
164: ; preds = %159
%165 = load i32, i32* %6
%166 = add nsw i32 %165, 1
store i32 %166, i32* %6
br label %126
167: ; preds = %126
%168 = getelementptr inbounds i32, i32* %29, i64 0
%169 = load i32, i32* %168
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i32 %169)
%171 = load i32, i32* %8
%172 = sub nsw i32 %171, 1
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i32, i32* %29, i64 %173
%175 = load i32, i32* %174
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i32 %175)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %3
%178 = load i8*, i8** %9
%179 = load i32, i32* %3
ret i32 %179
}

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 %96
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 %96
73: ; preds = %71, %92
%74 = phi i64 [ %94, %92 ], [ 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
br label %80
80: ; preds = %73, %80
%81 = phi i64 [ 0, %73 ], [ %90, %80 ]
%82 = phi i32 [ 0, %73 ], [ %88, %80 ]
%83 = getelementptr inbounds i32, i32* %79, i64 %81
%84 = load i32, i32* %83
%85 = getelementptr inbounds i32, i32* %16, i64 %81
%86 = load i32, i32* %85
%87 = mul nsw i32 %86, %84
%88 = add nsw i32 %87, %82
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %88)
%90 = add nuw nsw i64 %81, 1
%91 = icmp eq i64 %90, %12
br i1 %91, label %92, label %80
92: ; preds = %80
%93 = getelementptr inbounds i32, i32* %13, i64 %74
store i32 %88, i32* %93
%94 = add nuw nsw i64 %74, 1
%95 = icmp eq i64 %94, %12
br i1 %95, label %96, label %73
96: ; preds = %92, %69, %71
%97 = load i32, i32* %13
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i32 %97)
%99 = add nsw i32 %11, -1
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %13, i64 %100
%102 = load i32, i32* %101
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i32 %102)
%104 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}