#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 *, int *, int *, int *, int *, int *);
int main() {
  int interf, inteli, encap, indent, structs;
  int requisito = 0;
  scanf("%d%d%d%d%d", &interf, &inteli, &encap, &indent, &structs);
  if (interf || inteli) {
    requisito = requisito + 1;
  }
  if (encap && indent) {
    requisito = requisito + 1;
  }
  if (structs) {
    requisito = requisito + 1;
  }
  if (requisito == 3) {
    printf("AVALIADO\n");
  } else {
    printf("0\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    116a <main+0x4a>
cmpl   $0x0,-0xc(%rbp)
je     1173 <main+0x53>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1190 <main+0x70>
cmpl   $0x0,-0x14(%rbp)
je     1190 <main+0x70>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11a3 <main+0x83>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jne    11be <main+0x9e>
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
jmp    11ca <main+0xaa>
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x4(%rsp),%r9
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
xor    %ecx,%ecx
or     0x10(%rsp),%eax
setne  %cl
lea    0x1(%rcx),%eax
cmpl   $0x0,0x8(%rsp)
cmove  %ecx,%eax
cmpl   $0x0,0xc(%rsp)
cmove  %ecx,%eax
cmpl   $0x1,0x4(%rsp)
sbb    $0xffffffff,%eax
cmp    $0x3,%eax
lea    0xe92(%rip),%rax
lea    0xe89(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d%d%d%d%d\00"
@.str.1 = [10 x i8] c"AVALIADO\0A\00"
@.str.2 = [3 x i8] c"0\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5, i32* %6)
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %0
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11, %0
%15 = load i32, i32* %7
%16 = add nsw i32 %15, 1
store i32 %16, i32* %7
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load i32, i32* %5
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %26
26: ; preds = %23, %20, %17
%27 = load i32, i32* %6
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %32
32: ; preds = %29, %26
%33 = load i32, i32* %7
%34 = icmp eq i32 %33, 3
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %39
37: ; preds = %32
%38 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d%d%d%d%d\00"
@str = [2 x i8] c"0\00"
@str.3 = [9 x i8] c"AVALIADO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %1
%13 = icmp ne i32 %12, 0
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 0
%16 = select i1 %13, i1 true, i1 %15
%17 = zext i1 %16 to i32
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 0
%22 = select i1 %19, i1 %21, i1 false
%23 = select i1 %16, i32 2, i32 1
%24 = select i1 %22, i32 %23, i32 %17
%25 = load i32, i32* %5
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i32
%28 = add nuw nsw i32 %24, %27
%29 = icmp eq i32 %28, 3
%30 = select i1 %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%31 = call i32 @puts(i8* dereferenceable(1) %30)
ret i32 0
}