#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__ isalpha(char);
scalar_t__ isdigit(char);
int isfactorstart(char c) {
  if (isalpha(c))
    return 1;
  else if (isdigit(c))
    return 1;
  else
    switch (c) {
    case '*':
    case '$':
    case '%':
    case '@':
    case '\'':
    case '(':
    case '-':
    case '+':
    case '!':
    case '~':
      return 1;
    }
  return 0;
}


x86 assembly (clang, -O0):
<isfactorstart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     114d <isfactorstart+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    11b3 <isfactorstart+0x93>
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     116c <isfactorstart+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    11b3 <isfactorstart+0x93>
movsbl -0x5(%rbp),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5d,%eax
ja     11a2 <isfactorstart+0x82>
mov    -0x10(%rbp),%rax
lea    0xe73(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    11b3 <isfactorstart+0x93>
jmp    11a7 <isfactorstart+0x87>
jmp    11ac <isfactorstart+0x8c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfactorstart>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
call   1040 <isalpha@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1160 <isfactorstart+0x40>
movsbl %bpl,%r14d
mov    %r14d,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1160 <isfactorstart+0x40>
add    $0xffffffdf,%r14d
cmp    $0x5d,%r14d
ja     1167 <isfactorstart+0x47>
lea    0xea9(%rip),%rax
movslq (%rax,%r14,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
xor    %ebx,%ebx
jmp    1160 <isfactorstart+0x40>

LLVM IR (-O0):
define i32 @isfactorstart(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalpha(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %20
8: ; preds = %1
%9 = load i8, i8* %3
%10 = call i64 @isdigit(i8 signext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %20
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
switch i32 %15, label %17 [
i32 42, label %16
i32 36, label %16
i32 37, label %16
i32 64, label %16
i32 39, label %16
i32 40, label %16
i32 45, label %16
i32 43, label %16
i32 33, label %16
i32 126, label %16
]
16: ; preds = %13, %13, %13, %13, %13, %13, %13, %13, %13, %13
store i32 1, i32* %2
br label %20
17: ; preds = %13
br label %18
18: ; preds = %17
br label %19
19: ; preds = %18
store i32 0, i32* %2
br label %20
20: ; preds = %19, %16, %12, %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @isfactorstart(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @isdigit(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = sext i8 %0 to i32
switch i32 %8, label %9 [
i32 42, label %10
i32 36, label %10
i32 37, label %10
i32 64, label %10
i32 39, label %10
i32 40, label %10
i32 45, label %10
i32 43, label %10
i32 33, label %10
i32 126, label %10
]
9: ; preds = %7
br label %10
10: ; preds = %7, %7, %7, %7, %7, %7, %7, %7, %7, %7, %4, %1, %9
%11 = phi i32 [ 0, %9 ], [ 1, %1 ], [ 1, %4 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ], [ 1, %7 ]
ret i32 %11
}