#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, num, cant, valor[100];
  for (i = 0; i <= 100 - 1; i++) {
    valor[i] = i + 1;
  }
pregunta:
  printf("¿Cuántos valores desea que el programa lea?: ");
  scanf("%d", &cant);
  printf("\n");
  if (cant < 2 || cant > 50) {
    printf("La cantidad mínima de valores que pueden ser ingresado son 2 y la "
           "mayor son 50.");
    printf("\n");
    goto pregunta;
  } else {
    for (i = 0; i <= cant - 1; i++) {
      printf("Introduzca el valor número %d: ", i + 1);
      scanf("%d", &num);
      valor[i * 2 + 1] = num;
    }
    for (i = 0; i <= 100 - 1; i++) {
      printf("\nValor: %d\tPosición: %d", valor[i], i + 1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x63,-0x8(%rbp)
jg     1162 <main+0x42>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
jmp    1167 <main+0x47>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x10(%rbp)
jl     11a7 <main+0x87>
cmpl   $0x32,-0x10(%rbp)
jle    11c8 <main+0xa8>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1167 <main+0x47>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1227 <main+0x107>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11cf <main+0xaf>
movl   $0x0,-0x8(%rbp)
cmpl   $0x63,-0x8(%rbp)
jg     1265 <main+0x145>
movslq -0x8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
mov    -0x8(%rbp),%edx
add    $0x1,%edx
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    122e <main+0x10e>
jmp    126a <main+0x14a>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a0,%rsp
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf91(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
ja     133f <main+0x20f>
lea    0xee2(%rip),%r14
lea    0xeab(%rip),%r15
lea    0xf5c(%rip),%r12
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffcf,%eax
jb     1300 <main+0x1d0>
lea    0xecb(%rip),%r14
lea    0xefb(%rip),%r15
lea    0xc(%rsp),%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rbx),%r13
mov    %r14,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x14(%rsp,%rbx,8)
movslq 0x8(%rsp),%rax
mov    %r13,%rbx
cmp    %rax,%r13
jl     1360 <main+0x230>
lea    0xe9a(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp,%rbx,4),%esi
add    $0x1,%rbx
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x64,%rbx
jne    13a0 <main+0x270>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [48 x i8] c"\C2\BFCu\C3\A1ntos valores desea que el programa lea?: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [81 x i8] c"La cantidad m\C3\ADnima de valores que pueden ser ingresado son 2 y la mayor son 50.\00"
@.str.4 = [33 x i8] c"Introduzca el valor n\C3\BAmero %d: \00"
@.str.5 = [25 x i8] c"\0AValor: %d\09Posici\C3\B3n: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i32]
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 99
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %13
store i32 %11, i32* %14
br label %15
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %6
18: ; preds = %6
br label %19
19: ; preds = %28, %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 2
br i1 %24, label %28, label %25
25: ; preds = %19
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 50
br i1 %27, label %28, label %31
28: ; preds = %25, %19
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %19
31: ; preds = %25
store i32 0, i32* %2
br label %32
32: ; preds = %48, %31
%33 = load i32, i32* %2
%34 = load i32, i32* %4
%35 = sub nsw i32 %34, 1
%36 = icmp sle i32 %33, %35
br i1 %36, label %37, label %51
37: ; preds = %32
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%42 = load i32, i32* %3
%43 = load i32, i32* %2
%44 = mul nsw i32 %43, 2
%45 = add nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %46
store i32 %42, i32* %47
br label %48
48: ; preds = %37
%49 = load i32, i32* %2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %2
br label %32
51: ; preds = %32
store i32 0, i32* %2
br label %52
52: ; preds = %63, %51
%53 = load i32, i32* %2
%54 = icmp sle i32 %53, 99
br i1 %54, label %55, label %66
55: ; preds = %52
%56 = load i32, i32* %2
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 1
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %59, i32 %61)
br label %63
63: ; preds = %55
%64 = load i32, i32* %2
%65 = add nsw i32 %64, 1
store i32 %65, i32* %2
br label %52
66: ; preds = %52
br label %67
67: ; preds = %66
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"\C2\BFCu\C3\A1ntos valores desea que el programa lea?: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [81 x i8] c"La cantidad m\C3\ADnima de valores que pueden ser ingresado son 2 y la mayor son 50.\00"
@.str.4 = [33 x i8] c"Introduzca el valor n\C3\BAmero %d: \00"
@.str.5 = [25 x i8] c"\0AValor: %d\09Posici\C3\B3n: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [100 x i32]* %3 to i8*
%7 = bitcast [100 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %7
%8 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %9
%10 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 8
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %11
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 12
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %13
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 16
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %15
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 20
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %17
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 24
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 25, i32 26, i32 27, i32 28>, <4 x i32>* %19
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 28
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 29, i32 30, i32 31, i32 32>, <4 x i32>* %21
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 32
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 33, i32 34, i32 35, i32 36>, <4 x i32>* %23
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 36
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 37, i32 38, i32 39, i32 40>, <4 x i32>* %25
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 40
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, <4 x i32>* %27
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 44
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 45, i32 46, i32 47, i32 48>, <4 x i32>* %29
%30 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 48
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 49, i32 50, i32 51, i32 52>, <4 x i32>* %31
%32 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 52
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 53, i32 54, i32 55, i32 56>, <4 x i32>* %33
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 56
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 57, i32 58, i32 59, i32 60>, <4 x i32>* %35
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 60
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> <i32 61, i32 62, i32 63, i32 64>, <4 x i32>* %37
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 64
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> <i32 65, i32 66, i32 67, i32 68>, <4 x i32>* %39
%40 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 68
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 69, i32 70, i32 71, i32 72>, <4 x i32>* %41
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 72
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 73, i32 74, i32 75, i32 76>, <4 x i32>* %43
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 76
%45 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> <i32 77, i32 78, i32 79, i32 80>, <4 x i32>* %45
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 80
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> <i32 81, i32 82, i32 83, i32 84>, <4 x i32>* %47
%48 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 84
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> <i32 85, i32 86, i32 87, i32 88>, <4 x i32>* %49
%50 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 88
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 89, i32 90, i32 91, i32 92>, <4 x i32>* %51
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 92
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 93, i32 94, i32 95, i32 96>, <4 x i32>* %53
%54 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 96
%55 = bitcast i32* %54 to <4 x i32>*
store <4 x i32> <i32 97, i32 98, i32 99, i32 100>, <4 x i32>* %55
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%58 = call i32 @putchar(i32 10)
%59 = load i32, i32* %2
%60 = add i32 %59, -51
%61 = icmp ult i32 %60, -49
br i1 %61, label %62, label %71
62: ; preds = %0, %62
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0))
%64 = call i32 @putchar(i32 10)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%66 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%67 = call i32 @putchar(i32 10)
%68 = load i32, i32* %2
%69 = add i32 %68, -51
%70 = icmp ult i32 %69, -49
br i1 %70, label %62, label %71
71: ; preds = %62, %0
br label %72
72: ; preds = %71, %72
%73 = phi i64 [ %74, %72 ], [ 0, %71 ]
%74 = add nuw nsw i64 %73, 1
%75 = trunc i64 %74 to i32
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %75)
%77 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%78 = load i32, i32* %1
%79 = shl nuw nsw i64 %73, 1
%80 = or i64 %79, 1
%81 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %80
store i32 %78, i32* %81
%82 = load i32, i32* %2
%83 = sext i32 %82 to i64
%84 = icmp slt i64 %74, %83
br i1 %84, label %72, label %85
85: ; preds = %72, %85
%86 = phi i64 [ %89, %85 ], [ 0, %72 ]
%87 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %86
%88 = load i32, i32* %87
%89 = add nuw nsw i64 %86, 1
%90 = trunc i64 %89 to i32
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %88, i32 %90)
%92 = icmp eq i64 %89, 100
br i1 %92, label %93, label %85
93: ; preds = %85
ret i32 0
}