#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 */
struct js_event {
  int type;
  size_t number;
  int value;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ JSIOCGAXES;
int /*<<< orphan*/ JSIOCGBUTTONS;
int /*<<< orphan*/ JSIOCGNAME(int);
#define JS_EVENT_AXIS 129
#define JS_EVENT_BUTTON 128
int JS_EVENT_INIT;
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ O_RDONLY;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, ...);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, struct js_event *, int);
int /*<<< orphan*/ stdout;
int main() {
  int joy_fd, *axis = NULL, num_of_axis = 0, num_of_buttons = 0, x;
  char *button = NULL, name_of_joystick[80];
  struct js_event js;
  if ((joy_fd = open("/dev/input/js0", O_RDONLY)) == -1) {
    printf("Couldn't open joystick\n");
    return -1;
  }
  ioctl(joy_fd, JSIOCGAXES, &num_of_axis);
  ioctl(joy_fd, JSIOCGBUTTONS, &num_of_buttons);
  ioctl(joy_fd, JSIOCGNAME(80), &name_of_joystick);
  axis = (int *)calloc(num_of_axis, sizeof(int));
  button = (char *)calloc(num_of_buttons, sizeof(char));
  printf("Joystick detected: %s\n\t%d axis\n\t%d buttons\n\n", name_of_joystick,
         num_of_axis, num_of_buttons);
  fcntl(joy_fd, F_SETFL, O_NONBLOCK);
  while (1) {
    read(joy_fd, &js, sizeof(struct js_event));
    switch (js.type & ~JS_EVENT_INIT) {
    case JS_EVENT_AXIS:
      axis[js.number] = js.value;
      break;
    case JS_EVENT_BUTTON:
      button[js.number] = js.value;
      break;
    }
    printf("X: %6d  Y: %6d  ", axis[0], axis[1]);
    if (num_of_axis > 2)
      printf("Z: %6d  ", axis[2]);
    if (num_of_axis > 3)
      printf("R: %6d  ", axis[3]);
    for (x = 0; x < num_of_buttons; ++x)
      printf("B%d: %d  ", x, button[x]);
    printf("  \r");
    fflush(stdout);
  }
  close(joy_fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2e29(%rip),%rax
mov    (%rax),%esi
lea    0xe40(%rip),%rdi
call   1090 <open@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    11ed <main+0x6d>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%eax
add    $0xa0,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%edi
mov    0x2dd9(%rip),%rax
mov    (%rax),%esi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1050 <ioctl@plt>
mov    -0x8(%rbp),%edi
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1050 <ioctl@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    $0x50,%edi
call   10a0 <JSIOCGNAME@plt>
mov    -0x9c(%rbp),%edi
mov    %eax,%esi
lea    -0x80(%rbp),%rdx
mov    $0x0,%al
call   1050 <ioctl@plt>
mov    -0x14(%rbp),%edi
mov    $0x4,%esi
call   1070 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x1,%esi
call   1070 <calloc@plt>
mov    %rax,-0x28(%rbp)
lea    -0x80(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
mov    0x2d5a(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    -0x8(%rbp),%edi
lea    -0x98(%rbp),%rsi
mov    $0x18,%edx
call   1060 <read@plt>
mov    -0x98(%rbp),%eax
mov    0x2d02(%rip),%rcx
mov    (%rcx),%ecx
not    %ecx
and    %ecx,%eax
mov    %eax,-0xa0(%rbp)
sub    $0x80,%eax
je     1301 <main+0x181>
jmp    12d2 <main+0x152>
mov    -0xa0(%rbp),%eax
sub    $0x81,%eax
jne    1317 <main+0x197>
jmp    12e8 <main+0x168>
mov    -0x88(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    -0x90(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1317 <main+0x197>
mov    -0x88(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x90(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x2,-0x14(%rbp)
jle    1351 <main+0x1d1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x3,-0x14(%rbp)
jle    1370 <main+0x1f0>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%esi
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13ae <main+0x22e>
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0xcde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1377 <main+0x1f7>
lea    0xccc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2bed(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1295 <main+0x115>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
lea    0xe43(%rip),%rdi
call   10a0 <open@plt>
cmp    $0xffffffff,%eax
je     1365 <main+0x1d5>
mov    %eax,%r14d
mov    0x2dfb(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
mov    %r14d,%edi
xor    %eax,%eax
call   1060 <ioctl@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %r14d,%edi
xor    %eax,%eax
call   1060 <ioctl@plt>
mov    $0x50,%edi
call   10b0 <JSIOCGNAME@plt>
lea    0x20(%rsp),%r15
mov    %r14d,%edi
mov    %eax,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <ioctl@plt>
mov    0x4(%rsp),%edi
mov    $0x4,%esi
call   1080 <calloc@plt>
mov    %rax,%rbx
mov    (%rsp),%edi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,%rbp
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
lea    0xdc6(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%esi
mov    0x2d85(%rip),%rax
mov    (%rax),%edx
mov    %r14d,%edi
call   1040 <fcntl@plt>
lea    0xdeb(%rip),%r13
lea    0xdee(%rip),%r15
jmp    1298 <main+0x108>
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    %r14d,%edi
lea    0x8(%rsp),%rsi
mov    $0x18,%edx
call   1070 <read@plt>
mov    0x2d07(%rip),%rax
mov    (%rax),%eax
not    %eax
and    0x8(%rsp),%eax
cmp    $0x80,%eax
je     12e0 <main+0x150>
cmp    $0x81,%eax
jne    12ed <main+0x15d>
mov    0x18(%rsp),%eax
mov    0x10(%rsp),%rcx
mov    %eax,(%rbx,%rcx,4)
jmp    12ed <main+0x15d>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x18(%rsp),%al
mov    0x10(%rsp),%rcx
mov    %al,0x0(%rbp,%rcx,1)
mov    (%rbx),%esi
mov    0x4(%rbx),%edx
lea    0xd43(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x3,0x4(%rsp)
jl     1330 <main+0x1a0>
mov    0x8(%rbx),%esi
lea    0xd3c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x4,0x4(%rsp)
jl     1330 <main+0x1a0>
mov    0xc(%rbx),%esi
lea    0xd2d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,(%rsp)
jle    1280 <main+0xf0>
xor    %r12d,%r12d
nopl   (%rax)
movsbl 0x0(%rbp,%r12,1),%edx
mov    %r13,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r12
movslq (%rsp),%rax
cmp    %rax,%r12
jl     1340 <main+0x1b0>
jmp    1280 <main+0xf0>
lea    0xd01(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.js_event = type { i32, i64, i32 }
@.str = [15 x i8] c"/dev/input/js0\00"
@O_RDONLY = global i32 0
@.str.1 = [24 x i8] c"Couldn't open joystick\0A\00"
@JSIOCGAXES = global i32 0
@JSIOCGBUTTONS = global i32 0
@.str.2 = [45 x i8] c"Joystick detected: %s\0A\09%d axis\0A\09%d buttons\0A\0A\00"
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@JS_EVENT_INIT = global i32 0
@.str.3 = [17 x i8] c"X: %6d Y: %6d \00"
@.str.4 = [9 x i8] c"Z: %6d \00"
@.str.5 = [9 x i8] c"R: %6d \00"
@.str.6 = [10 x i8] c"B%d: %d \00"
@.str.7 = [4 x i8] c" \0D\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca [80 x i8]
%9 = alloca %struct.js_event
store i32 0, i32* %1
store i32* null, i32** %3
store i32 0, i32* %4
store i32 0, i32* %5
store i8* null, i8** %7
%10 = load i32, i32* @O_RDONLY
%11 = call i32 @open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 %11, i32* %2
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
15: ; preds = %0
%16 = load i32, i32* %2
%17 = load i32, i32* @JSIOCGAXES
%18 = call i32 (i32, i32, ...) @ioctl(i32 %16, i32 %17, i32* %4)
%19 = load i32, i32* %2
%20 = load i32, i32* @JSIOCGBUTTONS
%21 = call i32 (i32, i32, ...) @ioctl(i32 %19, i32 %20, i32* %5)
%22 = load i32, i32* %2
%23 = call i32 @JSIOCGNAME(i32 80)
%24 = call i32 (i32, i32, ...) @ioctl(i32 %22, i32 %23, [80 x i8]* %8)
%25 = load i32, i32* %4
%26 = call i64 @calloc(i32 %25, i32 4)
%27 = inttoptr i64 %26 to i32*
store i32* %27, i32** %3
%28 = load i32, i32* %5
%29 = call i64 @calloc(i32 %28, i32 1)
%30 = inttoptr i64 %29 to i8*
store i8* %30, i8** %7
%31 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %31, i32 %32, i32 %33)
%35 = load i32, i32* %2
%36 = load i32, i32* @F_SETFL
%37 = load i32, i32* @O_NONBLOCK
%38 = call i32 @fcntl(i32 %35, i32 %36, i32 %37)
br label %39
39: ; preds = %15, %102
%40 = load i32, i32* %2
%41 = call i32 @read(i32 %40, %struct.js_event* %9, i32 24)
%42 = getelementptr inbounds %struct.js_event, %struct.js_event* %9, i32 0, i32 0
%43 = load i32, i32* %42
%44 = load i32, i32* @JS_EVENT_INIT
%45 = xor i32 %44, -1
%46 = and i32 %43, %45
switch i32 %46, label %62 [
i32 129, label %47
i32 128, label %54
]
47: ; preds = %39
%48 = getelementptr inbounds %struct.js_event, %struct.js_event* %9, i32 0, i32 2
%49 = load i32, i32* %48
%50 = load i32*, i32** %3
%51 = getelementptr inbounds %struct.js_event, %struct.js_event* %9, i32 0, i32 1
%52 = load i64, i64* %51
%53 = getelementptr inbounds i32, i32* %50, i64 %52
store i32 %49, i32* %53
br label %62
54: ; preds = %39
%55 = getelementptr inbounds %struct.js_event, %struct.js_event* %9, i32 0, i32 2
%56 = load i32, i32* %55
%57 = trunc i32 %56 to i8
%58 = load i8*, i8** %7
%59 = getelementptr inbounds %struct.js_event, %struct.js_event* %9, i32 0, i32 1
%60 = load i64, i64* %59
%61 = getelementptr inbounds i8, i8* %58, i64 %60
store i8 %57, i8* %61
br label %62
62: ; preds = %39, %54, %47
%63 = load i32*, i32** %3
%64 = getelementptr inbounds i32, i32* %63, i64 0
%65 = load i32, i32* %64
%66 = load i32*, i32** %3
%67 = getelementptr inbounds i32, i32* %66, i64 1
%68 = load i32, i32* %67
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %65, i32 %68)
%70 = load i32, i32* %4
%71 = icmp sgt i32 %70, 2
br i1 %71, label %72, label %77
72: ; preds = %62
%73 = load i32*, i32** %3
%74 = getelementptr inbounds i32, i32* %73, i64 2
%75 = load i32, i32* %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %72, %62
%78 = load i32, i32* %4
%79 = icmp sgt i32 %78, 3
br i1 %79, label %80, label %85
80: ; preds = %77
%81 = load i32*, i32** %3
%82 = getelementptr inbounds i32, i32* %81, i64 3
%83 = load i32, i32* %82
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %83)
br label %85
85: ; preds = %80, %77
store i32 0, i32* %6
br label %86
86: ; preds = %99, %85
%87 = load i32, i32* %6
%88 = load i32, i32* %5
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %102
90: ; preds = %86
%91 = load i32, i32* %6
%92 = load i8*, i8** %7
%93 = load i32, i32* %6
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %92, i64 %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %91, i32 %97)
br label %99
99: ; preds = %90
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
store i32 %101, i32* %6
br label %86
102: ; preds = %86
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%104 = load i32, i32* @stdout
%105 = call i32 @fflush(i32 %104)
br label %39
}

LLVM IR (-O2):
%struct.js_event = type { i32, i64, i32 }
@.str = [15 x i8] c"/dev/input/js0\00"
@O_RDONLY = global i32 0
@JSIOCGAXES = global i32 0
@JSIOCGBUTTONS = global i32 0
@.str.2 = [45 x i8] c"Joystick detected: %s\0A\09%d axis\0A\09%d buttons\0A\0A\00"
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@JS_EVENT_INIT = global i32 0
@.str.3 = [17 x i8] c"X: %6d Y: %6d \00"
@.str.4 = [9 x i8] c"Z: %6d \00"
@.str.5 = [9 x i8] c"R: %6d \00"
@.str.6 = [10 x i8] c"B%d: %d \00"
@.str.7 = [4 x i8] c" \0D\00"
@stdout = global i32 0
@str = [23 x i8] c"Couldn't open joystick\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [80 x i8]
%4 = alloca %struct.js_event
%5 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = bitcast %struct.js_event* %4 to i8*
%9 = load i32, i32* @O_RDONLY
%10 = tail call i32 @open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 -1
14: ; preds = %0
%15 = load i32, i32* @JSIOCGAXES
%16 = call i32 (i32, i32, ...) @ioctl(i32 %10, i32 %15, i32* %1)
%17 = load i32, i32* @JSIOCGBUTTONS
%18 = call i32 (i32, i32, ...) @ioctl(i32 %10, i32 %17, i32* %2)
%19 = call i32 @JSIOCGNAME(i32 80)
%20 = call i32 (i32, i32, ...) @ioctl(i32 %10, i32 %19, [80 x i8]* %3)
%21 = load i32, i32* %1
%22 = call i64 @calloc(i32 %21, i32 4)
%23 = inttoptr i64 %22 to i32*
%24 = load i32, i32* %2
%25 = call i64 @calloc(i32 %24, i32 1)
%26 = inttoptr i64 %25 to i8*
%27 = load i32, i32* %1
%28 = load i32, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %7, i32 %27, i32 %28)
%30 = load i32, i32* @F_SETFL
%31 = load i32, i32* @O_NONBLOCK
%32 = call i32 @fcntl(i32 %10, i32 %30, i32 %31)
%33 = getelementptr inbounds %struct.js_event, %struct.js_event* %4, i64 0, i32 0
%34 = getelementptr inbounds %struct.js_event, %struct.js_event* %4, i64 0, i32 2
%35 = getelementptr inbounds %struct.js_event, %struct.js_event* %4, i64 0, i32 1
%36 = getelementptr inbounds i32, i32* %23, i64 1
%37 = getelementptr inbounds i32, i32* %23, i64 2
%38 = getelementptr inbounds i32, i32* %23, i64 3
br label %39
39: ; preds = %82, %14
%40 = call i32 @read(i32 %10, %struct.js_event* %4, i32 24)
%41 = load i32, i32* %33
%42 = load i32, i32* @JS_EVENT_INIT
%43 = xor i32 %42, -1
%44 = and i32 %41, %43
switch i32 %44, label %54 [
i32 129, label %45
i32 128, label %49
]
45: ; preds = %39
%46 = load i32, i32* %34
%47 = load i64, i64* %35
%48 = getelementptr inbounds i32, i32* %23, i64 %47
store i32 %46, i32* %48
br label %54
49: ; preds = %39
%50 = load i32, i32* %34
%51 = trunc i32 %50 to i8
%52 = load i64, i64* %35
%53 = getelementptr inbounds i8, i8* %26, i64 %52
store i8 %51, i8* %53
br label %54
54: ; preds = %39, %49, %45
%55 = load i32, i32* %23
%56 = load i32, i32* %36
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %55, i32 %56)
%58 = load i32, i32* %1
%59 = icmp sgt i32 %58, 2
br i1 %59, label %60, label %68
60: ; preds = %54
%61 = load i32, i32* %37
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %1
%64 = icmp sgt i32 %63, 3
br i1 %64, label %65, label %68
65: ; preds = %60
%66 = load i32, i32* %38
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %66)
br label %68
68: ; preds = %54, %65, %60
%69 = load i32, i32* %2
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %82
71: ; preds = %68, %71
%72 = phi i64 [ %78, %71 ], [ 0, %68 ]
%73 = getelementptr inbounds i8, i8* %26, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = trunc i64 %72 to i32
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %76, i32 %75)
%78 = add nuw nsw i64 %72, 1
%79 = load i32, i32* %2
%80 = sext i32 %79 to i64
%81 = icmp slt i64 %78, %80
br i1 %81, label %71, label %82
82: ; preds = %71, %68
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%84 = load i32, i32* @stdout
%85 = call i32 @fflush(i32 %84)
br label %39
}