#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ usleep(int);
unsigned int wait_keypress();
int main() {
  unsigned int start_value;
  unsigned int scancode;
  for (unsigned int i = 0; i < 20; i++) {
    scancode = wait_keypress();
    printf("%02x\n", scancode);
    if (scancode != i) {
      printf("FAIL: mismatch: want %02x got %02x", i, scancode);
      exit(1);
    }
  }
  printf("overrun...\n");
  usleep(5000);
  start_value = wait_keypress();
  printf("%02x\n", start_value);
  for (unsigned int i = 1; i < 20; i++) {
    scancode = wait_keypress();
    printf("%02x\n", scancode);
    if (scancode != i + start_value) {
      printf("FAIL: mismatch: want %02x got %02x", i + start_value, scancode);
      exit(1);
    }
  }
  printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jae    11b8 <main+0x78>
mov    $0x0,%al
call   1040 <wait_keypress@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11a5 <main+0x65>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    11aa <main+0x6a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <main+0x16>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1388,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1040 <wait_keypress@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jae    125c <main+0x11c>
mov    $0x0,%al
call   1040 <wait_keypress@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
je     1249 <main+0x109>
mov    -0x14(%rbp),%esi
add    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    124e <main+0x10e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11f2 <main+0xb2>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jne    176d <main+0x61d>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xe79(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebx
jne    16ea <main+0x59a>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xe57(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%ebx
jne    16f1 <main+0x5a1>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xe35(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%ebx
jne    16f8 <main+0x5a8>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xe13(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%ebx
jne    16ff <main+0x5af>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xdf1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%ebx
jne    1706 <main+0x5b6>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xdcf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x6,%ebx
jne    170d <main+0x5bd>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xdad(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x7,%ebx
jne    1714 <main+0x5c4>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xd8b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x8,%ebx
jne    171b <main+0x5cb>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xd69(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x9,%ebx
jne    1722 <main+0x5d2>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xd47(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xa,%ebx
jne    1729 <main+0x5d9>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xd25(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xb,%ebx
jne    1730 <main+0x5e0>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xd03(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xc,%ebx
jne    1737 <main+0x5e7>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xce1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xd,%ebx
jne    173e <main+0x5ee>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xcbf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xe,%ebx
jne    1745 <main+0x5f5>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xc9d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xf,%ebx
jne    174c <main+0x5fc>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xc7b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x10,%ebx
jne    1753 <main+0x603>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xc59(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x11,%ebx
jne    175a <main+0x60a>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xc37(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x12,%ebx
jne    1761 <main+0x611>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xc15(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x13,%ebx
jne    1768 <main+0x618>
lea    0xc25(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1388,%edi
call   1070 <usleep@plt>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebx
lea    0xbdd(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xba1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xb7d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xb59(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xb35(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x5(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xb11(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x6(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xaed(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x7(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xac9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xaa5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xa81(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xa5d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xa39(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0xa15(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x9f1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x9cd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x9a9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x985(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x11(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x961(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x12(%rbx),%esi
cmp    %esi,%ebp
jne    177c <main+0x62c>
xor    %eax,%eax
call   1050 <wait_keypress@plt>
mov    %eax,%ebp
lea    0x93d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x13,%ebx
cmp    %ebx,%ebp
jne    177a <main+0x62a>
lea    0x956(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x1,%ebp
jmp    176d <main+0x61d>
mov    $0x2,%ebp
jmp    176d <main+0x61d>
mov    $0x3,%ebp
jmp    176d <main+0x61d>
mov    $0x4,%ebp
jmp    176d <main+0x61d>
mov    $0x5,%ebp
jmp    176d <main+0x61d>
mov    $0x6,%ebp
jmp    176d <main+0x61d>
mov    $0x7,%ebp
jmp    176d <main+0x61d>
mov    $0x8,%ebp
jmp    176d <main+0x61d>
mov    $0x9,%ebp
jmp    176d <main+0x61d>
mov    $0xa,%ebp
jmp    176d <main+0x61d>
mov    $0xb,%ebp
jmp    176d <main+0x61d>
mov    $0xc,%ebp
jmp    176d <main+0x61d>
mov    $0xd,%ebp
jmp    176d <main+0x61d>
mov    $0xe,%ebp
jmp    176d <main+0x61d>
mov    $0xf,%ebp
jmp    176d <main+0x61d>
mov    $0x10,%ebp
jmp    176d <main+0x61d>
mov    $0x11,%ebp
jmp    176d <main+0x61d>
mov    $0x12,%ebp
jmp    176d <main+0x61d>
mov    $0x13,%ebp
lea    0x892(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
jmp    1785 <main+0x635>
mov    %ebx,%esi
lea    0x883(%rip),%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%02x\0A\00"
@.str.1 = [35 x i8] c"FAIL: mismatch: want %02x got %02x\00"
@.str.2 = [12 x i8] c"overrun...\0A\00"
@.str.3 = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %4
%8 = icmp ult i32 %7, 20
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = call i32 (...) @wait_keypress()
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %9
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18)
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %9
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add i32 %23, 1
store i32 %24, i32* %4
br label %6
25: ; preds = %6
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @usleep(i32 5000)
%28 = call i32 (...) @wait_keypress()
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %29)
store i32 1, i32* %5
br label %31
31: ; preds = %51, %25
%32 = load i32, i32* %5
%33 = icmp ult i32 %32, 20
br i1 %33, label %34, label %54
34: ; preds = %31
%35 = call i32 (...) @wait_keypress()
store i32 %35, i32* %3
%36 = load i32, i32* %3
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %3
%39 = load i32, i32* %5
%40 = load i32, i32* %2
%41 = add i32 %39, %40
%42 = icmp ne i32 %38, %41
br i1 %42, label %43, label %50
43: ; preds = %34
%44 = load i32, i32* %5
%45 = load i32, i32* %2
%46 = add i32 %44, %45
%47 = load i32, i32* %3
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %46, i32 %47)
%49 = call i32 @exit(i32 1)
unreachable
50: ; preds = %34
br label %51
51: ; preds = %50
%52 = load i32, i32* %5
%53 = add i32 %52, 1
store i32 %53, i32* %5
br label %31
54: ; preds = %31
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x\0A\00"
@.str.1 = [35 x i8] c"FAIL: mismatch: want %02x got %02x\00"
@str = [11 x i8] c"overrun...\00"
@str.4 = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 (...) @wait_keypress()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %81, %77, %73, %69, %65, %61, %57, %53, %49, %45, %41, %37, %33, %29, %25, %21, %17, %13, %9, %0
%5 = phi i32 [ 0, %0 ], [ 1, %9 ], [ 2, %13 ], [ 3, %17 ], [ 4, %21 ], [ 5, %25 ], [ 6, %29 ], [ 7, %33 ], [ 8, %37 ], [ 9, %41 ], [ 10, %45 ], [ 11, %49 ], [ 12, %53 ], [ 13, %57 ], [ 14, %61 ], [ 15, %65 ], [ 16, %69 ], [ 17, %73 ], [ 18, %77 ], [ 19, %81 ]
%6 = phi i32 [ %1, %0 ], [ %10, %9 ], [ %14, %13 ], [ %18, %17 ], [ %22, %21 ], [ %26, %25 ], [ %30, %29 ], [ %34, %33 ], [ %38, %37 ], [ %42, %41 ], [ %46, %45 ], [ %50, %49 ], [ %54, %53 ], [ %58, %57 ], [ %62, %61 ], [ %66, %65 ], [ %70, %69 ], [ %74, %73 ], [ %78, %77 ], [ %82, %81 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = tail call i32 (...) @wait_keypress()
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i32 %10, 1
br i1 %12, label %13, label %4
13: ; preds = %9
%14 = tail call i32 (...) @wait_keypress()
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = icmp eq i32 %14, 2
br i1 %16, label %17, label %4
17: ; preds = %13
%18 = tail call i32 (...) @wait_keypress()
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = icmp eq i32 %18, 3
br i1 %20, label %21, label %4
21: ; preds = %17
%22 = tail call i32 (...) @wait_keypress()
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = icmp eq i32 %22, 4
br i1 %24, label %25, label %4
25: ; preds = %21
%26 = tail call i32 (...) @wait_keypress()
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = icmp eq i32 %26, 5
br i1 %28, label %29, label %4
29: ; preds = %25
%30 = tail call i32 (...) @wait_keypress()
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = icmp eq i32 %30, 6
br i1 %32, label %33, label %4
33: ; preds = %29
%34 = tail call i32 (...) @wait_keypress()
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = icmp eq i32 %34, 7
br i1 %36, label %37, label %4
37: ; preds = %33
%38 = tail call i32 (...) @wait_keypress()
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %38)
%40 = icmp eq i32 %38, 8
br i1 %40, label %41, label %4
41: ; preds = %37
%42 = tail call i32 (...) @wait_keypress()
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %42)
%44 = icmp eq i32 %42, 9
br i1 %44, label %45, label %4
45: ; preds = %41
%46 = tail call i32 (...) @wait_keypress()
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %46)
%48 = icmp eq i32 %46, 10
br i1 %48, label %49, label %4
49: ; preds = %45
%50 = tail call i32 (...) @wait_keypress()
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = icmp eq i32 %50, 11
br i1 %52, label %53, label %4
53: ; preds = %49
%54 = tail call i32 (...) @wait_keypress()
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = icmp eq i32 %54, 12
br i1 %56, label %57, label %4
57: ; preds = %53
%58 = tail call i32 (...) @wait_keypress()
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %58)
%60 = icmp eq i32 %58, 13
br i1 %60, label %61, label %4
61: ; preds = %57
%62 = tail call i32 (...) @wait_keypress()
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = icmp eq i32 %62, 14
br i1 %64, label %65, label %4
65: ; preds = %61
%66 = tail call i32 (...) @wait_keypress()
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %66)
%68 = icmp eq i32 %66, 15
br i1 %68, label %69, label %4
69: ; preds = %65
%70 = tail call i32 (...) @wait_keypress()
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = icmp eq i32 %70, 16
br i1 %72, label %73, label %4
73: ; preds = %69
%74 = tail call i32 (...) @wait_keypress()
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %74)
%76 = icmp eq i32 %74, 17
br i1 %76, label %77, label %4
77: ; preds = %73
%78 = tail call i32 (...) @wait_keypress()
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %78)
%80 = icmp eq i32 %78, 18
br i1 %80, label %81, label %4
81: ; preds = %77
%82 = tail call i32 (...) @wait_keypress()
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %82)
%84 = icmp eq i32 %82, 19
br i1 %84, label %85, label %4
85: ; preds = %81
%86 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%87 = tail call i32 @usleep(i32 5000)
%88 = tail call i32 (...) @wait_keypress()
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %88)
%90 = tail call i32 (...) @wait_keypress()
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %90)
%92 = add i32 %88, 1
%93 = icmp eq i32 %90, %92
br i1 %93, label %94, label %186
94: ; preds = %85
%95 = tail call i32 (...) @wait_keypress()
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %95)
%97 = add i32 %88, 2
%98 = icmp eq i32 %95, %97
br i1 %98, label %99, label %186
99: ; preds = %94
%100 = tail call i32 (...) @wait_keypress()
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %100)
%102 = add i32 %88, 3
%103 = icmp eq i32 %100, %102
br i1 %103, label %104, label %186
104: ; preds = %99
%105 = tail call i32 (...) @wait_keypress()
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %105)
%107 = add i32 %88, 4
%108 = icmp eq i32 %105, %107
br i1 %108, label %109, label %186
109: ; preds = %104
%110 = tail call i32 (...) @wait_keypress()
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %110)
%112 = add i32 %88, 5
%113 = icmp eq i32 %110, %112
br i1 %113, label %114, label %186
114: ; preds = %109
%115 = tail call i32 (...) @wait_keypress()
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %115)
%117 = add i32 %88, 6
%118 = icmp eq i32 %115, %117
br i1 %118, label %119, label %186
119: ; preds = %114
%120 = tail call i32 (...) @wait_keypress()
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %120)
%122 = add i32 %88, 7
%123 = icmp eq i32 %120, %122
br i1 %123, label %124, label %186
124: ; preds = %119
%125 = tail call i32 (...) @wait_keypress()
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %125)
%127 = add i32 %88, 8
%128 = icmp eq i32 %125, %127
br i1 %128, label %129, label %186
129: ; preds = %124
%130 = tail call i32 (...) @wait_keypress()
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %130)
%132 = add i32 %88, 9
%133 = icmp eq i32 %130, %132
br i1 %133, label %134, label %186
134: ; preds = %129
%135 = tail call i32 (...) @wait_keypress()
%136 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %135)
%137 = add i32 %88, 10
%138 = icmp eq i32 %135, %137
br i1 %138, label %139, label %186
139: ; preds = %134
%140 = tail call i32 (...) @wait_keypress()
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %140)
%142 = add i32 %88, 11
%143 = icmp eq i32 %140, %142
br i1 %143, label %144, label %186
144: ; preds = %139
%145 = tail call i32 (...) @wait_keypress()
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %145)
%147 = add i32 %88, 12
%148 = icmp eq i32 %145, %147
br i1 %148, label %149, label %186
149: ; preds = %144
%150 = tail call i32 (...) @wait_keypress()
%151 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %150)
%152 = add i32 %88, 13
%153 = icmp eq i32 %150, %152
br i1 %153, label %154, label %186
154: ; preds = %149
%155 = tail call i32 (...) @wait_keypress()
%156 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %155)
%157 = add i32 %88, 14
%158 = icmp eq i32 %155, %157
br i1 %158, label %159, label %186
159: ; preds = %154
%160 = tail call i32 (...) @wait_keypress()
%161 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %160)
%162 = add i32 %88, 15
%163 = icmp eq i32 %160, %162
br i1 %163, label %164, label %186
164: ; preds = %159
%165 = tail call i32 (...) @wait_keypress()
%166 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %165)
%167 = add i32 %88, 16
%168 = icmp eq i32 %165, %167
br i1 %168, label %169, label %186
169: ; preds = %164
%170 = tail call i32 (...) @wait_keypress()
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %170)
%172 = add i32 %88, 17
%173 = icmp eq i32 %170, %172
br i1 %173, label %174, label %186
174: ; preds = %169
%175 = tail call i32 (...) @wait_keypress()
%176 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %175)
%177 = add i32 %88, 18
%178 = icmp eq i32 %175, %177
br i1 %178, label %179, label %186
179: ; preds = %174
%180 = tail call i32 (...) @wait_keypress()
%181 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %180)
%182 = add i32 %88, 19
%183 = icmp eq i32 %180, %182
br i1 %183, label %184, label %186
184: ; preds = %179
%185 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0))
ret i32 0
186: ; preds = %179, %174, %169, %164, %159, %154, %149, %144, %139, %134, %129, %124, %119, %114, %109, %104, %99, %94, %85
%187 = phi i32 [ %90, %85 ], [ %95, %94 ], [ %100, %99 ], [ %105, %104 ], [ %110, %109 ], [ %115, %114 ], [ %120, %119 ], [ %125, %124 ], [ %130, %129 ], [ %135, %134 ], [ %140, %139 ], [ %145, %144 ], [ %150, %149 ], [ %155, %154 ], [ %160, %159 ], [ %165, %164 ], [ %170, %169 ], [ %175, %174 ], [ %180, %179 ]
%188 = phi i32 [ %92, %85 ], [ %97, %94 ], [ %102, %99 ], [ %107, %104 ], [ %112, %109 ], [ %117, %114 ], [ %122, %119 ], [ %127, %124 ], [ %132, %129 ], [ %137, %134 ], [ %142, %139 ], [ %147, %144 ], [ %152, %149 ], [ %157, %154 ], [ %162, %159 ], [ %167, %164 ], [ %172, %169 ], [ %177, %174 ], [ %182, %179 ]
%189 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %188, i32 %187)
%190 = tail call i32 @exit(i32 1)
unreachable
}