#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 *, float *);
int /*<<< orphan*/ system(char *);
main() {
  system("title Números ordenados de menor a maior");
  system("color 90");
  system("cls");
  printf(" N\243meros ordenados de menor a maior\n");
  float num, numero;
  printf("Introduce o primeiro n\243mero:\n");
  scanf("%f", &num);
  printf("Introduce o segundo n\243mero:\n");
  scanf("%f", &numero);
  if (num < numero) {
    printf("\n%f\n", num);
    printf("%f\n\n", numero);
  } else {
    if (num > numero) {
      printf("\n%f\n", numero);
      printf("%f\n\n", num);
    } else {
      printf("\n%f\n", num);
      printf("%f\n\n", numero);
    }
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11f3 <main+0xc3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeca(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1268 <main+0x138>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1235 <main+0x105>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe88(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe76(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1263 <main+0x133>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe55(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe43(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1268 <main+0x138>
lea    0xe35(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xeb4(%rip),%rdi
call   1040 <system@plt>
lea    0xed2(%rip),%rdi
call   1040 <system@plt>
lea    0xecf(%rip),%rdi
call   1040 <system@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm3
movaps %xmm3,0x10(%rsp)
movss  0x8(%rsp),%xmm2
movaps %xmm2,0x20(%rsp)
movaps %xmm2,%xmm0
minss  %xmm3,%xmm0
movaps %xmm3,%xmm1
cmpltss %xmm2,%xmm1
movaps %xmm1,%xmm2
andnps %xmm0,%xmm2
andps  %xmm3,%xmm1
orps   %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe4d(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movaps 0x10(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
ucomiss %xmm1,%xmm2
movss  0x8(%rsp),%xmm0
ja     1220 <main+0xe0>
cmpltss %xmm1,%xmm2
movss  0xc(%rsp),%xmm1
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe14(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe0b(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"title N\C3\BAmeros ordenados de menor a maior\00"
@.str.1 = [9 x i8] c"color 90\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.3 = [37 x i8] c" N\A3meros ordenados de menor a maior\0A\00"
@.str.4 = [30 x i8] c"Introduce o primeiro n\A3mero:\0A\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [29 x i8] c"Introduce o segundo n\A3mero:\0A\00"
@.str.7 = [5 x i8] c"\0A%f\0A\00"
@.str.8 = [5 x i8] c"%f\0A\0A\00"
@.str.9 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 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 ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %3)
%12 = load float, float* %2
%13 = load float, float* %3
%14 = fcmp olt float %12, %13
br i1 %14, label %15, label %22
15: ; preds = %0
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double %17)
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), double %20)
br label %41
22: ; preds = %0
%23 = load float, float* %2
%24 = load float, float* %3
%25 = fcmp ogt float %23, %24
br i1 %25, label %26, label %33
26: ; preds = %22
%27 = load float, float* %3
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double %28)
%30 = load float, float* %2
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), double %31)
br label %40
33: ; preds = %22
%34 = load float, float* %2
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double %35)
%37 = load float, float* %3
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), double %38)
br label %40
40: ; preds = %33, %26
br label %41
41: ; preds = %40, %15
%42 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"title N\C3\BAmeros ordenados de menor a maior\00"
@.str.1 = [9 x i8] c"color 90\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.7 = [5 x i8] c"\0A%f\0A\00"
@.str.8 = [5 x i8] c"%f\0A\0A\00"
@.str.9 = [6 x i8] c"pause\00"
@str = [36 x i8] c" N\A3meros ordenados de menor a maior\00"
@str.10 = [29 x i8] c"Introduce o primeiro n\A3mero:\00"
@str.11 = [28 x i8] c"Introduce o segundo n\A3mero:\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = tail call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%7 = bitcast float* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.10, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %1)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.11, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %2)
%13 = load float, float* %1
%14 = load float, float* %2
%15 = fcmp olt float %13, %14
%16 = fcmp ogt float %13, %14
%17 = select i1 %16, float %14, float %13
%18 = select i1 %15, float %13, float %17
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double %19)
%21 = load float, float* %2
%22 = load float, float* %1
%23 = select i1 %16, float %22, float %21
%24 = select i1 %15, float %21, float %23
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), double %25)
%27 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}