#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__ isblank(int);
int resolveChar(int c) {
  if (c != '\n' && isblank(c))
    return 3;
  switch (c) {
  case '!':
    return 0;
  case '[':
    return 1;
  case ']':
    return 2;
  case '\n':
    return 4;
  case '(':
    return 5;
  case ')':
    return 6;
  case '#':
    return 7;
  default:
    return 8;
  }
}


x86 assembly (clang, -O0):
<resolveChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     1143 <resolveChar+0x33>
mov    -0x8(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
je     1143 <resolveChar+0x33>
movl   $0x3,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xa,%eax
je     11e1 <resolveChar+0xd1>
jmp    1157 <resolveChar+0x47>
mov    -0xc(%rbp),%eax
sub    $0x21,%eax
je     11bd <resolveChar+0xad>
jmp    1168 <resolveChar+0x58>
mov    -0xc(%rbp),%eax
sub    $0x23,%eax
je     1205 <resolveChar+0xf5>
jmp    1179 <resolveChar+0x69>
mov    -0xc(%rbp),%eax
sub    $0x28,%eax
je     11ed <resolveChar+0xdd>
jmp    118a <resolveChar+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x29,%eax
je     11f9 <resolveChar+0xe9>
jmp    119b <resolveChar+0x8b>
mov    -0xc(%rbp),%eax
sub    $0x5b,%eax
je     11c9 <resolveChar+0xb9>
jmp    11ac <resolveChar+0x9c>
mov    -0xc(%rbp),%eax
sub    $0x5d,%eax
je     11d5 <resolveChar+0xc5>
jmp    1211 <resolveChar+0x101>
movl   $0x0,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x1,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x2,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x4,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x5,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x6,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x7,-0x4(%rbp)
jmp    1218 <resolveChar+0x108>
movl   $0x8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolveChar>:
push   %rbx
mov    $0x4,%eax
cmp    $0xa,%edi
je     112f <resolveChar+0x1f>
mov    %edi,%ebx
call   1030 <isblank@plt>
mov    %rax,%rcx
mov    $0x3,%eax
test   %rcx,%rcx
je     1131 <resolveChar+0x21>
pop    %rbx
ret
lea    -0x21(%rbx),%ecx
cmp    $0x8,%ecx
ja     1152 <resolveChar+0x42>
xor    %eax,%eax
lea    0xebe(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x7,%eax
pop    %rbx
ret
cmp    $0x5d,%ebx
je     1178 <resolveChar+0x68>
cmp    $0x5b,%ebx
jne    1163 <resolveChar+0x53>
mov    $0x1,%eax
pop    %rbx
ret
mov    $0x8,%eax
pop    %rbx
ret
mov    $0x5,%eax
pop    %rbx
ret
mov    $0x6,%eax
pop    %rbx
ret
mov    $0x2,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @resolveChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i64 @isblank(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 3, i32* %2
br label %21
11: ; preds = %6, %1
%12 = load i32, i32* %3
switch i32 %12, label %20 [
i32 33, label %13
i32 91, label %14
i32 93, label %15
i32 10, label %16
i32 40, label %17
i32 41, label %18
i32 35, label %19
]
13: ; preds = %11
store i32 0, i32* %2
br label %21
14: ; preds = %11
store i32 1, i32* %2
br label %21
15: ; preds = %11
store i32 2, i32* %2
br label %21
16: ; preds = %11
store i32 4, i32* %2
br label %21
17: ; preds = %11
store i32 5, i32* %2
br label %21
18: ; preds = %11
store i32 6, i32* %2
br label %21
19: ; preds = %11
store i32 7, i32* %2
br label %21
20: ; preds = %11
store i32 8, i32* %2
br label %21
21: ; preds = %20, %19, %18, %17, %16, %15, %14, %13, %10
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @resolveChar(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i64 @isblank(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
switch i32 %0, label %12 [
i32 33, label %13
i32 91, label %7
i32 93, label %8
i32 35, label %11
i32 40, label %9
i32 41, label %10
]
7: ; preds = %6
br label %13
8: ; preds = %6
br label %13
9: ; preds = %6
br label %13
10: ; preds = %6
br label %13
11: ; preds = %6
br label %13
12: ; preds = %6
br label %13
13: ; preds = %1, %6, %3, %12, %11, %10, %9, %8, %7
%14 = phi i32 [ 8, %12 ], [ 7, %11 ], [ 6, %10 ], [ 5, %9 ], [ 2, %8 ], [ 1, %7 ], [ 3, %3 ], [ 0, %6 ], [ 4, %1 ]
ret i32 %14
}