#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 isOneOf(char, char *);
int popCMoreThanCurrent(char popC, char c) {
  if (c == 0) {
    return 1;
  }
  switch (c) {
  case '+':
    return isOneOf(popC, "-*/^");
  case '-':
    return isOneOf(popC, "*/^");
  case '*':
    return isOneOf(popC, "/^");
  case '/':
    return isOneOf(popC, "^");
  case '^':
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<popCMoreThanCurrent>:
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    $0x0,%eax
jne    113d <popCMoreThanCurrent+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
movsbl -0x6(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2a,%eax
je     11c6 <popCMoreThanCurrent+0xb6>
jmp    1152 <popCMoreThanCurrent+0x42>
mov    -0xc(%rbp),%eax
sub    $0x2b,%eax
je     1196 <popCMoreThanCurrent+0x86>
jmp    1163 <popCMoreThanCurrent+0x53>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     11ae <popCMoreThanCurrent+0x9e>
jmp    1174 <popCMoreThanCurrent+0x64>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     11de <popCMoreThanCurrent+0xce>
jmp    1185 <popCMoreThanCurrent+0x75>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     11f6 <popCMoreThanCurrent+0xe6>
jmp    1202 <popCMoreThanCurrent+0xf2>
lea    0xe63(%rip),%rsi
movsbl -0x5(%rbp),%edi
call   1030 <isOneOf@plt>
mov    %eax,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
lea    0xe4c(%rip),%rsi
movsbl -0x5(%rbp),%edi
call   1030 <isOneOf@plt>
mov    %eax,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
lea    0xe35(%rip),%rsi
movsbl -0x5(%rbp),%edi
call   1030 <isOneOf@plt>
mov    %eax,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
lea    0xe1e(%rip),%rsi
movsbl -0x5(%rbp),%edi
call   1030 <isOneOf@plt>
mov    %eax,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
movl   $0x0,-0x4(%rbp)
jmp    1209 <popCMoreThanCurrent+0xf9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popCMoreThanCurrent>:
test   %sil,%sil
je     112e <popCMoreThanCurrent+0x1e>
movsbl %sil,%ecx
add    $0xffffffd6,%ecx
xor    %eax,%eax
cmp    $0x5,%ecx
ja     112d <popCMoreThanCurrent+0x1d>
mov    $0x2b,%edx
bt     %ecx,%edx
jb     1134 <popCMoreThanCurrent+0x24>
ret
mov    $0x1,%eax
ret
movslq %ecx,%rax
lea    0xeca(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
movsbl %dil,%edi
jmp    1030 <isOneOf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"-*/^\00"
@.str.1 = [4 x i8] c"*/^\00"
@.str.2 = [3 x i8] c"/^\00"
@.str.3 = [2 x i8] c"^\00"
define i32 @popCMoreThanCurrent(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, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %27
10: ; preds = %2
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
switch i32 %12, label %26 [
i32 43, label %13
i32 45, label %16
i32 42, label %19
i32 47, label %22
i32 94, label %25
]
13: ; preds = %10
%14 = load i8, i8* %4
%15 = call i32 @isOneOf(i8 signext %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %15, i32* %3
br label %27
16: ; preds = %10
%17 = load i8, i8* %4
%18 = call i32 @isOneOf(i8 signext %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 %18, i32* %3
br label %27
19: ; preds = %10
%20 = load i8, i8* %4
%21 = call i32 @isOneOf(i8 signext %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32 %21, i32* %3
br label %27
22: ; preds = %10
%23 = load i8, i8* %4
%24 = call i32 @isOneOf(i8 signext %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 %24, i32* %3
br label %27
25: ; preds = %10
store i32 0, i32* %3
br label %27
26: ; preds = %10
store i32 0, i32* %3
br label %27
27: ; preds = %26, %25, %22, %19, %16, %13, %9
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [5 x i8] c"-*/^\00"
@.str.1 = [4 x i8] c"*/^\00"
@.str.2 = [3 x i8] c"/^\00"
@.str.3 = [2 x i8] c"^\00"
@reltable.popCMoreThanCurrent = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.3 to i64), i64 ptrtoint ([6 x i32]* @reltable.popCMoreThanCurrent to i64)) to i32)]
define i32 @popCMoreThanCurrent(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = sext i8 %1 to i32
%6 = add nsw i32 %5, -42
%7 = icmp ult i32 %6, 6
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = trunc i32 %6 to i8
%10 = lshr i8 43, %9
%11 = and i8 %10, 1
%12 = icmp eq i8 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = sext i32 %6 to i64
%15 = shl i64 %14, 2
%16 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.popCMoreThanCurrent to i8*), i64 %15)
%17 = tail call i32 @isOneOf(i8 signext %0, i8* %16)
br label %18
18: ; preds = %8, %4, %13, %2
%19 = phi i32 [ 1, %2 ], [ 0, %4 ], [ %17, %13 ], [ 0, %8 ]
ret i32 %19
}