#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
char *basename(char *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int getc(int /*<<< orphan*/ *);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
int /*<<< orphan*/ perror(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_hard(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ show_reserved(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ show_swit(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ show_timestamp(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int main(int argc, char **argv) {
  FILE *f = stdin;
  int c;
  while ((c = getopt(argc, argv, "f:")) != EOF) {
    switch (c) {
    case 'f':
      f = fopen(optarg, "r");
      if (!f) {
        perror(optarg);
        return 1;
      }
      break;
    default:
    usage:
      fprintf(stderr, "usage: %s [-f input]", basename(argv[0]));
      return 1;
    }
  }
  bool overflow = false;
  while ((c = getc(f)) != EOF) {
    if (c == 0) {
      int i;
      for (i = 0; i < 6; i++) {
        c = fgetc(f);
        if (c == EOF)
          break;
        if (c != 0)
          goto bad_sync;
      }
      c = fgetc(f);
      if (c == 0x80) {
        printf("SYNC\n");
        continue;
      }
    bad_sync:
      printf("BAD SYNC\n");
      continue;
    }
    if (c == 0x70) {
      overflow = true;
      printf("OVERFLOW ...\n");
      continue;
    }
    overflow = false;
    switch (c & 0x0f) {
    case 0x00:
      show_timestamp(f, c);
      break;
    case 0x04:
      show_reserved(f, "RESERVED", c);
      break;
    case 0x08:
      show_reserved(f, "ITM EXT", c);
      break;
    case 0x0c:
      show_reserved(f, "DWT EXT", c);
      break;
    default:
      if (c & 4)
        show_hard(f, c);
      else
        show_swit(f, c);
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e03(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe42(%rip),%rdx
call   10c0 <getopt@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2dd7(%rip),%rcx
cmp    (%rcx),%eax
je     129d <main+0xdd>
mov    -0x1c(%rbp),%eax
sub    $0x66,%eax
jne    125d <main+0x9d>
jmp    121a <main+0x5a>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
lea    0xe0d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1258 <main+0x98>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
call   10b0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1445 <main+0x285>
jmp    1298 <main+0xd8>
jmp    1262 <main+0xa2>
mov    0x2d5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <basename@plt>
mov    -0x28(%rbp),%edi
mov    %rax,%rdx
lea    0xdb2(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1445 <main+0x285>
jmp    11e4 <main+0x24>
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   10e0 <getc@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2d21(%rip),%rcx
cmp    (%rcx),%eax
je     143e <main+0x27e>
cmpl   $0x0,-0x1c(%rbp)
jne    135f <main+0x19f>
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    131f <main+0x15f>
mov    -0x18(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2ce8(%rip),%rcx
cmp    (%rcx),%eax
jne    12fd <main+0x13d>
jmp    131f <main+0x15f>
cmpl   $0x0,-0x1c(%rbp)
je     130c <main+0x14c>
jmp    134e <main+0x18e>
jmp    1311 <main+0x151>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12d0 <main+0x110>
mov    -0x18(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x80,-0x1c(%rbp)
jne    1349 <main+0x189>
lea    0xd13(%rip),%rdi
call   1030 <printf@plt>
jmp    12a4 <main+0xe4>
jmp    134e <main+0x18e>
lea    0xcf9(%rip),%rdi
call   1030 <printf@plt>
jmp    12a4 <main+0xe4>
cmpl   $0x70,-0x1c(%rbp)
jne    1381 <main+0x1c1>
movl   $0x1,-0x20(%rbp)
lea    0xce1(%rip),%rdi
call   1030 <printf@plt>
jmp    12a4 <main+0xe4>
movl   $0x0,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
and    $0xf,%eax
mov    %rax,-0x30(%rbp)
sub    $0xc,%eax
ja     1408 <main+0x248>
mov    -0x30(%rbp),%rax
lea    0xc5a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10d0 <show_timestamp@plt>
jmp    1439 <main+0x279>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xc98(%rip),%rsi
call   1070 <show_reserved@plt>
jmp    1439 <main+0x279>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xc89(%rip),%rsi
call   1070 <show_reserved@plt>
jmp    1439 <main+0x279>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xc79(%rip),%rsi
call   1070 <show_reserved@plt>
jmp    1439 <main+0x279>
mov    -0x1c(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1428 <main+0x268>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <show_hard@plt>
jmp    1434 <main+0x274>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <show_swit@plt>
jmp    1439 <main+0x279>
jmp    12a4 <main+0xe4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2e09(%rip),%rax
mov    (%rax),%rbx
lea    0xe2f(%rip),%rdx
call   10c0 <getopt@plt>
mov    0x2deb(%rip),%r13
cmp    0x0(%r13),%eax
je     1250 <main+0x90>
mov    0x2dfe(%rip),%r13
lea    0xe12(%rip),%r15
lea    0xe08(%rip),%r12
nopl   0x0(%rax,%rax,1)
cmp    $0x66,%eax
jne    13cc <main+0x20c>
mov    0x0(%r13),%edi
mov    %r15,%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     13f0 <main+0x230>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r12,%rdx
call   10c0 <getopt@plt>
mov    0x2d93(%rip),%rcx
cmp    (%rcx),%eax
jne    1210 <main+0x50>
mov    0x2d88(%rip),%r13
mov    %rbx,%rdi
call   10e0 <getc@plt>
xor    %r14d,%r14d
cmp    0x0(%r13),%eax
je     13ff <main+0x23f>
lea    0xdd7(%rip),%rbp
lea    0xddd(%rip),%r12
lea    0xd86(%rip),%r15
jmp    129a <main+0xda>
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   10e0 <getc@plt>
cmp    0x0(%r13),%eax
je     13ff <main+0x23f>
cmp    $0x70,%eax
je     1280 <main+0xc0>
test   %eax,%eax
jne    12d0 <main+0x110>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
jne    12f5 <main+0x135>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    $0x80,%eax
jne    12f9 <main+0x139>
lea    0xd8d(%rip),%rdi
jmp    1283 <main+0xc3>
nopl   0x0(%rax)
mov    %eax,%ecx
rol    $0x1e,%ecx
and    $0xc0000003,%ecx
cmp    $0x3,%ecx
ja     12fe <main+0x13e>
movslq (%r15,%rcx,4),%rcx
add    %r15,%rcx
jmp    *%rcx
mov    %rbx,%rdi
mov    %eax,%esi
call   10d0 <show_timestamp@plt>
jmp    1288 <main+0xc8>
test   %eax,%eax
je     1343 <main+0x183>
mov    %r12,%rdi
jmp    1283 <main+0xc3>
mov    %rbx,%rdi
mov    %eax,%esi
test   $0x4,%al
jne    13c2 <main+0x202>
call   1050 <show_swit@plt>
jmp    1288 <main+0xc8>
mov    %rbx,%rdi
lea    0xd0b(%rip),%rsi
jmp    1337 <main+0x177>
mov    %rbx,%rdi
lea    0xd08(%rip),%rsi
jmp    1337 <main+0x177>
mov    %rbx,%rdi
lea    0xd04(%rip),%rsi
mov    %eax,%edx
call   1070 <show_reserved@plt>
jmp    1288 <main+0xc8>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12b1 <main+0xf1>
test   %eax,%eax
jne    12f9 <main+0x139>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12b1 <main+0xf1>
test   %eax,%eax
jne    12f9 <main+0x139>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12b1 <main+0xf1>
test   %eax,%eax
jne    12f9 <main+0x139>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12b1 <main+0xf1>
test   %eax,%eax
jne    12f9 <main+0x139>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    0x0(%r13),%eax
je     12b1 <main+0xf1>
test   %eax,%eax
jne    12f9 <main+0x139>
jmp    12b1 <main+0xf1>
call   1040 <show_hard@plt>
jmp    1288 <main+0xc8>
mov    0x2bf5(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%rdi
call   1090 <basename@plt>
lea    0xc31(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1080 <fprintf@plt>
jmp    13f9 <main+0x239>
mov    0x0(%r13),%edi
call   10b0 <perror@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32* null
@.str = [3 x i8] c"f:\00"
@EOF = global i32 0
@optarg = global i32 0
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [21 x i8] c"usage: %s [-f input]\00"
@.str.3 = [6 x i8] c"SYNC\0A\00"
@.str.4 = [10 x i8] c"BAD SYNC\0A\00"
@.str.5 = [14 x i8] c"OVERFLOW ...\0A\00"
@.str.6 = [9 x i8] c"RESERVED\00"
@.str.7 = [8 x i8] c"ITM EXT\00"
@.str.8 = [8 x i8] c"DWT EXT\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32*, i32** @stdin
store i32* %10, i32** %6
br label %11
11: ; preds = %36, %2
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @getopt(i32 %12, i8** %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %7
%15 = load i32, i32* @EOF
%16 = icmp ne i32 %14, %15
br i1 %16, label %17, label %37
17: ; preds = %11
%18 = load i32, i32* %7
switch i32 %18, label %28 [
i32 102, label %19
]
19: ; preds = %17
%20 = load i32, i32* @optarg
%21 = call i32* @fopen(i32 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %6
%22 = load i32*, i32** %6
%23 = icmp ne i32* %22, null
br i1 %23, label %27, label %24
24: ; preds = %19
%25 = load i32, i32* @optarg
%26 = call i32 @perror(i32 %25)
store i32 1, i32* %3
br label %114
27: ; preds = %19
br label %36
28: ; preds = %17
br label %29
29: ; preds = %28
%30 = load i32, i32* @stderr
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = call i8* @basename(i8* %33)
%35 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %34)
store i32 1, i32* %3
br label %114
36: ; preds = %27
br label %11
37: ; preds = %11
store i32 0, i32* %8
br label %38
38: ; preds = %112, %78, %73, %70, %37
%39 = load i32*, i32** %6
%40 = call i32 @getc(i32* %39)
store i32 %40, i32* %7
%41 = load i32, i32* @EOF
%42 = icmp ne i32 %40, %41
br i1 %42, label %43, label %113
43: ; preds = %38
%44 = load i32, i32* %7
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %75
46: ; preds = %43
store i32 0, i32* %9
br label %47
47: ; preds = %62, %46
%48 = load i32, i32* %9
%49 = icmp slt i32 %48, 6
br i1 %49, label %50, label %65
50: ; preds = %47
%51 = load i32*, i32** %6
%52 = call i32 @fgetc(i32* %51)
store i32 %52, i32* %7
%53 = load i32, i32* %7
%54 = load i32, i32* @EOF
%55 = icmp eq i32 %53, %54
br i1 %55, label %56, label %57
56: ; preds = %50
br label %65
57: ; preds = %50
%58 = load i32, i32* %7
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %57
br label %73
61: ; preds = %57
br label %62
62: ; preds = %61
%63 = load i32, i32* %9
%64 = add nsw i32 %63, 1
store i32 %64, i32* %9
br label %47
65: ; preds = %56, %47
%66 = load i32*, i32** %6
%67 = call i32 @fgetc(i32* %66)
store i32 %67, i32* %7
%68 = load i32, i32* %7
%69 = icmp eq i32 %68, 128
br i1 %69, label %70, label %72
70: ; preds = %65
%71 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %38
72: ; preds = %65
br label %73
73: ; preds = %72, %60
%74 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %38
75: ; preds = %43
%76 = load i32, i32* %7
%77 = icmp eq i32 %76, 112
br i1 %77, label %78, label %80
78: ; preds = %75
store i32 1, i32* %8
%79 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %38
80: ; preds = %75
store i32 0, i32* %8
%81 = load i32, i32* %7
%82 = and i32 %81, 15
switch i32 %82, label %99 [
i32 0, label %83
i32 4, label %87
i32 8, label %91
i32 12, label %95
]
83: ; preds = %80
%84 = load i32*, i32** %6
%85 = load i32, i32* %7
%86 = call i32 @show_timestamp(i32* %84, i32 %85)
br label %112
87: ; preds = %80
%88 = load i32*, i32** %6
%89 = load i32, i32* %7
%90 = call i32 @show_reserved(i32* %88, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %89)
br label %112
91: ; preds = %80
%92 = load i32*, i32** %6
%93 = load i32, i32* %7
%94 = call i32 @show_reserved(i32* %92, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %93)
br label %112
95: ; preds = %80
%96 = load i32*, i32** %6
%97 = load i32, i32* %7
%98 = call i32 @show_reserved(i32* %96, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %97)
br label %112
99: ; preds = %80
%100 = load i32, i32* %7
%101 = and i32 %100, 4
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %107
103: ; preds = %99
%104 = load i32*, i32** %6
%105 = load i32, i32* %7
%106 = call i32 @show_hard(i32* %104, i32 %105)
br label %111
107: ; preds = %99
%108 = load i32*, i32** %6
%109 = load i32, i32* %7
%110 = call i32 @show_swit(i32* %108, i32 %109)
br label %111
111: ; preds = %107, %103
br label %112
112: ; preds = %111, %95, %91, %87, %83
br label %38
113: ; preds = %38
store i32 0, i32* %3
br label %114
114: ; preds = %113, %29, %24
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
@stdin = global i32* null
@.str = [3 x i8] c"f:\00"
@EOF = global i32 0
@optarg = global i32 0
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [21 x i8] c"usage: %s [-f input]\00"
@.str.6 = [9 x i8] c"RESERVED\00"
@.str.7 = [8 x i8] c"ITM EXT\00"
@.str.8 = [8 x i8] c"DWT EXT\00"
@str = [13 x i8] c"OVERFLOW ...\00"
@str.9 = [9 x i8] c"BAD SYNC\00"
@str.10 = [5 x i8] c"SYNC\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i32*, i32** @stdin
%4 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %11, label %16
7: ; preds = %19
%8 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7, %2
%12 = phi i32* [ %3, %2 ], [ %21, %7 ]
%13 = tail call i32 @getc(i32* %12)
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %102, label %31
16: ; preds = %2, %7
%17 = phi i32 [ %8, %7 ], [ %4, %2 ]
%18 = icmp eq i32 %17, 102
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* @optarg
%21 = tail call i32* @fopen(i32 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %7
23: ; preds = %19
%24 = load i32, i32* @optarg
%25 = tail call i32 @perror(i32 %24)
br label %102
26: ; preds = %16
%27 = load i32, i32* @stderr
%28 = load i8*, i8** %1
%29 = tail call i8* @basename(i8* %28)
%30 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %29)
br label %102
31: ; preds = %11, %76
%32 = phi i32 [ %77, %76 ], [ %13, %11 ]
switch i32 %32, label %82 [
i32 0, label %33
i32 112, label %80
]
33: ; preds = %31
%34 = tail call i32 @fgetc(i32* %12)
%35 = load i32, i32* @EOF
%36 = icmp eq i32 %34, %35
br i1 %36, label %69, label %67
37: ; preds = %67
%38 = tail call i32 @fgetc(i32* %12)
%39 = load i32, i32* @EOF
%40 = icmp eq i32 %38, %39
br i1 %40, label %69, label %41
41: ; preds = %37
%42 = icmp eq i32 %38, 0
br i1 %42, label %43, label %74
43: ; preds = %41
%44 = tail call i32 @fgetc(i32* %12)
%45 = load i32, i32* @EOF
%46 = icmp eq i32 %44, %45
br i1 %46, label %69, label %47
47: ; preds = %43
%48 = icmp eq i32 %44, 0
br i1 %48, label %49, label %74
49: ; preds = %47
%50 = tail call i32 @fgetc(i32* %12)
%51 = load i32, i32* @EOF
%52 = icmp eq i32 %50, %51
br i1 %52, label %69, label %53
53: ; preds = %49
%54 = icmp eq i32 %50, 0
br i1 %54, label %55, label %74
55: ; preds = %53
%56 = tail call i32 @fgetc(i32* %12)
%57 = load i32, i32* @EOF
%58 = icmp eq i32 %56, %57
br i1 %58, label %69, label %59
59: ; preds = %55
%60 = icmp eq i32 %56, 0
br i1 %60, label %61, label %74
61: ; preds = %59
%62 = tail call i32 @fgetc(i32* %12)
%63 = load i32, i32* @EOF
%64 = icmp eq i32 %62, %63
%65 = icmp eq i32 %62, 0
%66 = or i1 %64, %65
br i1 %66, label %69, label %74
67: ; preds = %33
%68 = icmp eq i32 %34, 0
br i1 %68, label %37, label %74
69: ; preds = %61, %55, %49, %43, %37, %33
%70 = tail call i32 @fgetc(i32* %12)
%71 = icmp eq i32 %70, 128
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.10, i64 0, i64 0))
br label %76
74: ; preds = %61, %67, %41, %47, %53, %59, %69
%75 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.9, i64 0, i64 0))
br label %76
76: ; preds = %87, %89, %91, %93, %100, %98, %72, %74, %80
%77 = tail call i32 @getc(i32* %12)
%78 = load i32, i32* @EOF
%79 = icmp eq i32 %77, %78
br i1 %79, label %102, label %31
80: ; preds = %31
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %76
82: ; preds = %31
%83 = lshr i32 %32, 2
%84 = and i32 %83, 3
%85 = shl i32 %32, 30
%86 = or i32 %84, %85
switch i32 %86, label %95 [
i32 0, label %87
i32 1, label %89
i32 2, label %91
i32 3, label %93
]
87: ; preds = %82
%88 = tail call i32 @show_timestamp(i32* %12, i32 %32)
br label %76
89: ; preds = %82
%90 = tail call i32 @show_reserved(i32* %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %32)
br label %76
91: ; preds = %82
%92 = tail call i32 @show_reserved(i32* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %32)
br label %76
93: ; preds = %82
%94 = tail call i32 @show_reserved(i32* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %32)
br label %76
95: ; preds = %82
%96 = and i32 %32, 4
%97 = icmp eq i32 %96, 0
br i1 %97, label %100, label %98
98: ; preds = %95
%99 = tail call i32 @show_hard(i32* %12, i32 %32)
br label %76
100: ; preds = %95
%101 = tail call i32 @show_swit(i32* %12, i32 %32)
br label %76
102: ; preds = %76, %11, %26, %23
%103 = phi i32 [ 1, %23 ], [ 1, %26 ], [ 0, %11 ], [ 0, %76 ]
ret i32 %103
}