int main(int argc, char **argv) {
  double resultado;
  unsigned int N = 3, i, j;
  double cgt1, cgt2;
  double ncgt;
  if (argc < 2) {
    printf("Faltan no componentes del vector\n");
    exit(-1);
  }
  N = atoi(argv[1]);
  double **matriz, *v1, *v2;
  v1 = (double *)malloc(N * sizeof(double));
  v2 = (double *)malloc(N * sizeof(double));
  matriz = (double **)malloc(N * sizeof(double *));
  for (i = 0; i < N; i++)
    matriz[i] = (double *)malloc(N * sizeof(double));
#pragma omp parallel
  {
#pragma omp for schedule(runtime)
    for (i = 0; i < N; i++)
      v1[i] = 3;
#pragma omp for schedule(runtime)
    for (i = 0; i < N; i++) {
      for (j = 0; j < N; j++) {
        if (i <= j) {
          matriz[i][j] = 2;
        } else {
          matriz[i][j] = 0;
        }
      }
    }
  }
  cgt1 = omp_get_wtime();
  for (i = 0; i < N; i++) {
    resultado = 0;
#pragma omp parallel for reduction(+ : resultado) schedule(runtime)
    for (j = 0; j < N; j++) {
      if (i <= j) {
        resultado += (matriz[i][j] * v1[j]);
      }
    }
    v2[i] = resultado;
  }
  cgt2 = omp_get_wtime();
  ncgt = cgt2 - cgt1;
  printf("Tiempo(seg.):%11.9f\t / Tamaño Vectores:%u\n", ncgt, N);
  printf("Primer componente del vector resultadoado [%f] y el ultimo "
         "componente del vector resultadoado [%f]\n",
         v2[0], v2[N - 1]);
  free(v1);
  free(v2);
  for (i = 0; i < N; i++)
    free(matriz[i]);
  free(matriz);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    119f <main+0x3f>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1070 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1224 <main+0xc4>
mov    -0x1c(%rbp),%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,%rdx
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11ee <main+0x8e>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1259 <main+0xf9>
mov    -0x50(%rbp),%rax
mov    -0x20(%rbp),%ecx
movsd  0xdc2(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    122b <main+0xcb>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    12e7 <main+0x187>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    12d4 <main+0x174>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
ja     12ab <main+0x14b>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x24(%rbp),%ecx
movsd  0xd5f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12c1 <main+0x161>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x24(%rbp),%ecx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12c6 <main+0x166>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1273 <main+0x113>
jmp    12d9 <main+0x179>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1260 <main+0x100>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1394 <main+0x234>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1375 <main+0x215>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
ja     1362 <main+0x202>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x24(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x24(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1367 <main+0x207>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1319 <main+0x1b9>
movsd  -0x18(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x20(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12fe <main+0x19e>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
lea    0xc70(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm1
lea    0xc75(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1433 <main+0x2d3>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1409 <main+0x2a9>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jle    158e <main+0x41e>
mov    0x8(%rsi),%rdi
xor    %eax,%eax
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    %eax,%r14d
lea    0x0(,%r14,8),%rbx
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%r15
test   %ebp,%ebp
je     1422 <main+0x2b2>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11d0 <main+0x60>
test   %r14,%r14
je     1422 <main+0x2b2>
cmp    $0x4,%r14d
jae    11fb <main+0x8b>
xor    %eax,%eax
jmp    1309 <main+0x199>
mov    %r14d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    1222 <main+0xb2>
xor    %esi,%esi
jmp    12c6 <main+0x156>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movapd 0xdd0(%rip),%xmm0
movupd %xmm0,0x0(%r13,%rsi,8)
movupd %xmm0,0x10(%r13,%rsi,8)
movupd %xmm0,0x20(%r13,%rsi,8)
movupd %xmm0,0x30(%r13,%rsi,8)
movupd %xmm0,0x40(%r13,%rsi,8)
movupd %xmm0,0x50(%r13,%rsi,8)
movupd %xmm0,0x60(%r13,%rsi,8)
movupd %xmm0,0x70(%r13,%rsi,8)
movupd %xmm0,0x80(%r13,%rsi,8)
movupd %xmm0,0x90(%r13,%rsi,8)
movupd %xmm0,0xa0(%r13,%rsi,8)
movupd %xmm0,0xb0(%r13,%rsi,8)
movupd %xmm0,0xc0(%r13,%rsi,8)
movupd %xmm0,0xd0(%r13,%rsi,8)
movupd %xmm0,0xe0(%r13,%rsi,8)
movupd %xmm0,0xf0(%r13,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    1230 <main+0xc0>
test   %rcx,%rcx
je     1304 <main+0x194>
lea    0x10(,%rsi,8),%rdx
add    %r13,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movapd 0xd1c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    12f0 <main+0x180>
cmp    %r14,%rax
je     132e <main+0x1be>
movabs $0x4008000000000000,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,0x0(%r13,%rax,8)
add    $0x1,%rax
cmp    %rax,%r14
jne    1320 <main+0x1b0>
test   %r14,%r14
je     1422 <main+0x2b2>
lea    -0x1(%r14),%rbx
mov    %r14d,%ebp
and    $0x3,%ebp
mov    %r14d,%ecx
and    $0xfffffffc,%ecx
xor    %edx,%edx
movsd  0xcbf(%rip),%xmm0
jmp    136d <main+0x1fd>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rdx
cmp    %r14,%rdx
je     14bb <main+0x34b>
cmp    $0x3,%rbx
jae    13b0 <main+0x240>
xor    %esi,%esi
test   %rbp,%rbp
je     1360 <main+0x1f0>
mov    (%r15,%rdx,8),%rdi
mov    %rbp,%rax
jmp    139f <main+0x22f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm1,(%rdi,%rsi,8)
add    $0x1,%rsi
add    $0xffffffffffffffff,%rax
je     1360 <main+0x1f0>
xorpd  %xmm1,%xmm1
cmp    %rsi,%rdx
ja     1390 <main+0x220>
movapd %xmm0,%xmm1
jmp    1390 <main+0x220>
xchg   %ax,%ax
mov    (%r15,%rdx,8),%rdi
xor    %esi,%esi
jmp    13cf <main+0x25f>
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0x18(%rdi,%rsi,8)
add    $0x4,%rsi
cmp    %rcx,%rsi
je     1375 <main+0x205>
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmp    %rsi,%rdx
ja     13e0 <main+0x270>
movapd %xmm0,%xmm2
movsd  %xmm2,(%rdi,%rsi,8)
lea    0x1(%rsi),%rax
xorpd  %xmm2,%xmm2
cmp    %rax,%rdx
ja     13f6 <main+0x286>
movapd %xmm0,%xmm2
movsd  %xmm2,0x8(%rdi,%rsi,8)
lea    0x2(%rsi),%rax
xorpd  %xmm2,%xmm2
cmp    %rax,%rdx
ja     140d <main+0x29d>
movapd %xmm0,%xmm2
movsd  %xmm2,0x10(%rdi,%rsi,8)
lea    0x3(%rsi),%rax
cmp    %rax,%rdx
ja     13c0 <main+0x250>
movapd %xmm0,%xmm1
jmp    13c0 <main+0x250>
xor    %eax,%eax
call   1050 <omp_get_wtime@plt>
lea    -0x1(%r14),%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <omp_get_wtime@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  (%rsp),%xmm0
lea    0xbc5(%rip),%rdi
mov    %r14d,%esi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  (%r12),%xmm0
movsd  (%r12,%rbx,8),%xmm1
lea    0xbd4(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
cmp    $0x1,%r14d
jb     14a2 <main+0x332>
xor    %ebx,%ebx
nop
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1490 <main+0x320>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1050 <omp_get_wtime@plt>
test   %r14,%r14
je     1429 <main+0x2b9>
mov    %r14d,%ecx
and    $0xfffffffe,%ecx
xor    %edx,%edx
jmp    14f3 <main+0x383>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm0,(%r12,%rdx,8)
add    $0x1,%rdx
cmp    %r14,%rdx
je     1429 <main+0x2b9>
xorpd  %xmm0,%xmm0
test   %rbx,%rbx
je     1560 <main+0x3f0>
xor    %edi,%edi
jmp    1509 <main+0x399>
add    $0x1,%rdi
cmp    %rcx,%rdi
je     1550 <main+0x3e0>
mov    %rdi,%rsi
cmp    %rdi,%rdx
ja     1525 <main+0x3b5>
mov    (%r15,%rdx,8),%rdi
movsd  (%rdi,%rsi,8),%xmm1
mulsd  0x0(%r13,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
lea    0x1(%rsi),%rdi
cmp    %rdi,%rdx
ja     1500 <main+0x390>
mov    (%r15,%rdx,8),%rbp
movsd  0x8(%rbp,%rsi,8),%xmm1
mulsd  0x8(%r13,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
jmp    1500 <main+0x390>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x2,%rsi
test   $0x1,%r14b
je     14e0 <main+0x370>
jmp    156c <main+0x3fc>
nopl   0x0(%rax)
xor    %esi,%esi
test   $0x1,%r14b
je     14e0 <main+0x370>
cmp    %rsi,%rdx
ja     14e0 <main+0x370>
mov    (%r15,%rdx,8),%rdi
movsd  (%rdi,%rsi,8),%xmm1
mulsd  0x0(%r13,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
jmp    14e0 <main+0x370>
lea    0xb13(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Faltan no componentes del vector\0A\00"
@.str.1 = [44 x i8] c"Tiempo(seg.):%11.9f\09 / Tama\C3\B1o Vectores:%u\0A\00"
@.str.2 = [100 x i8] c"Primer componente del vector resultadoado [%f] y el ultimo componente del vector resultadoado [%f]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double**
%14 = alloca double*
%15 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %7
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
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 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %23)
store i32 %24, i32* %7
%25 = load i32, i32* %7
%26 = zext i32 %25 to i64
%27 = mul i64 %26, 8
%28 = call i8* @malloc(i64 %27)
%29 = bitcast i8* %28 to double*
store double* %29, double** %14
%30 = load i32, i32* %7
%31 = zext i32 %30 to i64
%32 = mul i64 %31, 8
%33 = call i8* @malloc(i64 %32)
%34 = bitcast i8* %33 to double*
store double* %34, double** %15
%35 = load i32, i32* %7
%36 = zext i32 %35 to i64
%37 = mul i64 %36, 8
%38 = call i8* @malloc(i64 %37)
%39 = bitcast i8* %38 to double**
store double** %39, double*** %13
store i32 0, i32* %8
br label %40
40: ; preds = %54, %20
%41 = load i32, i32* %8
%42 = load i32, i32* %7
%43 = icmp ult i32 %41, %42
br i1 %43, label %44, label %57
44: ; preds = %40
%45 = load i32, i32* %7
%46 = zext i32 %45 to i64
%47 = mul i64 %46, 8
%48 = call i8* @malloc(i64 %47)
%49 = bitcast i8* %48 to double*
%50 = load double**, double*** %13
%51 = load i32, i32* %8
%52 = zext i32 %51 to i64
%53 = getelementptr inbounds double*, double** %50, i64 %52
store double* %49, double** %53
br label %54
54: ; preds = %44
%55 = load i32, i32* %8
%56 = add i32 %55, 1
store i32 %56, i32* %8
br label %40
57: ; preds = %40
store i32 0, i32* %8
br label %58
58: ; preds = %67, %57
%59 = load i32, i32* %8
%60 = load i32, i32* %7
%61 = icmp ult i32 %59, %60
br i1 %61, label %62, label %70
62: ; preds = %58
%63 = load double*, double** %14
%64 = load i32, i32* %8
%65 = zext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
store double 3.000000e+00, double* %66
br label %67
67: ; preds = %62
%68 = load i32, i32* %8
%69 = add i32 %68, 1
store i32 %69, i32* %8
br label %58
70: ; preds = %58
store i32 0, i32* %8
br label %71
71: ; preds = %107, %70
%72 = load i32, i32* %8
%73 = load i32, i32* %7
%74 = icmp ult i32 %72, %73
br i1 %74, label %75, label %110
75: ; preds = %71
store i32 0, i32* %9
br label %76
76: ; preds = %103, %75
%77 = load i32, i32* %9
%78 = load i32, i32* %7
%79 = icmp ult i32 %77, %78
br i1 %79, label %80, label %106
80: ; preds = %76
%81 = load i32, i32* %8
%82 = load i32, i32* %9
%83 = icmp ule i32 %81, %82
br i1 %83, label %84, label %93
84: ; preds = %80
%85 = load double**, double*** %13
%86 = load i32, i32* %8
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds double*, double** %85, i64 %87
%89 = load double*, double** %88
%90 = load i32, i32* %9
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds double, double* %89, i64 %91
store double 2.000000e+00, double* %92
br label %102
93: ; preds = %80
%94 = load double**, double*** %13
%95 = load i32, i32* %8
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds double*, double** %94, i64 %96
%98 = load double*, double** %97
%99 = load i32, i32* %9
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds double, double* %98, i64 %100
store double 0.000000e+00, double* %101
br label %102
102: ; preds = %93, %84
br label %103
103: ; preds = %102
%104 = load i32, i32* %9
%105 = add i32 %104, 1
store i32 %105, i32* %9
br label %76
106: ; preds = %76
br label %107
107: ; preds = %106
%108 = load i32, i32* %8
%109 = add i32 %108, 1
store i32 %109, i32* %8
br label %71
110: ; preds = %71
%111 = call i32 (...) @omp_get_wtime()
%112 = sitofp i32 %111 to double
store double %112, double* %10
store i32 0, i32* %8
br label %113
113: ; preds = %153, %110
%114 = load i32, i32* %8
%115 = load i32, i32* %7
%116 = icmp ult i32 %114, %115
br i1 %116, label %117, label %156
117: ; preds = %113
store double 0.000000e+00, double* %6
store i32 0, i32* %9
br label %118
118: ; preds = %144, %117
%119 = load i32, i32* %9
%120 = load i32, i32* %7
%121 = icmp ult i32 %119, %120
br i1 %121, label %122, label %147
122: ; preds = %118
%123 = load i32, i32* %8
%124 = load i32, i32* %9
%125 = icmp ule i32 %123, %124
br i1 %125, label %126, label %143
126: ; preds = %122
%127 = load double**, double*** %13
%128 = load i32, i32* %8
%129 = zext i32 %128 to i64
%130 = getelementptr inbounds double*, double** %127, i64 %129
%131 = load double*, double** %130
%132 = load i32, i32* %9
%133 = zext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
%135 = load double, double* %134
%136 = load double*, double** %14
%137 = load i32, i32* %9
%138 = zext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
%140 = load double, double* %139
%141 = load double, double* %6
%142 = call double @llvm.fmuladd.f64(double %135, double %140, double %141)
store double %142, double* %6
br label %143
143: ; preds = %126, %122
br label %144
144: ; preds = %143
%145 = load i32, i32* %9
%146 = add i32 %145, 1
store i32 %146, i32* %9
br label %118
147: ; preds = %118
%148 = load double, double* %6
%149 = load double*, double** %15
%150 = load i32, i32* %8
%151 = zext i32 %150 to i64
%152 = getelementptr inbounds double, double* %149, i64 %151
store double %148, double* %152
br label %153
153: ; preds = %147
%154 = load i32, i32* %8
%155 = add i32 %154, 1
store i32 %155, i32* %8
br label %113
156: ; preds = %113
%157 = call i32 (...) @omp_get_wtime()
%158 = sitofp i32 %157 to double
store double %158, double* %11
%159 = load double, double* %11
%160 = load double, double* %10
%161 = fsub double %159, %160
store double %161, double* %12
%162 = load double, double* %12
%163 = load i32, i32* %7
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %162, i32 %163)
%165 = load double*, double** %15
%166 = getelementptr inbounds double, double* %165, i64 0
%167 = load double, double* %166
%168 = load double*, double** %15
%169 = load i32, i32* %7
%170 = sub i32 %169, 1
%171 = zext i32 %170 to i64
%172 = getelementptr inbounds double, double* %168, i64 %171
%173 = load double, double* %172
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0), double %167, double %173)
%175 = load double*, double** %14
%176 = bitcast double* %175 to i8*
%177 = load double*, double** %15
%178 = bitcast double* %177 to i8*
store i32 0, i32* %8
br label %179
179: ; preds = %190, %156
%180 = load i32, i32* %8
%181 = load i32, i32* %7
%182 = icmp ult i32 %180, %181
br i1 %182, label %183, label %193
183: ; preds = %179
%184 = load double**, double*** %13
%185 = load i32, i32* %8
%186 = zext i32 %185 to i64
%187 = getelementptr inbounds double*, double** %184, i64 %186
%188 = load double*, double** %187
%189 = bitcast double* %188 to i8*
br label %190
190: ; preds = %183
%191 = load i32, i32* %8
%192 = add i32 %191, 1
store i32 %192, i32* %8
br label %179
193: ; preds = %179
%194 = load double**, double*** %13
%195 = bitcast double** %194 to i8*
%196 = load i32, i32* %3
ret i32 %196
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"Tiempo(seg.):%11.9f\09 / Tama\C3\B1o Vectores:%u\0A\00"
@.str.2 = [100 x i8] c"Primer componente del vector resultadoado [%f] y el ultimo componente del vector resultadoado [%f]\0A\00"
@str = [33 x i8] c"Faltan no componentes del vector\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 -1)
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %8)
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 3
%12 = tail call i8* @malloc(i64 %11)
%13 = bitcast i8* %12 to double*
%14 = tail call i8* @malloc(i64 %11)
%15 = bitcast i8* %14 to double*
%16 = tail call i8* @malloc(i64 %11)
%17 = bitcast i8* %16 to double**
%18 = icmp eq i32 %9, 0
br i1 %18, label %155, label %93
19: ; preds = %93
br i1 %18, label %155, label %20
20: ; preds = %19
%21 = icmp ult i32 %9, 4
br i1 %21, label %91, label %22
22: ; preds = %20
%23 = and i64 %10, 4294967292
%24 = add nsw i64 %23, -4
%25 = lshr exact i64 %24, 2
%26 = add nuw nsw i64 %25, 1
%27 = and i64 %26, 7
%28 = icmp ult i64 %24, 28
br i1 %28, label %76, label %29
29: ; preds = %22
%30 = and i64 %26, 9223372036854775800
br label %31
31: ; preds = %31, %29
%32 = phi i64 [ 0, %29 ], [ %73, %31 ]
%33 = phi i64 [ 0, %29 ], [ %74, %31 ]
%34 = getelementptr inbounds double, double* %13, i64 %32
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %35
%36 = getelementptr inbounds double, double* %34, i64 2
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %37
%38 = or i64 %32, 4
%39 = getelementptr inbounds double, double* %13, i64 %38
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %40
%41 = getelementptr inbounds double, double* %39, i64 2
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %42
%43 = or i64 %32, 8
%44 = getelementptr inbounds double, double* %13, i64 %43
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %45
%46 = getelementptr inbounds double, double* %44, i64 2
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %47
%48 = or i64 %32, 12
%49 = getelementptr inbounds double, double* %13, i64 %48
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %50
%51 = getelementptr inbounds double, double* %49, i64 2
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %52
%53 = or i64 %32, 16
%54 = getelementptr inbounds double, double* %13, i64 %53
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %55
%56 = getelementptr inbounds double, double* %54, i64 2
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %57
%58 = or i64 %32, 20
%59 = getelementptr inbounds double, double* %13, i64 %58
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %60
%61 = getelementptr inbounds double, double* %59, i64 2
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %62
%63 = or i64 %32, 24
%64 = getelementptr inbounds double, double* %13, i64 %63
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %65
%66 = getelementptr inbounds double, double* %64, i64 2
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %67
%68 = or i64 %32, 28
%69 = getelementptr inbounds double, double* %13, i64 %68
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %70
%71 = getelementptr inbounds double, double* %69, i64 2
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %72
%73 = add nuw i64 %32, 32
%74 = add i64 %33, 8
%75 = icmp eq i64 %74, %30
br i1 %75, label %76, label %31
76: ; preds = %31, %22
%77 = phi i64 [ 0, %22 ], [ %73, %31 ]
%78 = icmp eq i64 %27, 0
br i1 %78, label %89, label %79
79: ; preds = %76, %79
%80 = phi i64 [ %86, %79 ], [ %77, %76 ]
%81 = phi i64 [ %87, %79 ], [ 0, %76 ]
%82 = getelementptr inbounds double, double* %13, i64 %80
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %83
%84 = getelementptr inbounds double, double* %82, i64 2
%85 = bitcast double* %84 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double>* %85
%86 = add nuw i64 %80, 4
%87 = add i64 %81, 1
%88 = icmp eq i64 %87, %27
br i1 %88, label %89, label %79
89: ; preds = %79, %76
%90 = icmp eq i64 %23, %10
br i1 %90, label %100, label %91
91: ; preds = %20, %89
%92 = phi i64 [ 0, %20 ], [ %23, %89 ]
br label %107
93: ; preds = %6, %93
%94 = phi i64 [ %98, %93 ], [ 0, %6 ]
%95 = tail call i8* @malloc(i64 %11)
%96 = getelementptr inbounds double*, double** %17, i64 %94
%97 = bitcast double** %96 to i8**
store i8* %95, i8** %97
%98 = add nuw nsw i64 %94, 1
%99 = icmp eq i64 %98, %10
br i1 %99, label %19, label %93
100: ; preds = %107, %89
br i1 %18, label %155, label %101
101: ; preds = %100
%102 = add nsw i64 %10, -1
%103 = and i64 %10, 3
%104 = icmp ult i64 %102, 3
%105 = and i64 %10, 4294967292
%106 = icmp eq i64 %103, 0
br label %112
107: ; preds = %91, %107
%108 = phi i64 [ %110, %107 ], [ %92, %91 ]
%109 = getelementptr inbounds double, double* %13, i64 %108
store double 3.000000e+00, double* %109
%110 = add nuw nsw i64 %108, 1
%111 = icmp eq i64 %110, %10
br i1 %111, label %100, label %107
112: ; preds = %101, %152
%113 = phi i64 [ %153, %152 ], [ 0, %101 ]
%114 = getelementptr inbounds double*, double** %17, i64 %113
br i1 %104, label %139, label %115
115: ; preds = %112
%116 = load double*, double** %114
%117 = load double*, double** %114
br label %118
118: ; preds = %118, %115
%119 = phi i64 [ 0, %115 ], [ %136, %118 ]
%120 = phi i64 [ 0, %115 ], [ %137, %118 ]
%121 = icmp ugt i64 %113, %119
%122 = getelementptr inbounds double, double* %116, i64 %119
%123 = select i1 %121, double 0.000000e+00, double 2.000000e+00
store double %123, double* %122
%124 = or i64 %119, 1
%125 = icmp ugt i64 %113, %124
%126 = getelementptr inbounds double, double* %116, i64 %124
%127 = select i1 %125, double 0.000000e+00, double 2.000000e+00
store double %127, double* %126
%128 = or i64 %119, 2
%129 = icmp ugt i64 %113, %128
%130 = getelementptr inbounds double, double* %117, i64 %128
%131 = select i1 %129, double 0.000000e+00, double 2.000000e+00
store double %131, double* %130
%132 = or i64 %119, 3
%133 = icmp ugt i64 %113, %132
%134 = getelementptr inbounds double, double* %117, i64 %132
%135 = select i1 %133, double 0.000000e+00, double 2.000000e+00
store double %135, double* %134
%136 = add nuw nsw i64 %119, 4
%137 = add i64 %120, 4
%138 = icmp eq i64 %137, %105
br i1 %138, label %139, label %118
139: ; preds = %118, %112
%140 = phi i64 [ 0, %112 ], [ %136, %118 ]
br i1 %106, label %152, label %141
141: ; preds = %139
%142 = load double*, double** %114
br label %143
143: ; preds = %143, %141
%144 = phi i64 [ %140, %141 ], [ %149, %143 ]
%145 = phi i64 [ 0, %141 ], [ %150, %143 ]
%146 = icmp ugt i64 %113, %144
%147 = getelementptr inbounds double, double* %142, i64 %144
%148 = select i1 %146, double 0.000000e+00, double 2.000000e+00
store double %148, double* %147
%149 = add nuw nsw i64 %144, 1
%150 = add i64 %145, 1
%151 = icmp eq i64 %150, %103
br i1 %151, label %152, label %143
152: ; preds = %143, %139
%153 = add nuw nsw i64 %113, 1
%154 = icmp eq i64 %153, %10
br i1 %154, label %157, label %112
155: ; preds = %100, %19, %6
%156 = tail call i32 (...) @omp_get_wtime()
br label %213
157: ; preds = %152
%158 = tail call i32 (...) @omp_get_wtime()
br i1 %18, label %213, label %159
159: ; preds = %157
%160 = and i64 %10, 1
%161 = icmp eq i64 %102, 0
%162 = and i64 %10, 4294967294
%163 = icmp eq i64 %160, 0
br label %164
164: ; preds = %159, %208
%165 = phi i64 [ %211, %208 ], [ 0, %159 ]
%166 = getelementptr inbounds double*, double** %17, i64 %165
br i1 %161, label %195, label %167
167: ; preds = %164, %190
%168 = phi i64 [ %192, %190 ], [ 0, %164 ]
%169 = phi double [ %191, %190 ], [ 0.000000e+00, %164 ]
%170 = phi i64 [ %193, %190 ], [ 0, %164 ]
%171 = icmp ugt i64 %165, %168
br i1 %171, label %179, label %172
172: ; preds = %167
%173 = load double*, double** %166
%174 = getelementptr inbounds double, double* %173, i64 %168
%175 = load double, double* %174
%176 = getelementptr inbounds double, double* %13, i64 %168
%177 = load double, double* %176
%178 = tail call double @llvm.fmuladd.f64(double %175, double %177, double %169)
br label %179
179: ; preds = %167, %172
%180 = phi double [ %178, %172 ], [ %169, %167 ]
%181 = or i64 %168, 1
%182 = icmp ugt i64 %165, %181
br i1 %182, label %190, label %183
183: ; preds = %179
%184 = load double*, double** %166
%185 = getelementptr inbounds double, double* %184, i64 %181
%186 = load double, double* %185
%187 = getelementptr inbounds double, double* %13, i64 %181
%188 = load double, double* %187
%189 = tail call double @llvm.fmuladd.f64(double %186, double %188, double %180)
br label %190
190: ; preds = %183, %179
%191 = phi double [ %189, %183 ], [ %180, %179 ]
%192 = add nuw nsw i64 %168, 2
%193 = add i64 %170, 2
%194 = icmp eq i64 %193, %162
br i1 %194, label %195, label %167
195: ; preds = %190, %164
%196 = phi double [ undef, %164 ], [ %191, %190 ]
%197 = phi i64 [ 0, %164 ], [ %192, %190 ]
%198 = phi double [ 0.000000e+00, %164 ], [ %191, %190 ]
br i1 %163, label %208, label %199
199: ; preds = %195
%200 = icmp ugt i64 %165, %197
br i1 %200, label %208, label %201
201: ; preds = %199
%202 = load double*, double** %166
%203 = getelementptr inbounds double, double* %202, i64 %197
%204 = load double, double* %203
%205 = getelementptr inbounds double, double* %13, i64 %197
%206 = load double, double* %205
%207 = tail call double @llvm.fmuladd.f64(double %204, double %206, double %198)
br label %208
208: ; preds = %199, %201, %195
%209 = phi double [ %196, %195 ], [ %207, %201 ], [ %198, %199 ]
%210 = getelementptr inbounds double, double* %15, i64 %165
store double %209, double* %210
%211 = add nuw nsw i64 %165, 1
%212 = icmp eq i64 %211, %10
br i1 %212, label %213, label %164
213: ; preds = %208, %155, %157
%214 = phi i32 [ %156, %155 ], [ %158, %157 ], [ %158, %208 ]
%215 = sitofp i32 %214 to double
%216 = tail call i32 (...) @omp_get_wtime()
%217 = sitofp i32 %216 to double
%218 = fsub double %217, %215
%219 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %218, i32 %9)
%220 = load double, double* %15
%221 = add i32 %9, -1
%222 = zext i32 %221 to i64
%223 = getelementptr inbounds double, double* %15, i64 %222
%224 = load double, double* %223
%225 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0), double %220, double %224)
tail call void @free(i8* %12)
tail call void @free(i8* %14)
br i1 %18, label %233, label %226
226: ; preds = %213, %226
%227 = phi i64 [ %231, %226 ], [ 0, %213 ]
%228 = getelementptr inbounds double*, double** %17, i64 %227
%229 = bitcast double** %228 to i8**
%230 = load i8*, i8** %229
tail call void @free(i8* %230)
%231 = add nuw nsw i64 %227, 1
%232 = icmp eq i64 %231, %10
br i1 %232, label %233, label %226
233: ; preds = %226, %213
tail call void @free(i8* %16)
ret i32 0
}