#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 __BNF_trans_string(char *);
int organism(void) {
  int state;
  do {
    state = __BNF_trans_string("troll");
    if (!state)
      break;
    state = __BNF_trans_string("bear");
    if (!state)
      break;
    state = __BNF_trans_string("dragon");
    if (!state)
      break;
    state = __BNF_trans_string("bird");
    if (!state)
      break;
    state = __BNF_trans_string("pirate");
    if (!state)
      break;
    state = __BNF_trans_string("dwarf");
    if (!state)
      break;
    state = __BNF_trans_string("dwarves");
    if (!state)
      break;
    state = __BNF_trans_string("snake");
    if (!state)
      break;
    state = __BNF_trans_string("clam");
    if (!state)
      break;
    state = __BNF_trans_string("oyster");
    if (!state)
      break;
    state = __BNF_trans_string("plant");
    if (!state)
      break;
    state = __BNF_trans_string("giant");
    if (!state)
      break;
    state = __BNF_trans_string("shadow");
    if (!state)
      break;
    state = __BNF_trans_string("figure");
  } while (0);
  return state;
}


x86 assembly (clang, -O0):
<organism>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1136 <organism+0x26>
jmp    12ad <organism+0x19d>
lea    0xec9(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1154 <organism+0x44>
jmp    12ad <organism+0x19d>
lea    0xeb0(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1172 <organism+0x62>
jmp    12ad <organism+0x19d>
lea    0xe99(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1190 <organism+0x80>
jmp    12ad <organism+0x19d>
lea    0xe80(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11ae <organism+0x9e>
jmp    12ad <organism+0x19d>
lea    0xe69(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11cc <organism+0xbc>
jmp    12ad <organism+0x19d>
lea    0xe51(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11ea <organism+0xda>
jmp    12ad <organism+0x19d>
lea    0xe3b(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1208 <organism+0xf8>
jmp    12ad <organism+0x19d>
lea    0xe23(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1226 <organism+0x116>
jmp    12ad <organism+0x19d>
lea    0xe0a(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1244 <organism+0x134>
jmp    12ad <organism+0x19d>
lea    0xdf3(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1262 <organism+0x152>
jmp    12ad <organism+0x19d>
lea    0xddb(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1280 <organism+0x170>
jmp    12ad <organism+0x19d>
lea    0xdc3(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    129e <organism+0x18e>
jmp    12ad <organism+0x19d>
lea    0xdac(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<organism>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xeda(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xecb(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xebe(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xeaf(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xea2(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe98(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe90(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe86(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe7b(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe72(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe68(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe5e(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     1202 <organism+0xf2>
lea    0xe55(%rip),%rdi
pop    %rax
jmp    1030 <__BNF_trans_string@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"troll\00"
@.str.1 = [5 x i8] c"bear\00"
@.str.2 = [7 x i8] c"dragon\00"
@.str.3 = [5 x i8] c"bird\00"
@.str.4 = [7 x i8] c"pirate\00"
@.str.5 = [6 x i8] c"dwarf\00"
@.str.6 = [8 x i8] c"dwarves\00"
@.str.7 = [6 x i8] c"snake\00"
@.str.8 = [5 x i8] c"clam\00"
@.str.9 = [7 x i8] c"oyster\00"
@.str.10 = [6 x i8] c"plant\00"
@.str.11 = [6 x i8] c"giant\00"
@.str.12 = [7 x i8] c"shadow\00"
@.str.13 = [7 x i8] c"figure\00"
define i32 @organism() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %2
br label %69
7: ; preds = %2
%8 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
br label %69
12: ; preds = %7
%13 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 %13, i32* %1
%14 = load i32, i32* %1
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %12
br label %69
17: ; preds = %12
%18 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i32 %18, i32* %1
%19 = load i32, i32* %1
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %17
br label %69
22: ; preds = %17
%23 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i32 %23, i32* %1
%24 = load i32, i32* %1
%25 = icmp ne i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %22
br label %69
27: ; preds = %22
%28 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
store i32 %28, i32* %1
%29 = load i32, i32* %1
%30 = icmp ne i32 %29, 0
br i1 %30, label %32, label %31
31: ; preds = %27
br label %69
32: ; preds = %27
%33 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i32 %33, i32* %1
%34 = load i32, i32* %1
%35 = icmp ne i32 %34, 0
br i1 %35, label %37, label %36
36: ; preds = %32
br label %69
37: ; preds = %32
%38 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
store i32 %38, i32* %1
%39 = load i32, i32* %1
%40 = icmp ne i32 %39, 0
br i1 %40, label %42, label %41
41: ; preds = %37
br label %69
42: ; preds = %37
%43 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
store i32 %43, i32* %1
%44 = load i32, i32* %1
%45 = icmp ne i32 %44, 0
br i1 %45, label %47, label %46
46: ; preds = %42
br label %69
47: ; preds = %42
%48 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
store i32 %48, i32* %1
%49 = load i32, i32* %1
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %47
br label %69
52: ; preds = %47
%53 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
store i32 %53, i32* %1
%54 = load i32, i32* %1
%55 = icmp ne i32 %54, 0
br i1 %55, label %57, label %56
56: ; preds = %52
br label %69
57: ; preds = %52
%58 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
store i32 %58, i32* %1
%59 = load i32, i32* %1
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %57
br label %69
62: ; preds = %57
%63 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
store i32 %63, i32* %1
%64 = load i32, i32* %1
%65 = icmp ne i32 %64, 0
br i1 %65, label %67, label %66
66: ; preds = %62
br label %69
67: ; preds = %62
%68 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
store i32 %68, i32* %1
br label %69
69: ; preds = %67, %66, %61, %56, %51, %46, %41, %36, %31, %26, %21, %16, %11, %6
%70 = load i32, i32* %1
ret i32 %70
}

LLVM IR (-O2):
@.str = [6 x i8] c"troll\00"
@.str.1 = [5 x i8] c"bear\00"
@.str.2 = [7 x i8] c"dragon\00"
@.str.3 = [5 x i8] c"bird\00"
@.str.4 = [7 x i8] c"pirate\00"
@.str.5 = [6 x i8] c"dwarf\00"
@.str.6 = [8 x i8] c"dwarves\00"
@.str.7 = [6 x i8] c"snake\00"
@.str.8 = [5 x i8] c"clam\00"
@.str.9 = [7 x i8] c"oyster\00"
@.str.10 = [6 x i8] c"plant\00"
@.str.11 = [6 x i8] c"giant\00"
@.str.12 = [7 x i8] c"shadow\00"
@.str.13 = [7 x i8] c"figure\00"
define i32 @organism() {
%1 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %41, label %3
3: ; preds = %0
%4 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %41, label %6
6: ; preds = %3
%7 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %41, label %9
9: ; preds = %6
%10 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %41, label %12
12: ; preds = %9
%13 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %41, label %15
15: ; preds = %12
%16 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %41, label %18
18: ; preds = %15
%19 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %41, label %21
21: ; preds = %18
%22 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %41, label %24
24: ; preds = %21
%25 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %41, label %27
27: ; preds = %24
%28 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%29 = icmp eq i32 %28, 0
br i1 %29, label %41, label %30
30: ; preds = %27
%31 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %41, label %33
33: ; preds = %30
%34 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %41, label %36
36: ; preds = %33
%37 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %36
%40 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %41
41: ; preds = %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0, %39
%42 = phi i32 [ %40, %39 ], [ 0, %36 ], [ 0, %33 ], [ 0, %30 ], [ 0, %27 ], [ 0, %24 ], [ 0, %21 ], [ 0, %18 ], [ 0, %15 ], [ 0, %12 ], [ 0, %9 ], [ 0, %6 ], [ 0, %3 ], [ 0, %0 ]
ret i32 %42
}