#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 *, int);
int /*<<< orphan*/ usleep(int);
void toggle_io(volatile unsigned int *port) {
  int keyval = 0;
  int temp_key = 0;
  int flag = 0;
  while (1) {
    *port = 0x0000000E << 5;
    usleep(1000);
    temp_key = (*port & 0x000001eF);
    if ((keyval != temp_key) && ((temp_key & 0x0000000F) < 0xF)) {
      keyval = temp_key;
      flag = 1;
    }
    *port = 0x0000000D << 5;
    usleep(1000);
    temp_key = (*port & 0x000001eF);
    if ((keyval != temp_key) && ((temp_key & 0x0000000F) < 0xF)) {
      keyval = temp_key;
      flag = 1;
    }
    *port = 0x0000000B << 5;
    usleep(1000);
    temp_key = (*port & 0x000001eF);
    if ((keyval != temp_key) && ((temp_key & 0x0000000F) < 0xF)) {
      keyval = temp_key;
      flag = 1;
    }
    *port = 0x00000007 << 5;
    usleep(1);
    temp_key = (*port & 0x000001eF);
    if ((keyval != temp_key) && ((temp_key & 0x0000000F) < 0xF)) {
      keyval = temp_key;
      flag = 1;
    }
    if (flag) {
      switch (keyval) {
      case 0x1CE:
        printf("-> %d\n", keyval);
        break;
      case 0x1CD:
        printf("<- %d\n", keyval);
        break;
      case 0x1CB:
        printf("blank %d\n", keyval);
        break;
      case 0x1C7:
        printf(". %d\n", keyval);
        break;
      case 0x1AE:
        printf("9 %d\n", keyval);
        break;
      case 0x1AD:
        printf("6 %d\n", keyval);
        break;
      case 0x1AB:
        printf("3 %d\n", keyval);
        break;
      case 0x1A7:
        printf("ent %d\n", keyval);
        break;
      case 0x16E:
        printf("8 %d\n", keyval);
        break;
      case 0x16D:
        printf("5 %d\n", keyval);
        break;
      case 0x16B:
        printf("2 %d\n", keyval);
        break;
      case 0x167:
        printf("0 %d\n", keyval);
        break;
      case 0xEE:
        printf("7 %d\n", keyval);
        break;
      case 0xED:
        printf("4 %d\n", keyval);
        break;
      case 0xEB:
        printf("1 %d\n", keyval);
        break;
      case 0xE7:
        printf("clr %d\n", keyval);
        break;
      }
      flag = 0;
    }
  }
}


x86 assembly (clang, -O0):
<toggle_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1c0,(%rax)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1ef,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     118b <toggle_io+0x6b>
mov    -0x10(%rbp),%eax
and    $0xf,%eax
cmp    $0xf,%eax
jge    118b <toggle_io+0x6b>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1a0,(%rax)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1ef,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11d5 <toggle_io+0xb5>
mov    -0x10(%rbp),%eax
and    $0xf,%eax
cmp    $0xf,%eax
jge    11d5 <toggle_io+0xb5>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x160,(%rax)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1ef,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     121f <toggle_io+0xff>
mov    -0x10(%rbp),%eax
and    $0xf,%eax
cmp    $0xf,%eax
jge    121f <toggle_io+0xff>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xe0,(%rax)
mov    $0x1,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1ef,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1269 <toggle_io+0x149>
mov    -0x10(%rbp),%eax
and    $0xf,%eax
cmp    $0xf,%eax
jge    1269 <toggle_io+0x149>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     14e8 <toggle_io+0x3c8>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0xe7,%eax
je     14d2 <toggle_io+0x3b2>
jmp    1289 <toggle_io+0x169>
mov    -0x18(%rbp),%eax
sub    $0xeb,%eax
je     14be <toggle_io+0x39e>
jmp    129c <toggle_io+0x17c>
mov    -0x18(%rbp),%eax
sub    $0xed,%eax
je     14aa <toggle_io+0x38a>
jmp    12af <toggle_io+0x18f>
mov    -0x18(%rbp),%eax
sub    $0xee,%eax
je     1496 <toggle_io+0x376>
jmp    12c2 <toggle_io+0x1a2>
mov    -0x18(%rbp),%eax
sub    $0x167,%eax
je     1482 <toggle_io+0x362>
jmp    12d5 <toggle_io+0x1b5>
mov    -0x18(%rbp),%eax
sub    $0x16b,%eax
je     146e <toggle_io+0x34e>
jmp    12e8 <toggle_io+0x1c8>
mov    -0x18(%rbp),%eax
sub    $0x16d,%eax
je     145a <toggle_io+0x33a>
jmp    12fb <toggle_io+0x1db>
mov    -0x18(%rbp),%eax
sub    $0x16e,%eax
je     1446 <toggle_io+0x326>
jmp    130e <toggle_io+0x1ee>
mov    -0x18(%rbp),%eax
sub    $0x1a7,%eax
je     1432 <toggle_io+0x312>
jmp    1321 <toggle_io+0x201>
mov    -0x18(%rbp),%eax
sub    $0x1ab,%eax
je     141e <toggle_io+0x2fe>
jmp    1334 <toggle_io+0x214>
mov    -0x18(%rbp),%eax
sub    $0x1ad,%eax
je     140a <toggle_io+0x2ea>
jmp    1347 <toggle_io+0x227>
mov    -0x18(%rbp),%eax
sub    $0x1ae,%eax
je     13f6 <toggle_io+0x2d6>
jmp    135a <toggle_io+0x23a>
mov    -0x18(%rbp),%eax
sub    $0x1c7,%eax
je     13e2 <toggle_io+0x2c2>
jmp    136d <toggle_io+0x24d>
mov    -0x18(%rbp),%eax
sub    $0x1cb,%eax
je     13ce <toggle_io+0x2ae>
jmp    1380 <toggle_io+0x260>
mov    -0x18(%rbp),%eax
sub    $0x1cd,%eax
je     13ba <toggle_io+0x29a>
jmp    1393 <toggle_io+0x273>
mov    -0x18(%rbp),%eax
sub    $0x1ce,%eax
jne    14e1 <toggle_io+0x3c1>
jmp    13a6 <toggle_io+0x286>
mov    -0xc(%rbp),%esi
lea    0xc50(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc43(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc36(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc2c(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc1e(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc10(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xc02(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbf4(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbe8(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbda(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbcc(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbbe(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xbb0(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xba2(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xb94(%rip),%rdi
call   1030 <printf@plt>
jmp    14e1 <toggle_io+0x3c1>
mov    -0xc(%rbp),%esi
lea    0xb86(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
jmp    1141 <toggle_io+0x21>

x86 assembly (clang, -O2):
<toggle_io>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r12d,%r12d
lea    0xee8(%rip),%r13
jmp    1150 <toggle_io+0x30>
lea    0x10c9(%rip),%rdi
mov    $0x167,%esi
call   1030 <printf@plt>
nopl   0x0(%rax,%rax,1)
movl   $0x1c0,(%rbx)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    (%rbx),%ecx
mov    %ecx,%eax
and    $0x1ef,%eax
cmp    %eax,%r12d
sete   %dl
not    %ecx
test   $0xf,%cl
sete   %bpl
or     %dl,%bpl
jne    1180 <toggle_io+0x60>
mov    %eax,%r12d
movl   $0x1a0,(%rbx)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    (%rbx),%ecx
mov    %ecx,%eax
and    $0x1ef,%eax
cmp    %eax,%r12d
sete   %dl
not    %ecx
test   $0xf,%cl
sete   %r14b
or     %dl,%r14b
jne    11b0 <toggle_io+0x90>
mov    %eax,%r12d
movl   $0x160,(%rbx)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    (%rbx),%ecx
mov    %ecx,%eax
and    $0x1ef,%eax
cmp    %eax,%r12d
sete   %dl
not    %ecx
test   $0xf,%cl
sete   %r15b
or     %dl,%r15b
jne    11e0 <toggle_io+0xc0>
mov    %eax,%r12d
movl   $0xe0,(%rbx)
mov    $0x1,%edi
call   1040 <usleep@plt>
mov    (%rbx),%ecx
mov    %ecx,%eax
and    $0x1ef,%eax
cmp    %eax,%r12d
sete   %dl
not    %ecx
test   $0xf,%cl
sete   %cl
or     %dl,%cl
test   %cl,%cl
jne    1210 <toggle_io+0xf0>
mov    %eax,%r12d
je     1225 <toggle_io+0x105>
test   %r15b,%r15b
je     1225 <toggle_io+0x105>
test   %r14b,%r14b
je     1225 <toggle_io+0x105>
test   %bpl,%bpl
jne    1150 <toggle_io+0x30>
lea    -0x167(%r12),%eax
ff
cmp    $0x67,%eax
ja     1252 <toggle_io+0x132>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0xfc1(%rip),%rdi
mov    $0x16b,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    -0xe7(%r12),%eax
ff
cmp    $0x7,%eax
ja     1150 <toggle_io+0x30>
lea    0xd96(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfa8(%rip),%rdi
mov    $0xe7,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xf6e(%rip),%rdi
mov    $0x16d,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xf52(%rip),%rdi
mov    $0x16e,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xf34(%rip),%rdi
mov    $0x1a7,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xf18(%rip),%rdi
mov    $0x1ab,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xefc(%rip),%rdi
mov    $0x1ad,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xee0(%rip),%rdi
mov    $0x1ae,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xec4(%rip),%rdi
mov    $0x1c7,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xea4(%rip),%rdi
mov    $0x1cb,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xe87(%rip),%rdi
mov    $0x1cd,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xe6a(%rip),%rdi
mov    $0x1ce,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xeb0(%rip),%rdi
mov    $0xeb,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xe94(%rip),%rdi
mov    $0xed,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>
lea    0xe78(%rip),%rdi
mov    $0xee,%esi
call   1030 <printf@plt>
jmp    1150 <toggle_io+0x30>

LLVM IR (-O0):
@.str = [7 x i8] c"-> %d\0A\00"
@.str.1 = [7 x i8] c"<- %d\0A\00"
@.str.2 = [10 x i8] c"blank %d\0A\00"
@.str.3 = [6 x i8] c". %d\0A\00"
@.str.4 = [6 x i8] c"9 %d\0A\00"
@.str.5 = [6 x i8] c"6 %d\0A\00"
@.str.6 = [6 x i8] c"3 %d\0A\00"
@.str.7 = [8 x i8] c"ent %d\0A\00"
@.str.8 = [6 x i8] c"8 %d\0A\00"
@.str.9 = [6 x i8] c"5 %d\0A\00"
@.str.10 = [6 x i8] c"2 %d\0A\00"
@.str.11 = [6 x i8] c"0 %d\0A\00"
@.str.12 = [6 x i8] c"7 %d\0A\00"
@.str.13 = [6 x i8] c"4 %d\0A\00"
@.str.14 = [6 x i8] c"1 %d\0A\00"
@.str.15 = [8 x i8] c"clr %d\0A\00"
define void @toggle_io(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %1, %120
%7 = load i32*, i32** %2
store volatile i32 448, i32* %7
%8 = call i32 @usleep(i32 1000)
%9 = load i32*, i32** %2
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 495
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %6
%16 = load i32, i32* %4
%17 = and i32 %16, 15
%18 = icmp slt i32 %17, 15
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i32, i32* %4
store i32 %20, i32* %3
store i32 1, i32* %5
br label %21
21: ; preds = %19, %15, %6
%22 = load i32*, i32** %2
store volatile i32 416, i32* %22
%23 = call i32 @usleep(i32 1000)
%24 = load i32*, i32** %2
%25 = load volatile i32, i32* %24
%26 = and i32 %25, 495
store i32 %26, i32* %4
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = icmp ne i32 %27, %28
br i1 %29, label %30, label %36
30: ; preds = %21
%31 = load i32, i32* %4
%32 = and i32 %31, 15
%33 = icmp slt i32 %32, 15
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = load i32, i32* %4
store i32 %35, i32* %3
store i32 1, i32* %5
br label %36
36: ; preds = %34, %30, %21
%37 = load i32*, i32** %2
store volatile i32 352, i32* %37
%38 = call i32 @usleep(i32 1000)
%39 = load i32*, i32** %2
%40 = load volatile i32, i32* %39
%41 = and i32 %40, 495
store i32 %41, i32* %4
%42 = load i32, i32* %3
%43 = load i32, i32* %4
%44 = icmp ne i32 %42, %43
br i1 %44, label %45, label %51
45: ; preds = %36
%46 = load i32, i32* %4
%47 = and i32 %46, 15
%48 = icmp slt i32 %47, 15
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = load i32, i32* %4
store i32 %50, i32* %3
store i32 1, i32* %5
br label %51
51: ; preds = %49, %45, %36
%52 = load i32*, i32** %2
store volatile i32 224, i32* %52
%53 = call i32 @usleep(i32 1)
%54 = load i32*, i32** %2
%55 = load volatile i32, i32* %54
%56 = and i32 %55, 495
store i32 %56, i32* %4
%57 = load i32, i32* %3
%58 = load i32, i32* %4
%59 = icmp ne i32 %57, %58
br i1 %59, label %60, label %66
60: ; preds = %51
%61 = load i32, i32* %4
%62 = and i32 %61, 15
%63 = icmp slt i32 %62, 15
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = load i32, i32* %4
store i32 %65, i32* %3
store i32 1, i32* %5
br label %66
66: ; preds = %64, %60, %51
%67 = load i32, i32* %5
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %120
69: ; preds = %66
%70 = load i32, i32* %3
switch i32 %70, label %119 [
i32 462, label %71
i32 461, label %74
i32 459, label %77
i32 455, label %80
i32 430, label %83
i32 429, label %86
i32 427, label %89
i32 423, label %92
i32 366, label %95
i32 365, label %98
i32 363, label %101
i32 359, label %104
i32 238, label %107
i32 237, label %110
i32 235, label %113
i32 231, label %116
]
71: ; preds = %69
%72 = load i32, i32* %3
%73 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %72)
br label %119
74: ; preds = %69
%75 = load i32, i32* %3
%76 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %75)
br label %119
77: ; preds = %69
%78 = load i32, i32* %3
%79 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %78)
br label %119
80: ; preds = %69
%81 = load i32, i32* %3
%82 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %81)
br label %119
83: ; preds = %69
%84 = load i32, i32* %3
%85 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %84)
br label %119
86: ; preds = %69
%87 = load i32, i32* %3
%88 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %87)
br label %119
89: ; preds = %69
%90 = load i32, i32* %3
%91 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %90)
br label %119
92: ; preds = %69
%93 = load i32, i32* %3
%94 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %93)
br label %119
95: ; preds = %69
%96 = load i32, i32* %3
%97 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %96)
br label %119
98: ; preds = %69
%99 = load i32, i32* %3
%100 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %99)
br label %119
101: ; preds = %69
%102 = load i32, i32* %3
%103 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 %102)
br label %119
104: ; preds = %69
%105 = load i32, i32* %3
%106 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i32 %105)
br label %119
107: ; preds = %69
%108 = load i32, i32* %3
%109 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 %108)
br label %119
110: ; preds = %69
%111 = load i32, i32* %3
%112 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32 %111)
br label %119
113: ; preds = %69
%114 = load i32, i32* %3
%115 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i32 %114)
br label %119
116: ; preds = %69
%117 = load i32, i32* %3
%118 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %117)
br label %119
119: ; preds = %69, %116, %113, %110, %107, %104, %101, %98, %95, %92, %89, %86, %83, %80, %77, %74, %71
store i32 0, i32* %5
br label %120
120: ; preds = %119, %66
br label %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"-> %d\0A\00"
@.str.1 = [7 x i8] c"<- %d\0A\00"
@.str.2 = [10 x i8] c"blank %d\0A\00"
@.str.3 = [6 x i8] c". %d\0A\00"
@.str.4 = [6 x i8] c"9 %d\0A\00"
@.str.5 = [6 x i8] c"6 %d\0A\00"
@.str.6 = [6 x i8] c"3 %d\0A\00"
@.str.7 = [8 x i8] c"ent %d\0A\00"
@.str.8 = [6 x i8] c"8 %d\0A\00"
@.str.9 = [6 x i8] c"5 %d\0A\00"
@.str.10 = [6 x i8] c"2 %d\0A\00"
@.str.11 = [6 x i8] c"0 %d\0A\00"
@.str.12 = [6 x i8] c"7 %d\0A\00"
@.str.13 = [6 x i8] c"4 %d\0A\00"
@.str.14 = [6 x i8] c"1 %d\0A\00"
@.str.15 = [8 x i8] c"clr %d\0A\00"
define void @toggle_io(i32* %0) {
br label %2
2: ; preds = %42, %1
%3 = phi i32 [ 0, %1 ], [ %35, %42 ]
store volatile i32 448, i32* %0
%4 = tail call i32 @usleep(i32 1000)
%5 = load volatile i32, i32* %0
%6 = and i32 %5, 495
%7 = icmp eq i32 %3, %6
%8 = and i32 %5, 15
%9 = icmp eq i32 %8, 15
%10 = or i1 %7, %9
%11 = select i1 %10, i32 %3, i32 %6
store volatile i32 416, i32* %0
%12 = tail call i32 @usleep(i32 1000)
%13 = load volatile i32, i32* %0
%14 = and i32 %13, 495
%15 = icmp eq i32 %11, %14
%16 = and i32 %13, 15
%17 = icmp eq i32 %16, 15
%18 = or i1 %15, %17
%19 = select i1 %18, i32 %11, i32 %14
store volatile i32 352, i32* %0
%20 = tail call i32 @usleep(i32 1000)
%21 = load volatile i32, i32* %0
%22 = and i32 %21, 495
%23 = icmp eq i32 %19, %22
%24 = and i32 %21, 15
%25 = icmp eq i32 %24, 15
%26 = or i1 %23, %25
%27 = select i1 %26, i32 %19, i32 %22
store volatile i32 224, i32* %0
%28 = tail call i32 @usleep(i32 1)
%29 = load volatile i32, i32* %0
%30 = and i32 %29, 495
%31 = icmp eq i32 %27, %30
%32 = and i32 %29, 15
%33 = icmp eq i32 %32, 15
%34 = or i1 %31, %33
%35 = select i1 %34, i32 %27, i32 %30
%36 = select i1 %34, i1 %26, i1 false
%37 = select i1 %36, i1 %18, i1 false
%38 = select i1 %37, i1 %10, i1 false
br i1 %38, label %42, label %39
39: ; preds = %2
switch i32 %35, label %42 [
i32 462, label %40
i32 461, label %43
i32 459, label %45
i32 455, label %47
i32 430, label %49
i32 429, label %51
i32 427, label %53
i32 423, label %55
i32 366, label %57
i32 365, label %59
i32 363, label %61
i32 359, label %63
i32 238, label %65
i32 237, label %67
i32 235, label %69
i32 231, label %71
]
40: ; preds = %39
%41 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 462)
br label %42
42: ; preds = %40, %43, %45, %47, %49, %51, %53, %55, %57, %59, %61, %63, %65, %67, %69, %71, %39, %2
br label %2
43: ; preds = %39
%44 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 461)
br label %42
45: ; preds = %39
%46 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 459)
br label %42
47: ; preds = %39
%48 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 455)
br label %42
49: ; preds = %39
%50 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 430)
br label %42
51: ; preds = %39
%52 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 429)
br label %42
53: ; preds = %39
%54 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 427)
br label %42
55: ; preds = %39
%56 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 423)
br label %42
57: ; preds = %39
%58 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 366)
br label %42
59: ; preds = %39
%60 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 365)
br label %42
61: ; preds = %39
%62 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 363)
br label %42
63: ; preds = %39
%64 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i32 359)
br label %42
65: ; preds = %39
%66 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 238)
br label %42
67: ; preds = %39
%68 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32 237)
br label %42
69: ; preds = %39
%70 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i32 235)
br label %42
71: ; preds = %39
%72 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 231)
br label %42
}