#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__ isdigit(char);
int /*<<< orphan*/ proccmd(char *);
int /*<<< orphan*/ procint(char *);
int /*<<< orphan*/ procmulti(char *);
int /*<<< orphan*/ procstr(char *);
void proctoken(char *token) {
  if (*token == '"')
    procstr(token);
  else if (*token == '#')
    procmulti(token);
  else if (isdigit(*token))
    procint(token);
  else
    proccmd(token);
}


x86 assembly (clang, -O0):
<proctoken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    117a <proctoken+0x2a>
mov    -0x8(%rbp),%rdi
call   1070 <procstr@plt>
jmp    11cf <proctoken+0x7f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1198 <proctoken+0x48>
mov    -0x8(%rbp),%rdi
call   1060 <procmulti@plt>
jmp    11ca <proctoken+0x7a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     11bc <proctoken+0x6c>
mov    -0x8(%rbp),%rdi
call   1050 <procint@plt>
jmp    11c5 <proctoken+0x75>
mov    -0x8(%rbp),%rdi
call   1040 <proccmd@plt>
jmp    11ca <proctoken+0x7a>
jmp    11cf <proctoken+0x7f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctoken>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
cmp    $0x23,%al
je     1167 <proctoken+0x17>
cmp    $0x22,%al
jne    1170 <proctoken+0x20>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <procstr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <procmulti@plt>
movsbl %al,%edi
call   1030 <isdigit@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1186 <proctoken+0x36>
pop    %rbx
jmp    1050 <procint@plt>
pop    %rbx
jmp    1040 <proccmd@plt>

LLVM IR (-O0):
define void @proctoken(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 34
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @procstr(i8* %8)
br label %31
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 35
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i8*, i8** %2
%17 = call i32 @procmulti(i8* %16)
br label %30
18: ; preds = %10
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = call i64 @isdigit(i8 signext %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = call i32 @procint(i8* %24)
br label %29
26: ; preds = %18
%27 = load i8*, i8** %2
%28 = call i32 @proccmd(i8* %27)
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29, %15
br label %31
31: ; preds = %30, %7
ret void
}

LLVM IR (-O2):
define void @proctoken(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %7 [
i8 34, label %3
i8 35, label %5
]
3: ; preds = %1
%4 = tail call i32 @procstr(i8* %0)
br label %14
5: ; preds = %1
%6 = tail call i32 @procmulti(i8* %0)
br label %14
7: ; preds = %1
%8 = tail call i64 @isdigit(i8 signext %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @procint(i8* %0)
br label %14
12: ; preds = %7
%13 = tail call i32 @proccmd(i8* %0)
br label %14
14: ; preds = %5, %12, %10, %3
ret void
}