#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 pollfd {
  int fd;
  int events;
  int revents;
};
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ O_RDWR;
int POLLIN;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ poll(struct pollfd *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
char *read_write_file(const char *filename, size_t length) {
  char *buffer;
  int fd;
  static int u_random_fd = -1;
  ssize_t bytes_read;
  unsigned random;
  struct pollfd pfds[2];
  unsigned cnt = 0;
  buffer = (char *)malloc(10 * 1024);
  if (buffer == NULL)
    return NULL;
  fd = open(filename, O_RDWR);
  if (fd == -1) {
    printf("Open  %s failed!\n", filename);
    free(buffer);
    return NULL;
  }
  if (u_random_fd == -1) {
    u_random_fd = open("/dev/urandom", O_RDONLY);
    if (u_random_fd == -1) {
      printf("Open  /dev/random failed!\n");
      return NULL;
    }
  }
  printf("Now read from random!\n");
  if (read(u_random_fd, buffer, 10 * 1024) != 10 * 1024)
    return NULL;
  printf("Now write to device!\n");
  pfds[0].fd = 0;
  pfds[0].events = POLLIN;
  pfds[1].fd = fd;
  pfds[1].events = POLLIN;
  write(fd, buffer, 10 * 1024);
  do {
    poll(pfds, 2, 0);
    cnt++;
    if (pfds[1].revents & POLLIN) {
      bytes_read = read(fd, buffer, 3);
      if (bytes_read != 3) {
        printf("Read from device failed!\n");
        free(buffer);
        close(fd);
        return NULL;
      }
      break;
    }
  } while (1);
  close(fd);
  printf("cnt: %d\n", cnt);
  printf("min: %d\n", (unsigned char)buffer[0]);
  printf("max: %d\n", (unsigned char)buffer[1]);
  printf("avg: %d\n", (unsigned char)buffer[2]);
  free(buffer);
  return NULL;
}


x86 assembly (clang, -O0):
<read_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x54(%rbp)
mov    $0x2800,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11bd <read_write_file+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    13d3 <read_write_file+0x253>
mov    -0x10(%rbp),%rdi
mov    0x2e20(%rip),%rax
mov    (%rax),%esi
call   10a0 <open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    1204 <read_write_file+0x84>
mov    -0x10(%rbp),%rsi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    13d3 <read_write_file+0x253>
cmpl   $0xffffffff,0x2e55(%rip)
jne    1259 <read_write_file+0xd9>
mov    0x2dc8(%rip),%rax
mov    (%rax),%esi
lea    0xdf1(%rip),%rdi
call   10a0 <open@plt>
mov    %eax,0x2e34(%rip)
cmpl   $0xffffffff,0x2e2d(%rip)
jne    1254 <read_write_file+0xd4>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0x0,-0x8(%rbp)
jmp    13d3 <read_write_file+0x253>
jmp    1259 <read_write_file+0xd9>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2df3(%rip),%edi
mov    -0x20(%rbp),%rsi
mov    $0x2800,%edx
call   1070 <read@plt>
cmp    $0x2800,%eax
je     1293 <read_write_file+0x113>
movq   $0x0,-0x8(%rbp)
jmp    13d3 <read_write_file+0x253>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x50(%rbp)
mov    0x2d29(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    0x2d17(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x2800,%edx
call   1040 <write@plt>
lea    -0x50(%rbp),%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1090 <poll@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x3c(%rbp),%eax
mov    0x2cde(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1354 <read_write_file+0x1d4>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x3,%edx
call   1070 <read@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
je     134f <read_write_file+0x1cf>
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
movq   $0x0,-0x8(%rbp)
jmp    13d3 <read_write_file+0x253>
jmp    1368 <read_write_file+0x1e8>
jmp    1359 <read_write_file+0x1d9>
mov    $0x1,%al
test   $0x1,%al
jne    12d7 <read_write_file+0x157>
jmp    1368 <read_write_file+0x1e8>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
mov    -0x54(%rbp),%esi
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movzbl (%rax),%esi
lea    0xcfb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movzbl 0x1(%rax),%esi
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movzbl 0x2(%rax),%esi
lea    0xce1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_write_file>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbp
mov    $0x2800,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     1338 <read_write_file+0x1a8>
mov    %rax,%r15
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10b0 <open@plt>
cmp    $0xffffffff,%eax
je     12f3 <read_write_file+0x163>
mov    %eax,%r14d
cmpl   $0xffffffff,0x2e8f(%rip)
jne    11ff <read_write_file+0x6f>
mov    0x2dfe(%rip),%rax
mov    (%rax),%esi
lea    0xe27(%rip),%rdi
call   10b0 <open@plt>
mov    %eax,0x2e72(%rip)
cmp    $0xffffffff,%eax
je     132c <read_write_file+0x19c>
lea    0xe3d(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e57(%rip),%edi
mov    %r15,%rsi
mov    $0x2800,%edx
call   1080 <read@plt>
cmp    $0x2800,%eax
jne    1338 <read_write_file+0x1a8>
lea    0xe29(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,(%rsp)
mov    0x2d95(%rip),%r12
mov    (%r12),%eax
mov    %eax,0x4(%rsp)
mov    %r14d,0xc(%rsp)
mov    %eax,0x10(%rsp)
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x2800,%edx
call   1050 <write@plt>
xor    %ebp,%ebp
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   10a0 <poll@plt>
add    $0x1,%ebp
mov    (%r12),%eax
test   %eax,0x14(%rsp)
je     1270 <read_write_file+0xe0>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x3,%edx
call   1080 <read@plt>
cmp    $0x3,%eax
jne    130e <read_write_file+0x17e>
mov    %r14d,%edi
call   1070 <close@plt>
lea    0xd6f(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl (%r15),%esi
lea    0xd64(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x1(%r15),%esi
lea    0xd5a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x2(%r15),%esi
lea    0xd50(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1304 <read_write_file+0x174>
lea    0xd06(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    1338 <read_write_file+0x1a8>
lea    0xd59(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
call   1070 <close@plt>
jmp    1338 <read_write_file+0x1a8>
lea    0xd54(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.pollfd = type { i32, i32, i32 }
@read_write_file.u_random_fd = internal global i32 -1
@O_RDWR = global i32 0
@.str = [18 x i8] c"Open %s failed!\0A\00"
@.str.1 = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
@.str.2 = [27 x i8] c"Open /dev/random failed!\0A\00"
@.str.3 = [23 x i8] c"Now read from random!\0A\00"
@.str.4 = [22 x i8] c"Now write to device!\0A\00"
@POLLIN = global i32 0
@.str.5 = [26 x i8] c"Read from device failed!\0A\00"
@.str.6 = [9 x i8] c"cnt: %d\0A\00"
@.str.7 = [9 x i8] c"min: %d\0A\00"
@.str.8 = [9 x i8] c"max: %d\0A\00"
@.str.9 = [9 x i8] c"avg: %d\0A\00"
define i8* @read_write_file(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [2 x %struct.pollfd]
%11 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 0, i32* %11
%12 = call i64 @malloc(i32 10240)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i8* null, i8** %3
br label %110
17: ; preds = %2
%18 = load i8*, i8** %4
%19 = load i32, i32* @O_RDWR
%20 = call i32 @open(i8* %18, i32 %19)
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %28
23: ; preds = %17
%24 = load i8*, i8** %4
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %6
%27 = call i32 @free(i8* %26)
store i8* null, i8** %3
br label %110
28: ; preds = %17
%29 = load i32, i32* @read_write_file.u_random_fd
%30 = icmp eq i32 %29, -1
br i1 %30, label %31, label %39
31: ; preds = %28
%32 = load i32, i32* @O_RDONLY
%33 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %32)
store i32 %33, i32* @read_write_file.u_random_fd
%34 = load i32, i32* @read_write_file.u_random_fd
%35 = icmp eq i32 %34, -1
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i8* null, i8** %3
br label %110
38: ; preds = %31
br label %39
39: ; preds = %38, %28
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%41 = load i32, i32* @read_write_file.u_random_fd
%42 = load i8*, i8** %6
%43 = call i32 @read(i32 %41, i8* %42, i32 10240)
%44 = icmp ne i32 %43, 10240
br i1 %44, label %45, label %46
45: ; preds = %39
store i8* null, i8** %3
br label %110
46: ; preds = %39
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%48 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 0
%49 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %48, i32 0, i32 0
store i32 0, i32* %49
%50 = load i32, i32* @POLLIN
%51 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 0
%52 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %51, i32 0, i32 1
store i32 %50, i32* %52
%53 = load i32, i32* %7
%54 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 1
%55 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %54, i32 0, i32 0
store i32 %53, i32* %55
%56 = load i32, i32* @POLLIN
%57 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 1
%58 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %57, i32 0, i32 1
store i32 %56, i32* %58
%59 = load i32, i32* %7
%60 = load i8*, i8** %6
%61 = call i32 @write(i32 %59, i8* %60, i32 10240)
br label %62
62: ; preds = %87, %46
%63 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 0
%64 = call i32 @poll(%struct.pollfd* %63, i32 2, i32 0)
%65 = load i32, i32* %11
%66 = add i32 %65, 1
store i32 %66, i32* %11
%67 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %10, i64 0, i64 1
%68 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %67, i32 0, i32 2
%69 = load i32, i32* %68
%70 = load i32, i32* @POLLIN
%71 = and i32 %69, %70
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %86
73: ; preds = %62
%74 = load i32, i32* %7
%75 = load i8*, i8** %6
%76 = call i32 @read(i32 %74, i8* %75, i32 3)
store i32 %76, i32* %8
%77 = load i32, i32* %8
%78 = icmp ne i32 %77, 3
br i1 %78, label %79, label %85
79: ; preds = %73
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%81 = load i8*, i8** %6
%82 = call i32 @free(i8* %81)
%83 = load i32, i32* %7
%84 = call i32 @close(i32 %83)
store i8* null, i8** %3
br label %110
85: ; preds = %73
br label %88
86: ; preds = %62
br label %87
87: ; preds = %86
br i1 true, label %62, label %88
88: ; preds = %87, %85
%89 = load i32, i32* %7
%90 = call i32 @close(i32 %89)
%91 = load i32, i32* %11
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %91)
%93 = load i8*, i8** %6
%94 = getelementptr inbounds i8, i8* %93, i64 0
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %96)
%98 = load i8*, i8** %6
%99 = getelementptr inbounds i8, i8* %98, i64 1
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %101)
%103 = load i8*, i8** %6
%104 = getelementptr inbounds i8, i8* %103, i64 2
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %106)
%108 = load i8*, i8** %6
%109 = call i32 @free(i8* %108)
store i8* null, i8** %3
br label %110
110: ; preds = %88, %79, %45, %36, %23, %16
%111 = load i8*, i8** %3
ret i8* %111
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32, i32 }
@read_write_file.u_random_fd = internal unnamed_addr global i32 -1
@O_RDWR = global i32 0
@.str = [18 x i8] c"Open %s failed!\0A\00"
@.str.1 = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
@POLLIN = global i32 0
@.str.6 = [9 x i8] c"cnt: %d\0A\00"
@.str.7 = [9 x i8] c"min: %d\0A\00"
@.str.8 = [9 x i8] c"max: %d\0A\00"
@.str.9 = [9 x i8] c"avg: %d\0A\00"
@str = [22 x i8] c"Now read from random!\00"
@str.10 = [21 x i8] c"Now write to device!\00"
@str.11 = [25 x i8] c"Read from device failed!\00"
@str.12 = [26 x i8] c"Open /dev/random failed!\00"
define noalias i8* @read_write_file(i8* %0, i64 %1) {
%3 = alloca [2 x %struct.pollfd]
%4 = bitcast [2 x %struct.pollfd]* %3 to i8*
%5 = tail call i64 @malloc(i32 10240)
%6 = inttoptr i64 %5 to i8*
%7 = icmp eq i64 %5, 0
br i1 %7, label %69, label %8
8: ; preds = %2
%9 = load i32, i32* @O_RDWR
%10 = tail call i32 @open(i8* %0, i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%14 = tail call i32 @free(i8* %6)
br label %69
15: ; preds = %8
%16 = load i32, i32* @read_write_file.u_random_fd
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* @O_RDONLY
%20 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %19)
store i32 %20, i32* @read_write_file.u_random_fd
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.12, i64 0, i64 0))
br label %69
24: ; preds = %18, %15
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%26 = load i32, i32* @read_write_file.u_random_fd
%27 = tail call i32 @read(i32 %26, i8* %6, i32 10240)
%28 = icmp eq i32 %27, 10240
br i1 %28, label %29, label %69
29: ; preds = %24
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.10, i64 0, i64 0))
%31 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 0
%32 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 0, i32 0
store i32 0, i32* %32
%33 = load i32, i32* @POLLIN
%34 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 0, i32 1
store i32 %33, i32* %34
%35 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 1, i32 0
store i32 %10, i32* %35
%36 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 1, i32 1
store i32 %33, i32* %36
%37 = tail call i32 @write(i32 %10, i8* %6, i32 10240)
%38 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %3, i64 0, i64 1, i32 2
br label %39
39: ; preds = %39, %29
%40 = phi i32 [ 0, %29 ], [ %42, %39 ]
%41 = call i32 @poll(%struct.pollfd* %31, i32 2, i32 0)
%42 = add i32 %40, 1
%43 = load i32, i32* %38
%44 = load i32, i32* @POLLIN
%45 = and i32 %44, %43
%46 = icmp eq i32 %45, 0
br i1 %46, label %39, label %47
47: ; preds = %39
%48 = call i32 @read(i32 %10, i8* %6, i32 3)
%49 = icmp eq i32 %48, 3
br i1 %49, label %54, label %50
50: ; preds = %47
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.11, i64 0, i64 0))
%52 = call i32 @free(i8* %6)
%53 = call i32 @close(i32 %10)
br label %69
54: ; preds = %47
%55 = call i32 @close(i32 %10)
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %42)
%57 = load i8, i8* %6
%58 = zext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %58)
%60 = getelementptr inbounds i8, i8* %6, i64 1
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds i8, i8* %6, i64 2
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %66)
%68 = call i32 @free(i8* %6)
br label %69
69: ; preds = %24, %2, %54, %50, %22, %12
ret i8* null
}