#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 *, double *, double *);
void main() {
  double a, b;
  printf("Digite 2 numeros reais: ");
  scanf("%lf %lf", &a, &b);
  if (a > b)
    printf("O primeiro numero eh maior.\n");
  else if (a < b)
    printf("O segundo numero eh maior.\n");
  else
    printf("Os dois numeros sao iguais.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1169 <main+0x49>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    119f <main+0x7f>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    118e <main+0x6e>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x7a>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
jmp    119f <main+0x7f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
lea    0xed0(%rip),%rax
lea    0xead(%rip),%rcx
cmova  %rax,%rcx
ucomisd %xmm1,%xmm0
lea    0xed5(%rip),%rdi
cmovbe %rcx,%rdi
call   1030 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Digite 2 numeros reais: \00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [29 x i8] c"O primeiro numero eh maior.\0A\00"
@.str.3 = [28 x i8] c"O segundo numero eh maior.\0A\00"
@.str.4 = [29 x i8] c"Os dois numeros sao iguais.\0A\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%5 = load double, double* %1
%6 = load double, double* %2
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %19
10: ; preds = %0
%11 = load double, double* %1
%12 = load double, double* %2
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %18
16: ; preds = %10
%17 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
br label %19
19: ; preds = %18, %8
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Digite 2 numeros reais: \00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@str = [28 x i8] c"Os dois numeros sao iguais.\00"
@str.5 = [27 x i8] c"O segundo numero eh maior.\00"
@str.6 = [28 x i8] c"O primeiro numero eh maior.\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = load double, double* %2
%9 = fcmp ogt double %7, %8
%10 = fcmp olt double %7, %8
%11 = select i1 %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0)
%12 = select i1 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.6, i64 0, i64 0), i8* %11
%13 = call i32 @puts(i8* dereferenceable(1) %12)
ret void
}