#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 */
struct symbol_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ symbol_table_add(struct symbol_table *, char *, int);
int /*<<< orphan*/ symbol_table_is_interesting(struct symbol_table *, char *,
                                               int);
int /*<<< orphan*/ symbol_table_make_interesting(struct symbol_table *);
int compute_parse_state(int state, int token_type, char *token,
                        int token_length, int ignore_order_by,
                        struct symbol_table *s) {
  int rc;
  rc = state;
  switch (state) {
  case 0: {
    if (token_type == 1)
      rc = 1;
    else if (token_type == 5)
      rc = 4;
    else if (token_type == 8)
      rc = 10;
    else if (token_type == 10)
      rc = 0;
    else if (token_type == 11)
      rc = 14;
    else if (token_type != 4)
      rc = 12;
    else
      rc = 13;
    break;
  }
  case 1: {
    if ((token_type == 2) && (!ignore_order_by))
      rc = 2;
    else if (token_type == 4)
      rc = 3;
    break;
  }
  case 2: {
    if (token_type == 3)
      rc = 12;
    else if (token_type == 4)
      rc = 3;
    else
      rc = 1;
    break;
  }
  case 16:
  case 3: {
    if (token_type == 1)
      rc = 1;
    else if (token_type == 11)
      rc = 14;
    else if (token_type == 5)
      rc = 4;
    else if (token_type == 8)
      rc = 10;
    else if (token_type == 10)
      rc = 0;
    else if (token_type != 4)
      rc = 12;
    else
      rc = 13;
    break;
  }
  case 4: {
    if (token_type == 9) {
      symbol_table_add(s, token, token_length);
      rc = 5;
    } else if (token_type == 4)
      rc = 0;
    else
      rc = 12;
    break;
  }
  case 5: {
    if (token_type == 6)
      rc = 6;
    else if (token_type == 4)
      rc = 0;
    else
      rc = 12;
    break;
  }
  case 6: {
    if (token_type == 7)
      rc = 7;
    else if (token_type == 1)
      rc = 8;
    else if (token_type == 4)
      rc = 0;
    else
      rc = 12;
    break;
  }
  case 7: {
    if (token_type == 1)
      rc = 8;
    else if (token_type == 4)
      rc = 0;
    else
      rc = 12;
    break;
  }
  case 8: {
    if ((token_type == 2) && (!ignore_order_by))
      rc = 9;
    else if (token_type == 4) {
      symbol_table_make_interesting(s);
      rc = 0;
    }
    break;
  }
  case 9: {
    if (token_type == 3)
      rc = 12;
    else if (token_type == 4) {
      symbol_table_make_interesting(s);
      rc = 0;
    } else
      rc = 8;
    break;
  }
  case 10: {
    if (token_type == 9) {
      if (symbol_table_is_interesting(s, token, token_length)) {
        rc = 11;
      } else
        rc = 12;
    } else if (token_type == 4)
      rc = 0;
    else
      rc = 12;
    break;
  }
  case 11: {
    if (token_type == 4)
      rc = 3;
    break;
  }
  case 12: {
    if (token_type == 4)
      rc = 0;
    break;
  }
  case 13: {
    if (token_type == 1)
      rc = 1;
    else if (token_type == 5)
      rc = 4;
    else if (token_type == 8)
      rc = 10;
    else if (token_type != 4)
      rc = 12;
    break;
  }
  case 14: {
    if (token_type == 12)
      rc = 15;
    else if (token_type == 4)
      rc = 0;
    break;
  }
  case 15: {
    if (token_type == 4)
      rc = 16;
    break;
  }
  default: {
    printf("Error:  unknown token type %d.\n", token_type);
    rc = 0;
    break;
  }
  }
  return rc;
}


x86 assembly (clang, -O0):
<compute_parse_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0x10,%rax
ja     1637 <compute_parse_state+0x4f7>
mov    -0x30(%rbp),%rax
lea    0xe81(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x1,-0x8(%rbp)
jne    119e <compute_parse_state+0x5e>
movl   $0x1,-0x24(%rbp)
jmp    122c <compute_parse_state+0xec>
cmpl   $0x5,-0x8(%rbp)
jne    11b4 <compute_parse_state+0x74>
movl   $0x4,-0x24(%rbp)
jmp    1227 <compute_parse_state+0xe7>
cmpl   $0x8,-0x8(%rbp)
jne    11ca <compute_parse_state+0x8a>
movl   $0xa,-0x24(%rbp)
jmp    1222 <compute_parse_state+0xe2>
cmpl   $0xa,-0x8(%rbp)
jne    11e0 <compute_parse_state+0xa0>
movl   $0x0,-0x24(%rbp)
jmp    121d <compute_parse_state+0xdd>
cmpl   $0xb,-0x8(%rbp)
jne    11f6 <compute_parse_state+0xb6>
movl   $0xe,-0x24(%rbp)
jmp    1218 <compute_parse_state+0xd8>
cmpl   $0x4,-0x8(%rbp)
je     120c <compute_parse_state+0xcc>
movl   $0xc,-0x24(%rbp)
jmp    1213 <compute_parse_state+0xd3>
movl   $0xd,-0x24(%rbp)
jmp    1218 <compute_parse_state+0xd8>
jmp    121d <compute_parse_state+0xdd>
jmp    1222 <compute_parse_state+0xe2>
jmp    1227 <compute_parse_state+0xe7>
jmp    122c <compute_parse_state+0xec>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x2,-0x8(%rbp)
jne    1251 <compute_parse_state+0x111>
cmpl   $0x0,-0x18(%rbp)
jne    1251 <compute_parse_state+0x111>
movl   $0x2,-0x24(%rbp)
jmp    1267 <compute_parse_state+0x127>
cmpl   $0x4,-0x8(%rbp)
jne    1262 <compute_parse_state+0x122>
movl   $0x3,-0x24(%rbp)
jmp    1267 <compute_parse_state+0x127>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x3,-0x8(%rbp)
jne    1282 <compute_parse_state+0x142>
movl   $0xc,-0x24(%rbp)
jmp    12a4 <compute_parse_state+0x164>
cmpl   $0x4,-0x8(%rbp)
jne    1298 <compute_parse_state+0x158>
movl   $0x3,-0x24(%rbp)
jmp    129f <compute_parse_state+0x15f>
movl   $0x1,-0x24(%rbp)
jmp    12a4 <compute_parse_state+0x164>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x1,-0x8(%rbp)
jne    12bf <compute_parse_state+0x17f>
movl   $0x1,-0x24(%rbp)
jmp    134d <compute_parse_state+0x20d>
cmpl   $0xb,-0x8(%rbp)
jne    12d5 <compute_parse_state+0x195>
movl   $0xe,-0x24(%rbp)
jmp    1348 <compute_parse_state+0x208>
cmpl   $0x5,-0x8(%rbp)
jne    12eb <compute_parse_state+0x1ab>
movl   $0x4,-0x24(%rbp)
jmp    1343 <compute_parse_state+0x203>
cmpl   $0x8,-0x8(%rbp)
jne    1301 <compute_parse_state+0x1c1>
movl   $0xa,-0x24(%rbp)
jmp    133e <compute_parse_state+0x1fe>
cmpl   $0xa,-0x8(%rbp)
jne    1317 <compute_parse_state+0x1d7>
movl   $0x0,-0x24(%rbp)
jmp    1339 <compute_parse_state+0x1f9>
cmpl   $0x4,-0x8(%rbp)
je     132d <compute_parse_state+0x1ed>
movl   $0xc,-0x24(%rbp)
jmp    1334 <compute_parse_state+0x1f4>
movl   $0xd,-0x24(%rbp)
jmp    1339 <compute_parse_state+0x1f9>
jmp    133e <compute_parse_state+0x1fe>
jmp    1343 <compute_parse_state+0x203>
jmp    1348 <compute_parse_state+0x208>
jmp    134d <compute_parse_state+0x20d>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x9,-0x8(%rbp)
jne    1378 <compute_parse_state+0x238>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <symbol_table_add@plt>
movl   $0x5,-0x24(%rbp)
jmp    139a <compute_parse_state+0x25a>
cmpl   $0x4,-0x8(%rbp)
jne    138e <compute_parse_state+0x24e>
movl   $0x0,-0x24(%rbp)
jmp    1395 <compute_parse_state+0x255>
movl   $0xc,-0x24(%rbp)
jmp    139a <compute_parse_state+0x25a>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x6,-0x8(%rbp)
jne    13b5 <compute_parse_state+0x275>
movl   $0x6,-0x24(%rbp)
jmp    13d7 <compute_parse_state+0x297>
cmpl   $0x4,-0x8(%rbp)
jne    13cb <compute_parse_state+0x28b>
movl   $0x0,-0x24(%rbp)
jmp    13d2 <compute_parse_state+0x292>
movl   $0xc,-0x24(%rbp)
jmp    13d7 <compute_parse_state+0x297>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x7,-0x8(%rbp)
jne    13f2 <compute_parse_state+0x2b2>
movl   $0x7,-0x24(%rbp)
jmp    142f <compute_parse_state+0x2ef>
cmpl   $0x1,-0x8(%rbp)
jne    1408 <compute_parse_state+0x2c8>
movl   $0x8,-0x24(%rbp)
jmp    142a <compute_parse_state+0x2ea>
cmpl   $0x4,-0x8(%rbp)
jne    141e <compute_parse_state+0x2de>
movl   $0x0,-0x24(%rbp)
jmp    1425 <compute_parse_state+0x2e5>
movl   $0xc,-0x24(%rbp)
jmp    142a <compute_parse_state+0x2ea>
jmp    142f <compute_parse_state+0x2ef>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x1,-0x8(%rbp)
jne    144a <compute_parse_state+0x30a>
movl   $0x8,-0x24(%rbp)
jmp    146c <compute_parse_state+0x32c>
cmpl   $0x4,-0x8(%rbp)
jne    1460 <compute_parse_state+0x320>
movl   $0x0,-0x24(%rbp)
jmp    1467 <compute_parse_state+0x327>
movl   $0xc,-0x24(%rbp)
jmp    146c <compute_parse_state+0x32c>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x2,-0x8(%rbp)
jne    1491 <compute_parse_state+0x351>
cmpl   $0x0,-0x18(%rbp)
jne    1491 <compute_parse_state+0x351>
movl   $0x9,-0x24(%rbp)
jmp    14b0 <compute_parse_state+0x370>
cmpl   $0x4,-0x8(%rbp)
jne    14ab <compute_parse_state+0x36b>
mov    -0x20(%rbp),%rdi
call   1040 <symbol_table_make_interesting@plt>
movl   $0x0,-0x24(%rbp)
jmp    14b0 <compute_parse_state+0x370>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x3,-0x8(%rbp)
jne    14cb <compute_parse_state+0x38b>
movl   $0xc,-0x24(%rbp)
jmp    14f6 <compute_parse_state+0x3b6>
cmpl   $0x4,-0x8(%rbp)
jne    14ea <compute_parse_state+0x3aa>
mov    -0x20(%rbp),%rdi
call   1040 <symbol_table_make_interesting@plt>
movl   $0x0,-0x24(%rbp)
jmp    14f1 <compute_parse_state+0x3b1>
movl   $0x8,-0x24(%rbp)
jmp    14f6 <compute_parse_state+0x3b6>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x9,-0x8(%rbp)
jne    1536 <compute_parse_state+0x3f6>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <symbol_table_is_interesting@plt>
cmp    $0x0,%eax
je     152a <compute_parse_state+0x3ea>
movl   $0xb,-0x24(%rbp)
jmp    1531 <compute_parse_state+0x3f1>
movl   $0xc,-0x24(%rbp)
jmp    1558 <compute_parse_state+0x418>
cmpl   $0x4,-0x8(%rbp)
jne    154c <compute_parse_state+0x40c>
movl   $0x0,-0x24(%rbp)
jmp    1553 <compute_parse_state+0x413>
movl   $0xc,-0x24(%rbp)
jmp    1558 <compute_parse_state+0x418>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x4,-0x8(%rbp)
jne    156e <compute_parse_state+0x42e>
movl   $0x3,-0x24(%rbp)
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x4,-0x8(%rbp)
jne    1584 <compute_parse_state+0x444>
movl   $0x0,-0x24(%rbp)
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x1,-0x8(%rbp)
jne    159f <compute_parse_state+0x45f>
movl   $0x1,-0x24(%rbp)
jmp    15eb <compute_parse_state+0x4ab>
cmpl   $0x5,-0x8(%rbp)
jne    15b5 <compute_parse_state+0x475>
movl   $0x4,-0x24(%rbp)
jmp    15e6 <compute_parse_state+0x4a6>
cmpl   $0x8,-0x8(%rbp)
jne    15cb <compute_parse_state+0x48b>
movl   $0xa,-0x24(%rbp)
jmp    15e1 <compute_parse_state+0x4a1>
cmpl   $0x4,-0x8(%rbp)
je     15dc <compute_parse_state+0x49c>
movl   $0xc,-0x24(%rbp)
jmp    15e1 <compute_parse_state+0x4a1>
jmp    15e6 <compute_parse_state+0x4a6>
jmp    15eb <compute_parse_state+0x4ab>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0xc,-0x8(%rbp)
jne    1606 <compute_parse_state+0x4c6>
movl   $0xf,-0x24(%rbp)
jmp    161c <compute_parse_state+0x4dc>
cmpl   $0x4,-0x8(%rbp)
jne    1617 <compute_parse_state+0x4d7>
movl   $0x0,-0x24(%rbp)
jmp    161c <compute_parse_state+0x4dc>
jmp    164d <compute_parse_state+0x50d>
cmpl   $0x4,-0x8(%rbp)
jne    1632 <compute_parse_state+0x4f2>
movl   $0x10,-0x24(%rbp)
jmp    164d <compute_parse_state+0x50d>
mov    -0x8(%rbp),%esi
lea    0xa03(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_parse_state>:
push   %rax
cmp    $0x10,%edi
ja     1178 <compute_parse_state+0x38>
mov    %edi,%eax
lea    0xeb1(%rip),%rdi
movslq (%rdi,%rax,4),%rax
add    %rdi,%rax
jmp    *%rax
add    $0xffffffff,%esi
mov    $0xc,%eax
cmp    $0xb,%esi
jae    12df <compute_parse_state+0x19f>
movslq %esi,%rax
lea    0xed1(%rip),%rcx
jmp    12dc <compute_parse_state+0x19c>
lea    0xf0d(%rip),%rdi
call   1050 <printf@plt>
jmp    12a1 <compute_parse_state+0x161>
cmp    $0x2,%esi
jne    119c <compute_parse_state+0x5c>
mov    $0x2,%eax
test   %r8d,%r8d
je     12df <compute_parse_state+0x19f>
xor    %eax,%eax
cmp    $0x4,%esi
sete   %al
add    %eax,%eax
add    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
cmp    $0x4,%esi
sete   %al
lea    (%rax,%rax,1),%ecx
add    $0x1,%ecx
cmp    $0x3,%esi
mov    $0xc,%eax
jmp    12f6 <compute_parse_state+0x1b6>
cmp    $0x4,%esi
je     12a1 <compute_parse_state+0x161>
cmp    $0x9,%esi
jne    1308 <compute_parse_state+0x1c8>
mov    %r9,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <symbol_table_add@plt>
mov    $0x5,%eax
pop    %rcx
ret
xor    %ecx,%ecx
cmp    $0x4,%esi
mov    $0xc,%eax
cmove  %ecx,%eax
cmp    $0x6,%esi
cmove  %esi,%eax
pop    %rcx
ret
add    $0xffffffff,%esi
mov    $0xc,%eax
cmp    $0x7,%esi
jae    12df <compute_parse_state+0x19f>
movslq %esi,%rax
lea    0xe54(%rip),%rcx
jmp    12dc <compute_parse_state+0x19c>
xor    %eax,%eax
cmp    $0x4,%esi
mov    $0xc,%ecx
cmove  %eax,%ecx
cmp    $0x1,%esi
mov    $0x8,%eax
jmp    12f6 <compute_parse_state+0x1b6>
cmp    $0x2,%esi
jne    124e <compute_parse_state+0x10e>
mov    $0x9,%eax
test   %r8d,%r8d
je     12df <compute_parse_state+0x19f>
mov    $0x8,%eax
cmp    $0x4,%esi
je     126f <compute_parse_state+0x12f>
jmp    12df <compute_parse_state+0x19f>
cmp    $0x3,%esi
je     1308 <compute_parse_state+0x1c8>
cmp    $0x4,%esi
jne    130f <compute_parse_state+0x1cf>
mov    %r9,%rdi
call   1040 <symbol_table_make_interesting@plt>
jmp    12a1 <compute_parse_state+0x161>
cmp    $0x4,%esi
je     12a1 <compute_parse_state+0x161>
cmp    $0x9,%esi
jne    1308 <compute_parse_state+0x1c8>
mov    %r9,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1060 <symbol_table_is_interesting@plt>
cmp    $0x1,%eax
mov    $0xb,%eax
adc    $0x0,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
cmp    $0x4,%esi
setne  %al
lea    0x3(,%rax,8),%eax
pop    %rcx
ret
xor    %ecx,%ecx
cmp    $0x4,%esi
mov    $0xc,%eax
cmove  %ecx,%eax
pop    %rcx
ret
add    $0xffffffff,%esi
mov    $0xc,%eax
cmp    $0x8,%esi
jae    12df <compute_parse_state+0x19f>
movslq %esi,%rax
lea    0xdd0(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rcx
ret
xor    %eax,%eax
cmp    $0x4,%esi
mov    $0xe,%ecx
cmove  %eax,%ecx
cmp    $0xc,%esi
mov    $0xf,%eax
cmovne %ecx,%eax
pop    %rcx
ret
xor    %eax,%eax
cmp    $0x4,%esi
sete   %al
add    $0xf,%eax
pop    %rcx
ret
mov    $0xc,%eax
pop    %rcx
ret
mov    $0x8,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.symbol_table = type { i32 }
@.str = [32 x i8] c"Error: unknown token type %d.\0A\00"
define i32 @compute_parse_state(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, %struct.symbol_table* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.symbol_table*
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store %struct.symbol_table* %5, %struct.symbol_table** %12
%14 = load i32, i32* %7
store i32 %14, i32* %13
%15 = load i32, i32* %7
switch i32 %15, label %247 [
i32 0, label %16
i32 1, label %47
i32 2, label %60
i32 16, label %71
i32 3, label %71
i32 4, label %102
i32 5, label %117
i32 6, label %128
i32 7, label %144
i32 8, label %155
i32 9, label %170
i32 10, label %183
i32 11, label %202
i32 12, label %207
i32 13, label %212
i32 14, label %232
i32 15, label %242
]
16: ; preds = %6
%17 = load i32, i32* %8
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 1, i32* %13
br label %46
20: ; preds = %16
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 5
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 4, i32* %13
br label %45
24: ; preds = %20
%25 = load i32, i32* %8
%26 = icmp eq i32 %25, 8
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 10, i32* %13
br label %44
28: ; preds = %24
%29 = load i32, i32* %8
%30 = icmp eq i32 %29, 10
br i1 %30, label %31, label %32
31: ; preds = %28
store i32 0, i32* %13
br label %43
32: ; preds = %28
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, 11
br i1 %34, label %35, label %36
35: ; preds = %32
store i32 14, i32* %13
br label %42
36: ; preds = %32
%37 = load i32, i32* %8
%38 = icmp ne i32 %37, 4
br i1 %38, label %39, label %40
39: ; preds = %36
store i32 12, i32* %13
br label %41
40: ; preds = %36
store i32 13, i32* %13
br label %41
41: ; preds = %40, %39
br label %42
42: ; preds = %41, %35
br label %43
43: ; preds = %42, %31
br label %44
44: ; preds = %43, %27
br label %45
45: ; preds = %44, %23
br label %46
46: ; preds = %45, %19
br label %250
47: ; preds = %6
%48 = load i32, i32* %8
%49 = icmp eq i32 %48, 2
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = load i32, i32* %11
%52 = icmp ne i32 %51, 0
br i1 %52, label %54, label %53
53: ; preds = %50
store i32 2, i32* %13
br label %59
54: ; preds = %50, %47
%55 = load i32, i32* %8
%56 = icmp eq i32 %55, 4
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 3, i32* %13
br label %58
58: ; preds = %57, %54
br label %59
59: ; preds = %58, %53
br label %250
60: ; preds = %6
%61 = load i32, i32* %8
%62 = icmp eq i32 %61, 3
br i1 %62, label %63, label %64
63: ; preds = %60
store i32 12, i32* %13
br label %70
64: ; preds = %60
%65 = load i32, i32* %8
%66 = icmp eq i32 %65, 4
br i1 %66, label %67, label %68
67: ; preds = %64
store i32 3, i32* %13
br label %69
68: ; preds = %64
store i32 1, i32* %13
br label %69
69: ; preds = %68, %67
br label %70
70: ; preds = %69, %63
br label %250
71: ; preds = %6, %6
%72 = load i32, i32* %8
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %75
74: ; preds = %71
store i32 1, i32* %13
br label %101
75: ; preds = %71
%76 = load i32, i32* %8
%77 = icmp eq i32 %76, 11
br i1 %77, label %78, label %79
78: ; preds = %75
store i32 14, i32* %13
br label %100
79: ; preds = %75
%80 = load i32, i32* %8
%81 = icmp eq i32 %80, 5
br i1 %81, label %82, label %83
82: ; preds = %79
store i32 4, i32* %13
br label %99
83: ; preds = %79
%84 = load i32, i32* %8
%85 = icmp eq i32 %84, 8
br i1 %85, label %86, label %87
86: ; preds = %83
store i32 10, i32* %13
br label %98
87: ; preds = %83
%88 = load i32, i32* %8
%89 = icmp eq i32 %88, 10
br i1 %89, label %90, label %91
90: ; preds = %87
store i32 0, i32* %13
br label %97
91: ; preds = %87
%92 = load i32, i32* %8
%93 = icmp ne i32 %92, 4
br i1 %93, label %94, label %95
94: ; preds = %91
store i32 12, i32* %13
br label %96
95: ; preds = %91
store i32 13, i32* %13
br label %96
96: ; preds = %95, %94
br label %97
97: ; preds = %96, %90
br label %98
98: ; preds = %97, %86
br label %99
99: ; preds = %98, %82
br label %100
100: ; preds = %99, %78
br label %101
101: ; preds = %100, %74
br label %250
102: ; preds = %6
%103 = load i32, i32* %8
%104 = icmp eq i32 %103, 9
br i1 %104, label %105, label %110
105: ; preds = %102
%106 = load %struct.symbol_table*, %struct.symbol_table** %12
%107 = load i8*, i8** %9
%108 = load i32, i32* %10
%109 = call i32 @symbol_table_add(%struct.symbol_table* %106, i8* %107, i32 %108)
store i32 5, i32* %13
br label %116
110: ; preds = %102
%111 = load i32, i32* %8
%112 = icmp eq i32 %111, 4
br i1 %112, label %113, label %114
113: ; preds = %110
store i32 0, i32* %13
br label %115
114: ; preds = %110
store i32 12, i32* %13
br label %115
115: ; preds = %114, %113
br label %116
116: ; preds = %115, %105
br label %250
117: ; preds = %6
%118 = load i32, i32* %8
%119 = icmp eq i32 %118, 6
br i1 %119, label %120, label %121
120: ; preds = %117
store i32 6, i32* %13
br label %127
121: ; preds = %117
%122 = load i32, i32* %8
%123 = icmp eq i32 %122, 4
br i1 %123, label %124, label %125
124: ; preds = %121
store i32 0, i32* %13
br label %126
125: ; preds = %121
store i32 12, i32* %13
br label %126
126: ; preds = %125, %124
br label %127
127: ; preds = %126, %120
br label %250
128: ; preds = %6
%129 = load i32, i32* %8
%130 = icmp eq i32 %129, 7
br i1 %130, label %131, label %132
131: ; preds = %128
store i32 7, i32* %13
br label %143
132: ; preds = %128
%133 = load i32, i32* %8
%134 = icmp eq i32 %133, 1
br i1 %134, label %135, label %136
135: ; preds = %132
store i32 8, i32* %13
br label %142
136: ; preds = %132
%137 = load i32, i32* %8
%138 = icmp eq i32 %137, 4
br i1 %138, label %139, label %140
139: ; preds = %136
store i32 0, i32* %13
br label %141
140: ; preds = %136
store i32 12, i32* %13
br label %141
141: ; preds = %140, %139
br label %142
142: ; preds = %141, %135
br label %143
143: ; preds = %142, %131
br label %250
144: ; preds = %6
%145 = load i32, i32* %8
%146 = icmp eq i32 %145, 1
br i1 %146, label %147, label %148
147: ; preds = %144
store i32 8, i32* %13
br label %154
148: ; preds = %144
%149 = load i32, i32* %8
%150 = icmp eq i32 %149, 4
br i1 %150, label %151, label %152
151: ; preds = %148
store i32 0, i32* %13
br label %153
152: ; preds = %148
store i32 12, i32* %13
br label %153
153: ; preds = %152, %151
br label %154
154: ; preds = %153, %147
br label %250
155: ; preds = %6
%156 = load i32, i32* %8
%157 = icmp eq i32 %156, 2
br i1 %157, label %158, label %162
158: ; preds = %155
%159 = load i32, i32* %11
%160 = icmp ne i32 %159, 0
br i1 %160, label %162, label %161
161: ; preds = %158
store i32 9, i32* %13
br label %169
162: ; preds = %158, %155
%163 = load i32, i32* %8
%164 = icmp eq i32 %163, 4
br i1 %164, label %165, label %168
165: ; preds = %162
%166 = load %struct.symbol_table*, %struct.symbol_table** %12
%167 = call i32 @symbol_table_make_interesting(%struct.symbol_table* %166)
store i32 0, i32* %13
br label %168
168: ; preds = %165, %162
br label %169
169: ; preds = %168, %161
br label %250
170: ; preds = %6
%171 = load i32, i32* %8
%172 = icmp eq i32 %171, 3
br i1 %172, label %173, label %174
173: ; preds = %170
store i32 12, i32* %13
br label %182
174: ; preds = %170
%175 = load i32, i32* %8
%176 = icmp eq i32 %175, 4
br i1 %176, label %177, label %180
177: ; preds = %174
%178 = load %struct.symbol_table*, %struct.symbol_table** %12
%179 = call i32 @symbol_table_make_interesting(%struct.symbol_table* %178)
store i32 0, i32* %13
br label %181
180: ; preds = %174
store i32 8, i32* %13
br label %181
181: ; preds = %180, %177
br label %182
182: ; preds = %181, %173
br label %250
183: ; preds = %6
%184 = load i32, i32* %8
%185 = icmp eq i32 %184, 9
br i1 %185, label %186, label %195
186: ; preds = %183
%187 = load %struct.symbol_table*, %struct.symbol_table** %12
%188 = load i8*, i8** %9
%189 = load i32, i32* %10
%190 = call i32 @symbol_table_is_interesting(%struct.symbol_table* %187, i8* %188, i32 %189)
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %193
192: ; preds = %186
store i32 11, i32* %13
br label %194
193: ; preds = %186
store i32 12, i32* %13
br label %194
194: ; preds = %193, %192
br label %201
195: ; preds = %183
%196 = load i32, i32* %8
%197 = icmp eq i32 %196, 4
br i1 %197, label %198, label %199
198: ; preds = %195
store i32 0, i32* %13
br label %200
199: ; preds = %195
store i32 12, i32* %13
br label %200
200: ; preds = %199, %198
br label %201
201: ; preds = %200, %194
br label %250
202: ; preds = %6
%203 = load i32, i32* %8
%204 = icmp eq i32 %203, 4
br i1 %204, label %205, label %206
205: ; preds = %202
store i32 3, i32* %13
br label %206
206: ; preds = %205, %202
br label %250
207: ; preds = %6
%208 = load i32, i32* %8
%209 = icmp eq i32 %208, 4
br i1 %209, label %210, label %211
210: ; preds = %207
store i32 0, i32* %13
br label %211
211: ; preds = %210, %207
br label %250
212: ; preds = %6
%213 = load i32, i32* %8
%214 = icmp eq i32 %213, 1
br i1 %214, label %215, label %216
215: ; preds = %212
store i32 1, i32* %13
br label %231
216: ; preds = %212
%217 = load i32, i32* %8
%218 = icmp eq i32 %217, 5
br i1 %218, label %219, label %220
219: ; preds = %216
store i32 4, i32* %13
br label %230
220: ; preds = %216
%221 = load i32, i32* %8
%222 = icmp eq i32 %221, 8
br i1 %222, label %223, label %224
223: ; preds = %220
store i32 10, i32* %13
br label %229
224: ; preds = %220
%225 = load i32, i32* %8
%226 = icmp ne i32 %225, 4
br i1 %226, label %227, label %228
227: ; preds = %224
store i32 12, i32* %13
br label %228
228: ; preds = %227, %224
br label %229
229: ; preds = %228, %223
br label %230
230: ; preds = %229, %219
br label %231
231: ; preds = %230, %215
br label %250
232: ; preds = %6
%233 = load i32, i32* %8
%234 = icmp eq i32 %233, 12
br i1 %234, label %235, label %236
235: ; preds = %232
store i32 15, i32* %13
br label %241
236: ; preds = %232
%237 = load i32, i32* %8
%238 = icmp eq i32 %237, 4
br i1 %238, label %239, label %240
239: ; preds = %236
store i32 0, i32* %13
br label %240
240: ; preds = %239, %236
br label %241
241: ; preds = %240, %235
br label %250
242: ; preds = %6
%243 = load i32, i32* %8
%244 = icmp eq i32 %243, 4
br i1 %244, label %245, label %246
245: ; preds = %242
store i32 16, i32* %13
br label %246
246: ; preds = %245, %242
br label %250
247: ; preds = %6
%248 = load i32, i32* %8
%249 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %248)
store i32 0, i32* %13
br label %250
250: ; preds = %247, %246, %241, %231, %211, %206, %201, %182, %169, %154, %143, %127, %116, %101, %70, %59, %46
%251 = load i32, i32* %13
ret i32 %251
}

LLVM IR (-O2):
%struct.symbol_table = type { i32 }
@.str = [32 x i8] c"Error: unknown token type %d.\0A\00"
@switch.table.compute_parse_state.1 = [11 x i32] [i32 1, i32 12, i32 12, i32 13, i32 4, i32 12, i32 12, i32 10, i32 12, i32 0, i32 14]
@switch.table.compute_parse_state.2 = [7 x i32] [i32 8, i32 12, i32 12, i32 0, i32 12, i32 12, i32 7]
@switch.table.compute_parse_state.3 = [8 x i32] [i32 1, i32 12, i32 12, i32 13, i32 4, i32 12, i32 12, i32 10]
define i32 @compute_parse_state(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, %struct.symbol_table* %5) {
switch i32 %0, label %77 [
i32 0, label %7
i32 1, label %10
i32 2, label %17
i32 16, label %22
i32 3, label %22
i32 4, label %25
i32 5, label %29
i32 6, label %34
i32 7, label %37
i32 8, label %42
i32 9, label %50
i32 10, label %54
i32 11, label %60
i32 12, label %63
i32 13, label %66
i32 14, label %69
i32 15, label %74
]
7: ; preds = %6
%8 = add i32 %1, -1
%9 = icmp ult i32 %8, 11
br i1 %9, label %79, label %95
10: ; preds = %6
%11 = icmp ne i32 %1, 2
%12 = icmp ne i32 %4, 0
%13 = or i1 %11, %12
br i1 %13, label %14, label %95
14: ; preds = %10
%15 = icmp eq i32 %1, 4
%16 = select i1 %15, i32 3, i32 1
br label %95
17: ; preds = %6
%18 = icmp eq i32 %1, 4
%19 = select i1 %18, i32 3, i32 1
%20 = icmp eq i32 %1, 3
%21 = select i1 %20, i32 12, i32 %19
br label %95
22: ; preds = %6, %6
%23 = add i32 %1, -1
%24 = icmp ult i32 %23, 11
br i1 %24, label %83, label %95
25: ; preds = %6
switch i32 %1, label %28 [
i32 9, label %26
i32 4, label %95
]
26: ; preds = %25
%27 = tail call i32 @symbol_table_add(%struct.symbol_table* %5, i8* %2, i32 %3)
br label %95
28: ; preds = %25
br label %95
29: ; preds = %6
%30 = icmp eq i32 %1, 4
%31 = select i1 %30, i32 0, i32 12
%32 = icmp eq i32 %1, 6
%33 = select i1 %32, i32 6, i32 %31
br label %95
34: ; preds = %6
%35 = add i32 %1, -1
%36 = icmp ult i32 %35, 7
br i1 %36, label %87, label %95
37: ; preds = %6
%38 = icmp eq i32 %1, 4
%39 = select i1 %38, i32 0, i32 12
%40 = icmp eq i32 %1, 1
%41 = select i1 %40, i32 8, i32 %39
br label %95
42: ; preds = %6
%43 = icmp ne i32 %1, 2
%44 = icmp ne i32 %4, 0
%45 = or i1 %43, %44
br i1 %45, label %46, label %95
46: ; preds = %42
%47 = icmp eq i32 %1, 4
br i1 %47, label %48, label %95
48: ; preds = %46
%49 = tail call i32 @symbol_table_make_interesting(%struct.symbol_table* %5)
br label %95
50: ; preds = %6
switch i32 %1, label %53 [
i32 3, label %95
i32 4, label %51
]
51: ; preds = %50
%52 = tail call i32 @symbol_table_make_interesting(%struct.symbol_table* %5)
br label %95
53: ; preds = %50
br label %95
54: ; preds = %6
switch i32 %1, label %59 [
i32 9, label %55
i32 4, label %95
]
55: ; preds = %54
%56 = tail call i32 @symbol_table_is_interesting(%struct.symbol_table* %5, i8* %2, i32 %3)
%57 = icmp eq i32 %56, 0
%58 = select i1 %57, i32 12, i32 11
br label %95
59: ; preds = %54
br label %95
60: ; preds = %6
%61 = icmp eq i32 %1, 4
%62 = select i1 %61, i32 3, i32 11
br label %95
63: ; preds = %6
%64 = icmp eq i32 %1, 4
%65 = select i1 %64, i32 0, i32 12
br label %95
66: ; preds = %6
%67 = add i32 %1, -1
%68 = icmp ult i32 %67, 8
br i1 %68, label %91, label %95
69: ; preds = %6
%70 = icmp eq i32 %1, 4
%71 = select i1 %70, i32 0, i32 14
%72 = icmp eq i32 %1, 12
%73 = select i1 %72, i32 15, i32 %71
br label %95
74: ; preds = %6
%75 = icmp eq i32 %1, 4
%76 = select i1 %75, i32 16, i32 15
br label %95
77: ; preds = %6
%78 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %95
79: ; preds = %7
%80 = sext i32 %8 to i64
%81 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.compute_parse_state.1, i64 0, i64 %80
%82 = load i32, i32* %81
br label %95
83: ; preds = %22
%84 = sext i32 %23 to i64
%85 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.compute_parse_state.1, i64 0, i64 %84
%86 = load i32, i32* %85
br label %95
87: ; preds = %34
%88 = sext i32 %35 to i64
%89 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.compute_parse_state.2, i64 0, i64 %88
%90 = load i32, i32* %89
br label %95
91: ; preds = %66
%92 = sext i32 %67 to i64
%93 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.compute_parse_state.3, i64 0, i64 %92
%94 = load i32, i32* %93
br label %95
95: ; preds = %66, %91, %34, %87, %22, %83, %7, %79, %74, %69, %63, %60, %37, %29, %17, %14, %54, %55, %50, %42, %25, %10, %59, %53, %51, %48, %46, %26, %28, %77
%96 = phi i32 [ 0, %77 ], [ 12, %59 ], [ 0, %51 ], [ 8, %53 ], [ 0, %48 ], [ 8, %46 ], [ 5, %26 ], [ 12, %28 ], [ 2, %10 ], [ %16, %14 ], [ 0, %25 ], [ 9, %42 ], [ 12, %50 ], [ %58, %55 ], [ 0, %54 ], [ %62, %60 ], [ %65, %63 ], [ %76, %74 ], [ %21, %17 ], [ %33, %29 ], [ %41, %37 ], [ %73, %69 ], [ %82, %79 ], [ 12, %7 ], [ %86, %83 ], [ 12, %22 ], [ %90, %87 ], [ 12, %34 ], [ %94, %91 ], [ 12, %66 ]
ret i32 %96
}