#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*/ strcasecmp(char const *, char *);
bool check_name(char const **in) {
  return (!strcasecmp(in[0], "Iggy") && !strcasecmp(in[1], "Pop")) ||
         (!strcasecmp(in[0], "James") && !strcasecmp(in[1], "Osterberg"));
}


x86 assembly (clang, -O0):
<check_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    115c <check_name+0x4c>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     11a4 <check_name+0x94>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xe9f(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
jne    119e <check_name+0x8e>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe81(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_name>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1141 <check_name+0x31>
mov    0x8(%r14),%rdi
lea    0xecd(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1173 <check_name+0x63>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    1178 <check_name+0x68>
mov    0x8(%r14),%rdi
lea    0xeac(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
jmp    1178 <check_name+0x68>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Iggy\00"
@.str.1 = [4 x i8] c"Pop\00"
@.str.2 = [6 x i8] c"James\00"
@.str.3 = [10 x i8] c"Osterberg\00"
define i32 @check_name(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @strcasecmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcasecmp(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %29
14: ; preds = %8, %1
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @strcasecmp(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp ne i32 %18, 0
br i1 %19, label %27, label %20
20: ; preds = %14
%21 = load i8**, i8*** %2
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @strcasecmp(i8* %23, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
%26 = xor i1 %25, true
br label %27
27: ; preds = %20, %14
%28 = phi i1 [ false, %14 ], [ %26, %20 ]
br label %29
29: ; preds = %27, %8
%30 = phi i1 [ true, %8 ], [ %28, %27 ]
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
@.str = [5 x i8] c"Iggy\00"
@.str.1 = [4 x i8] c"Pop\00"
@.str.2 = [6 x i8] c"James\00"
@.str.3 = [10 x i8] c"Osterberg\00"
define i32 @check_name(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @strcasecmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds i8*, i8** %0, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strcasecmp(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %19, label %10
10: ; preds = %5, %1
%11 = tail call i32 @strcasecmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = getelementptr inbounds i8*, i8** %0, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32 @strcasecmp(i8* %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %10, %13, %5
%20 = phi i32 [ 1, %5 ], [ 0, %10 ], [ %18, %13 ]
ret i32 %20
}