#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 *);
int main(void) {
  double x;
  scanf("%lf", &x);
  if (x < 0.0 || x > 100.0) {
    printf("Fora de intervalo\n");
  } else if (x <= 25.0) {
    printf("Intervalo [0,25]\n");
  } else if (x <= 50.0) {
    printf("Intervalo (25,50]\n");
  } else if (x <= 75.0) {
    printf("Intervalo (50,75]\n");
  } else if (x <= 100.0) {
    printf("Intervalo (75,100]\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1164 <main+0x44>
movsd  -0x10(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1175 <main+0x55>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1214 <main+0xf4>
movsd  0xe8b(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1199 <main+0x79>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    120f <main+0xef>
movsd  0xe6f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11bd <main+0x9d>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    120a <main+0xea>
movsd  0xe53(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11e1 <main+0xc1>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
jmp    1205 <main+0xe5>
movsd  0xe17(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1200 <main+0xe0>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    1205 <main+0xe5>
jmp    120a <main+0xea>
jmp    120f <main+0xef>
jmp    1214 <main+0xf4>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
lea    0xf28(%rip),%rdi
ja     11aa <main+0x8a>
ucomisd 0xeb2(%rip),%xmm0
ja     11aa <main+0x8a>
movsd  0xeb0(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1191 <main+0x71>
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    119a <main+0x7a>
movsd  0xea4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11a3 <main+0x83>
movsd  0xe7e(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11af <main+0x8f>
lea    0xe95(%rip),%rdi
jmp    11aa <main+0x8a>
lea    0xec3(%rip),%rdi
jmp    11aa <main+0x8a>
lea    0xea8(%rip),%rdi
jmp    11aa <main+0x8a>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [19 x i8] c"Fora de intervalo\0A\00"
@.str.2 = [18 x i8] c"Intervalo [0,25]\0A\00"
@.str.3 = [19 x i8] c"Intervalo (25,50]\0A\00"
@.str.4 = [19 x i8] c"Intervalo (50,75]\0A\00"
@.str.5 = [20 x i8] c"Intervalo (75,100]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load double, double* %2
%8 = fcmp ogt double %7, 1.000000e+02
br i1 %8, label %9, label %11
9: ; preds = %6, %0
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %35
11: ; preds = %6
%12 = load double, double* %2
%13 = fcmp ole double %12, 2.500000e+01
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %34
16: ; preds = %11
%17 = load double, double* %2
%18 = fcmp ole double %17, 5.000000e+01
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %33
21: ; preds = %16
%22 = load double, double* %2
%23 = fcmp ole double %22, 7.500000e+01
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %32
26: ; preds = %21
%27 = load double, double* %2
%28 = fcmp ole double %27, 1.000000e+02
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
br label %32
32: ; preds = %31, %24
br label %33
33: ; preds = %32, %19
br label %34
34: ; preds = %33, %14
br label %35
35: ; preds = %34, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@str = [19 x i8] c"Intervalo (75,100]\00"
@str.6 = [18 x i8] c"Intervalo (50,75]\00"
@str.7 = [18 x i8] c"Intervalo (25,50]\00"
@str.8 = [17 x i8] c"Intervalo [0,25]\00"
@str.9 = [18 x i8] c"Fora de intervalo\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fcmp olt double %4, 0.000000e+00
%6 = fcmp ogt double %4, 1.000000e+02
%7 = or i1 %5, %6
br i1 %7, label %16, label %8
8: ; preds = %0
%9 = fcmp ugt double %4, 2.500000e+01
br i1 %9, label %10, label %16
10: ; preds = %8
%11 = fcmp ugt double %4, 5.000000e+01
br i1 %11, label %12, label %16
12: ; preds = %10
%13 = fcmp ugt double %4, 7.500000e+01
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = fcmp ugt double %4, 1.000000e+02
br i1 %15, label %19, label %16
16: ; preds = %14, %12, %10, %8, %0
%17 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.9, i64 0, i64 0), %0 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.8, i64 0, i64 0), %8 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.6, i64 0, i64 0), %12 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), %14 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
br label %19
19: ; preds = %16, %14
ret i32 0
}