#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 **);
int main() {
  char a[12], b[12], c[12];
  scanf("%s %s %s", &a, &b, &c);
  if (a[0] == 'v' && b[0] == 'a' && c[0] == 'c') {
    printf("aguia\n");
  } else if (a[0] == 'v' && b[0] == 'a' && c[0] == 'o') {
    printf("pomba\n");
  } else if (a[0] == 'v' && b[0] == 'm' && c[0] == 'o') {
    printf("homem\n");
  } else if (a[0] == 'v' && b[0] == 'm' && c[0] == 'h') {
    printf("vaca\n");
  } else if (a[0] == 'i' && b[0] == 'i' && c[2] == 'm') {
    printf("pulga\n");
  } else if (a[0] == 'i' && b[0] == 'i' && c[2] == 'r') {
    printf("lagarta\n");
  } else if (a[0] == 'i' && b[0] == 'a' && c[0] == 'h') {
    printf("sanguessuga\n");
  } else if (a[0] == 'i' && b[0] == 'a' && c[0] == 'o') {
    printf("minhoca\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    0xebe(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x10(%rbp),%eax
cmp    $0x76,%eax
jne    117f <main+0x5f>
movsbl -0x1c(%rbp),%eax
cmp    $0x61,%eax
jne    117f <main+0x5f>
movsbl -0x28(%rbp),%eax
cmp    $0x63,%eax
jne    117f <main+0x5f>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    1325 <main+0x205>
movsbl -0x10(%rbp),%eax
cmp    $0x76,%eax
jne    11b7 <main+0x97>
movsbl -0x1c(%rbp),%eax
cmp    $0x61,%eax
jne    11b7 <main+0x97>
movsbl -0x28(%rbp),%eax
cmp    $0x6f,%eax
jne    11b7 <main+0x97>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    1320 <main+0x200>
movsbl -0x10(%rbp),%eax
cmp    $0x76,%eax
jne    11ef <main+0xcf>
movsbl -0x1c(%rbp),%eax
cmp    $0x6d,%eax
jne    11ef <main+0xcf>
movsbl -0x28(%rbp),%eax
cmp    $0x6f,%eax
jne    11ef <main+0xcf>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    131b <main+0x1fb>
movsbl -0x10(%rbp),%eax
cmp    $0x76,%eax
jne    1227 <main+0x107>
movsbl -0x1c(%rbp),%eax
cmp    $0x6d,%eax
jne    1227 <main+0x107>
movsbl -0x28(%rbp),%eax
cmp    $0x68,%eax
jne    1227 <main+0x107>
lea    0xe01(%rip),%rdi
call   1030 <printf@plt>
jmp    1316 <main+0x1f6>
movsbl -0x10(%rbp),%eax
cmp    $0x69,%eax
jne    125f <main+0x13f>
movsbl -0x1c(%rbp),%eax
cmp    $0x69,%eax
jne    125f <main+0x13f>
movsbl -0x26(%rbp),%eax
cmp    $0x6d,%eax
jne    125f <main+0x13f>
lea    0xdcf(%rip),%rdi
call   1030 <printf@plt>
jmp    1311 <main+0x1f1>
movsbl -0x10(%rbp),%eax
cmp    $0x69,%eax
jne    1297 <main+0x177>
movsbl -0x1c(%rbp),%eax
cmp    $0x69,%eax
jne    1297 <main+0x177>
movsbl -0x26(%rbp),%eax
cmp    $0x72,%eax
jne    1297 <main+0x177>
lea    0xd9e(%rip),%rdi
call   1030 <printf@plt>
jmp    130c <main+0x1ec>
movsbl -0x10(%rbp),%eax
cmp    $0x69,%eax
jne    12cf <main+0x1af>
movsbl -0x1c(%rbp),%eax
cmp    $0x61,%eax
jne    12cf <main+0x1af>
movsbl -0x28(%rbp),%eax
cmp    $0x68,%eax
jne    12cf <main+0x1af>
lea    0xd6f(%rip),%rdi
call   1030 <printf@plt>
jmp    1307 <main+0x1e7>
movsbl -0x10(%rbp),%eax
cmp    $0x69,%eax
jne    1302 <main+0x1e2>
movsbl -0x1c(%rbp),%eax
cmp    $0x61,%eax
jne    1302 <main+0x1e2>
movsbl -0x28(%rbp),%eax
cmp    $0x6f,%eax
jne    1302 <main+0x1e2>
lea    0xd44(%rip),%rdi
call   1030 <printf@plt>
jmp    1307 <main+0x1e7>
jmp    130c <main+0x1ec>
jmp    1311 <main+0x1f1>
jmp    1316 <main+0x1f6>
jmp    131b <main+0x1fb>
jmp    1320 <main+0x200>
jmp    1325 <main+0x205>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
lea    0x1c(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x1c(%rsp),%sil
mov    %esi,%ecx
xor    $0x76,%cl
mov    0x10(%rsp),%r8b
mov    %r8d,%edx
xor    $0x61,%dl
mov    %ecx,%eax
or     %dl,%al
sete   %r9b
mov    0x4(%rsp),%dil
jne    1175 <main+0x55>
cmp    $0x63,%dil
jne    1175 <main+0x55>
lea    0xecc(%rip),%rdi
jmp    121c <main+0xfc>
cmp    $0x6f,%dil
sete   %al
test   %al,%r9b
je     118d <main+0x6d>
lea    0xeae(%rip),%rdi
jmp    121c <main+0xfc>
mov    %r8d,%eax
xor    $0x6d,%al
or     %al,%cl
sete   %al
jne    11a8 <main+0x88>
cmp    $0x6f,%dil
jne    11a8 <main+0x88>
lea    0xe8a(%rip),%rdi
jmp    121c <main+0xfc>
cmp    $0x68,%dil
sete   %cl
test   %cl,%al
je     11bc <main+0x9c>
lea    0xe71(%rip),%rdi
jmp    121c <main+0xfc>
xor    $0x69,%sil
xor    $0x69,%r8b
or     %sil,%r8b
sete   %al
mov    0x6(%rsp),%cl
jne    11de <main+0xbe>
cmp    $0x6d,%cl
jne    11de <main+0xbe>
lea    0xe49(%rip),%rdi
jmp    121c <main+0xfc>
cmp    $0x72,%cl
sete   %cl
test   %cl,%al
je     11f1 <main+0xd1>
lea    0xe2e(%rip),%rdi
jmp    121c <main+0xfc>
or     %dl,%sil
sete   %al
jne    1208 <main+0xe8>
cmp    $0x68,%dil
jne    1208 <main+0xe8>
lea    0xe0b(%rip),%rdi
jmp    121c <main+0xfc>
cmp    $0x6f,%dil
sete   %cl
and    %cl,%al
cmp    $0x1,%al
jne    1221 <main+0x101>
lea    0xded(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s %s %s\00"
@.str.1 = [7 x i8] c"aguia\0A\00"
@.str.2 = [7 x i8] c"pomba\0A\00"
@.str.3 = [7 x i8] c"homem\0A\00"
@.str.4 = [6 x i8] c"vaca\0A\00"
@.str.5 = [7 x i8] c"pulga\0A\00"
@.str.6 = [9 x i8] c"lagarta\0A\00"
@.str.7 = [13 x i8] c"sanguessuga\0A\00"
@.str.8 = [9 x i8] c"minhoca\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 0, i32* %1
%5 = bitcast [12 x i8]* %2 to i8**
%6 = bitcast [12 x i8]* %3 to i8**
%7 = bitcast [12 x i8]* %4 to i8**
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %5, i8** %6, i8** %7)
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 118
br i1 %12, label %13, label %25
13: ; preds = %0
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 97
br i1 %17, label %18, label %25
18: ; preds = %13
%19 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 99
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %151
25: ; preds = %18, %13, %0
%26 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 118
br i1 %29, label %30, label %42
30: ; preds = %25
%31 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 97
br i1 %34, label %35, label %42
35: ; preds = %30
%36 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 111
br i1 %39, label %40, label %42
40: ; preds = %35
%41 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %150
42: ; preds = %35, %30, %25
%43 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 118
br i1 %46, label %47, label %59
47: ; preds = %42
%48 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 109
br i1 %51, label %52, label %59
52: ; preds = %47
%53 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 111
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %149
59: ; preds = %52, %47, %42
%60 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 118
br i1 %63, label %64, label %76
64: ; preds = %59
%65 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 109
br i1 %68, label %69, label %76
69: ; preds = %64
%70 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 104
br i1 %73, label %74, label %76
74: ; preds = %69
%75 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %148
76: ; preds = %69, %64, %59
%77 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 105
br i1 %80, label %81, label %93
81: ; preds = %76
%82 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 105
br i1 %85, label %86, label %93
86: ; preds = %81
%87 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 2
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp eq i32 %89, 109
br i1 %90, label %91, label %93
91: ; preds = %86
%92 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %147
93: ; preds = %86, %81, %76
%94 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %96, 105
br i1 %97, label %98, label %110
98: ; preds = %93
%99 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 105
br i1 %102, label %103, label %110
103: ; preds = %98
%104 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 2
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp eq i32 %106, 114
br i1 %107, label %108, label %110
108: ; preds = %103
%109 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %146
110: ; preds = %103, %98, %93
%111 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 105
br i1 %114, label %115, label %127
115: ; preds = %110
%116 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp eq i32 %118, 97
br i1 %119, label %120, label %127
120: ; preds = %115
%121 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 104
br i1 %124, label %125, label %127
125: ; preds = %120
%126 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
br label %145
127: ; preds = %120, %115, %110
%128 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp eq i32 %130, 105
br i1 %131, label %132, label %144
132: ; preds = %127
%133 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = icmp eq i32 %135, 97
br i1 %136, label %137, label %144
137: ; preds = %132
%138 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%139 = load i8, i8* %138
%140 = sext i8 %139 to i32
%141 = icmp eq i32 %140, 111
br i1 %141, label %142, label %144
142: ; preds = %137
%143 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %144
144: ; preds = %142, %137, %132, %127
br label %145
145: ; preds = %144, %125
br label %146
146: ; preds = %145, %108
br label %147
147: ; preds = %146, %91
br label %148
148: ; preds = %147, %74
br label %149
149: ; preds = %148, %57
br label %150
150: ; preds = %149, %40
br label %151
151: ; preds = %150, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s %s %s\00"
@str = [8 x i8] c"minhoca\00"
@str.9 = [12 x i8] c"sanguessuga\00"
@str.10 = [8 x i8] c"lagarta\00"
@str.11 = [6 x i8] c"pulga\00"
@str.12 = [5 x i8] c"vaca\00"
@str.13 = [6 x i8] c"homem\00"
@str.14 = [6 x i8] c"pomba\00"
@str.15 = [6 x i8] c"aguia\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%7 = bitcast [12 x i8]* %1 to i8**
%8 = bitcast [12 x i8]* %2 to i8**
%9 = bitcast [12 x i8]* %3 to i8**
%10 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %7, i8** %8, i8** %9)
%11 = load i8, i8* %4
%12 = icmp eq i8 %11, 118
%13 = load i8, i8* %5
%14 = icmp eq i8 %13, 97
%15 = select i1 %12, i1 %14, i1 false
%16 = load i8, i8* %6
%17 = icmp eq i8 %16, 99
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %45, label %19
19: ; preds = %0
%20 = icmp eq i8 %16, 111
%21 = select i1 %15, i1 %20, i1 false
br i1 %21, label %45, label %22
22: ; preds = %19
%23 = icmp eq i8 %13, 109
%24 = select i1 %12, i1 %23, i1 false
%25 = select i1 %24, i1 %20, i1 false
br i1 %25, label %45, label %26
26: ; preds = %22
%27 = icmp eq i8 %16, 104
%28 = select i1 %24, i1 %27, i1 false
br i1 %28, label %45, label %29
29: ; preds = %26
%30 = icmp eq i8 %11, 105
%31 = icmp eq i8 %13, 105
%32 = select i1 %30, i1 %31, i1 false
%33 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 2
%34 = load i8, i8* %33
%35 = icmp eq i8 %34, 109
%36 = select i1 %32, i1 %35, i1 false
br i1 %36, label %45, label %37
37: ; preds = %29
%38 = icmp eq i8 %34, 114
%39 = select i1 %32, i1 %38, i1 false
br i1 %39, label %45, label %40
40: ; preds = %37
%41 = select i1 %30, i1 %14, i1 false
%42 = select i1 %41, i1 %27, i1 false
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = select i1 %41, i1 %20, i1 false
br i1 %44, label %45, label %48
45: ; preds = %43, %40, %37, %29, %26, %22, %19, %0
%46 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.15, i64 0, i64 0), %0 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i64 0, i64 0), %19 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.13, i64 0, i64 0), %22 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.12, i64 0, i64 0), %26 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.11, i64 0, i64 0), %29 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.10, i64 0, i64 0), %37 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.9, i64 0, i64 0), %40 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0), %43 ]
%47 = call i32 @puts(i8* dereferenceable(1) %46)
br label %48
48: ; preds = %45, %43
ret i32 0
}