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


x86 assembly (clang, -O0):
<checkTwo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <checkTwo+0x35>
cmpq   $0x0,-0x10(%rbp)
je     1155 <checkTwo+0x35>
cmpq   $0x0,-0x20(%rbp)
jne    1176 <checkTwo+0x56>
lea    0xea4(%rip),%rdi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1030 <logError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b5 <checkTwo+0x95>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11a2 <checkTwo+0x82>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11ae <checkTwo+0x8e>
movl   $0x0,-0x4(%rbp)
jmp    11b5 <checkTwo+0x95>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkTwo>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1158 <checkTwo+0x38>
test   %rsi,%rsi
je     1158 <checkTwo+0x38>
mov    %rdx,%r14
test   %rdx,%rdx
je     1158 <checkTwo+0x38>
mov    %rdi,%rbx
call   1040 <strcmp@plt>
test   %eax,%eax
je     1174 <checkTwo+0x54>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
jmp    1176 <checkTwo+0x56>
lea    0xea1(%rip),%rdi
lea    0xebb(%rip),%rsi
xor    %eax,%eax
call   1030 <logError@plt>
mov    $0xffffffff,%eax
jmp    1176 <checkTwo+0x56>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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