#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 **, char **, char **);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char a[128], b[128], c[128];
  scanf("%s%s%s", &a, &b, &c);
  if (strcmp(a, "vertebrado") == 0) {
    if (strcmp(b, "ave") == 0) {
      if (strcmp(c, "carnivoro") == 0) {
        printf("aguia\n");
      } else {
        printf("pomba\n");
      }
    } else {
      if (strcmp(c, "onivoro") == 0) {
        printf("homem\n");
      } else {
        printf("vaca\n");
      }
    }
  } else {
    if (strcmp(b, "inseto") == 0) {
      if (strcmp(c, "hematofago") == 0) {
        printf("pulga\n");
      } else {
        printf("lagarta\n");
      }
    } else {
      if (strcmp(c, "hematofago") == 0) {
        printf("sanguessuga\n");
      } else {
        printf("minhoca\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
lea    -0x110(%rbp),%rdx
lea    -0x190(%rbp),%rcx
lea    0xea2(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1220 <main+0xf0>
lea    -0x110(%rbp),%rdi
lea    0xe84(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11dc <main+0xac>
lea    -0x190(%rbp),%rdi
lea    0xe6b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11cb <main+0x9b>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    11d7 <main+0xa7>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    121b <main+0xeb>
lea    -0x190(%rbp),%rdi
lea    0xe44(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    120a <main+0xda>
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xe6>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    121b <main+0xeb>
jmp    12c0 <main+0x190>
lea    -0x110(%rbp),%rdi
lea    0xe15(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    127c <main+0x14c>
lea    -0x190(%rbp),%rdi
lea    0xdff(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    126b <main+0x13b>
lea    0xdf4(%rip),%rdi
call   1030 <printf@plt>
jmp    1277 <main+0x147>
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
jmp    12bb <main+0x18b>
lea    -0x190(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12aa <main+0x17a>
lea    0xdc5(%rip),%rdi
call   1030 <printf@plt>
jmp    12b6 <main+0x186>
lea    0xdc1(%rip),%rdi
call   1030 <printf@plt>
jmp    12bb <main+0x18b>
jmp    12c0 <main+0x190>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x180,%rsp
lea    0xec1(%rip),%rdi
lea    0x100(%rsp),%rbx
lea    0x80(%rsp),%rdx
mov    %rsp,%rcx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11ac <main+0x7c>
lea    0xeb3(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1040 <strcmp@plt>
mov    %rax,%rbx
lea    0xea3(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rbx,%rbx
je     11e7 <main+0xb7>
test   %rax,%rax
lea    0xe9f(%rip),%rax
lea    0xe90(%rip),%rdi
jmp    121a <main+0xea>
lea    0xe5f(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11fa <main+0xca>
lea    0xe54(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xe83(%rip),%rax
lea    0xe77(%rip),%rdi
jmp    121a <main+0xea>
test   %rax,%rax
lea    0xe65(%rip),%rax
lea    0xe56(%rip),%rdi
jmp    121a <main+0xea>
lea    0xe15(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xe5a(%rip),%rax
lea    0xe4d(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%s%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 = [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() {
%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 = bitcast [128 x i8]* %3 to i8**
%7 = bitcast [128 x i8]* %4 to i8**
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %5, i8** %6, i8** %7)
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %35
12: ; preds = %0
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %24
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %34
25: ; preds = %12
%26 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %33
31: ; preds = %25
%32 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %33
33: ; preds = %31, %29
br label %34
34: ; preds = %33, %24
br label %58
35: ; preds = %0
%36 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %48
39: ; preds = %35
%40 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %47
45: ; preds = %39
%46 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
br label %47
47: ; preds = %45, %43
br label %57
48: ; preds = %35
%49 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%50 = call i64 @strcmp(i8* %49, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %56
54: ; preds = %48
%55 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
br label %56
56: ; preds = %54, %52
br label %57
57: ; preds = %56, %47
br label %58
58: ; preds = %57, %34
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%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 = [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() {
%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 = bitcast [128 x i8]* %2 to i8**
%9 = bitcast [128 x i8]* %3 to i8**
%10 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %7, i8** %8, i8** %9)
%11 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %0
%14 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, 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 %33
20: ; preds = %13
%21 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
%23 = select i1 %22, 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 %33
24: ; preds = %0
%25 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
%27 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %26, label %29, label %31
29: ; preds = %24
%30 = select i1 %28, 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 %33
31: ; preds = %24
%32 = select i1 %28, 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 %33
33: ; preds = %31, %29, %20, %16
%34 = phi i8* [ %19, %16 ], [ %23, %20 ], [ %30, %29 ], [ %32, %31 ]
%35 = call i32 @puts(i8* dereferenceable(1) %34)
ret i32 0
}