#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 intervaloRecursos(int iRecursos, int iIntervalo) {
  if (iRecursos > 333) {
    printf("\nRecursos abundantes\n");
    iIntervalo = 1;
  } else if ((iRecursos < 333) && (iRecursos > 110)) {
    printf("\nRecursos adequados\n");
    iIntervalo = 2;
  } else if ((iRecursos < 110) && (iRecursos > 50)) {
    printf("\nRecursos criticos\n");
    iIntervalo = 3;
  } else if (iRecursos < 50) {
    printf("\nRecursos Escassos\n");
    iIntervalo = 4;
  }
  return iIntervalo;
}


x86 assembly (clang, -O0):
<intervaloRecursos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x14d,-0x4(%rbp)
jle    1143 <intervaloRecursos+0x33>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
jmp    11ca <intervaloRecursos+0xba>
cmpl   $0x14d,-0x4(%rbp)
jge    1172 <intervaloRecursos+0x62>
cmpl   $0x6e,-0x4(%rbp)
jle    1172 <intervaloRecursos+0x62>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x2,-0x8(%rbp)
jmp    11c5 <intervaloRecursos+0xb5>
cmpl   $0x6e,-0x4(%rbp)
jge    119e <intervaloRecursos+0x8e>
cmpl   $0x32,-0x4(%rbp)
jle    119e <intervaloRecursos+0x8e>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x3,-0x8(%rbp)
jmp    11c0 <intervaloRecursos+0xb0>
cmpl   $0x32,-0x4(%rbp)
jge    11bb <intervaloRecursos+0xab>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
movl   $0x4,-0x8(%rbp)
jmp    11c0 <intervaloRecursos+0xb0>
jmp    11c5 <intervaloRecursos+0xb5>
jmp    11ca <intervaloRecursos+0xba>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intervaloRecursos>:
push   %rbx
cmp    $0x14d,%edi
jle    1127 <intervaloRecursos+0x17>
mov    $0x1,%ebx
lea    0xf15(%rip),%rdi
jmp    1165 <intervaloRecursos+0x55>
mov    %esi,%ebx
je     113e <intervaloRecursos+0x2e>
cmp    $0x6e,%edi
jle    113e <intervaloRecursos+0x2e>
mov    $0x2,%ebx
lea    0xeea(%rip),%rdi
jmp    1165 <intervaloRecursos+0x55>
lea    -0x33(%rdi),%eax
cmp    $0x3b,%eax
jae    1154 <intervaloRecursos+0x44>
mov    $0x3,%ebx
lea    0xec1(%rip),%rdi
jmp    1165 <intervaloRecursos+0x55>
cmp    $0x31,%edi
jg     116a <intervaloRecursos+0x5a>
mov    $0x4,%ebx
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0ARecursos abundantes\0A\00"
@.str.1 = [21 x i8] c"\0ARecursos adequados\0A\00"
@.str.2 = [20 x i8] c"\0ARecursos criticos\0A\00"
@.str.3 = [20 x i8] c"\0ARecursos Escassos\0A\00"
define i32 @intervaloRecursos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 333
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %4
br label %33
9: ; preds = %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 333
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 110
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 2, i32* %4
br label %32
17: ; preds = %12, %9
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 110
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 50
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
store i32 3, i32* %4
br label %31
25: ; preds = %20, %17
%26 = load i32, i32* %3
%27 = icmp slt i32 %26, 50
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
store i32 4, i32* %4
br label %30
30: ; preds = %28, %25
br label %31
31: ; preds = %30, %23
br label %32
32: ; preds = %31, %15
br label %33
33: ; preds = %32, %7
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
@str = [19 x i8] c"\0ARecursos Escassos\00"
@str.4 = [19 x i8] c"\0ARecursos criticos\00"
@str.5 = [20 x i8] c"\0ARecursos adequados\00"
@str.6 = [21 x i8] c"\0ARecursos abundantes\00"
define i32 @intervaloRecursos(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 333
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = icmp ne i32 %0, 333
%6 = icmp sgt i32 %0, 110
%7 = and i1 %5, %6
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add i32 %0, -51
%10 = icmp ult i32 %9, 59
br i1 %10, label %13, label %11
11: ; preds = %8
%12 = icmp slt i32 %0, 50
br i1 %12, label %13, label %17
13: ; preds = %11, %8, %4, %2
%14 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0), %2 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0), %4 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0), %8 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), %11 ]
%15 = phi i32 [ 1, %2 ], [ 2, %4 ], [ 3, %8 ], [ 4, %11 ]
%16 = tail call i32 @puts(i8* dereferenceable(1) %14)
br label %17
17: ; preds = %13, %11
%18 = phi i32 [ %1, %11 ], [ %15, %13 ]
ret i32 %18
}