#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 */
scalar_t__ strcmp(char const *, char *);
int reserved_kword(const char *ksym) {
  if (ksym == NULL)
    return 0;
  if (strcmp(ksym, "NUMBER_OF_FIELDS") == 0)
    return 1;
  if (strcmp(ksym, "BEGIN_DATA_FORMAT") == 0)
    return 1;
  if (strcmp(ksym, "END_DATA_FORMAT") == 0)
    return 1;
  if (strcmp(ksym, "NUMBER_OF_SETS") == 0)
    return 1;
  if (strcmp(ksym, "BEGIN_DATA") == 0)
    return 1;
  if (strcmp(ksym, "END_DATA") == 0)
    return 1;
  if (strcmp(ksym, "KEYWORD") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<reserved_kword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <reserved_kword+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1159 <reserved_kword+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    117f <reserved_kword+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11a5 <reserved_kword+0x95>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11cb <reserved_kword+0xbb>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f1 <reserved_kword+0xe1>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xe51(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1217 <reserved_kword+0x107>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
mov    -0x10(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    123d <reserved_kword+0x12d>
movl   $0x1,-0x4(%rbp)
jmp    1244 <reserved_kword+0x134>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reserved_kword>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     11b7 <reserved_kword+0xa7>
mov    %rdi,%rbx
lea    0xeda(%rip),%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xec6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <reserved_kword+0xa9>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
jmp    11b9 <reserved_kword+0xa9>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"NUMBER_OF_FIELDS\00"
@.str.1 = [18 x i8] c"BEGIN_DATA_FORMAT\00"
@.str.2 = [16 x i8] c"END_DATA_FORMAT\00"
@.str.3 = [15 x i8] c"NUMBER_OF_SETS\00"
@.str.4 = [11 x i8] c"BEGIN_DATA\00"
@.str.5 = [9 x i8] c"END_DATA\00"
@.str.6 = [8 x i8] c"KEYWORD\00"
define i32 @reserved_kword(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %43
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %43
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %43
17: ; preds = %12
%18 = load i8*, i8** %3
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 1, i32* %2
br label %43
22: ; preds = %17
%23 = load i8*, i8** %3
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
store i32 1, i32* %2
br label %43
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 1, i32* %2
br label %43
32: ; preds = %27
%33 = load i8*, i8** %3
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 1, i32* %2
br label %43
37: ; preds = %32
%38 = load i8*, i8** %3
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 1, i32* %2
br label %43
42: ; preds = %37
store i32 0, i32* %2
br label %43
43: ; preds = %42, %41, %36, %31, %26, %21, %16, %11, %6
%44 = load i32, i32* %2
ret i32 %44
}

LLVM IR (-O2):
@.str = [17 x i8] c"NUMBER_OF_FIELDS\00"
@.str.1 = [18 x i8] c"BEGIN_DATA_FORMAT\00"
@.str.2 = [16 x i8] c"END_DATA_FORMAT\00"
@.str.3 = [15 x i8] c"NUMBER_OF_SETS\00"
@.str.4 = [11 x i8] c"BEGIN_DATA\00"
@.str.5 = [9 x i8] c"END_DATA\00"
@.str.6 = [8 x i8] c"KEYWORD\00"
define i32 @reserved_kword(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %25, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %25, label %9
9: ; preds = %6
%10 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %25, label %12
12: ; preds = %9
%13 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %25, label %15
15: ; preds = %12
%16 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %25, label %18
18: ; preds = %15
%19 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %21, %18, %15, %12, %9, %6, %3, %1
%26 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 1, %6 ], [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %18 ], [ %24, %21 ]
ret i32 %26
}