#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 /*<<< orphan*/ printf(char *, unsigned long, ...);
void dumpnode(unsigned long id, unsigned idx) {
  if (idx == '\\')
    printf("%lu [label=\"\\\\\"];\n", id);
  if (idx == '"')
    printf("%lu [label=\"\\\"\"];\n", id);
  else if (idx > 0x20 && 127 > idx)
    printf("%lu [label=\"%c\"];\n", id, idx);
  else if (idx == 0x102)
    printf("%lu [label=\"RX:* (kleene)\"];\n", id);
  else if (idx == 0x101)
    printf("%lu [label=\"RX:? (wilcard)\"];\n", id);
  else if (idx == 0x103)
    printf("%lu [label=\"RX:\\\\S (whitespace, greedy)\"];\n", id);
  else if (idx == 0x104)
    printf("%lu [label=\"RX:\\\\s (whitespace)\"];\n", id);
  else if (idx == 0x105)
    printf("%lu [label=\"RX:\\\\S (digit, greedy)\"];\n", id);
  else if (idx == 0x106)
    printf("%lu [label=\"RX:\\\\s (digit)\"];\n", id);
  else
    printf("%lu [label=\"LITERAL: %d\"];\n", id, idx);
}


x86 assembly (clang, -O0):
<dumpnode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x5c,-0xc(%rbp)
jne    113b <dumpnode+0x2b>
mov    -0x8(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x22,-0xc(%rbp)
jne    115c <dumpnode+0x4c>
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129e <dumpnode+0x18e>
cmpl   $0x20,-0xc(%rbp)
jbe    118e <dumpnode+0x7e>
mov    $0x7f,%eax
cmp    -0xc(%rbp),%eax
jbe    118e <dumpnode+0x7e>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1299 <dumpnode+0x189>
cmpl   $0x102,-0xc(%rbp)
jne    11b2 <dumpnode+0xa2>
mov    -0x8(%rbp),%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1294 <dumpnode+0x184>
cmpl   $0x101,-0xc(%rbp)
jne    11d6 <dumpnode+0xc6>
mov    -0x8(%rbp),%rsi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    128f <dumpnode+0x17f>
cmpl   $0x103,-0xc(%rbp)
jne    11fa <dumpnode+0xea>
mov    -0x8(%rbp),%rsi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    128a <dumpnode+0x17a>
cmpl   $0x104,-0xc(%rbp)
jne    121e <dumpnode+0x10e>
mov    -0x8(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1285 <dumpnode+0x175>
cmpl   $0x105,-0xc(%rbp)
jne    1242 <dumpnode+0x132>
mov    -0x8(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1280 <dumpnode+0x170>
cmpl   $0x106,-0xc(%rbp)
jne    1266 <dumpnode+0x156>
mov    -0x8(%rbp),%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    127b <dumpnode+0x16b>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1280 <dumpnode+0x170>
jmp    1285 <dumpnode+0x175>
jmp    128a <dumpnode+0x17a>
jmp    128f <dumpnode+0x17f>
jmp    1294 <dumpnode+0x184>
jmp    1299 <dumpnode+0x189>
jmp    129e <dumpnode+0x18e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpnode>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
cmp    $0x22,%esi
je     1136 <dumpnode+0x26>
mov    %esi,%ebx
cmp    $0x5c,%esi
jne    114e <dumpnode+0x3e>
lea    0xeee(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1156 <dumpnode+0x46>
lea    0xeee(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
lea    -0x21(%rbx),%eax
cmp    $0x5d,%eax
ja     1170 <dumpnode+0x60>
lea    0xee1(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
lea    -0x101(%rbx),%eax
cmp    $0x5,%eax
ja     11c4 <dumpnode+0xb4>
lea    0xe7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xeb6(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xeea(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xf0d(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xf28(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xf46(%rip),%rdi
jmp    113d <dumpnode+0x2d>
lea    0xf59(%rip),%rdi
jmp    115d <dumpnode+0x4d>

LLVM IR (-O0):
@.str = [19 x i8] c"%lu [label=\22\\\\\22];\0A\00"
@.str.1 = [19 x i8] c"%lu [label=\22\\\22\22];\0A\00"
@.str.2 = [19 x i8] c"%lu [label=\22%c\22];\0A\00"
@.str.3 = [30 x i8] c"%lu [label=\22RX:* (kleene)\22];\0A\00"
@.str.4 = [31 x i8] c"%lu [label=\22RX:? (wilcard)\22];\0A\00"
@.str.5 = [44 x i8] c"%lu [label=\22RX:\\\\S (whitespace, greedy)\22];\0A\00"
@.str.6 = [36 x i8] c"%lu [label=\22RX:\\\\s (whitespace)\22];\0A\00"
@.str.7 = [39 x i8] c"%lu [label=\22RX:\\\\S (digit, greedy)\22];\0A\00"
@.str.8 = [31 x i8] c"%lu [label=\22RX:\\\\s (digit)\22];\0A\00"
@.str.9 = [28 x i8] c"%lu [label=\22LITERAL: %d\22];\0A\00"
define void @dumpnode(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 92
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 34
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i64, i64* %3
%15 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 %14)
br label %73
16: ; preds = %10
%17 = load i32, i32* %4
%18 = icmp ugt i32 %17, 32
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp ugt i32 127, %20
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i64, i64* %3
%24 = load i32, i32* %4
%25 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i64 %23, i32 %24)
br label %72
26: ; preds = %19, %16
%27 = load i32, i32* %4
%28 = icmp eq i32 %27, 258
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i64, i64* %3
%31 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i64 %30)
br label %71
32: ; preds = %26
%33 = load i32, i32* %4
%34 = icmp eq i32 %33, 257
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i64, i64* %3
%37 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i64 %36)
br label %70
38: ; preds = %32
%39 = load i32, i32* %4
%40 = icmp eq i32 %39, 259
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i64, i64* %3
%43 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i64 %42)
br label %69
44: ; preds = %38
%45 = load i32, i32* %4
%46 = icmp eq i32 %45, 260
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i64, i64* %3
%49 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i64 %48)
br label %68
50: ; preds = %44
%51 = load i32, i32* %4
%52 = icmp eq i32 %51, 261
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i64, i64* %3
%55 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i64 %54)
br label %67
56: ; preds = %50
%57 = load i32, i32* %4
%58 = icmp eq i32 %57, 262
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i64, i64* %3
%61 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i64 %60)
br label %66
62: ; preds = %56
%63 = load i64, i64* %3
%64 = load i32, i32* %4
%65 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i64 %63, i32 %64)
br label %66
66: ; preds = %62, %59
br label %67
67: ; preds = %66, %53
br label %68
68: ; preds = %67, %47
br label %69
69: ; preds = %68, %41
br label %70
70: ; preds = %69, %35
br label %71
71: ; preds = %70, %29
br label %72
72: ; preds = %71, %22
br label %73
73: ; preds = %72, %13
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%lu [label=\22\\\\\22];\0A\00"
@.str.1 = [19 x i8] c"%lu [label=\22\\\22\22];\0A\00"
@.str.2 = [19 x i8] c"%lu [label=\22%c\22];\0A\00"
@.str.3 = [30 x i8] c"%lu [label=\22RX:* (kleene)\22];\0A\00"
@.str.4 = [31 x i8] c"%lu [label=\22RX:? (wilcard)\22];\0A\00"
@.str.5 = [44 x i8] c"%lu [label=\22RX:\\\\S (whitespace, greedy)\22];\0A\00"
@.str.6 = [36 x i8] c"%lu [label=\22RX:\\\\s (whitespace)\22];\0A\00"
@.str.7 = [39 x i8] c"%lu [label=\22RX:\\\\S (digit, greedy)\22];\0A\00"
@.str.8 = [31 x i8] c"%lu [label=\22RX:\\\\s (digit)\22];\0A\00"
@.str.9 = [28 x i8] c"%lu [label=\22LITERAL: %d\22];\0A\00"
define void @dumpnode(i64 %0, i32 %1) {
switch i32 %1, label %7 [
i32 92, label %3
i32 34, label %5
]
3: ; preds = %2
%4 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %10
5: ; preds = %2
%6 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 %0)
br label %27
7: ; preds = %2
%8 = add i32 %1, -33
%9 = icmp ult i32 %8, 94
br i1 %9, label %10, label %12
10: ; preds = %3, %7
%11 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i64 %0, i32 %1)
br label %27
12: ; preds = %7
switch i32 %1, label %25 [
i32 258, label %13
i32 257, label %15
i32 259, label %17
i32 260, label %19
i32 261, label %21
i32 262, label %23
]
13: ; preds = %12
%14 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i64 %0)
br label %27
15: ; preds = %12
%16 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i64 %0)
br label %27
17: ; preds = %12
%18 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i64 %0)
br label %27
19: ; preds = %12
%20 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i64 %0)
br label %27
21: ; preds = %12
%22 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i64 %0)
br label %27
23: ; preds = %12
%24 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i64 %0)
br label %27
25: ; preds = %12
%26 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i64 %0, i32 %1)
br label %27
27: ; preds = %10, %15, %19, %23, %25, %21, %17, %13, %5
ret void
}