#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 stat {
  int st_size;
};

/* Variables and functions */
int O_CREAT;
int O_RDWR;
int O_TRUNC;
int /*<<< orphan*/ close(int);
int errno;
int open(char *, int, int /*<<< orphan*/);
int stat(char *, struct stat *);
int /*<<< orphan*/ strcpy(char *, char *);
int const strerror(int);
int unlink(char *);
int /*<<< orphan*/ v_printf(char *, int const, ...);
int /*<<< orphan*/ write(int, char *, int const);
int process(const int write_size, const int write_iters) {
  int failed = 0;
  int fd;
  struct stat sbuf;
  char ch = 'A';
  char buf[write_size];
  char filename[4096];
  int ret;
  v_printf("s%d i%d\n", write_size, write_iters);
  for (int idx = 0; idx < write_size; idx++) {
    buf[idx] = ch;
    ++ch;
    if (ch > 'z')
      ch = 'A';
  }
  strcpy(filename, "files/stat-stat");
  fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0);
  for (int kdx = 0; kdx < write_iters; kdx++) {
    write(fd, buf, write_size);
  }
  ret = unlink(filename);
  if (ret < 0) {
    v_printf("ERROR on unlink: %d: %s\n", errno, strerror(errno));
    ++failed;
  }
  ret = stat(filename, &sbuf);
  if (ret < 0) {
    v_printf("ERROR on stat or fstat: %d: %s\n", errno, strerror(errno));
    ++failed;
  } else {
    int expected_size;
    expected_size = write_size * write_iters;
    if (sbuf.st_size == expected_size) {
      v_printf("stat-stat After write, fstat got expected size of %d\n",
               sbuf.st_size);
    } else {
      v_printf("stat-stat After write, fstat ERROR expected %d size is %d\n",
               expected_size, sbuf.st_size);
      ++failed;
    }
  }
  close(fd);
  return failed;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1050,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movb   $0x41,-0x19(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1048(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1090 <v_printf@plt>
movl   $0x0,-0x1038(%rbp)
mov    -0x1038(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1238 <process+0xb8>
mov    -0x1048(%rbp),%rax
mov    -0x19(%rbp),%dl
movslq -0x1038(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x7a,%eax
jle    121f <process+0x9f>
movb   $0x41,-0x19(%rbp)
jmp    1224 <process+0xa4>
mov    -0x1038(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1038(%rbp)
jmp    11e3 <process+0x63>
lea    -0x1030(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1030(%rbp),%rdi
mov    0x2d7f(%rip),%rax
mov    (%rax),%esi
mov    0x2d96(%rip),%rax
or     (%rax),%esi
mov    0x2d85(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1080 <open@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x103c(%rbp)
mov    -0x103c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12b6 <process+0x136>
mov    -0x1048(%rbp),%rsi
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%edx
call   1050 <write@plt>
mov    -0x103c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x103c(%rbp)
jmp    1281 <process+0x101>
lea    -0x1030(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x1034(%rbp)
cmpl   $0x0,-0x1034(%rbp)
jge    1311 <process+0x191>
mov    0x2cec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x104c(%rbp)
mov    0x2cdd(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x104c(%rbp),%esi
mov    %eax,%edx
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1090 <v_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    -0x1030(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1070 <stat@plt>
mov    %eax,-0x1034(%rbp)
cmpl   $0x0,-0x1034(%rbp)
jge    1375 <process+0x1f5>
mov    0x2c8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1050(%rbp)
mov    0x2c7e(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x1050(%rbp),%esi
mov    %eax,%edx
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1090 <v_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13cc <process+0x24c>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x1040(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1040(%rbp),%eax
jne    13a7 <process+0x227>
mov    -0x18(%rbp),%esi
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1090 <v_printf@plt>
jmp    13c7 <process+0x247>
mov    -0x1040(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1090 <v_printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13cc <process+0x24c>
mov    -0x10(%rbp),%edi
call   1060 <close@plt>
mov    -0xc(%rbp),%eax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1018,%rsp
mov    %esi,%r14d
mov    %edi,%r15d
mov    %rsp,-0x38(%rbp)
mov    %edi,%r12d
mov    %rsp,%rbx
lea    0xf(%r12),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xe46(%rip),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <v_printf@plt>
test   %r15d,%r15d
jle    1218 <process+0x98>
lea    -0x1(%r12),%rax
mov    %r12d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rax
jae    131d <process+0x19d>
mov    $0x41,%dl
xor    %ecx,%ecx
test   %r8,%r8
je     1218 <process+0x98>
add    %rbx,%rcx
xor    %esi,%esi
mov    $0x41,%edi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %dl,(%rcx,%rsi,1)
add    $0x1,%dl
cmp    $0x7b,%dl
movzbl %dl,%edx
cmovge %edi,%edx
add    $0x1,%rsi
cmp    %rsi,%r8
jne    1200 <process+0x80>
lea    0xdea(%rip),%rsi
lea    -0x1040(%rbp),%r12
mov    %r12,%rdi
call   1040 <strcpy@plt>
mov    0x2da3(%rip),%rax
mov    0x2dbc(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2da9(%rip),%rax
or     (%rax),%esi
mov    %r12,%rdi
xor    %edx,%edx
call   1080 <open@plt>
mov    %eax,%r12d
mov    %r14d,%r13d
test   %r14d,%r14d
jle    1284 <process+0x104>
mov    %r13d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %r15d,%edx
call   1050 <write@plt>
add    $0xffffffff,%r14d
jne    1270 <process+0xf0>
lea    -0x1040(%rbp),%rdi
call   1030 <unlink@plt>
test   %eax,%eax
mov    $0x0,%ebx
jns    12c0 <process+0x140>
mov    0x2d28(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10a0 <strerror@plt>
lea    0xd69(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <v_printf@plt>
mov    $0x1,%ebx
lea    -0x1040(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1070 <stat@plt>
test   %eax,%eax
js     12fa <process+0x17a>
imul   %r15d,%r13d
mov    -0x30(%rbp),%edx
cmp    %r13d,%edx
jne    1394 <process+0x214>
lea    0xd67(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1090 <v_printf@plt>
jmp    13a8 <process+0x228>
mov    0x2cc7(%rip),%rax
mov    (%rax),%r14d
mov    %r14d,%edi
call   10a0 <strerror@plt>
lea    0xd1f(%rip),%rdi
mov    %r14d,%esi
mov    %eax,%edx
jmp    139e <process+0x21e>
and    $0xfffffffc,%r12d
mov    $0x41,%al
xor    %ecx,%ecx
jmp    133f <process+0x1bf>
nopw   0x0(%rax,%rax,1)
add    $0x4,%rcx
mov    %edx,%eax
cmp    %rcx,%r12
je     11e6 <process+0x66>
mov    %al,(%rbx,%rcx,1)
add    $0x1,%al
mov    $0x41,%edx
mov    $0x41,%esi
cmp    $0x7b,%al
jge    1355 <process+0x1d5>
movzbl %al,%esi
mov    %sil,0x1(%rbx,%rcx,1)
add    $0x1,%sil
mov    $0x41,%eax
cmp    $0x7b,%sil
jge    136d <process+0x1ed>
movzbl %sil,%eax
mov    %al,0x2(%rbx,%rcx,1)
add    $0x1,%al
mov    $0x41,%esi
cmp    $0x7b,%al
jge    137f <process+0x1ff>
movzbl %al,%esi
mov    %sil,0x3(%rbx,%rcx,1)
add    $0x1,%sil
cmp    $0x7b,%sil
jge    1330 <process+0x1b0>
movzbl %sil,%edx
jmp    1330 <process+0x1b0>
lea    0xced(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1090 <v_printf@plt>
add    $0x1,%ebx
mov    %r12d,%edi
call   1060 <close@plt>
mov    -0x38(%rbp),%rsp
mov    %ebx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [9 x i8] c"s%d i%d\0A\00"
@.str.1 = [16 x i8] c"files/stat-stat\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str.2 = [25 x i8] c"ERROR on unlink: %d: %s\0A\00"
@errno = global i32 0
@.str.3 = [32 x i8] c"ERROR on stat or fstat: %d: %s\0A\00"
@.str.4 = [54 x i8] c"stat-stat After write, fstat got expected size of %d\0A\00"
@.str.5 = [59 x i8] c"stat-stat After write, fstat ERROR expected %d size is %d\0A\00"
define i32 @process(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.stat
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i64
%11 = alloca [4096 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i8 65, i8* %8
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %9
%19 = alloca i8, i64 %17
store i64 %17, i64* %10
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21)
store i32 0, i32* %13
br label %23
23: ; preds = %39, %2
%24 = load i32, i32* %13
%25 = load i32, i32* %3
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %42
27: ; preds = %23
%28 = load i8, i8* %8
%29 = load i32, i32* %13
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %19, i64 %30
store i8 %28, i8* %31
%32 = load i8, i8* %8
%33 = add i8 %32, 1
store i8 %33, i8* %8
%34 = load i8, i8* %8
%35 = sext i8 %34 to i32
%36 = icmp sgt i32 %35, 122
br i1 %36, label %37, label %38
37: ; preds = %27
store i8 65, i8* %8
br label %38
38: ; preds = %37, %27
br label %39
39: ; preds = %38
%40 = load i32, i32* %13
%41 = add nsw i32 %40, 1
store i32 %41, i32* %13
br label %23
42: ; preds = %23
%43 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%45 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%46 = load i32, i32* @O_RDWR
%47 = load i32, i32* @O_CREAT
%48 = or i32 %46, %47
%49 = load i32, i32* @O_TRUNC
%50 = or i32 %48, %49
%51 = call i32 @open(i8* %45, i32 %50, i32 0)
store i32 %51, i32* %6
store i32 0, i32* %14
br label %52
52: ; preds = %60, %42
%53 = load i32, i32* %14
%54 = load i32, i32* %4
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %63
56: ; preds = %52
%57 = load i32, i32* %6
%58 = load i32, i32* %3
%59 = call i32 @write(i32 %57, i8* %19, i32 %58)
br label %60
60: ; preds = %56
%61 = load i32, i32* %14
%62 = add nsw i32 %61, 1
store i32 %62, i32* %14
br label %52
63: ; preds = %52
%64 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%65 = call i32 @unlink(i8* %64)
store i32 %65, i32* %12
%66 = load i32, i32* %12
%67 = icmp slt i32 %66, 0
br i1 %67, label %68, label %75
68: ; preds = %63
%69 = load i32, i32* @errno
%70 = load i32, i32* @errno
%71 = call i32 @strerror(i32 %70)
%72 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %69, i32 %71)
%73 = load i32, i32* %5
%74 = add nsw i32 %73, 1
store i32 %74, i32* %5
br label %75
75: ; preds = %68, %63
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%77 = call i32 @stat(i8* %76, %struct.stat* %7)
store i32 %77, i32* %12
%78 = load i32, i32* %12
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %87
80: ; preds = %75
%81 = load i32, i32* @errno
%82 = load i32, i32* @errno
%83 = call i32 @strerror(i32 %82)
%84 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %81, i32 %83)
%85 = load i32, i32* %5
%86 = add nsw i32 %85, 1
store i32 %86, i32* %5
br label %107
87: ; preds = %75
%88 = load i32, i32* %3
%89 = load i32, i32* %4
%90 = mul nsw i32 %88, %89
store i32 %90, i32* %15
%91 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%92 = load i32, i32* %91
%93 = load i32, i32* %15
%94 = icmp eq i32 %92, %93
br i1 %94, label %95, label %99
95: ; preds = %87
%96 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%97 = load i32, i32* %96
%98 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i32 %97)
br label %106
99: ; preds = %87
%100 = load i32, i32* %15
%101 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%102 = load i32, i32* %101
%103 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %100, i32 %102)
%104 = load i32, i32* %5
%105 = add nsw i32 %104, 1
store i32 %105, i32* %5
br label %106
106: ; preds = %99, %95
br label %107
107: ; preds = %106, %80
%108 = load i32, i32* %6
%109 = call i32 @close(i32 %108)
%110 = load i32, i32* %5
%111 = load i8*, i8** %9
ret i32 %110
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"s%d i%d\0A\00"
@.str.1 = [16 x i8] c"files/stat-stat\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@.str.2 = [25 x i8] c"ERROR on unlink: %d: %s\0A\00"
@errno = global i32 0
@.str.3 = [32 x i8] c"ERROR on stat or fstat: %d: %s\0A\00"
@.str.4 = [54 x i8] c"stat-stat After write, fstat got expected size of %d\0A\00"
@.str.5 = [59 x i8] c"stat-stat After write, fstat ERROR expected %d size is %d\0A\00"
define i32 @process(i32 %0, i32 %1) {
%3 = alloca %struct.stat
%4 = alloca [4096 x i8]
%5 = bitcast %struct.stat* %3 to i8*
%6 = zext i32 %0 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = alloca i8, i64 %6
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%10 = tail call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%11 = icmp sgt i32 %0, 0
br i1 %11, label %12, label %33
12: ; preds = %2
%13 = add nsw i64 %6, -1
%14 = and i64 %6, 3
%15 = icmp ult i64 %13, 3
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = and i64 %6, 4294967292
br label %42
18: ; preds = %42, %12
%19 = phi i64 [ 0, %12 ], [ %65, %42 ]
%20 = phi i8 [ 65, %12 ], [ %64, %42 ]
%21 = icmp eq i64 %14, 0
br i1 %21, label %33, label %22
22: ; preds = %18, %22
%23 = phi i64 [ %30, %22 ], [ %19, %18 ]
%24 = phi i8 [ %29, %22 ], [ %20, %18 ]
%25 = phi i64 [ %31, %22 ], [ 0, %18 ]
%26 = getelementptr inbounds i8, i8* %8, i64 %23
store i8 %24, i8* %26
%27 = add i8 %24, 1
%28 = icmp sgt i8 %27, 122
%29 = select i1 %28, i8 65, i8 %27
%30 = add nuw nsw i64 %23, 1
%31 = add i64 %25, 1
%32 = icmp eq i64 %31, %14
br i1 %32, label %33, label %22
33: ; preds = %18, %22, %2
%34 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%35 = load i32, i32* @O_RDWR
%36 = load i32, i32* @O_CREAT
%37 = or i32 %36, %35
%38 = load i32, i32* @O_TRUNC
%39 = or i32 %37, %38
%40 = call i32 @open(i8* %9, i32 %39, i32 0)
%41 = icmp sgt i32 %1, 0
br i1 %41, label %71, label %68
42: ; preds = %42, %16
%43 = phi i64 [ 0, %16 ], [ %65, %42 ]
%44 = phi i8 [ 65, %16 ], [ %64, %42 ]
%45 = phi i64 [ 0, %16 ], [ %66, %42 ]
%46 = getelementptr inbounds i8, i8* %8, i64 %43
store i8 %44, i8* %46
%47 = add i8 %44, 1
%48 = icmp sgt i8 %47, 122
%49 = select i1 %48, i8 65, i8 %47
%50 = or i64 %43, 1
%51 = getelementptr inbounds i8, i8* %8, i64 %50
store i8 %49, i8* %51
%52 = add i8 %49, 1
%53 = icmp sgt i8 %52, 122
%54 = select i1 %53, i8 65, i8 %52
%55 = or i64 %43, 2
%56 = getelementptr inbounds i8, i8* %8, i64 %55
store i8 %54, i8* %56
%57 = add i8 %54, 1
%58 = icmp sgt i8 %57, 122
%59 = select i1 %58, i8 65, i8 %57
%60 = or i64 %43, 3
%61 = getelementptr inbounds i8, i8* %8, i64 %60
store i8 %59, i8* %61
%62 = add i8 %59, 1
%63 = icmp sgt i8 %62, 122
%64 = select i1 %63, i8 65, i8 %62
%65 = add nuw nsw i64 %43, 4
%66 = add i64 %45, 4
%67 = icmp eq i64 %66, %17
br i1 %67, label %18, label %42
68: ; preds = %71, %33
%69 = call i32 @unlink(i8* %9)
%70 = icmp slt i32 %69, 0
br i1 %70, label %76, label %80
71: ; preds = %33, %71
%72 = phi i32 [ %74, %71 ], [ 0, %33 ]
%73 = call i32 @write(i32 %40, i8* %8, i32 %0)
%74 = add nuw nsw i32 %72, 1
%75 = icmp eq i32 %74, %1
br i1 %75, label %68, label %71
76: ; preds = %68
%77 = load i32, i32* @errno
%78 = call i32 @strerror(i32 %77)
%79 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %77, i32 %78)
br label %80
80: ; preds = %76, %68
%81 = phi i32 [ 1, %76 ], [ 0, %68 ]
%82 = call i32 @stat(i8* %9, %struct.stat* %3)
%83 = icmp slt i32 %82, 0
br i1 %83, label %84, label %89
84: ; preds = %80
%85 = load i32, i32* @errno
%86 = call i32 @strerror(i32 %85)
%87 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %85, i32 %86)
%88 = add nuw nsw i32 %81, 1
br label %99
89: ; preds = %80
%90 = mul nsw i32 %1, %0
%91 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%92 = load i32, i32* %91
%93 = icmp eq i32 %92, %90
br i1 %93, label %94, label %96
94: ; preds = %89
%95 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i32 %90)
br label %99
96: ; preds = %89
%97 = call i32 (i8*, i32, ...) @v_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %90, i32 %92)
%98 = add nuw nsw i32 %81, 1
br label %99
99: ; preds = %94, %96, %84
%100 = phi i32 [ %88, %84 ], [ %81, %94 ], [ %98, %96 ]
%101 = call i32 @close(i32 %40)
ret i32 %100
}