#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 km, litro, consumo;
  printf("Digite a distancia em km: ");
  scanf("%f", &km);
  printf("Digite o consumo de gasolina em litros: ");
  scanf("%f", &litro);
  consumo = km / litro;
  if (consumo < 8) {
    printf("Venda o carro! %.2f", consumo);
  } else if (consumo >= 8 && consumo <= 12) {
    printf("Econômico! %.2f", consumo);
  } else {
    printf("Super Econômico! %.2f", consumo);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe7e(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11a8 <main+0x88>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
movss  -0x10(%rbp),%xmm0
movss  0xe4b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11ec <main+0xcc>
movss  0xe3e(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11ec <main+0xcc>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe89(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1203 <main+0xe3>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm1
divss  0x8(%rsp),%xmm1
movss  0xe8a(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    118b <main+0x6b>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xec6(%rip),%rdi
jmp    11b8 <main+0x98>
ucomiss 0xe6e(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
jb     11b1 <main+0x91>
movss  0xe61(%rip),%xmm2
ucomiss %xmm1,%xmm2
jb     11b1 <main+0x91>
lea    0xeba(%rip),%rdi
jmp    11b8 <main+0x98>
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Digite a distancia em km: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [41 x i8] c"Digite o consumo de gasolina em litros: \00"
@.str.3 = [20 x i8] c"Venda o carro! %.2f\00"
@.str.4 = [17 x i8] c"Econ\C3\B4mico! %.2f\00"
@.str.5 = [23 x i8] c"Super Econ\C3\B4mico! %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 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* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 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* %3)
%9 = load float, float* %2
%10 = load float, float* %3
%11 = fdiv float %9, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = fcmp olt float %12, 8.000000e+00
br i1 %13, label %14, label %18
14: ; preds = %0
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %16)
br label %33
18: ; preds = %0
%19 = load float, float* %4
%20 = fcmp oge float %19, 8.000000e+00
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load float, float* %4
%23 = fcmp ole float %22, 1.200000e+01
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load float, float* %4
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %26)
br label %32
28: ; preds = %21, %18
%29 = load float, float* %4
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %30)
br label %32
32: ; preds = %28, %24
br label %33
33: ; preds = %32, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Digite a distancia em km: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [41 x i8] c"Digite o consumo de gasolina em litros: \00"
@.str.3 = [20 x i8] c"Venda o carro! %.2f\00"
@.str.4 = [17 x i8] c"Econ\C3\B4mico! %.2f\00"
@.str.5 = [23 x i8] c"Super Econ\C3\B4mico! %.2f\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 ([27 x i8], [27 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 ([41 x i8], [41 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 = fdiv float %9, %10
%12 = fcmp olt float %11, 8.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = fpext float %11 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %14)
br label %25
16: ; preds = %0
%17 = fcmp oge float %11, 8.000000e+00
%18 = fcmp ole float %11, 1.200000e+01
%19 = and i1 %17, %18
%20 = fpext float %11 to double
br i1 %19, label %21, label %23
21: ; preds = %16
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %20)
br label %25
23: ; preds = %16
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %20)
br label %25
25: ; preds = %21, %23, %13
ret i32 0
}