#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*/ O_RDONLY;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ close(int);
int creat(char *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int read(int, int *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ write(int, int *, int);
int main(int argc, char **argv) {
  int i, fd, count, val;
  int vet[12] = {11, 4, 5, 1, 2, 19, 37, 3, 6, 12, 0, 9};
  if (argc != 2) {
    fprintf(stderr, "usage: %s fileName\n", argv[0]);
    exit(-1);
  }
  fd = creat(argv[1], 0666);
  if (fd == -1) {
    fprintf(stderr, "Cannot create file %s\n", argv[1]);
    exit(-1);
  }
  fprintf(stdout, "Reading: ");
  for (i = 0; i < 12; i++) {
    write(fd, &vet[i], sizeof(int));
    fprintf(stdout, "%2d ", vet[i]);
  }
  fprintf(stdout, "\n");
  close(fd);
  fd = open(argv[1], O_RDONLY);
  if (fd == -1) {
    fprintf(stderr, "Cannot open file %s\n", argv[1]);
    exit(-1);
  }
  fprintf(stdout, "Reading: ");
  for (i = 12 - 1; i >= 0; i--) {
    lseek(fd, i * sizeof(int), SEEK_SET);
    count = read(fd, &val, sizeof(int));
    if (count <= 0) {
      fprintf(stderr, "Error reading file\n");
      exit(-1);
    }
    fprintf(stdout, "%2d ", val);
  }
  fprintf(stdout, "\n");
  close(fd);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe4f(%rip),%rsi
mov    $0x30,%edx
call   1080 <memcpy@plt>
cmpl   $0x2,-0x8(%rbp)
je     11ed <main+0x5d>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe54(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1b6,%esi
call   10a0 <creat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1235 <main+0xa5>
mov    0x2dc5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe20(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
lea    0xe16(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    12a6 <main+0x116>
mov    -0x18(%rbp),%edi
movslq -0x14(%rbp),%rax
lea    -0x50(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
movslq -0x14(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xdd4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1253 <main+0xc3>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
lea    0xddb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%edi
call   1050 <close@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2d14(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1311 <main+0x181>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%edi
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0xb,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     13bb <main+0x22b>
mov    -0x18(%rbp),%edi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
mov    0x2c83(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
mov    -0x18(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1060 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jg     1393 <main+0x203>
mov    0x2c5f(%rip),%rax
mov    (%rax),%edi
lea    0xcfd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    0x2c2e(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%edx
lea    0xcbf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    132f <main+0x19f>
mov    0x2c06(%rip),%rax
mov    (%rax),%edi
lea    0xcc6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
movaps 0xe88(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe6c(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe50(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
cmp    $0x2,%edi
jne    1495 <main+0x315>
mov    0x8(%r14),%rdi
mov    $0x1b6,%esi
call   1090 <creat@plt>
cmp    $0xffffffff,%eax
je     14aa <main+0x32a>
mov    %eax,%ebp
mov    0x2dea(%rip),%r12
mov    (%r12),%edi
lea    0xe72(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x10(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
lea    0xe59(%rip),%rbx
mov    %rbx,%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x14(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x18(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x1c(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x20(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x24(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x13,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x28(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x25,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x2c(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x30(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x34(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x38(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x3c(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r12),%edi
lea    0xce2(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %ebp,%edi
call   1050 <close@plt>
mov    0x8(%r14),%rdi
mov    0x2c20(%rip),%rax
mov    (%rax),%esi
call   1080 <open@plt>
cmp    $0xffffffff,%eax
je     14c0 <main+0x340>
mov    %eax,%ebx
mov    (%r12),%edi
lea    0xc76(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x2c,%ebp
mov    0x2bd8(%rip),%r13
lea    0xc(%rsp),%r14
lea    0xc61(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13),%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <lseek@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1060 <read@plt>
test   %eax,%eax
jle    1474 <main+0x2f4>
mov    (%r12),%edi
mov    0xc(%rsp),%edx
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0xfffffffc,%ebp
cmp    $0xfffffffc,%ebp
jne    1410 <main+0x290>
mov    (%r12),%edi
lea    0xc3c(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b5d(%rip),%rax
mov    (%rax),%edi
lea    0xbfb(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
mov    0x2b3c(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xb88(%rip),%rsi
jmp    14d4 <main+0x354>
mov    0x2b27(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xb86(%rip),%rsi
jmp    14d4 <main+0x354>
mov    0x2b11(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xb96(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@__const.main.vet = [12 x i32] [i32 11, i32 4, i32 5, i32 1, i32 2, i32 19, i32 37, i32 3, i32 6, i32 12, i32 0, i32 9]
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s fileName\0A\00"
@.str.1 = [23 x i8] c"Cannot create file %s\0A\00"
@stdout = global i32 0
@.str.2 = [10 x i8] c"Reading: \00"
@.str.3 = [5 x i8] c"%2d \00"
@.str.4 = [2 x i8] c"\0A\00"
@O_RDONLY = global i32 0
@.str.5 = [21 x i8] c"Cannot open file %s\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [20 x i8] c"Error reading file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [12 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [12 x i32]* %10 to i8*
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %21
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = call i32 @exit(i32 -1)
unreachable
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @creat(i8* %24, i32 438)
store i32 %25, i32* %7
%26 = load i32, i32* %7
%27 = icmp eq i32 %26, -1
br i1 %27, label %28, label %35
28: ; preds = %21
%29 = load i32, i32* @stderr
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = call i32 @exit(i32 -1)
unreachable
35: ; preds = %21
%36 = load i32, i32* @stdout
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %38
38: ; preds = %53, %35
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 12
br i1 %40, label %41, label %56
41: ; preds = %38
%42 = load i32, i32* %7
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [12 x i32], [12 x i32]* %10, i64 0, i64 %44
%46 = call i32 @write(i32 %42, i32* %45, i32 4)
%47 = load i32, i32* @stdout
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [12 x i32], [12 x i32]* %10, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %41
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
br label %38
56: ; preds = %38
%57 = load i32, i32* @stdout
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%59 = load i32, i32* %7
%60 = call i32 @close(i32 %59)
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 1
%63 = load i8*, i8** %62
%64 = load i32, i32* @O_RDONLY
%65 = call i32 @open(i8* %63, i32 %64)
store i32 %65, i32* %7
%66 = load i32, i32* %7
%67 = icmp eq i32 %66, -1
br i1 %67, label %68, label %75
68: ; preds = %56
%69 = load i32, i32* @stderr
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 1
%72 = load i8*, i8** %71
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %72)
%74 = call i32 @exit(i32 -1)
unreachable
75: ; preds = %56
%76 = load i32, i32* @stdout
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store i32 11, i32* %6
br label %78
78: ; preds = %101, %75
%79 = load i32, i32* %6
%80 = icmp sge i32 %79, 0
br i1 %80, label %81, label %104
81: ; preds = %78
%82 = load i32, i32* %7
%83 = load i32, i32* %6
%84 = sext i32 %83 to i64
%85 = mul i64 %84, 4
%86 = trunc i64 %85 to i32
%87 = load i32, i32* @SEEK_SET
%88 = call i32 @lseek(i32 %82, i32 %86, i32 %87)
%89 = load i32, i32* %7
%90 = call i32 @read(i32 %89, i32* %9, i32 4)
store i32 %90, i32* %8
%91 = load i32, i32* %8
%92 = icmp sle i32 %91, 0
br i1 %92, label %93, label %97
93: ; preds = %81
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%96 = call i32 @exit(i32 -1)
unreachable
97: ; preds = %81
%98 = load i32, i32* @stdout
%99 = load i32, i32* %9
%100 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %99)
br label %101
101: ; preds = %97
%102 = load i32, i32* %6
%103 = add nsw i32 %102, -1
store i32 %103, i32* %6
br label %78
104: ; preds = %78
%105 = load i32, i32* @stdout
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%107 = load i32, i32* %7
%108 = call i32 @close(i32 %107)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vet = [12 x i32] [i32 11, i32 4, i32 5, i32 1, i32 2, i32 19, i32 37, i32 3, i32 6, i32 12, i32 0, i32 9]
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s fileName\0A\00"
@.str.1 = [23 x i8] c"Cannot create file %s\0A\00"
@stdout = global i32 0
@.str.2 = [10 x i8] c"Reading: \00"
@.str.3 = [5 x i8] c"%2d \00"
@.str.4 = [2 x i8] c"\0A\00"
@O_RDONLY = global i32 0
@.str.5 = [21 x i8] c"Cannot open file %s\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [20 x i8] c"Error reading file\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [12 x i32]
%5 = bitcast i32* %3 to i8*
%6 = bitcast [12 x i32]* %4 to i8*
%7 = icmp eq i32 %0, 2
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = tail call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32 @creat(i8* %15, i32 438)
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %23
18: ; preds = %13
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %14
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = tail call i32 @exit(i32 -1)
unreachable
23: ; preds = %13
%24 = load i32, i32* @stdout
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%26 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 0
%27 = call i32 @write(i32 %16, i32* %26, i32 4)
%28 = load i32, i32* @stdout
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 11)
%30 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 1
%31 = call i32 @write(i32 %16, i32* %30, i32 4)
%32 = load i32, i32* @stdout
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 4)
%34 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 2
%35 = call i32 @write(i32 %16, i32* %34, i32 4)
%36 = load i32, i32* @stdout
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 5)
%38 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 3
%39 = call i32 @write(i32 %16, i32* %38, i32 4)
%40 = load i32, i32* @stdout
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 1)
%42 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 4
%43 = call i32 @write(i32 %16, i32* %42, i32 4)
%44 = load i32, i32* @stdout
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 2)
%46 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 5
%47 = call i32 @write(i32 %16, i32* %46, i32 4)
%48 = load i32, i32* @stdout
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 19)
%50 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 6
%51 = call i32 @write(i32 %16, i32* %50, i32 4)
%52 = load i32, i32* @stdout
%53 = tail call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 37)
%54 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 7
%55 = call i32 @write(i32 %16, i32* %54, i32 4)
%56 = load i32, i32* @stdout
%57 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 3)
%58 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 8
%59 = call i32 @write(i32 %16, i32* %58, i32 4)
%60 = load i32, i32* @stdout
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 6)
%62 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 9
%63 = call i32 @write(i32 %16, i32* %62, i32 4)
%64 = load i32, i32* @stdout
%65 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 12)
%66 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 10
%67 = call i32 @write(i32 %16, i32* %66, i32 4)
%68 = load i32, i32* @stdout
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 0)
%70 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 11
%71 = call i32 @write(i32 %16, i32* %70, i32 4)
%72 = load i32, i32* @stdout
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 9)
%74 = load i32, i32* @stdout
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%76 = tail call i32 @close(i32 %16)
%77 = load i8*, i8** %14
%78 = load i32, i32* @O_RDONLY
%79 = tail call i32 @open(i8* %77, i32 %78)
%80 = icmp eq i32 %79, -1
br i1 %80, label %81, label %86
81: ; preds = %23
%82 = load i32, i32* @stderr
%83 = load i8*, i8** %14
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %83)
%85 = tail call i32 @exit(i32 -1)
unreachable
86: ; preds = %23
%87 = load i32, i32* @stdout
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %89
89: ; preds = %86, %100
%90 = phi i32 [ 11, %86 ], [ %104, %100 ]
%91 = shl i32 %90, 2
%92 = load i32, i32* @SEEK_SET
%93 = tail call i32 @lseek(i32 %79, i32 %91, i32 %92)
%94 = call i32 @read(i32 %79, i32* %3, i32 4)
%95 = icmp slt i32 %94, 1
br i1 %95, label %96, label %100
96: ; preds = %89
%97 = load i32, i32* @stderr
%98 = tail call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%99 = tail call i32 @exit(i32 -1)
unreachable
100: ; preds = %89
%101 = load i32, i32* @stdout
%102 = load i32, i32* %3
%103 = tail call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %102)
%104 = add nsw i32 %90, -1
%105 = icmp eq i32 %90, 0
br i1 %105, label %106, label %89
106: ; preds = %100
%107 = load i32, i32* @stdout
%108 = tail call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%109 = tail call i32 @close(i32 %79)
ret i32 0
}