#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("\nValores vector: ");
  for (i = 0; i < N; i++) {
    VR[i] = 0;
    V[i] = i + 2;
    printf("[%d]", V[i]);
  }
  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++) {
    printf("\n%d: ", 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    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    1295 <main+0x155>
mov    -0x50(%rbp),%rax
mov    -0x68(%rbp),%rcx
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)
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1246 <main+0x106>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1346 <main+0x206>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1333 <main+0x1f3>
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   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12cb <main+0x18b>
jmp    1338 <main+0x1f8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12aa <main+0x16a>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13f9 <main+0x2b9>
mov    -0x14(%rbp),%esi
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13e6 <main+0x2a6>
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    0xced(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    137f <main+0x23f>
jmp    13eb <main+0x2ab>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    135b <main+0x21b>
mov    -0x68(%rbp),%rax
mov    (%rax),%esi
lea    0xcbf(%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    0xcca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xce3(%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    139a <main+0x23a>
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,%r14
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%r14
mov    %r14,%rsp
mov    %rsp,%r15
sub    %rcx,%r15
mov    %r15,%rsp
cmp    $0xfff,%eax
jge    13ac <main+0x24c>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    1339 <main+0x1d9>
mov    %r14,-0x30(%rbp)
lea    0xed3(%rip),%r14
xor    %ebx,%ebx
nop
movl   $0x0,(%r12,%rbx,4)
lea    0x2(%rbx),%esi
mov    %esi,(%r15,%rbx,4)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    11f0 <main+0x90>
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
jle    1347 <main+0x1e7>
mov    %r15,-0x58(%rbp)
mov    %r12,-0x40(%rbp)
lea    0x0(,%r13,4),%rax
mov    %rax,-0x48(%rbp)
mov    $0x1,%ebx
lea    0xe77(%rip),%r12
mov    -0x30(%rbp),%r14
xor    %r15d,%r15d
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
mov    %r15,-0x38(%rbp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rbx,%r15,1),%esi
mov    %esi,(%r14,%r15,4)
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r13
jne    1270 <main+0x110>
add    -0x48(%rbp),%r14
add    $0x1,%rbx
mov    -0x38(%rbp),%r15
cmp    %r13,%r15
jne    1250 <main+0xf0>
lea    0xdfc(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r13d,%r13d
mov    -0x40(%rbp),%r12
jle    1355 <main+0x1f5>
xor    %ebx,%ebx
mov    %r13,-0x50(%rbp)
nopl   (%rax)
lea    0xdf1(%rip),%rdi
mov    %ebx,%esi
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    0xdd5(%rip),%r13
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    12f0 <main+0x190>
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    12c0 <main+0x160>
jmp    1355 <main+0x1f5>
lea    0xd4d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd51(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%esi
lea    0xd65(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq %r13d,%rax
mov    -0x4(%r12,%rax,4),%esi
lea    0xd78(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcf5(%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    0x2c3f(%rip),%rax
mov    (%rax),%edi
lea    0xc56(%rip),%rsi
jmp    13bc <main+0x25c>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
lea    0xc77(%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 = [18 x i8] c"\0AValores vector: \00"
@.str.3 = [5 x i8] c"[%d]\00"
@.str.4 = [18 x i8] c"\0A\0AValores matriz:\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [25 x i8] c"\0A\0ACalculando producto...\00"
@.str.7 = [6 x i8] c"\0A%d: \00"
@.str.8 = [7 x i8] c"->[%d]\00"
@.str.9 = [41 x i8] c"\0A\0AValor primera componente resultado: %d\00"
@.str.10 = [39 x i8] c"\0AValor ultima componente resultado: %d\00"
@.str.11 = [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 ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %46
46: ; preds = %64, %44
%47 = load i32, i32* %6
%48 = load i32, i32* %8
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %67
50: ; preds = %46
%51 = load i32, i32* %6
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %28, i64 %52
store i32 0, i32* %53
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 2
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %37, i64 %57
store i32 %55, i32* %58
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i32, i32* %37, i64 %60
%62 = load i32, i32* %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %50
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %46
67: ; preds = %46
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %69
69: ; preds = %104, %67
%70 = load i32, i32* %6
%71 = load i32, i32* %8
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %107
73: ; preds = %69
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %7
br label %75
75: ; preds = %100, %73
%76 = load i32, i32* %7
%77 = load i32, i32* %8
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %103
79: ; preds = %75
%80 = load i32, i32* %6
%81 = load i32, i32* %7
%82 = add nsw i32 %80, %81
%83 = add nsw i32 %82, 1
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = mul nsw i64 %85, %32
%87 = getelementptr inbounds i32, i32* %34, i64 %86
%88 = load i32, i32* %7
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %87, i64 %89
store i32 %83, i32* %90
%91 = load i32, i32* %6
%92 = sext i32 %91 to i64
%93 = mul nsw i64 %92, %32
%94 = getelementptr inbounds i32, i32* %34, i64 %93
%95 = load i32, i32* %7
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
%98 = load i32, i32* %97
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %98)
br label %100
100: ; preds = %79
%101 = load i32, i32* %7
%102 = add nsw i32 %101, 1
store i32 %102, i32* %7
br label %75
103: ; preds = %75
br label %104
104: ; preds = %103
%105 = load i32, i32* %6
%106 = add nsw i32 %105, 1
store i32 %106, i32* %6
br label %69
107: ; preds = %69
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %109
109: ; preds = %148, %107
%110 = load i32, i32* %6
%111 = load i32, i32* %8
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %151
113: ; preds = %109
%114 = load i32, i32* %6
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %114)
store i32 0, i32* %7
br label %116
116: ; preds = %144, %113
%117 = load i32, i32* %7
%118 = load i32, i32* %8
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %147
120: ; preds = %116
%121 = load i32, i32* %6
%122 = sext i32 %121 to i64
%123 = mul nsw i64 %122, %32
%124 = getelementptr inbounds i32, i32* %34, i64 %123
%125 = load i32, i32* %7
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %124, i64 %126
%128 = load i32, i32* %127
%129 = load i32, i32* %7
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i32, i32* %37, i64 %130
%132 = load i32, i32* %131
%133 = mul nsw i32 %128, %132
%134 = load i32, i32* %6
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %28, i64 %135
%137 = load i32, i32* %136
%138 = add nsw i32 %137, %133
store i32 %138, i32* %136
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i32, i32* %28, i64 %140
%142 = load i32, i32* %141
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %142)
br label %144
144: ; preds = %120
%145 = load i32, i32* %7
%146 = add nsw i32 %145, 1
store i32 %146, i32* %7
br label %116
147: ; preds = %116
br label %148
148: ; preds = %147
%149 = load i32, i32* %6
%150 = add nsw i32 %149, 1
store i32 %150, i32* %6
br label %109
151: ; preds = %109
%152 = getelementptr inbounds i32, i32* %28, i64 0
%153 = load i32, i32* %152
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0), i32 %153)
%155 = load i32, i32* %8
%156 = sub nsw i32 %155, 1
%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 ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i32 %159)
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
%162 = load i8*, i8** %9
%163 = load i32, i32* %3
ret i32 %163
}

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