#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 */
typedef int ssize_t;
typedef scalar_t__ off_t;

/* Variables and functions */
int O_CREAT;
int O_RDWR;
int O_TRUNC;
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ lseek(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, char, int);
int open(char *, int, int);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int write(int, char *, int);
int main(int argc, char **argv) {
  int fd = -1;
  char buf[5] = {0};
  ssize_t n_written = 0, n_read = 0;
  off_t pos = 0;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <output filename>\n", argv[0]);
    return 1;
  }
  memset(buf, 'A', 5);
  fd = open(argv[1], (O_RDWR | O_CREAT | O_TRUNC), 0666);
  if (fd == -1) {
    fprintf(stderr, "Failed to open file %s\n", argv[1]);
    return 1;
  }
  n_written = write(fd, buf, 5);
  if (n_written != 5) {
    fprintf(stderr, "Failed to write first buffer\n");
    return 1;
  }
  fprintf(stderr, "Wrote %d bytes\n", 5);
  pos = lseek(fd, 100000, SEEK_CUR);
  if (pos == (off_t)-1) {
    fprintf(stderr, "Failed to seek\n");
    return 1;
  }
  fprintf(stderr, "lseek() returned %ld\n", (long)pos);
  n_written = write(fd, buf, 5);
  if (n_written != 5) {
    fprintf(stderr, "Failed to write first buffer\n");
    return 1;
  }
  fprintf(stderr, "Wrote %d bytes\n", 5);
  pos = lseek(fd, 10, SEEK_SET);
  if (pos == (off_t)-1) {
    fprintf(stderr, "Failed to seek\n");
    return 1;
  }
  fprintf(stderr, "lseek() returned %ld\n", (long)pos);
  n_read = read(fd, buf, 5);
  if (n_read != 5) {
    fprintf(stderr, "Failed to read %d bytes at offset %d\n", (int)5, (int)pos);
    return 1;
  }
  fprintf(stderr, "Read %d bytes\n", 5);
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    -0x19(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1050 <memset@plt>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11e7 <main+0x77>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe2c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
lea    -0x19(%rbp),%rdi
mov    $0x41,%esi
mov    $0x5,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2dcf(%rip),%rax
mov    (%rax),%esi
mov    0x2de6(%rip),%rax
or     (%rax),%esi
mov    0x2dd5(%rip),%rax
or     (%rax),%esi
mov    $0x1b6,%edx
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    125f <main+0xef>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdd1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    -0x14(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
je     12a0 <main+0x130>
mov    0x2d3c(%rip),%rax
mov    (%rax),%edi
lea    0xda8(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
lea    0xda3(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
mov    0x2d0a(%rip),%rax
mov    (%rax),%edx
mov    $0x186a0,%esi
call   1040 <lseek@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0xffffffffffffffff,-0x30(%rbp)
jne    1304 <main+0x194>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
lea    0xd72(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rdx
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
je     1360 <main+0x1f0>
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    0x2c59(%rip),%rax
mov    (%rax),%edi
lea    0xce3(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
mov    0x2c32(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1040 <lseek@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0xffffffffffffffff,-0x30(%rbp)
jne    13c4 <main+0x254>
mov    0x2c18(%rip),%rax
mov    (%rax),%edi
lea    0xcb2(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rdx
lea    0xc9b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x5,%edx
call   1070 <read@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
je     142b <main+0x2bb>
mov    0x2bbc(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
mov    %eax,%ecx
lea    0xc76(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2e6>
mov    0x2b8e(%rip),%rax
mov    (%rax),%edi
lea    0xc74(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1060 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbp
movb   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
cmp    $0x2,%edi
jne    12d6 <main+0x166>
mov    %rsp,%rdi
mov    $0x41,%esi
mov    $0x5,%edx
call   1050 <memset@plt>
mov    0x2e30(%rip),%rax
mov    0x2e49(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x8(%rbp),%rdi
mov    0x2e32(%rip),%rax
or     (%rax),%esi
mov    $0x1b6,%edx
call   1090 <open@plt>
cmp    $0xffffffff,%eax
je     12f5 <main+0x185>
mov    %eax,%ebx
mov    %rsp,%rsi
mov    %eax,%edi
mov    $0x5,%edx
call   1030 <write@plt>
mov    0x2dd5(%rip),%r15
mov    (%r15),%edi
cmp    $0x5,%eax
jne    12ec <main+0x17c>
lea    0xe55(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    $0x186a0,%esi
call   1040 <lseek@plt>
mov    (%r15),%edi
cmp    $0xffffffffffffffff,%rax
je     1312 <main+0x1a2>
lea    0xe40(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rsp,%rsi
mov    %ebx,%edi
mov    $0x5,%edx
call   1030 <write@plt>
mov    (%r15),%edi
cmp    $0x5,%eax
jne    12ec <main+0x17c>
lea    0xdf4(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2d46(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    $0xa,%esi
call   1040 <lseek@plt>
mov    (%r15),%edi
cmp    $0xffffffffffffffff,%rax
je     1312 <main+0x1a2>
mov    %rax,%r14
lea    0xddc(%rip),%rsi
xor    %ebp,%ebp
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rsp,%rsi
mov    %ebx,%edi
mov    $0x5,%edx
call   1070 <read@plt>
mov    (%r15),%edi
cmp    $0x5,%eax
jne    1332 <main+0x1c2>
lea    0xdee(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %ebx,%edi
call   1060 <close@plt>
jmp    1325 <main+0x1b5>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xd16(%rip),%rsi
jmp    1309 <main+0x199>
lea    0xd42(%rip),%rsi
jmp    1319 <main+0x1a9>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbp),%rdx
lea    0xd14(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1320 <main+0x1b0>
lea    0xd4a(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd50(%rip),%rsi
mov    $0x5,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1320 <main+0x1b0>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: %s <output filename>\0A\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str.1 = [24 x i8] c"Failed to open file %s\0A\00"
@.str.2 = [30 x i8] c"Failed to write first buffer\0A\00"
@.str.3 = [16 x i8] c"Wrote %d bytes\0A\00"
@SEEK_CUR = global i32 0
@.str.4 = [16 x i8] c"Failed to seek\0A\00"
@.str.5 = [22 x i8] c"lseek() returned %ld\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [38 x i8] c"Failed to read %d bytes at offset %d\0A\00"
@.str.7 = [15 x i8] c"Read %d bytes\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [5 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
%11 = bitcast [5 x i8]* %7 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
store i64 0, i64* %10
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %20
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 ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 1, i32* %3
br label %102
20: ; preds = %2
%21 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%22 = call i32 @memset(i8* %21, i8 signext 65, i32 5)
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = load i32, i32* @O_RDWR
%27 = load i32, i32* @O_CREAT
%28 = or i32 %26, %27
%29 = load i32, i32* @O_TRUNC
%30 = or i32 %28, %29
%31 = call i32 @open(i8* %25, i32 %30, i32 438)
store i32 %31, i32* %6
%32 = load i32, i32* %6
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %40
34: ; preds = %20
%35 = load i32, i32* @stderr
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %38)
store i32 1, i32* %3
br label %102
40: ; preds = %20
%41 = load i32, i32* %6
%42 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%43 = call i32 @write(i32 %41, i8* %42, i32 5)
store i32 %43, i32* %8
%44 = load i32, i32* %8
%45 = icmp ne i32 %44, 5
br i1 %45, label %46, label %49
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %102
49: ; preds = %40
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 5)
%52 = load i32, i32* %6
%53 = load i32, i32* @SEEK_CUR
%54 = call i64 @lseek(i32 %52, i32 100000, i32 %53)
store i64 %54, i64* %10
%55 = load i64, i64* %10
%56 = icmp eq i64 %55, -1
br i1 %56, label %57, label %60
57: ; preds = %49
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %102
60: ; preds = %49
%61 = load i32, i32* @stderr
%62 = load i64, i64* %10
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 %62)
%64 = load i32, i32* %6
%65 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%66 = call i32 @write(i32 %64, i8* %65, i32 5)
store i32 %66, i32* %8
%67 = load i32, i32* %8
%68 = icmp ne i32 %67, 5
br i1 %68, label %69, label %72
69: ; preds = %60
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %102
72: ; preds = %60
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 5)
%75 = load i32, i32* %6
%76 = load i32, i32* @SEEK_SET
%77 = call i64 @lseek(i32 %75, i32 10, i32 %76)
store i64 %77, i64* %10
%78 = load i64, i64* %10
%79 = icmp eq i64 %78, -1
br i1 %79, label %80, label %83
80: ; preds = %72
%81 = load i32, i32* @stderr
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %102
83: ; preds = %72
%84 = load i32, i32* @stderr
%85 = load i64, i64* %10
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 %85)
%87 = load i32, i32* %6
%88 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%89 = call i32 @read(i32 %87, i8* %88, i32 5)
store i32 %89, i32* %9
%90 = load i32, i32* %9
%91 = icmp ne i32 %90, 5
br i1 %91, label %92, label %97
92: ; preds = %83
%93 = load i32, i32* @stderr
%94 = load i64, i64* %10
%95 = trunc i64 %94 to i32
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 %95)
store i32 1, i32* %3
br label %102
97: ; preds = %83
%98 = load i32, i32* @stderr
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 5)
%100 = load i32, i32* %6
%101 = call i32 @close(i32 %100)
store i32 0, i32* %3
br label %102
102: ; preds = %97, %92, %80, %69, %57, %46, %34, %14
%103 = load i32, i32* %3
ret i32 %103
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: %s <output filename>\0A\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str.1 = [24 x i8] c"Failed to open file %s\0A\00"
@.str.2 = [30 x i8] c"Failed to write first buffer\0A\00"
@.str.3 = [16 x i8] c"Wrote %d bytes\0A\00"
@SEEK_CUR = global i32 0
@.str.4 = [16 x i8] c"Failed to seek\0A\00"
@.str.5 = [22 x i8] c"lseek() returned %ld\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [38 x i8] c"Failed to read %d bytes at offset %d\0A\00"
@.str.7 = [15 x i8] c"Read %d bytes\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %65
10: ; preds = %2
%11 = call i32 @memset(i8* %4, i8 signext 65, i32 5)
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = load i32, i32* @O_RDWR
%15 = load i32, i32* @O_CREAT
%16 = or i32 %15, %14
%17 = load i32, i32* @O_TRUNC
%18 = or i32 %16, %17
%19 = call i32 @open(i8* %13, i32 %18, i32 438)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %25
21: ; preds = %10
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %12
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %23)
br label %65
25: ; preds = %10
%26 = call i32 @write(i32 %19, i8* %4, i32 5)
%27 = icmp eq i32 %26, 5
%28 = load i32, i32* @stderr
br i1 %27, label %31, label %29
29: ; preds = %25
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %65
31: ; preds = %25
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 5)
%33 = load i32, i32* @SEEK_CUR
%34 = call i64 @lseek(i32 %19, i32 100000, i32 %33)
%35 = icmp eq i64 %34, -1
%36 = load i32, i32* @stderr
br i1 %35, label %37, label %39
37: ; preds = %31
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %65
39: ; preds = %31
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 %34)
%41 = call i32 @write(i32 %19, i8* %4, i32 5)
%42 = icmp eq i32 %41, 5
%43 = load i32, i32* @stderr
br i1 %42, label %46, label %44
44: ; preds = %39
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %65
46: ; preds = %39
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 5)
%48 = load i32, i32* @SEEK_SET
%49 = call i64 @lseek(i32 %19, i32 10, i32 %48)
%50 = icmp eq i64 %49, -1
%51 = load i32, i32* @stderr
br i1 %50, label %52, label %54
52: ; preds = %46
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %65
54: ; preds = %46
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 %49)
%56 = call i32 @read(i32 %19, i8* %4, i32 5)
%57 = icmp eq i32 %56, 5
%58 = load i32, i32* @stderr
br i1 %57, label %62, label %59
59: ; preds = %54
%60 = trunc i64 %49 to i32
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 %60)
br label %65
62: ; preds = %54
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 5)
%64 = call i32 @close(i32 %19)
br label %65
65: ; preds = %62, %59, %52, %44, %37, %29, %21, %6
%66 = phi i32 [ 1, %6 ], [ 1, %21 ], [ 1, %29 ], [ 1, %37 ], [ 1, %44 ], [ 1, %52 ], [ 1, %59 ], [ 0, %62 ]
ret i32 %66
}