#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 attack_item_verb(void) {
  int state;
  do {
    state = __BNF_trans_string("wave");
    if (!state)
      break;
    state = __BNF_trans_string("shake");
    if (!state)
      break;
    state = __BNF_trans_string("swing");
  } while (0);
  return state;
}


x86 assembly (clang, -O0):
<attack_item_verb>:
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 <attack_item_verb+0x26>
jmp    1163 <attack_item_verb+0x53>
lea    0xec8(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1154 <attack_item_verb+0x44>
jmp    1163 <attack_item_verb+0x53>
lea    0xeb0(%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):
<attack_item_verb>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     113e <attack_item_verb+0x2e>
lea    0xedd(%rip),%rdi
call   1030 <__BNF_trans_string@plt>
test   %eax,%eax
je     113e <attack_item_verb+0x2e>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <__BNF_trans_string@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"wave\00"
@.str.1 = [6 x i8] c"shake\00"
@.str.2 = [6 x i8] c"swing\00"
define i32 @attack_item_verb() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 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 %14
7: ; preds = %2
%8 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 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 %14
12: ; preds = %7
%13 = call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 %13, i32* %1
br label %14
14: ; preds = %12, %11, %6
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [5 x i8] c"wave\00"
@.str.1 = [6 x i8] c"shake\00"
@.str.2 = [6 x i8] c"swing\00"
define i32 @attack_item_verb() {
%1 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @__BNF_trans_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %3, %0, %6
%9 = phi i32 [ %7, %6 ], [ 0, %3 ], [ 0, %0 ]
ret i32 %9
}