#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 */
scalar_t__ isOperator(char);
int /*<<< orphan*/ printf(char *, char);
void testIsOperator() {
  char op1 = '+', nonOp = '2';
  if (isOperator(op1))
    printf("\"%c\" is an Operator\n", op1);
  else
    printf("\"%c\" is NOT an Operator\n", op1);
  if (isOperator(nonOp))
    printf("\"%c\" is an Operator\n", nonOp);
  else
    printf("\"%c\" is NOT an Operator\n", nonOp);
}


x86 assembly (clang, -O0):
<testIsOperator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2b,-0x1(%rbp)
movb   $0x32,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isOperator@plt>
cmp    $0x0,%rax
je     1158 <testIsOperator+0x38>
lea    0xeb6(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
jmp    1168 <testIsOperator+0x48>
lea    0xeb6(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
movsbl -0x2(%rbp),%edi
call   1040 <isOperator@plt>
cmp    $0x0,%rax
je     1190 <testIsOperator+0x70>
lea    0xe7e(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
jmp    11a0 <testIsOperator+0x80>
lea    0xe7e(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testIsOperator>:
push   %r14
push   %rbx
push   %rax
mov    $0x2b,%edi
call   1040 <isOperator@plt>
test   %rax,%rax
lea    0xedd(%rip),%r14
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
mov    $0x2b,%esi
call   1030 <printf@plt>
mov    $0x32,%edi
call   1040 <isOperator@plt>
test   %rax,%rax
cmove  %r14,%rbx
mov    %rbx,%rdi
mov    $0x32,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\22%c\22 is an Operator\0A\00"
@.str.1 = [25 x i8] c"\22%c\22 is NOT an Operator\0A\00"
define void @testIsOperator() {
%1 = alloca i8
%2 = alloca i8
store i8 43, i8* %1
store i8 50, i8* %2
%3 = load i8, i8* %1
%4 = call i64 @isOperator(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8, i8* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %12
9: ; preds = %0
%10 = load i8, i8* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext %10)
br label %12
12: ; preds = %9, %6
%13 = load i8, i8* %2
%14 = call i64 @isOperator(i8 signext %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i8, i8* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %17)
br label %22
19: ; preds = %12
%20 = load i8, i8* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext %20)
br label %22
22: ; preds = %19, %16
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\22%c\22 is an Operator\0A\00"
@.str.1 = [25 x i8] c"\22%c\22 is NOT an Operator\0A\00"
define void @testIsOperator() {
%1 = tail call i64 @isOperator(i8 signext 43)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i8 signext 43)
%5 = tail call i64 @isOperator(i8 signext 50)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8 signext 50)
ret void
}