#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strtok(char *, char *);
int main(int argc, char const *argv[]) {
  char first[15];
  char second[15];
  char third[15];
  fgets(first, 15, stdin);
  fgets(second, 15, stdin);
  fgets(third, 15, stdin);
  strtok(first, "\n");
  strtok(second, "\n");
  strtok(third, "\n");
  if (strcmp(first, "vertebrado") == 0) {
    if (strcmp(second, "ave") == 0) {
      if (strcmp(third, "carnivoro") == 0) {
        printf("aguia\n");
      } else {
        printf("pomba\n");
      }
    } else {
      if (strcmp(third, "onivoro") == 0) {
        printf("homem\n");
      } else {
        printf("vaca\n");
      }
    }
  } else {
    if (strcmp(second, "inseto") == 0) {
      if (strcmp(third, "hematofago") == 0) {
        printf("pulga\n");
      } else {
        printf("lagarta\n");
      }
    } else {
      if (strcmp(third, "hematofago") == 0) {
        printf("sanguessuga\n");
      } else {
        printf("minhoca\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1f(%rbp),%rdi
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
mov    $0xf,%esi
call   1040 <fgets@plt>
lea    -0x2e(%rbp),%rdi
mov    0x2e70(%rip),%rax
mov    (%rax),%edx
mov    $0xf,%esi
call   1040 <fgets@plt>
lea    -0x3d(%rbp),%rdi
mov    0x2e59(%rip),%rax
mov    (%rax),%edx
mov    $0xf,%esi
call   1040 <fgets@plt>
lea    -0x1f(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1060 <strtok@plt>
lea    -0x2e(%rbp),%rdi
lea    0xe6f(%rip),%rsi
call   1060 <strtok@plt>
lea    -0x3d(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1060 <strtok@plt>
lea    -0x1f(%rbp),%rdi
lea    0xe2a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    127c <main+0x13c>
lea    -0x2e(%rbp),%rdi
lea    0xe1b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    123b <main+0xfb>
lea    -0x3d(%rbp),%rdi
lea    0xe05(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    122a <main+0xea>
lea    0xdf9(%rip),%rdi
call   1030 <printf@plt>
jmp    1236 <main+0xf6>
lea    0xdef(%rip),%rdi
call   1030 <printf@plt>
jmp    1277 <main+0x137>
lea    -0x3d(%rbp),%rdi
lea    0xde1(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1266 <main+0x126>
lea    0xdd3(%rip),%rdi
call   1030 <printf@plt>
jmp    1272 <main+0x132>
lea    0xdc9(%rip),%rdi
call   1030 <printf@plt>
jmp    1277 <main+0x137>
jmp    1313 <main+0x1d3>
lea    -0x2e(%rbp),%rdi
lea    0xdb5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12d2 <main+0x192>
lea    -0x3d(%rbp),%rdi
lea    0xda2(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12c1 <main+0x181>
lea    0xd97(%rip),%rdi
call   1030 <printf@plt>
jmp    12cd <main+0x18d>
lea    0xd8d(%rip),%rdi
call   1030 <printf@plt>
jmp    130e <main+0x1ce>
lea    -0x3d(%rbp),%rdi
lea    0xd66(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12fd <main+0x1bd>
lea    0xd6b(%rip),%rdi
call   1030 <printf@plt>
jmp    1309 <main+0x1c9>
lea    0xd67(%rip),%rdi
call   1030 <printf@plt>
jmp    130e <main+0x1ce>
jmp    1313 <main+0x1d3>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x2e96(%rip),%rbx
mov    (%rbx),%edx
lea    0x29(%rsp),%r14
mov    %r14,%rdi
mov    $0xf,%esi
call   1040 <fgets@plt>
mov    (%rbx),%edx
lea    0x1a(%rsp),%r15
mov    %r15,%rdi
mov    $0xf,%esi
call   1040 <fgets@plt>
mov    (%rbx),%edx
lea    0xb(%rsp),%r12
mov    %r12,%rdi
mov    $0xf,%esi
call   1040 <fgets@plt>
lea    0xe6b(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <strtok@plt>
lea    0xe45(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1207 <main+0xc7>
lea    0xe52(%rip),%rsi
lea    0x1a(%rsp),%rdi
call   1050 <strcmp@plt>
mov    %rax,%rbx
lea    0xe45(%rip),%rsi
lea    0xb(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rbx,%rbx
je     1241 <main+0x101>
test   %rax,%rax
lea    0xe3f(%rip),%rax
lea    0xe30(%rip),%rdi
jmp    1276 <main+0x136>
lea    0xdff(%rip),%rsi
lea    0x1a(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1254 <main+0x114>
lea    0xdf7(%rip),%rsi
lea    0xb(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xe24(%rip),%rax
lea    0xe18(%rip),%rdi
jmp    1276 <main+0x136>
test   %rax,%rax
lea    0xe06(%rip),%rax
lea    0xdf7(%rip),%rdi
jmp    1276 <main+0x136>
lea    0xdb6(%rip),%rsi
lea    0xb(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xdf9(%rip),%rax
lea    0xdec(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c"\0A\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 = [8 x i8] c"onivoro\00"
@.str.9 = [7 x i8] c"inseto\00"
@.str.10 = [11 x i8] c"hematofago\00"
@str = [8 x i8] c"minhoca\00"
@str.15 = [12 x i8] c"sanguessuga\00"
@str.16 = [8 x i8] c"lagarta\00"
@str.17 = [6 x i8] c"pulga\00"
@str.18 = [5 x i8] c"vaca\00"
@str.19 = [6 x i8] c"homem\00"
@str.20 = [6 x i8] c"pomba\00"
@str.21 = [6 x i8] c"aguia\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [15 x i8]
%4 = alloca [15 x i8]
%5 = alloca [15 x i8]
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %6, i32 15, i32 %9)
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %7, i32 15, i32 %11)
%13 = load i32, i32* @stdin
%14 = call i32 @fgets(i8* %8, i32 15, i32 %13)
%15 = call i32 @strtok(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @strtok(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @strtok(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%18 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %31
20: ; preds = %2
%21 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
%26 = select i1 %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.21, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.20, i64 0, i64 0)
br label %40
27: ; preds = %20
%28 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
%30 = select i1 %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.19, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.18, i64 0, i64 0)
br label %40
31: ; preds = %2
%32 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
%34 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %33, label %36, label %38
36: ; preds = %31
%37 = select i1 %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i64 0, i64 0)
br label %40
38: ; preds = %31
%39 = select i1 %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
br label %40
40: ; preds = %38, %36, %27, %23
%41 = phi i8* [ %26, %23 ], [ %30, %27 ], [ %37, %36 ], [ %39, %38 ]
%42 = call i32 @puts(i8* dereferenceable(1) %41)
ret i32 0
}