int checkThree(char *toCheck, char *match, char *matchTwo, char *matchThree) {
  if (!match || !toCheck || !matchTwo || !matchThree) {
    logError("String passed equivalent to NULL", __func__);
    return -1;
  }
  if (strcmp(toCheck, match) == 0 || strcmp(toCheck, matchTwo) == 0 ||
      strcmp(toCheck, matchThree) == 0) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<checkThree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1164 <checkThree+0x44>
cmpq   $0x0,-0x10(%rbp)
je     1164 <checkThree+0x44>
cmpq   $0x0,-0x20(%rbp)
je     1164 <checkThree+0x44>
cmpq   $0x0,-0x28(%rbp)
jne    1185 <checkThree+0x65>
lea    0xe95(%rip),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1030 <logError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11da <checkThree+0xba>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11c7 <checkThree+0xa7>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11c7 <checkThree+0xa7>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11d3 <checkThree+0xb3>
movl   $0x0,-0x4(%rbp)
jmp    11da <checkThree+0xba>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkThree>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1173 <checkThree+0x53>
test   %rsi,%rsi
je     1173 <checkThree+0x53>
mov    %rdx,%r15
test   %rdx,%rdx
je     1173 <checkThree+0x53>
mov    %rcx,%r14
test   %rcx,%rcx
je     1173 <checkThree+0x53>
mov    %rdi,%rbx
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
je     118d <checkThree+0x6d>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     118d <checkThree+0x6d>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
jmp    118d <checkThree+0x6d>
lea    0xe86(%rip),%rdi
lea    0xea0(%rip),%rsi
xor    %eax,%eax
call   1030 <logError@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"String passed equivalent to NULL\00"
@__func__.checkThree = [11 x i8] c"checkThree\00"
define i32 @checkThree(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = icmp ne i8* %1, null
%6 = icmp ne i8* %0, null
%7 = and i1 %6, %5
%8 = icmp ne i8* %2, null
%9 = and i1 %7, %8
%10 = icmp ne i8* %3, null
%11 = and i1 %9, %10
br i1 %11, label %14, label %12
12: ; preds = %4
%13 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @logError to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.checkThree, i64 0, i64 0))
br label %24
14: ; preds = %4
%15 = tail call i32 @strcmp(i8* %0, i8* %1)
%16 = icmp eq i32 %15, 0
br i1 %16, label %24, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* %0, i8* %2)
%19 = icmp eq i32 %18, 0
br i1 %19, label %24, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* %0, i8* %3)
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %20, %14, %17, %12
%25 = phi i32 [ -1, %12 ], [ 0, %17 ], [ 0, %14 ], [ %23, %20 ]
ret i32 %25
}