#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int vector[10], i;
  for (i = 0; i < 10; i++) {
    printf("Introduce numero enteros: ");
    scanf("%d", &vector[i]);
    printf("\nHas intriducido el numero %d cuyo cuadrado es %d y su cubo es "
           "%d.\n\n",
           vector[i], vector[i] * vector[i], vector[i] * vector[i] * vector[i]);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jge    11bf <main+0x9f>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb0(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edx
movslq -0x44(%rbp),%rax
imul   -0x40(%rbp,%rax,4),%edx
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
movslq -0x44(%rbp),%rax
imul   -0x40(%rbp,%rax,4),%ecx
movslq -0x44(%rbp),%rax
imul   -0x40(%rbp,%rax,4),%ecx
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    113d <main+0x1d>
mov    0x2e1a(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0xed0(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%r15
mov    %rsp,%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    (%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x18(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x1c(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x20(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0x24(%rsp),%esi
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2cc8(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Introduce numero enteros: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [69 x i8] c"\0AHas intriducido el numero %d cuyo cuadrado es %d y su cubo es %d.\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %8
8: ; preds = %45, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %48
11: ; preds = %8
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = mul nsw i32 %24, %28
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = mul nsw i32 %33, %37
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = mul nsw i32 %38, %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %20, i32 %29, i32 %43)
br label %45
45: ; preds = %11
%46 = load i32, i32* %7
%47 = add nsw i32 %46, 1
store i32 %47, i32* %7
br label %8
48: ; preds = %8
%49 = load i32, i32* @EXIT_SUCCESS
ret i32 %49
}

LLVM IR (-O2):
@.str = [27 x i8] c"Introduce numero enteros: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [69 x i8] c"\0AHas intriducido el numero %d cuyo cuadrado es %d y su cubo es %d.\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = mul nsw i32 %8, %8
%10 = mul nsw i32 %9, %8
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%15 = load i32, i32* %13
%16 = mul nsw i32 %15, %15
%17 = mul nsw i32 %16, %15
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 2
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %20)
%22 = load i32, i32* %20
%23 = mul nsw i32 %22, %22
%24 = mul nsw i32 %23, %22
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %27)
%29 = load i32, i32* %27
%30 = mul nsw i32 %29, %29
%31 = mul nsw i32 %30, %29
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %29, i32 %30, i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %34)
%36 = load i32, i32* %34
%37 = mul nsw i32 %36, %36
%38 = mul nsw i32 %37, %36
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %36, i32 %37, i32 %38)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %41)
%43 = load i32, i32* %41
%44 = mul nsw i32 %43, %43
%45 = mul nsw i32 %44, %43
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %43, i32 %44, i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 6
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %48)
%50 = load i32, i32* %48
%51 = mul nsw i32 %50, %50
%52 = mul nsw i32 %51, %50
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %50, i32 %51, i32 %52)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%55 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 7
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %55)
%57 = load i32, i32* %55
%58 = mul nsw i32 %57, %57
%59 = mul nsw i32 %58, %57
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %57, i32 %58, i32 %59)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%62 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 8
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %62)
%64 = load i32, i32* %62
%65 = mul nsw i32 %64, %64
%66 = mul nsw i32 %65, %64
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %64, i32 %65, i32 %66)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
%70 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %69)
%71 = load i32, i32* %69
%72 = mul nsw i32 %71, %71
%73 = mul nsw i32 %72, %71
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %71, i32 %72, i32 %73)
%75 = load i32, i32* @EXIT_SUCCESS
ret i32 %75
}