#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 main() {
  float num1, num2, maior, menor;
  printf("Digite o 1o numero: ");
  scanf("%f", &num1);
  printf("Digite o 2o numero: ");
  scanf("%f", &num2);
  if (num1 == num2) {
    printf("Números iguais!");
  } else {
    if (num1 > num2) {
      maior = num1;
      menor = num2;
      printf("%.2f maior que %.2f\n", num1, num2);
    } else {
      maior = num2;
      menor = num1;
      printf("%.2f maior que %.2f\n", num1, num2);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    1193 <main+0x73>
jp     1193 <main+0x73>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1214 <main+0xf4>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11db <main+0xbb>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe6f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    120f <main+0xef>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe36(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    1214 <main+0xf4>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jne    1185 <main+0x65>
jp     1185 <main+0x65>
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    119b <main+0x7b>
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xeaa(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Digite o 1o numero: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [21 x i8] c"Digite o 2o numero: \00"
@.str.3 = [17 x i8] c"N\C3\BAmeros iguais!\00"
@.str.4 = [21 x i8] c"%.2f maior que %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%10 = load float, float* %2
%11 = load float, float* %3
%12 = fcmp oeq float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %36
15: ; preds = %0
%16 = load float, float* %2
%17 = load float, float* %3
%18 = fcmp ogt float %16, %17
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load float, float* %2
store float %20, float* %4
%21 = load float, float* %3
store float %21, float* %5
%22 = load float, float* %2
%23 = fpext float %22 to double
%24 = load float, float* %3
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %23, double %25)
br label %35
27: ; preds = %15
%28 = load float, float* %3
store float %28, float* %4
%29 = load float, float* %2
store float %29, float* %5
%30 = load float, float* %2
%31 = fpext float %30 to double
%32 = load float, float* %3
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %31, double %33)
br label %35
35: ; preds = %27, %19
br label %36
36: ; preds = %35, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Digite o 1o numero: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [21 x i8] c"Digite o 2o numero: \00"
@.str.3 = [17 x i8] c"N\C3\BAmeros iguais!\00"
@.str.4 = [21 x i8] c"%.2f maior que %.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fcmp oeq float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %18
14: ; preds = %0
%15 = fpext float %9 to double
%16 = fpext float %10 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %15, double %16)
br label %18
18: ; preds = %14, %12
ret i32 0
}