#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 timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int O_CREAT;
int /*<<< orphan*/ O_RDONLY;
int O_WRONLY;
scalar_t__ close(int);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ garbage(unsigned char *, size_t);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int open(char const *, int, ...);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ srandom(unsigned int);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
size_t strtoul(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  struct timeval tv;
  unsigned seed;
  size_t numfiles = 1;
  size_t filenamelen = 32;
  unsigned char fbuf[4096];
  if (argc >= 2) {
    if (strcmp(argv[1], "-h") == 0) {
      fprintf(stderr,
              "usage: %s [<number of files>] "
              "[<filename length>]\n",
              argv[0]);
      exit(1);
    }
    numfiles = strtoul(argv[1], NULL, 0);
  }
  if (argc >= 3)
    filenamelen = strtoul(argv[2], NULL, 0);
  if (filenamelen >= sizeof fbuf)
    filenamelen = sizeof fbuf - 1;
  gettimeofday(&tv, NULL);
  seed = (unsigned)tv.tv_sec;
  seed %= (60 * 60 * 24);
  seed *= 1000;
  seed += (unsigned)(tv.tv_usec / 1000);
  srandom(seed);
  for (size_t i = 0; i < numfiles; i++) {
    garbage(fbuf, filenamelen);
    fbuf[filenamelen] = '\0';
    errno = 0;
    int fd = open((const char *)fbuf, O_RDONLY);
    if (fd != -1) {
      close(fd);
      i--;
      continue;
    }
    fd = open((const char *)fbuf, O_WRONLY | O_CREAT, 0644);
    if (fd < 0) {
      perror("open");
      fprintf(stderr, "filename was:");
      for (size_t x = 0; x < sizeof fbuf; x++) {
        fprintf(stderr, " %02hhx", fbuf[x]);
      }
      exit(1);
    }
    errno = 0;
    if (close(fd) != 0)
      perror("close");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1060,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x30(%rbp)
movq   $0x20,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1230 <main+0x90>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1219 <main+0x79>
mov    0x2dd8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdfb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %rax,-0x30(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     1251 <main+0xb1>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x1000,-0x38(%rbp)
jb     1267 <main+0xc7>
movq   $0xfff,-0x38(%rbp)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x18(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x15180,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x24(%rbp)
imul   $0x3e8,-0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <srandom@plt>
movq   $0x0,-0x1048(%rbp)
mov    -0x1048(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1448 <main+0x2a8>
lea    -0x1040(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10c0 <garbage@plt>
mov    -0x38(%rbp),%rax
movb   $0x0,-0x1040(%rbp,%rax,1)
mov    0x2cdc(%rip),%rax
movq   $0x0,(%rax)
lea    -0x1040(%rbp),%rdi
mov    0x2cdf(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x104c(%rbp)
cmpl   $0xffffffff,-0x104c(%rbp)
je     133f <main+0x19f>
mov    -0x104c(%rbp),%edi
call   1050 <close@plt>
mov    -0x1048(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x1048(%rbp)
jmp    1431 <main+0x291>
lea    -0x1040(%rbp),%rdi
mov    0x2c6b(%rip),%rax
mov    (%rax),%esi
mov    0x2ca2(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x104c(%rbp)
cmpl   $0x0,-0x104c(%rbp)
jge    13fd <main+0x25d>
lea    0xcb8(%rip),%rdi
call   1090 <perror@plt>
mov    0x2c46(%rip),%rax
mov    (%rax),%edi
lea    0xca8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movq   $0x0,-0x1058(%rbp)
cmpq   $0x1000,-0x1058(%rbp)
jae    13f3 <main+0x253>
mov    0x2c13(%rip),%rax
mov    (%rax),%edi
mov    -0x1058(%rbp),%rax
movzbl -0x1040(%rbp,%rax,1),%edx
ff
lea    0xc74(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1058(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1058(%rbp)
jmp    13a5 <main+0x205>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    0x2bc4(%rip),%rax
movq   $0x0,(%rax)
mov    -0x104c(%rbp),%edi
call   1050 <close@plt>
cmp    $0x0,%rax
je     142c <main+0x28c>
lea    0xc2a(%rip),%rdi
call   1090 <perror@plt>
jmp    1431 <main+0x291>
mov    -0x1048(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1048(%rbp)
jmp    12b8 <main+0x118>
xor    %eax,%eax
add    $0x1060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1018,%rsp
mov    $0x1,%r14d
mov    $0x20,%r15d
cmp    $0x2,%edi
jl     1212 <main+0x72>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
lea    0xe2e(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1379 <main+0x1d9>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %rax,%r14
cmp    $0x3,%ebp
jb     1212 <main+0x72>
mov    0x10(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %rax,%r15
mov    $0xfff,%ebx
cmp    $0xffe,%rax
ja     1215 <main+0x75>
mov    %r15,%rbx
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    0x8(%rsp),%eax
mov    $0xc22e4507,%ecx
imul   %rax,%rcx
shr    $0x30,%rcx
imul   $0x15180,%ecx,%ecx
sub    %ecx,%eax
imul   $0x3e8,%eax,%eax
movslq (%rsp),%rcx
imul   $0x10624dd3,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rdi
add    %ecx,%edi
add    %eax,%edi
call   1030 <srandom@plt>
test   %r14,%r14
je     1306 <main+0x166>
lea    0x10(%rsp),%r15
mov    0x2d56(%rip),%rbp
mov    0x2d67(%rip),%r13
xor    %r12d,%r12d
jmp    1294 <main+0xf4>
xchg   %ax,%ax
mov    %eax,%edi
call   1050 <close@plt>
add    $0xffffffffffffffff,%r12
add    $0x1,%r12
cmp    %r14,%r12
jae    1306 <main+0x166>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10c0 <garbage@plt>
movb   $0x0,0x10(%rsp,%rbx,1)
movq   $0x0,0x0(%rbp)
mov    0x0(%r13),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <open@plt>
cmp    $0xffffffff,%eax
jne    1280 <main+0xe0>
mov    0x2d32(%rip),%rax
mov    (%rax),%esi
mov    0x2ce9(%rip),%rax
or     (%rax),%esi
mov    %r15,%rdi
mov    $0x1a4,%edx
xor    %eax,%eax
call   1080 <open@plt>
test   %eax,%eax
js     131a <main+0x17a>
movq   $0x0,0x0(%rbp)
mov    %eax,%edi
call   1050 <close@plt>
test   %rax,%rax
je     128b <main+0xeb>
lea    0xd52(%rip),%rdi
call   1090 <perror@plt>
jmp    128b <main+0xeb>
xor    %eax,%eax
add    $0x1018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd15(%rip),%rdi
call   1090 <perror@plt>
mov    0x2ca3(%rip),%r14
mov    (%r14),%edi
lea    0xd04(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xd04(%rip),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    (%r14),%edi
movzbl 0x10(%rsp,%rbp,1),%edx
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%rbp
cmp    $0x1000,%rbp
jne    1350 <main+0x1b0>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    0x2c50(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xc77(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@.str = [3 x i8] c"-h\00"
@stderr = global i32 0
@.str.1 = [51 x i8] c"usage: %s [<number of files>] [<filename length>]\0A\00"
@errno = global i64 0
@O_RDONLY = global i32 0
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.2 = [5 x i8] c"open\00"
@.str.3 = [14 x i8] c"filename was:\00"
@.str.4 = [8 x i8] c" %02hhx\00"
@.str.5 = [6 x i8] c"close\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timeval
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
%10 = alloca [4096 x i8]
%11 = alloca i64
%12 = alloca i32
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 1, i64* %8
store i64 32, i64* %9
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 2
br i1 %15, label %16, label %34
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %16
%23 = load i32, i32* @stderr
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %16
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i64 @strtoul(i8* %32, i32* null, i32 0)
store i64 %33, i64* %8
br label %34
34: ; preds = %29, %2
%35 = load i32, i32* %4
%36 = icmp sge i32 %35, 3
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i64 @strtoul(i8* %40, i32* null, i32 0)
store i64 %41, i64* %9
br label %42
42: ; preds = %37, %34
%43 = load i64, i64* %9
%44 = icmp uge i64 %43, 4096
br i1 %44, label %45, label %46
45: ; preds = %42
store i64 4095, i64* %9
br label %46
46: ; preds = %45, %42
%47 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%48 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%49 = load i64, i64* %48
%50 = trunc i64 %49 to i32
store i32 %50, i32* %7
%51 = load i32, i32* %7
%52 = urem i32 %51, 86400
store i32 %52, i32* %7
%53 = load i32, i32* %7
%54 = mul i32 %53, 1000
store i32 %54, i32* %7
%55 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%56 = load i32, i32* %55
%57 = sdiv i32 %56, 1000
%58 = load i32, i32* %7
%59 = add i32 %58, %57
store i32 %59, i32* %7
%60 = load i32, i32* %7
%61 = call i32 @srandom(i32 %60)
store i64 0, i64* %11
br label %62
62: ; preds = %116, %46
%63 = load i64, i64* %11
%64 = load i64, i64* %8
%65 = icmp ult i64 %63, %64
br i1 %65, label %66, label %119
66: ; preds = %62
%67 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%68 = load i64, i64* %9
%69 = call i32 @garbage(i8* %67, i64 %68)
%70 = load i64, i64* %9
%71 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %70
store i8 0, i8* %71
store i64 0, i64* @errno
%72 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%73 = load i32, i32* @O_RDONLY
%74 = call i32 (i8*, i32, ...) @open(i8* %72, i32 %73)
store i32 %74, i32* %12
%75 = load i32, i32* %12
%76 = icmp ne i32 %75, -1
br i1 %76, label %77, label %82
77: ; preds = %66
%78 = load i32, i32* %12
%79 = call i64 @close(i32 %78)
%80 = load i64, i64* %11
%81 = add i64 %80, -1
store i64 %81, i64* %11
br label %116
82: ; preds = %66
%83 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%84 = load i32, i32* @O_WRONLY
%85 = load i32, i32* @O_CREAT
%86 = or i32 %84, %85
%87 = call i32 (i8*, i32, ...) @open(i8* %83, i32 %86, i32 420)
store i32 %87, i32* %12
%88 = load i32, i32* %12
%89 = icmp slt i32 %88, 0
br i1 %89, label %90, label %109
90: ; preds = %82
%91 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%92 = load i32, i32* @stderr
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
store i64 0, i64* %13
br label %94
94: ; preds = %104, %90
%95 = load i64, i64* %13
%96 = icmp ult i64 %95, 4096
br i1 %96, label %97, label %107
97: ; preds = %94
%98 = load i32, i32* @stderr
%99 = load i64, i64* %13
%100 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = zext i8 %101 to i32
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %102)
br label %104
104: ; preds = %97
%105 = load i64, i64* %13
%106 = add i64 %105, 1
store i64 %106, i64* %13
br label %94
107: ; preds = %94
%108 = call i32 @exit(i32 1)
unreachable
109: ; preds = %82
store i64 0, i64* @errno
%110 = load i32, i32* %12
%111 = call i64 @close(i32 %110)
%112 = icmp ne i64 %111, 0
br i1 %112, label %113, label %115
113: ; preds = %109
%114 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %115
115: ; preds = %113, %109
br label %116
116: ; preds = %115, %77
%117 = load i64, i64* %11
%118 = add i64 %117, 1
store i64 %118, i64* %11
br label %62
119: ; preds = %62
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@.str = [3 x i8] c"-h\00"
@stderr = global i32 0
@.str.1 = [51 x i8] c"usage: %s [<number of files>] [<filename length>]\0A\00"
@errno = global i64 0
@O_RDONLY = global i32 0
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.2 = [5 x i8] c"open\00"
@.str.3 = [14 x i8] c"filename was:\00"
@.str.4 = [8 x i8] c" %02hhx\00"
@.str.5 = [6 x i8] c"close\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = alloca [4096 x i8]
%5 = bitcast %struct.timeval* %3 to i8*
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %27
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %1
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %8
%19 = load i8*, i8** %9
%20 = tail call i64 @strtoul(i8* nocapture %19, i32* null, i32 0)
%21 = icmp ugt i32 %0, 2
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = tail call i64 @strtoul(i8* nocapture %24, i32* null, i32 0)
%26 = icmp ult i64 %25, 4095
br i1 %26, label %27, label %30
27: ; preds = %2, %18, %22
%28 = phi i64 [ %25, %22 ], [ 32, %18 ], [ 32, %2 ]
%29 = phi i64 [ %20, %22 ], [ %20, %18 ], [ 1, %2 ]
br label %30
30: ; preds = %22, %27
%31 = phi i64 [ %29, %27 ], [ %20, %22 ]
%32 = phi i64 [ %28, %27 ], [ 4095, %22 ]
%33 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%34 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
%35 = load i64, i64* %34
%36 = trunc i64 %35 to i32
%37 = urem i32 %36, 86400
%38 = mul nuw nsw i32 %37, 1000
%39 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%40 = load i32, i32* %39
%41 = sdiv i32 %40, 1000
%42 = add nsw i32 %38, %41
%43 = tail call i32 @srandom(i32 %42)
%44 = icmp eq i64 %31, 0
br i1 %44, label %47, label %45
45: ; preds = %30
%46 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %32
br label %48
47: ; preds = %83, %30
ret i32 0
48: ; preds = %45, %83
%49 = phi i64 [ 0, %45 ], [ %85, %83 ]
%50 = call i32 @garbage(i8* %6, i64 %32)
store i8 0, i8* %46
store i64 0, i64* @errno
%51 = load i32, i32* @O_RDONLY
%52 = call i32 (i8*, i32, ...) @open(i8* %6, i32 %51)
%53 = icmp eq i32 %52, -1
br i1 %53, label %57, label %54
54: ; preds = %48
%55 = call i64 @close(i32 %52)
%56 = add i64 %49, -1
br label %83
57: ; preds = %48
%58 = load i32, i32* @O_WRONLY
%59 = load i32, i32* @O_CREAT
%60 = or i32 %59, %58
%61 = call i32 (i8*, i32, ...) @open(i8* %6, i32 %60, i32 420)
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %57
%64 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %69
67: ; preds = %69
%68 = call i32 @exit(i32 1)
unreachable
69: ; preds = %63, %69
%70 = phi i64 [ 0, %63 ], [ %76, %69 ]
%71 = load i32, i32* @stderr
%72 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %70
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %74)
%76 = add nuw nsw i64 %70, 1
%77 = icmp eq i64 %76, 4096
br i1 %77, label %67, label %69
78: ; preds = %57
store i64 0, i64* @errno
%79 = call i64 @close(i32 %61)
%80 = icmp eq i64 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %78
%82 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %83
83: ; preds = %78, %81, %54
%84 = phi i64 [ %56, %54 ], [ %49, %81 ], [ %49, %78 ]
%85 = add i64 %84, 1
%86 = icmp ult i64 %85, %31
br i1 %86, label %48, label %47
}