#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 *, char *);
int supported(char *str) {
  int i;
  char *sup[] = {":STRIPS",
                 ":NEGATION",
                 ":EQUALITY",
                 ":TYPING",
                 ":CONDITIONAL-EFFECTS",
                 ":DISJUNCTIVE-PRECONDITIONS",
                 ":EXISTENTIAL-PRECONDITIONS",
                 ":UNIVERSAL-PRECONDITIONS",
                 ":QUANTIFIED-PRECONDITIONS",
                 ":ADL",
                 NULL};
  for (i = 0; NULL != sup[i]; i++) {
    if (0 == strcmp(sup[i], str)) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0x2c89(%rip),%rsi
mov    $0x58,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
xor    %eax,%eax
cmp    -0x70(%rbp,%rcx,8),%rax
je     1198 <supported+0x78>
movslq -0x14(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1185 <supported+0x65>
movl   $0x1,-0x4(%rbp)
jmp    119f <supported+0x7f>
jmp    118a <supported+0x6a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1148 <supported+0x28>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supported>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f3 <supported+0xe3>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c":STRIPS\00"
@.str.1 = [10 x i8] c":NEGATION\00"
@.str.2 = [10 x i8] c":EQUALITY\00"
@.str.3 = [8 x i8] c":TYPING\00"
@.str.4 = [21 x i8] c":CONDITIONAL-EFFECTS\00"
@.str.5 = [27 x i8] c":DISJUNCTIVE-PRECONDITIONS\00"
@.str.6 = [27 x i8] c":EXISTENTIAL-PRECONDITIONS\00"
@.str.7 = [25 x i8] c":UNIVERSAL-PRECONDITIONS\00"
@.str.8 = [26 x i8] c":QUANTIFIED-PRECONDITIONS\00"
@.str.9 = [5 x i8] c":ADL\00"
@__const.supported.sup = [11 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8* null]
define i32 @supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [11 x i8*]
store i8* %0, i8** %3
%6 = bitcast [11 x i8*]* %5 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %23, %1
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [11 x i8*], [11 x i8*]* %5, i64 0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp ne i8* null, %11
br i1 %12, label %13, label %26
13: ; preds = %7
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [11 x i8*], [11 x i8*]* %5, i64 0, i64 %15
%17 = load i8*, i8** %16
%18 = load i8*, i8** %3
%19 = call i64 @strcmp(i8* %17, i8* %18)
%20 = icmp eq i64 0, %19
br i1 %20, label %21, label %22
21: ; preds = %13
store i32 1, i32* %2
br label %27
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %7
26: ; preds = %7
store i32 0, i32* %2
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
@.str = [8 x i8] c":STRIPS\00"
@.str.1 = [10 x i8] c":NEGATION\00"
@.str.2 = [10 x i8] c":EQUALITY\00"
@.str.3 = [8 x i8] c":TYPING\00"
@.str.4 = [21 x i8] c":CONDITIONAL-EFFECTS\00"
@.str.5 = [27 x i8] c":DISJUNCTIVE-PRECONDITIONS\00"
@.str.6 = [27 x i8] c":EXISTENTIAL-PRECONDITIONS\00"
@.str.7 = [25 x i8] c":UNIVERSAL-PRECONDITIONS\00"
@.str.8 = [26 x i8] c":QUANTIFIED-PRECONDITIONS\00"
@.str.9 = [5 x i8] c":ADL\00"
define i32 @supported(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %32, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %32, label %7
7: ; preds = %4
%8 = tail call i64 @strcmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %7
%11 = tail call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%12 = icmp eq i64 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = tail call i64 @strcmp(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%15 = icmp eq i64 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13
%17 = tail call i64 @strcmp(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%18 = icmp eq i64 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16
%20 = tail call i64 @strcmp(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %0)
%21 = icmp eq i64 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = tail call i64 @strcmp(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%24 = icmp eq i64 %23, 0
br i1 %24, label %32, label %25
25: ; preds = %22
%26 = tail call i64 @strcmp(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i8* %0)
%27 = icmp eq i64 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = tail call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %0)
%30 = icmp eq i64 %29, 0
%31 = zext i1 %30 to i32
br label %32
32: ; preds = %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%33 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 1, %7 ], [ 1, %10 ], [ 1, %13 ], [ 1, %16 ], [ 1, %19 ], [ 1, %22 ], [ 1, %25 ], [ %31, %28 ]
ret i32 %33
}