#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 /*<<< orphan*/ system(char *);
main() {
  system("title 25b_Cascallar_Autrán_Manuel");
  system("color 88");
  system("cls");
  printf("ORDENAR 10 VALORES DE FORMA INVERSA A COMO OS ESCRIBIMOS\n");
  printf("========================================================\n");
  int i, a[10];
  printf("\nIntroduce os n\243meros\n");
  for (i = 0; i < 10; i++) {
    scanf("%d", &a[i]);
    printf("\n");
  }
  printf("O orden dos n\243meros colocados inversamente \202:\n");
  for (i = 9; i >= 0; i--) {
    printf("%d", a[i]);
    printf("\n\n");
  }
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11d5 <main+0xa5>
movslq -0x8(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xf07(%rip),%rdi
call   1050 <scanf@plt>
lea    0xf2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <main+0x64>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x9,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1226 <main+0xf6>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    11ea <main+0xba>
lea    0xec3(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xea2(%rip),%rdi
call   1050 <system@plt>
lea    0xeb9(%rip),%rdi
call   1050 <system@plt>
lea    0xeb6(%rip),%rdi
call   1050 <system@plt>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
lea    0xee4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf11(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8a(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe30(%rip),%rdi
call   1040 <puts@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe44(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    (%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xcb4(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [35 x i8] c"title 25b_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.1 = [9 x i8] c"color 88\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.3 = [58 x i8] c"ORDENAR 10 VALORES DE FORMA INVERSA A COMO OS ESCRIBIMOS\0A\00"
@.str.4 = [58 x i8] c"========================================================\0A\00"
@.str.5 = [23 x i8] c"\0AIntroduce os n\A3meros\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [47 x i8] c"O orden dos n\A3meros colocados inversamente \82:\0A\00"
@.str.9 = [3 x i8] c"\0A\0A\00"
@.str.10 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %2
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %19
19: ; preds = %13
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %10
22: ; preds = %10
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
store i32 9, i32* %2
br label %24
24: ; preds = %34, %22
%25 = load i32, i32* %2
%26 = icmp sge i32 %25, 0
br i1 %26, label %27, label %37
27: ; preds = %24
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %34
34: ; preds = %27
%35 = load i32, i32* %2
%36 = add nsw i32 %35, -1
store i32 %36, i32* %2
br label %24
37: ; preds = %24
%38 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [35 x i8] c"title 25b_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.1 = [9 x i8] c"color 88\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.10 = [6 x i8] c"pause\00"
@str = [57 x i8] c"ORDENAR 10 VALORES DE FORMA INVERSA A COMO OS ESCRIBIMOS\00"
@str.11 = [57 x i8] c"========================================================\00"
@str.12 = [22 x i8] c"\0AIntroduce os n\A3meros\00"
@str.13 = [46 x i8] c"O orden dos n\A3meros colocados inversamente \82:\00"
@str.14 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = tail call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.11, i64 0, i64 0))
%7 = bitcast [10 x i32]* %1 to i8*
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.12, i64 0, i64 0))
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %9)
%11 = call i32 @putchar(i32 10)
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %12)
%14 = call i32 @putchar(i32 10)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %15)
%17 = call i32 @putchar(i32 10)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %18)
%20 = call i32 @putchar(i32 10)
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %21)
%23 = call i32 @putchar(i32 10)
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %24)
%26 = call i32 @putchar(i32 10)
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %27)
%29 = call i32 @putchar(i32 10)
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %30)
%32 = call i32 @putchar(i32 10)
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %33)
%35 = call i32 @putchar(i32 10)
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %36)
%38 = call i32 @putchar(i32 10)
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.13, i64 0, i64 0))
%40 = load i32, i32* %36
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %40)
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%43 = load i32, i32* %33
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %43)
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%46 = load i32, i32* %30
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %46)
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%49 = load i32, i32* %27
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %49)
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%52 = load i32, i32* %24
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %52)
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%55 = load i32, i32* %21
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %55)
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%58 = load i32, i32* %18
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %58)
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%61 = load i32, i32* %15
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %61)
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%64 = load i32, i32* %12
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %64)
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%67 = load i32, i32* %9
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %67)
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
%70 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}