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


x86 assembly (clang, -O0):
<checkFour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <checkFour+0x53>
cmpq   $0x0,-0x10(%rbp)
je     1173 <checkFour+0x53>
cmpq   $0x0,-0x20(%rbp)
je     1173 <checkFour+0x53>
cmpq   $0x0,-0x28(%rbp)
je     1173 <checkFour+0x53>
cmpq   $0x0,-0x30(%rbp)
jne    1194 <checkFour+0x74>
lea    0xe86(%rip),%rdi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1030 <logError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11ff <checkFour+0xdf>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <checkFour+0xcc>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <checkFour+0xcc>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11ec <checkFour+0xcc>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11f8 <checkFour+0xd8>
movl   $0x0,-0x4(%rbp)
jmp    11ff <checkFour+0xdf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkFour>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %rdi,%rdi
je     118d <checkFour+0x6d>
test   %rsi,%rsi
je     118d <checkFour+0x6d>
mov    %rdx,%rbp
test   %rdx,%rdx
je     118d <checkFour+0x6d>
mov    %rcx,%r15
test   %rcx,%rcx
je     118d <checkFour+0x6d>
mov    %r8,%r14
test   %r8,%r8
je     118d <checkFour+0x6d>
mov    %rdi,%rbx
call   1040 <strcmp@plt>
xor    %r12d,%r12d
test   %eax,%eax
je     11a8 <checkFour+0x88>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11a8 <checkFour+0x88>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11a8 <checkFour+0x88>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %r12d,%r12d
test   %eax,%eax
setne  %r12b
jmp    11a8 <checkFour+0x88>
lea    0xe6c(%rip),%rdi
lea    0xe86(%rip),%rsi
xor    %eax,%eax
call   1030 <logError@plt>
mov    $0xffffffff,%r12d
mov    %r12d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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