#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 checkDigit(char);
int checkUpperCase(char);
bool checkChar(char charToCheck, char symbolToCheck) {
  if (symbolToCheck == ':')
    return (checkDigit(charToCheck));
  else if (symbolToCheck == '^')
    return (checkUpperCase(charToCheck));
  else if (symbolToCheck == '.' || symbolToCheck == charToCheck)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<checkChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0x3a,%eax
jne    1152 <checkChar+0x32>
movsbl -0x5(%rbp),%edi
call   1030 <checkDigit@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <checkChar+0x80>
movsbl -0x6(%rbp),%eax
cmp    $0x5e,%eax
jne    1170 <checkChar+0x50>
movsbl -0x5(%rbp),%edi
call   1040 <checkUpperCase@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <checkChar+0x80>
movsbl -0x6(%rbp),%eax
cmp    $0x2e,%eax
je     118d <checkChar+0x6d>
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1199 <checkChar+0x79>
movl   $0x1,-0x4(%rbp)
jmp    11a0 <checkChar+0x80>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkChar>:
cmp    $0x2e,%sil
je     113b <checkChar+0x1b>
cmp    $0x5e,%sil
je     1141 <checkChar+0x21>
cmp    $0x3a,%sil
jne    114a <checkChar+0x2a>
movsbl %dil,%edi
jmp    1030 <checkDigit@plt>
mov    $0x1,%eax
ret
movsbl %dil,%edi
jmp    1040 <checkUpperCase@plt>
xor    %eax,%eax
cmp    %dil,%sil
sete   %al
ret

LLVM IR (-O0):
define i32 @checkChar(i8 signext %0, i8 signext %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 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 58
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8, i8* %4
%11 = call i32 @checkDigit(i8 signext %10)
store i32 %11, i32* %3
br label %31
12: ; preds = %2
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 94
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i8, i8* %4
%18 = call i32 @checkUpperCase(i8 signext %17)
store i32 %18, i32* %3
br label %31
19: ; preds = %12
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 46
br i1 %22, label %29, label %23
23: ; preds = %19
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = load i8, i8* %4
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %25, %27
br i1 %28, label %29, label %30
29: ; preds = %23, %19
store i32 1, i32* %3
br label %31
30: ; preds = %23
store i32 0, i32* %3
br label %31
31: ; preds = %30, %29, %16, %9
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @checkChar(i8 signext %0, i8 signext %1) {
switch i8 %1, label %7 [
i8 58, label %3
i8 94, label %5
i8 46, label %10
]
3: ; preds = %2
%4 = tail call i32 @checkDigit(i8 signext %0)
br label %10
5: ; preds = %2
%6 = tail call i32 @checkUpperCase(i8 signext %0)
br label %10
7: ; preds = %2
%8 = icmp eq i8 %1, %0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %2, %5, %3
%11 = phi i32 [ %4, %3 ], [ %6, %5 ], [ 1, %2 ], [ %9, %7 ]
ret i32 %11
}