#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*/ strcmp(char *, char *);
int is_pair(void *args, void *val) {
  if (!strcmp("first_element", (char *)val))
    return 0;
  else if (!strcmp("second_element", (char *)val))
    return 1;
  else if (!strcmp("third_element", (char *)val))
    return 0;
  else if (!strcmp("fourth_element", (char *)val))
    return 1;
  else if (!strcmp("fifth_element", (char *)val))
    return 0;
  else if (!strcmp("sixth_element", (char *)val))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1145 <is_pair+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
mov    -0x18(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    116a <is_pair+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
mov    -0x18(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    118f <is_pair+0x7f>
movl   $0x0,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
mov    -0x18(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11b4 <is_pair+0xa4>
movl   $0x1,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
mov    -0x18(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11d9 <is_pair+0xc9>
movl   $0x0,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
mov    -0x18(%rbp),%rsi
lea    0xe64(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11fe <is_pair+0xee>
movl   $0x1,-0x4(%rbp)
jmp    1205 <is_pair+0xf5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pair>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0xee3(%rip),%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1195 <is_pair+0x85>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
je     1197 <is_pair+0x87>
lea    0xed8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1195 <is_pair+0x85>
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1197 <is_pair+0x87>
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    $0x0,%ebp
test   %eax,%eax
je     1197 <is_pair+0x87>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
jmp    1197 <is_pair+0x87>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"first_element\00"
@.str.1 = [15 x i8] c"second_element\00"
@.str.2 = [14 x i8] c"third_element\00"
@.str.3 = [15 x i8] c"fourth_element\00"
@.str.4 = [14 x i8] c"fifth_element\00"
@.str.5 = [14 x i8] c"sixth_element\00"
define i32 @is_pair(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i32 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store i32 0, i32* %3
br label %36
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call i32 @strcmp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %10
store i32 1, i32* %3
br label %36
15: ; preds = %10
%16 = load i8*, i8** %5
%17 = call i32 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %15
store i32 0, i32* %3
br label %36
20: ; preds = %15
%21 = load i8*, i8** %5
%22 = call i32 @strcmp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %20
store i32 1, i32* %3
br label %36
25: ; preds = %20
%26 = load i8*, i8** %5
%27 = call i32 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %26)
%28 = icmp ne i32 %27, 0
br i1 %28, label %30, label %29
29: ; preds = %25
store i32 0, i32* %3
br label %36
30: ; preds = %25
%31 = load i8*, i8** %5
%32 = call i32 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* %31)
%33 = icmp ne i32 %32, 0
br i1 %33, label %35, label %34
34: ; preds = %30
store i32 1, i32* %3
br label %36
35: ; preds = %30
store i32 0, i32* %3
br label %36
36: ; preds = %35, %34, %29, %24, %19, %14, %9
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str = [14 x i8] c"first_element\00"
@.str.1 = [15 x i8] c"second_element\00"
@.str.2 = [14 x i8] c"third_element\00"
@.str.3 = [15 x i8] c"fourth_element\00"
@.str.4 = [14 x i8] c"fifth_element\00"
@.str.5 = [14 x i8] c"sixth_element\00"
define i32 @is_pair(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %21, label %5
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %21, label %8
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
br i1 %10, label %21, label %11
11: ; preds = %8
%12 = tail call i32 @strcmp(i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* dereferenceable(1) %1)
%13 = icmp eq i32 %12, 0
br i1 %13, label %21, label %14
14: ; preds = %11
%15 = tail call i32 @strcmp(i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* dereferenceable(1) %1)
%16 = icmp eq i32 %15, 0
br i1 %16, label %21, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* dereferenceable(1) %1)
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %17, %14, %11, %8, %5, %2
%22 = phi i32 [ 0, %2 ], [ 1, %5 ], [ 0, %8 ], [ 1, %11 ], [ 0, %14 ], [ %20, %17 ]
ret i32 %22
}