#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*/ ordena(int *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int nums[3];
  printf("Informe a: ");
  scanf("%d", &nums[0]);
  printf("Informe b: ");
  scanf("%d", &nums[1]);
  printf("Informe c: ");
  scanf("%d", &nums[2]);
  ordena(&nums[0], &nums[1], &nums[2]);
  printf("%d %d %d", nums[0], nums[1], nums[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1050 <scanf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    0xe8e(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x10(%rbp),%rdi
lea    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   1040 <ordena@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%r12
lea    0xc(%rsp),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%r15
mov    %r12,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xe93(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <ordena@plt>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%ecx
lea    0xe67(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Informe a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Informe b: \00"
@.str.3 = [12 x i8] c"Informe c: \00"
@.str.4 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%15 = call i32 @ordena(i32* %12, i32* %13, i32* %14)
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%17 = load i32, i32* %16
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%19 = load i32, i32* %18
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%21 = load i32, i32* %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %19, i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Informe a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Informe b: \00"
@.str.3 = [12 x i8] c"Informe c: \00"
@.str.4 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 @ordena(i32* %4, i32* %7, i32* %10)
%13 = load i32, i32* %4
%14 = load i32, i32* %7
%15 = load i32, i32* %10
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
ret i32 0
}