#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 *, char **);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ system(char *);
int main() {
  char A[128], B[128], C[128];
  scanf("%s", &A);
  scanf("%s", &B);
  scanf("%s", &C);
  if (strcmp(A, "vertebrado") == 0) {
    if (strcmp(B, "ave") == 0) {
      if (strcmp(C, "carnivoro") == 0)
        printf("aguia\n");
      else
        printf("pomba\n");
    }
    if (strcmp(B, "mamifero") == 0) {
      if (strcmp(C, "onivoro") == 0)
        printf("homem\n");
      else
        printf("vaca\n");
    }
  }
  if (strcmp(A, "invertebrado") == 0) {
    if (strcmp(B, "inseto") == 0) {
      if (strcmp(C, "hematofago") == 0)
        printf("pulga\n");
      else
        printf("lagarta\n");
    }
    if (strcmp(B, "anelideo") == 0) {
      if (strcmp(C, "hematofago") == 0)
        printf("sanguessuga\n");
      else
        printf("minhoca\n");
    }
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x110(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x190(%rbp),%rsi
lea    0xe7a(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1265 <main+0x125>
lea    -0x110(%rbp),%rdi
lea    0xe4d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1204 <main+0xc4>
lea    -0x190(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11f3 <main+0xb3>
lea    0xe28(%rip),%rdi
call   1040 <printf@plt>
jmp    11ff <main+0xbf>
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
jmp    1204 <main+0xc4>
lea    -0x110(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1260 <main+0x120>
lea    -0x190(%rbp),%rdi
lea    0xdf9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    124f <main+0x10f>
lea    0xdeb(%rip),%rdi
call   1040 <printf@plt>
jmp    125b <main+0x11b>
lea    0xde1(%rip),%rdi
call   1040 <printf@plt>
jmp    1260 <main+0x120>
jmp    1265 <main+0x125>
lea    -0x90(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    133f <main+0x1ff>
lea    -0x110(%rbp),%rdi
lea    0xdba(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12de <main+0x19e>
lea    -0x190(%rbp),%rdi
lea    0xda4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12cd <main+0x18d>
lea    0xd99(%rip),%rdi
call   1040 <printf@plt>
jmp    12d9 <main+0x199>
lea    0xd8f(%rip),%rdi
call   1040 <printf@plt>
jmp    12de <main+0x19e>
lea    -0x110(%rbp),%rdi
lea    0xd80(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    133a <main+0x1fa>
lea    -0x190(%rbp),%rdi
lea    0xd48(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1329 <main+0x1e9>
lea    0xd56(%rip),%rdi
call   1040 <printf@plt>
jmp    1335 <main+0x1f5>
lea    0xd52(%rip),%rdi
call   1040 <printf@plt>
jmp    133a <main+0x1fa>
jmp    133f <main+0x1ff>
lea    0xd45(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x188,%rsp
lea    0xeaf(%rip),%rbx
lea    0x100(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0x80(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe9e(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    121b <main+0xdb>
lea    0xe65(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11d9 <main+0x99>
lea    0xe50(%rip),%rsi
mov    %rsp,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xeba(%rip),%rax
lea    0xead(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xe31(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    121b <main+0xdb>
lea    0xe21(%rip),%rsi
mov    %rsp,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xe6c(%rip),%rax
lea    0xe60(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xe00(%rip),%rsi
lea    0x100(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    12bc <main+0x17c>
lea    0xdf0(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    127a <main+0x13a>
lea    0xdde(%rip),%rsi
mov    %rsp,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xe02(%rip),%rax
lea    0xdf3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xdc0(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    12bc <main+0x17c>
lea    0xd9c(%rip),%rsi
mov    %rsp,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xdac(%rip),%rax
lea    0xd9d(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xd87(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x188,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [11 x i8] c"vertebrado\00"
@.str.2 = [4 x i8] c"ave\00"
@.str.3 = [10 x i8] c"carnivoro\00"
@.str.4 = [7 x i8] c"aguia\0A\00"
@.str.5 = [7 x i8] c"pomba\0A\00"
@.str.6 = [9 x i8] c"mamifero\00"
@.str.7 = [8 x i8] c"onivoro\00"
@.str.8 = [7 x i8] c"homem\0A\00"
@.str.9 = [6 x i8] c"vaca\0A\00"
@.str.10 = [13 x i8] c"invertebrado\00"
@.str.11 = [7 x i8] c"inseto\00"
@.str.12 = [11 x i8] c"hematofago\00"
@.str.13 = [7 x i8] c"pulga\0A\00"
@.str.14 = [9 x i8] c"lagarta\0A\00"
@.str.15 = [9 x i8] c"anelideo\00"
@.str.16 = [13 x i8] c"sanguessuga\0A\00"
@.str.17 = [9 x i8] c"minhoca\0A\00"
@.str.18 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
%4 = alloca [128 x i8]
store i32 0, i32* %1
%5 = bitcast [128 x i8]* %2 to i8**
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5)
%7 = bitcast [128 x i8]* %3 to i8**
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %7)
%9 = bitcast [128 x i8]* %4 to i8**
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %41
14: ; preds = %0
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %26
24: ; preds = %18
%25 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
br label %27
27: ; preds = %26, %14
%28 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %39
37: ; preds = %31
%38 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
br label %40
40: ; preds = %39, %27
br label %41
41: ; preds = %40, %0
%42 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %72
45: ; preds = %41
%46 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %58
49: ; preds = %45
%50 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %49
%54 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %57
55: ; preds = %49
%56 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
br label %57
57: ; preds = %55, %53
br label %58
58: ; preds = %57, %45
%59 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %71
62: ; preds = %58
%63 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %62
%67 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
br label %70
68: ; preds = %62
%69 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
br label %70
70: ; preds = %68, %66
br label %71
71: ; preds = %70, %58
br label %72
72: ; preds = %71, %41
%73 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [11 x i8] c"vertebrado\00"
@.str.2 = [4 x i8] c"ave\00"
@.str.3 = [10 x i8] c"carnivoro\00"
@.str.6 = [9 x i8] c"mamifero\00"
@.str.7 = [8 x i8] c"onivoro\00"
@.str.10 = [13 x i8] c"invertebrado\00"
@.str.11 = [7 x i8] c"inseto\00"
@.str.12 = [11 x i8] c"hematofago\00"
@.str.15 = [9 x i8] c"anelideo\00"
@.str.18 = [6 x i8] c"pause\00"
@str = [8 x i8] c"minhoca\00"
@str.19 = [12 x i8] c"sanguessuga\00"
@str.20 = [8 x i8] c"lagarta\00"
@str.21 = [6 x i8] c"pulga\00"
@str.22 = [5 x i8] c"vaca\00"
@str.23 = [6 x i8] c"homem\00"
@str.24 = [6 x i8] c"pomba\00"
@str.25 = [6 x i8] c"aguia\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = bitcast [128 x i8]* %1 to i8**
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %7)
%9 = bitcast [128 x i8]* %2 to i8**
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %9)
%11 = bitcast [128 x i8]* %3 to i8**
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %11)
%13 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %31
15: ; preds = %0
%16 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.25, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.24, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
br label %23
23: ; preds = %18, %15
%24 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
%29 = select i1 %28, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.22, i64 0, i64 0)
%30 = call i32 @puts(i8* dereferenceable(1) %29)
br label %31
31: ; preds = %26, %23, %0
%32 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %50
34: ; preds = %31
%35 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
%40 = select i1 %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.21, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.20, i64 0, i64 0)
%41 = call i32 @puts(i8* dereferenceable(1) %40)
br label %42
42: ; preds = %37, %34
%43 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
%48 = select i1 %47, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.19, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%49 = call i32 @puts(i8* dereferenceable(1) %48)
br label %50
50: ; preds = %45, %42, %31
%51 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
ret i32 0
}