#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 EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  unsigned long ucs4;
  int c, state, octets;
  ucs4 = 0;
  state = 0;
  octets = 0;
  while ((c = getchar()) != EOF) {
    switch (state) {
    case 0:
      ucs4 = 0;
      if ((c & 0xfe) == 0xfc) {
        ucs4 = (c & 0x01) << 30;
        octets = 6;
        state = 5;
      } else if ((c & 0xfc) == 0xf8) {
        ucs4 = (c & 0x03) << 24;
        octets = 5;
        state = 4;
      } else if ((c & 0xf8) == 0xf0) {
        ucs4 = (c & 0x07) << 18;
        octets = 4;
        state = 3;
      } else if ((c & 0xf0) == 0xe0) {
        ucs4 = (c & 0x0f) << 12;
        octets = 3;
        state = 2;
      } else if ((c & 0xe0) == 0xc0) {
        ucs4 = (c & 0x1f) << 6;
        octets = 2;
        state = 1;
      } else if ((c & 0x80) == 0x00) {
        ucs4 = (c & 0x7f);
        octets = 1;
        state = 0;
      } else {
        ;
      }
      break;
    case 1:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | (c & 0x3f);
        if (ucs4 < 0x80 || ucs4 > 0x7ff) {
          ucs4 = 0xffffffff;
        }
      } else {
        ucs4 = 0xffffffff;
      }
      state = 0;
      break;
    case 2:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 6);
        state = 1;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 3:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 12);
        state = 2;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 4:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 18);
        state = 3;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 5:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 24);
        state = 4;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    default:
      ucs4 = 0xffffffff;
      state = 0;
      break;
    }
    if (state == 0) {
      switch (octets) {
      case 1:
        if (ucs4 < 0x0 || ucs4 > 0x7f)
          ucs4 = 0xffffffff;
        break;
      case 2:
        if (ucs4 < 0x80 || ucs4 > 0x7ff)
          ucs4 = 0xffffffff;
        break;
      case 3:
        if (ucs4 < 0x800 || ucs4 > 0xffff)
          ucs4 = 0xffffffff;
        break;
      case 4:
        if (ucs4 < 0x10000 || ucs4 > 0x1fffff)
          ucs4 = 0xffffffff;
        break;
      case 5:
        if (ucs4 < 0x200000 || ucs4 > 0x3ffffff)
          ucs4 = 0xffffffff;
        break;
      case 6:
        if (ucs4 < 0x4000000 || ucs4 > 0x7fffffff)
          ucs4 = 0xffffffff;
        break;
      default:
        ucs4 = 0xffffffff;
        break;
      }
      if (ucs4 != 0xffffffff) {
        printf("%c", (int)ucs4);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%eax
je     15e6 <main+0x4c6>
mov    -0x18(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x5,%rax
ja     1479 <main+0x359>
mov    -0x28(%rbp),%rax
lea    0xe86(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
and    $0xfe,%eax
cmp    $0xfc,%eax
jne    11c0 <main+0xa0>
mov    -0x14(%rbp),%eax
and    $0x1,%eax
shl    $0x1e,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x1c(%rbp)
movl   $0x5,-0x18(%rbp)
jmp    12e2 <main+0x1c2>
mov    -0x14(%rbp),%eax
and    $0xfc,%eax
cmp    $0xf8,%eax
jne    11f5 <main+0xd5>
mov    -0x14(%rbp),%eax
and    $0x3,%eax
shl    $0x18,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x5,-0x1c(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    12dd <main+0x1bd>
mov    -0x14(%rbp),%eax
and    $0xf8,%eax
cmp    $0xf0,%eax
jne    122a <main+0x10a>
mov    -0x14(%rbp),%eax
and    $0x7,%eax
shl    $0x12,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x4,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
jmp    12d8 <main+0x1b8>
mov    -0x14(%rbp),%eax
and    $0xf0,%eax
cmp    $0xe0,%eax
jne    125f <main+0x13f>
mov    -0x14(%rbp),%eax
and    $0xf,%eax
shl    $0xc,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x2,-0x18(%rbp)
jmp    12d3 <main+0x1b3>
mov    -0x14(%rbp),%eax
and    $0xe0,%eax
cmp    $0xc0,%eax
jne    1294 <main+0x174>
mov    -0x14(%rbp),%eax
and    $0x1f,%eax
shl    $0x6,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
jmp    12ce <main+0x1ae>
mov    -0x14(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    12c4 <main+0x1a4>
mov    -0x14(%rbp),%eax
and    $0x7f,%eax
cltq
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    12c9 <main+0x1a9>
jmp    12c9 <main+0x1a9>
jmp    12ce <main+0x1ae>
jmp    12d3 <main+0x1b3>
jmp    12d8 <main+0x1b8>
jmp    12dd <main+0x1bd>
jmp    12e2 <main+0x1c2>
jmp    1489 <main+0x369>
mov    -0x14(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    1338 <main+0x218>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x3f,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x80,-0x10(%rbp)
jb     132a <main+0x20a>
cmpq   $0x7ff,-0x10(%rbp)
jbe    1333 <main+0x213>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    1341 <main+0x221>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    1489 <main+0x369>
mov    -0x14(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    1383 <main+0x263>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x6,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
jmp    1393 <main+0x273>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    1489 <main+0x369>
mov    -0x14(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    13ce <main+0x2ae>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x3f,%ecx
shl    $0xc,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x2,-0x18(%rbp)
jmp    13de <main+0x2be>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    1489 <main+0x369>
mov    -0x14(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    1419 <main+0x2f9>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x12,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x3,-0x18(%rbp)
jmp    1429 <main+0x309>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    1489 <main+0x369>
mov    -0x14(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    1464 <main+0x344>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x18,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    1474 <main+0x354>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    1489 <main+0x369>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    15e1 <main+0x4c1>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x5,%eax
ja     15b2 <main+0x492>
mov    -0x30(%rbp),%rax
lea    0xb65(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpq   $0x0,-0x10(%rbp)
jb     14d2 <main+0x3b2>
cmpq   $0x7f,-0x10(%rbp)
jbe    14db <main+0x3bb>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
cmpq   $0x80,-0x10(%rbp)
jb     14fc <main+0x3dc>
cmpq   $0x7ff,-0x10(%rbp)
jbe    1505 <main+0x3e5>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
cmpq   $0x800,-0x10(%rbp)
jb     1526 <main+0x406>
cmpq   $0xffff,-0x10(%rbp)
jbe    152f <main+0x40f>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
cmpq   $0x10000,-0x10(%rbp)
jb     1550 <main+0x430>
cmpq   $0x1fffff,-0x10(%rbp)
jbe    1559 <main+0x439>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
cmpq   $0x200000,-0x10(%rbp)
jb     157a <main+0x45a>
cmpq   $0x3ffffff,-0x10(%rbp)
03
jbe    1583 <main+0x463>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
cmpq   $0x4000000,-0x10(%rbp)
04
jb     15a4 <main+0x484>
cmpq   $0x7fffffff,-0x10(%rbp)
7f
jbe    15ad <main+0x48d>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    15bb <main+0x49b>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
mov    $0xffffffff,%eax
cmp    %rax,-0x10(%rbp)
je     15dc <main+0x4bc>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xa59(%rip),%rdi
call   1030 <printf@plt>
jmp    15e1 <main+0x4c1>
jmp    1145 <main+0x25>
xor    %eax,%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
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
jne    114e <main+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xeab(%rip),%r13
xor    %ebp,%ebp
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    1199 <main+0x79>
and    $0x7f,%eax
mov    $0x1,%r15d
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %r12d,%r12d
mov    %r15d,%ebp
mov    %rbx,%r14
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2e53(%rip),%rcx
cmp    (%rcx),%eax
je     113d <main+0x1d>
mov    $0xffffffff,%ebx
cmp    $0x5,%r12d
ja     1380 <main+0x260>
mov    %r12d,%ecx
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
mov    %eax,%ecx
and    $0xfe,%ecx
cmp    $0xfc,%ecx
jne    12d2 <main+0x1b2>
and    $0x1,%eax
shl    $0x1e,%eax
mov    $0x5,%r12d
mov    $0x6,%ebp
mov    %rax,%r14
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xc0,%ecx
mov    $0xffffffff,%ebx
cmp    $0x80,%ecx
jne    1380 <main+0x260>
and    $0x3f,%eax
or     %rax,%r14
lea    -0x800(%r14),%rax
mov    $0xffffffff,%ebx
cmp    $0xfffffffffffff880,%rax
jb     1380 <main+0x260>
mov    %r14,%rbx
jmp    1380 <main+0x260>
mov    %eax,%ecx
and    $0xc0,%ecx
mov    $0xffffffff,%ebx
cmp    $0x80,%ecx
jne    1380 <main+0x260>
and    $0x3f,%eax
shl    $0x6,%eax
or     %rax,%r14
mov    $0x1,%r12d
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xc0,%ecx
mov    $0xffffffff,%ebx
cmp    $0x80,%ecx
jne    1380 <main+0x260>
and    $0x3f,%eax
shl    $0xc,%eax
or     %rax,%r14
mov    $0x2,%r12d
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xc0,%ecx
mov    $0xffffffff,%ebx
cmp    $0x80,%ecx
jne    1380 <main+0x260>
and    $0x3f,%eax
shl    $0x12,%eax
or     %rax,%r14
mov    $0x3,%r12d
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xc0,%ecx
mov    $0xffffffff,%ebx
cmp    $0x80,%ecx
jne    1380 <main+0x260>
and    $0x3f,%eax
shl    $0x18,%eax
or     %rax,%r14
mov    $0x4,%r12d
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xfc,%ecx
cmp    $0xf8,%ecx
jne    12fb <main+0x1db>
and    $0x3,%eax
shl    $0x18,%eax
mov    $0x4,%r12d
mov    $0x5,%ebp
mov    %rax,%r14
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xf8,%ecx
cmp    $0xf0,%ecx
jne    1324 <main+0x204>
and    $0x7,%eax
shl    $0x12,%eax
mov    $0x3,%r12d
mov    $0x4,%ebp
mov    %rax,%r14
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xf0,%ecx
cmp    $0xe0,%ecx
jne    134b <main+0x22b>
shl    $0xc,%eax
movzwl %ax,%r14d
mov    $0x2,%r12d
mov    $0x3,%ebp
jmp    1187 <main+0x67>
mov    %eax,%ecx
and    $0xe0,%ecx
cmp    $0xc0,%ecx
jne    1374 <main+0x254>
and    $0x1f,%eax
shl    $0x6,%eax
mov    $0x1,%r12d
mov    $0x2,%ebp
mov    %rax,%r14
jmp    1187 <main+0x67>
test   $0x80,%al
je     115f <main+0x3f>
xor    %ebx,%ebx
xchg   %ax,%ax
xor    %r12d,%r12d
lea    -0x1(%rbp),%eax
cmp    $0x5,%eax
ja     13bb <main+0x29b>
lea    0xc86(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1,%r15d
mov    $0x1,%ebp
mov    $0xffffffff,%r14d
cmp    $0x7f,%rbx
jbe    1170 <main+0x50>
jmp    1187 <main+0x67>
mov    $0xffffffff,%r14d
jmp    1187 <main+0x67>
lea    -0x800(%rbx),%rax
mov    $0x2,%r15d
mov    $0x2,%ebp
mov    $0xffffffff,%r14d
cmp    $0xfffffffffffff880,%rax
jae    1170 <main+0x50>
jmp    1187 <main+0x67>
lea    -0x10000(%rbx),%rax
mov    $0x3,%r15d
mov    $0x3,%ebp
mov    $0xffffffff,%r14d
cmp    $0xffffffffffff0800,%rax
jae    1170 <main+0x50>
jmp    1187 <main+0x67>
lea    -0x200000(%rbx),%rax
mov    $0x4,%r15d
mov    $0x4,%ebp
mov    $0xffffffff,%r14d
cmp    $0xffffffffffe10000,%rax
jae    1170 <main+0x50>
jmp    1187 <main+0x67>
lea    -0x4000000(%rbx),%rax
mov    $0x5,%r15d
mov    $0x5,%ebp
mov    $0xffffffff,%r14d
cmp    $0xfffffffffc200000,%rax
jae    1170 <main+0x50>
jmp    1187 <main+0x67>
lea    -0x80000000(%rbx),%rax
mov    $0x6,%r15d
mov    $0x6,%ebp
mov    $0xffffffff,%r14d
cmp    $0xffffffff84000000,%rax
jae    1170 <main+0x50>
jmp    1187 <main+0x67>

LLVM IR (-O0):
@EOF = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %2
store i32 0, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %206, %0
%7 = call i32 (...) @getchar()
store i32 %7, i32* %3
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %207
10: ; preds = %6
%11 = load i32, i32* %4
switch i32 %11, label %143 [
i32 0, label %12
i32 1, label %72
i32 2, label %91
i32 3, label %104
i32 4, label %117
i32 5, label %130
]
12: ; preds = %10
store i64 0, i64* %2
%13 = load i32, i32* %3
%14 = and i32 %13, 254
%15 = icmp eq i32 %14, 252
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i32, i32* %3
%18 = and i32 %17, 1
%19 = shl i32 %18, 30
%20 = sext i32 %19 to i64
store i64 %20, i64* %2
store i32 6, i32* %5
store i32 5, i32* %4
br label %71
21: ; preds = %12
%22 = load i32, i32* %3
%23 = and i32 %22, 252
%24 = icmp eq i32 %23, 248
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i32, i32* %3
%27 = and i32 %26, 3
%28 = shl i32 %27, 24
%29 = sext i32 %28 to i64
store i64 %29, i64* %2
store i32 5, i32* %5
store i32 4, i32* %4
br label %70
30: ; preds = %21
%31 = load i32, i32* %3
%32 = and i32 %31, 248
%33 = icmp eq i32 %32, 240
br i1 %33, label %34, label %39
34: ; preds = %30
%35 = load i32, i32* %3
%36 = and i32 %35, 7
%37 = shl i32 %36, 18
%38 = sext i32 %37 to i64
store i64 %38, i64* %2
store i32 4, i32* %5
store i32 3, i32* %4
br label %69
39: ; preds = %30
%40 = load i32, i32* %3
%41 = and i32 %40, 240
%42 = icmp eq i32 %41, 224
br i1 %42, label %43, label %48
43: ; preds = %39
%44 = load i32, i32* %3
%45 = and i32 %44, 15
%46 = shl i32 %45, 12
%47 = sext i32 %46 to i64
store i64 %47, i64* %2
store i32 3, i32* %5
store i32 2, i32* %4
br label %68
48: ; preds = %39
%49 = load i32, i32* %3
%50 = and i32 %49, 224
%51 = icmp eq i32 %50, 192
br i1 %51, label %52, label %57
52: ; preds = %48
%53 = load i32, i32* %3
%54 = and i32 %53, 31
%55 = shl i32 %54, 6
%56 = sext i32 %55 to i64
store i64 %56, i64* %2
store i32 2, i32* %5
store i32 1, i32* %4
br label %67
57: ; preds = %48
%58 = load i32, i32* %3
%59 = and i32 %58, 128
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %65
61: ; preds = %57
%62 = load i32, i32* %3
%63 = and i32 %62, 127
%64 = sext i32 %63 to i64
store i64 %64, i64* %2
store i32 1, i32* %5
store i32 0, i32* %4
br label %66
65: ; preds = %57
br label %66
66: ; preds = %65, %61
br label %67
67: ; preds = %66, %52
br label %68
68: ; preds = %67, %43
br label %69
69: ; preds = %68, %34
br label %70
70: ; preds = %69, %25
br label %71
71: ; preds = %70, %16
br label %144
72: ; preds = %10
%73 = load i32, i32* %3
%74 = and i32 %73, 192
%75 = icmp eq i32 %74, 128
br i1 %75, label %76, label %89
76: ; preds = %72
%77 = load i64, i64* %2
%78 = load i32, i32* %3
%79 = and i32 %78, 63
%80 = sext i32 %79 to i64
%81 = or i64 %77, %80
store i64 %81, i64* %2
%82 = load i64, i64* %2
%83 = icmp ult i64 %82, 128
br i1 %83, label %87, label %84
84: ; preds = %76
%85 = load i64, i64* %2
%86 = icmp ugt i64 %85, 2047
br i1 %86, label %87, label %88
87: ; preds = %84, %76
store i64 4294967295, i64* %2
br label %88
88: ; preds = %87, %84
br label %90
89: ; preds = %72
store i64 4294967295, i64* %2
br label %90
90: ; preds = %89, %88
store i32 0, i32* %4
br label %144
91: ; preds = %10
%92 = load i32, i32* %3
%93 = and i32 %92, 192
%94 = icmp eq i32 %93, 128
br i1 %94, label %95, label %102
95: ; preds = %91
%96 = load i64, i64* %2
%97 = load i32, i32* %3
%98 = and i32 %97, 63
%99 = shl i32 %98, 6
%100 = sext i32 %99 to i64
%101 = or i64 %96, %100
store i64 %101, i64* %2
store i32 1, i32* %4
br label %103
102: ; preds = %91
store i64 4294967295, i64* %2
store i32 0, i32* %4
br label %103
103: ; preds = %102, %95
br label %144
104: ; preds = %10
%105 = load i32, i32* %3
%106 = and i32 %105, 192
%107 = icmp eq i32 %106, 128
br i1 %107, label %108, label %115
108: ; preds = %104
%109 = load i64, i64* %2
%110 = load i32, i32* %3
%111 = and i32 %110, 63
%112 = shl i32 %111, 12
%113 = sext i32 %112 to i64
%114 = or i64 %109, %113
store i64 %114, i64* %2
store i32 2, i32* %4
br label %116
115: ; preds = %104
store i64 4294967295, i64* %2
store i32 0, i32* %4
br label %116
116: ; preds = %115, %108
br label %144
117: ; preds = %10
%118 = load i32, i32* %3
%119 = and i32 %118, 192
%120 = icmp eq i32 %119, 128
br i1 %120, label %121, label %128
121: ; preds = %117
%122 = load i64, i64* %2
%123 = load i32, i32* %3
%124 = and i32 %123, 63
%125 = shl i32 %124, 18
%126 = sext i32 %125 to i64
%127 = or i64 %122, %126
store i64 %127, i64* %2
store i32 3, i32* %4
br label %129
128: ; preds = %117
store i64 4294967295, i64* %2
store i32 0, i32* %4
br label %129
129: ; preds = %128, %121
br label %144
130: ; preds = %10
%131 = load i32, i32* %3
%132 = and i32 %131, 192
%133 = icmp eq i32 %132, 128
br i1 %133, label %134, label %141
134: ; preds = %130
%135 = load i64, i64* %2
%136 = load i32, i32* %3
%137 = and i32 %136, 63
%138 = shl i32 %137, 24
%139 = sext i32 %138 to i64
%140 = or i64 %135, %139
store i64 %140, i64* %2
store i32 4, i32* %4
br label %142
141: ; preds = %130
store i64 4294967295, i64* %2
store i32 0, i32* %4
br label %142
142: ; preds = %141, %134
br label %144
143: ; preds = %10
store i64 4294967295, i64* %2
store i32 0, i32* %4
br label %144
144: ; preds = %143, %142, %129, %116, %103, %90, %71
%145 = load i32, i32* %4
%146 = icmp eq i32 %145, 0
br i1 %146, label %147, label %206
147: ; preds = %144
%148 = load i32, i32* %5
switch i32 %148, label %197 [
i32 1, label %149
i32 2, label %157
i32 3, label %165
i32 4, label %173
i32 5, label %181
i32 6, label %189
]
149: ; preds = %147
%150 = load i64, i64* %2
%151 = icmp ult i64 %150, 0
br i1 %151, label %155, label %152
152: ; preds = %149
%153 = load i64, i64* %2
%154 = icmp ugt i64 %153, 127
br i1 %154, label %155, label %156
155: ; preds = %152, %149
store i64 4294967295, i64* %2
br label %156
156: ; preds = %155, %152
br label %198
157: ; preds = %147
%158 = load i64, i64* %2
%159 = icmp ult i64 %158, 128
br i1 %159, label %163, label %160
160: ; preds = %157
%161 = load i64, i64* %2
%162 = icmp ugt i64 %161, 2047
br i1 %162, label %163, label %164
163: ; preds = %160, %157
store i64 4294967295, i64* %2
br label %164
164: ; preds = %163, %160
br label %198
165: ; preds = %147
%166 = load i64, i64* %2
%167 = icmp ult i64 %166, 2048
br i1 %167, label %171, label %168
168: ; preds = %165
%169 = load i64, i64* %2
%170 = icmp ugt i64 %169, 65535
br i1 %170, label %171, label %172
171: ; preds = %168, %165
store i64 4294967295, i64* %2
br label %172
172: ; preds = %171, %168
br label %198
173: ; preds = %147
%174 = load i64, i64* %2
%175 = icmp ult i64 %174, 65536
br i1 %175, label %179, label %176
176: ; preds = %173
%177 = load i64, i64* %2
%178 = icmp ugt i64 %177, 2097151
br i1 %178, label %179, label %180
179: ; preds = %176, %173
store i64 4294967295, i64* %2
br label %180
180: ; preds = %179, %176
br label %198
181: ; preds = %147
%182 = load i64, i64* %2
%183 = icmp ult i64 %182, 2097152
br i1 %183, label %187, label %184
184: ; preds = %181
%185 = load i64, i64* %2
%186 = icmp ugt i64 %185, 67108863
br i1 %186, label %187, label %188
187: ; preds = %184, %181
store i64 4294967295, i64* %2
br label %188
188: ; preds = %187, %184
br label %198
189: ; preds = %147
%190 = load i64, i64* %2
%191 = icmp ult i64 %190, 67108864
br i1 %191, label %195, label %192
192: ; preds = %189
%193 = load i64, i64* %2
%194 = icmp ugt i64 %193, 2147483647
br i1 %194, label %195, label %196
195: ; preds = %192, %189
store i64 4294967295, i64* %2
br label %196
196: ; preds = %195, %192
br label %198
197: ; preds = %147
store i64 4294967295, i64* %2
br label %198
198: ; preds = %197, %196, %188, %180, %172, %164, %156
%199 = load i64, i64* %2
%200 = icmp ne i64 %199, 4294967295
br i1 %200, label %201, label %205
201: ; preds = %198
%202 = load i64, i64* %2
%203 = trunc i64 %202 to i32
%204 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %203)
br label %205
205: ; preds = %201, %198
br label %206
206: ; preds = %205, %144
br label %6
207: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %123, label %4
4: ; preds = %0, %116
%5 = phi i32 [ %120, %116 ], [ %1, %0 ]
%6 = phi i32 [ %117, %116 ], [ 0, %0 ]
%7 = phi i32 [ %118, %116 ], [ 0, %0 ]
%8 = phi i64 [ %119, %116 ], [ 0, %0 ]
switch i32 %7, label %92 [
i32 0, label %9
i32 1, label %50
i32 2, label %60
i32 3, label %68
i32 4, label %76
i32 5, label %84
]
9: ; preds = %4
%10 = and i32 %5, 254
%11 = icmp eq i32 %10, 252
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = shl i32 %5, 30
%14 = and i32 %13, 1073741824
%15 = zext i32 %14 to i64
br label %116
16: ; preds = %9
%17 = and i32 %5, 252
%18 = icmp eq i32 %17, 248
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = shl i32 %5, 24
%21 = and i32 %20, 50331648
%22 = zext i32 %21 to i64
br label %116
23: ; preds = %16
%24 = and i32 %5, 248
%25 = icmp eq i32 %24, 240
br i1 %25, label %26, label %30
26: ; preds = %23
%27 = shl i32 %5, 18
%28 = and i32 %27, 1835008
%29 = zext i32 %28 to i64
br label %116
30: ; preds = %23
%31 = and i32 %5, 240
%32 = icmp eq i32 %31, 224
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = shl i32 %5, 12
%35 = and i32 %34, 61440
%36 = zext i32 %35 to i64
br label %116
37: ; preds = %30
%38 = and i32 %5, 224
%39 = icmp eq i32 %38, 192
br i1 %39, label %40, label %44
40: ; preds = %37
%41 = shl i32 %5, 6
%42 = and i32 %41, 1984
%43 = zext i32 %42 to i64
br label %116
44: ; preds = %37
%45 = and i32 %5, 128
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %92
47: ; preds = %44
%48 = and i32 %5, 127
%49 = zext i32 %48 to i64
br label %111
50: ; preds = %4
%51 = and i32 %5, 192
%52 = icmp eq i32 %51, 128
br i1 %52, label %53, label %92
53: ; preds = %50
%54 = and i32 %5, 63
%55 = zext i32 %54 to i64
%56 = or i64 %8, %55
%57 = add i64 %56, -2048
%58 = icmp ult i64 %57, -1920
%59 = select i1 %58, i64 4294967295, i64 %56
br label %92
60: ; preds = %4
%61 = and i32 %5, 192
%62 = icmp eq i32 %61, 128
br i1 %62, label %63, label %92
63: ; preds = %60
%64 = shl i32 %5, 6
%65 = and i32 %64, 4032
%66 = zext i32 %65 to i64
%67 = or i64 %8, %66
br label %116
68: ; preds = %4
%69 = and i32 %5, 192
%70 = icmp eq i32 %69, 128
br i1 %70, label %71, label %92
71: ; preds = %68
%72 = shl i32 %5, 12
%73 = and i32 %72, 258048
%74 = zext i32 %73 to i64
%75 = or i64 %8, %74
br label %116
76: ; preds = %4
%77 = and i32 %5, 192
%78 = icmp eq i32 %77, 128
br i1 %78, label %79, label %92
79: ; preds = %76
%80 = shl i32 %5, 18
%81 = and i32 %80, 16515072
%82 = zext i32 %81 to i64
%83 = or i64 %8, %82
br label %116
84: ; preds = %4
%85 = and i32 %5, 192
%86 = icmp eq i32 %85, 128
br i1 %86, label %87, label %92
87: ; preds = %84
%88 = shl i32 %5, 24
%89 = and i32 %88, 1056964608
%90 = zext i32 %89 to i64
%91 = or i64 %8, %90
br label %116
92: ; preds = %44, %50, %53, %60, %68, %76, %84, %4
%93 = phi i64 [ 4294967295, %4 ], [ 4294967295, %84 ], [ 4294967295, %76 ], [ 4294967295, %68 ], [ 4294967295, %60 ], [ 4294967295, %50 ], [ %59, %53 ], [ 0, %44 ]
switch i32 %6, label %116 [
i32 1, label %94
i32 2, label %96
i32 3, label %99
i32 4, label %102
i32 5, label %105
i32 6, label %108
]
94: ; preds = %92
%95 = icmp ugt i64 %93, 127
br i1 %95, label %116, label %111
96: ; preds = %92
%97 = add nsw i64 %93, -2048
%98 = icmp ult i64 %97, -1920
br i1 %98, label %116, label %111
99: ; preds = %92
%100 = add nsw i64 %93, -65536
%101 = icmp ult i64 %100, -63488
br i1 %101, label %116, label %111
102: ; preds = %92
%103 = add nsw i64 %93, -2097152
%104 = icmp ult i64 %103, -2031616
br i1 %104, label %116, label %111
105: ; preds = %92
%106 = add nsw i64 %93, -67108864
%107 = icmp ult i64 %106, -65011712
br i1 %107, label %116, label %111
108: ; preds = %92
%109 = add nsw i64 %93, -2147483648
%110 = icmp ult i64 %109, -2080374784
br i1 %110, label %116, label %111
111: ; preds = %47, %94, %96, %99, %102, %105, %108
%112 = phi i32 [ 1, %94 ], [ 2, %96 ], [ 3, %99 ], [ 4, %102 ], [ 5, %105 ], [ 6, %108 ], [ 1, %47 ]
%113 = phi i64 [ %93, %94 ], [ %93, %96 ], [ %93, %99 ], [ %93, %102 ], [ %93, %105 ], [ %93, %108 ], [ %49, %47 ]
%114 = trunc i64 %113 to i32
%115 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %114)
br label %116
116: ; preds = %108, %105, %102, %99, %96, %94, %92, %19, %33, %40, %26, %12, %63, %71, %79, %87, %111
%117 = phi i32 [ %112, %111 ], [ %6, %87 ], [ %6, %79 ], [ %6, %71 ], [ %6, %63 ], [ 6, %12 ], [ 5, %19 ], [ 4, %26 ], [ 3, %33 ], [ 2, %40 ], [ %6, %92 ], [ 1, %94 ], [ 2, %96 ], [ 3, %99 ], [ 4, %102 ], [ 5, %105 ], [ 6, %108 ]
%118 = phi i32 [ 0, %111 ], [ 4, %87 ], [ 3, %79 ], [ 2, %71 ], [ 1, %63 ], [ 5, %12 ], [ 4, %19 ], [ 3, %26 ], [ 2, %33 ], [ 1, %40 ], [ 0, %92 ], [ 0, %94 ], [ 0, %96 ], [ 0, %99 ], [ 0, %102 ], [ 0, %105 ], [ 0, %108 ]
%119 = phi i64 [ %113, %111 ], [ %91, %87 ], [ %83, %79 ], [ %75, %71 ], [ %67, %63 ], [ %15, %12 ], [ %22, %19 ], [ %29, %26 ], [ %36, %33 ], [ %43, %40 ], [ 4294967295, %92 ], [ 4294967295, %94 ], [ 4294967295, %96 ], [ 4294967295, %99 ], [ 4294967295, %102 ], [ 4294967295, %105 ], [ 4294967295, %108 ]
%120 = tail call i32 (...) @getchar()
%121 = load i32, i32* @EOF
%122 = icmp eq i32 %120, %121
br i1 %122, label %123, label %4
123: ; preds = %116, %0
ret i32 0
}