#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
size_t fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv, char **envp) {
  FILE *fout;
  size_t read_bytes;
  char input[BUFSIZ], outfile[255], time_as_str[20];
  (void)argc;
  sprintf(time_as_str, "%zu", time(NULL));
  strcpy(outfile, "/tmp/alleyes.");
  strcat(outfile, time_as_str);
  if (!(fout = fopen(outfile, "w"))) {
    fprintf(stderr, "alleyes: cannot open outfile for writing!\n");
    exit(1);
  }
  fputs("** Arguments **\n", fout);
  while (*argv)
    fprintf(fout, "%s\n", *argv++);
  fputc('\n', fout);
  fputs("** Environment **\n", fout);
  while (*envp)
    fprintf(fout, "%s\n", *envp++);
  fputc('\n', fout);
  fputs("** Standard Input **\n", fout);
  while ((read_bytes = fread(input, sizeof(*input), BUFSIZ, stdin))) {
    if (ferror(stdin)) {
      fprintf(stderr, "alleyes: error while reading stdin!\n");
      exit(2);
    }
    fwrite(input, sizeof(*input), read_bytes, fout);
    if (ferror(fout)) {
      fprintf(stderr, "alleyes: error while writing stdout!\n");
      exit(3);
    }
    if (feof(stdin))
      break;
  }
  fclose(fout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2dcc(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x170(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
lea    -0x160(%rbp),%rax
mov    %rax,-0x168(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <time@plt>
mov    -0x168(%rbp),%rdi
mov    %eax,%edx
lea    0xdad(%rip),%rsi
call   10e0 <sprintf@plt>
lea    -0x140(%rbp),%rdi
lea    0xd9e(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x140(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   10d0 <strcat@plt>
lea    -0x140(%rbp),%rdi
lea    0xd86(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12c0 <main+0xe0>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
lea    0xd65(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x20(%rbp),%rsi
lea    0xd74(%rip),%rdi
call   1070 <fputs@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1309 <main+0x129>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rdx
lea    0xd53(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    12d0 <main+0xf0>
mov    -0x20(%rbp),%rsi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rsi
lea    0xd32(%rip),%rdi
call   1070 <fputs@plt>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1360 <main+0x180>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rdx
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1327 <main+0x147>
mov    -0x20(%rbp),%rsi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    -0x20(%rbp),%rsi
lea    0xcee(%rip),%rdi
call   1070 <fputs@plt>
mov    -0x170(%rbp),%rdi
mov    0x2c44(%rip),%rax
mov    (%rax),%edx
mov    0x2c53(%rip),%rax
mov    (%rax),%rcx
mov    $0x1,%esi
call   1050 <fread@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     145a <main+0x27a>
mov    0x2c31(%rip),%rax
mov    (%rax),%rdi
call   1040 <ferror@plt>
cmp    $0x0,%rax
je     13ea <main+0x20a>
mov    0x2c08(%rip),%rax
mov    (%rax),%edi
lea    0xca4(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x2,%edi
call   10f0 <exit@plt>
mov    -0x170(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1100 <fwrite@plt>
mov    -0x20(%rbp),%rdi
call   1040 <ferror@plt>
cmp    $0x0,%rax
je     1437 <main+0x257>
mov    0x2bbb(%rip),%rax
mov    (%rax),%edi
lea    0xc7c(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x3,%edi
call   10f0 <exit@plt>
mov    0x2baa(%rip),%rax
mov    (%rax),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%rax
je     1455 <main+0x275>
jmp    145a <main+0x27a>
jmp    137e <main+0x19e>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %rdx,%r12
mov    %rsi,%rbx
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
xor    %edi,%edi
call   10a0 <time@plt>
lea    0xdee(%rip),%rsi
lea    -0x40(%rbp),%r15
mov    %r15,%rdi
mov    %eax,%edx
call   10d0 <sprintf@plt>
lea    0xddd(%rip),%rsi
lea    -0x140(%rbp),%r13
mov    %r13,%rdi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   10c0 <strcat@plt>
lea    0xdca(%rip),%rsi
mov    %r13,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     13f4 <main+0x224>
mov    %rax,%r15
lea    0xddc(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10f0 <fwrite@plt>
mov    (%rbx),%rdx
test   %rdx,%rdx
je     12a9 <main+0xd9>
add    $0x8,%rbx
lea    0xdc8(%rip),%r13
nopl   0x0(%rax,%rax,1)
mov    %r15d,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%rbx),%rdx
add    $0x8,%rbx
test   %rdx,%rdx
jne    1290 <main+0xc0>
mov    $0xa,%edi
mov    %r15,%rsi
call   1070 <fputc@plt>
lea    0xd97(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10f0 <fwrite@plt>
mov    (%r12),%rdx
test   %rdx,%rdx
je     130a <main+0x13a>
add    $0x8,%r12
lea    0xd6d(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15d,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%r12),%rdx
add    $0x8,%r12
test   %rdx,%rdx
jne    12f0 <main+0x120>
mov    $0xa,%edi
mov    %r15,%rsi
call   1070 <fputc@plt>
lea    0xd49(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10f0 <fwrite@plt>
mov    0x2cb1(%rip),%r12
mov    0x2c92(%rip),%r13
xchg   %ax,%ax
mov    0x0(%r13),%edx
mov    (%r12),%rcx
mov    %r14,%rdi
mov    $0x1,%esi
call   1050 <fread@plt>
test   %rax,%rax
je     1399 <main+0x1c9>
mov    %rax,%rbx
mov    (%r12),%rdi
call   1040 <ferror@plt>
test   %rax,%rax
jne    13b2 <main+0x1e2>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
call   10f0 <fwrite@plt>
mov    %r15,%rdi
call   1040 <ferror@plt>
test   %rax,%rax
jne    13d3 <main+0x203>
mov    (%r12),%rdi
call   1090 <feof@plt>
test   %rax,%rax
je     1340 <main+0x170>
mov    %r15,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
lea    0xcbb(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x2,%edi
call   10e0 <exit@plt>
mov    0x2bfe(%rip),%rax
mov    (%rax),%edi
lea    0xcbf(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x3,%edi
call   10e0 <exit@plt>
mov    0x2bdd(%rip),%rax
mov    (%rax),%edi
lea    0xc10(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [4 x i8] c"%zu\00"
@.str.1 = [14 x i8] c"/tmp/alleyes.\00"
@.str.2 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.3 = [43 x i8] c"alleyes: cannot open outfile for writing!\0A\00"
@.str.4 = [17 x i8] c"** Arguments **\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [19 x i8] c"** Environment **\0A\00"
@.str.7 = [22 x i8] c"** Standard Input **\0A\00"
@stdin = global i32* null
@.str.8 = [37 x i8] c"alleyes: error while reading stdin!\0A\00"
@.str.9 = [38 x i8] c"alleyes: error while writing stdout!\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca [255 x i8]
%13 = alloca [20 x i8]
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%14 = load i32, i32* @BUFSIZ
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %10
%17 = alloca i8, i64 %15
store i64 %15, i64* %11
%18 = load i32, i32* %5
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%20 = call i32 @time(i32* null)
%21 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [255 x i8], [255 x i8]* %12, i64 0, i64 0
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%24 = getelementptr inbounds [255 x i8], [255 x i8]* %12, i64 0, i64 0
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%26 = call i32 @strcat(i8* %24, i8* %25)
%27 = getelementptr inbounds [255 x i8], [255 x i8]* %12, i64 0, i64 0
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %28, i32** %8
%29 = icmp ne i32* %28, null
br i1 %29, label %34, label %30
30: ; preds = %3
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %3
%35 = load i32*, i32** %8
%36 = call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32* %35)
br label %37
37: ; preds = %41, %34
%38 = load i8**, i8*** %6
%39 = load i8*, i8** %38
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %48
41: ; preds = %37
%42 = load i32*, i32** %8
%43 = ptrtoint i32* %42 to i32
%44 = load i8**, i8*** %6
%45 = getelementptr inbounds i8*, i8** %44, i32 1
store i8** %45, i8*** %6
%46 = load i8*, i8** %44
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %46)
br label %37
48: ; preds = %37
%49 = load i32*, i32** %8
%50 = call i32 @fputc(i8 signext 10, i32* %49)
%51 = load i32*, i32** %8
%52 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32* %51)
br label %53
53: ; preds = %57, %48
%54 = load i8**, i8*** %7
%55 = load i8*, i8** %54
%56 = icmp ne i8* %55, null
br i1 %56, label %57, label %64
57: ; preds = %53
%58 = load i32*, i32** %8
%59 = ptrtoint i32* %58 to i32
%60 = load i8**, i8*** %7
%61 = getelementptr inbounds i8*, i8** %60, i32 1
store i8** %61, i8*** %7
%62 = load i8*, i8** %60
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %62)
br label %53
64: ; preds = %53
%65 = load i32*, i32** %8
%66 = call i32 @fputc(i8 signext 10, i32* %65)
%67 = load i32*, i32** %8
%68 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32* %67)
br label %69
69: ; preds = %98, %64
%70 = load i32, i32* @BUFSIZ
%71 = load i32*, i32** @stdin
%72 = call i64 @fread(i8* %17, i32 1, i32 %70, i32* %71)
store i64 %72, i64* %9
%73 = icmp ne i64 %72, 0
br i1 %73, label %74, label %99
74: ; preds = %69
%75 = load i32*, i32** @stdin
%76 = call i64 @ferror(i32* %75)
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %82
78: ; preds = %74
%79 = load i32, i32* @stderr
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%81 = call i32 @exit(i32 2)
unreachable
82: ; preds = %74
%83 = load i64, i64* %9
%84 = load i32*, i32** %8
%85 = call i32 @fwrite(i8* %17, i32 1, i64 %83, i32* %84)
%86 = load i32*, i32** %8
%87 = call i64 @ferror(i32* %86)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %82
%90 = load i32, i32* @stderr
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%92 = call i32 @exit(i32 3)
unreachable
93: ; preds = %82
%94 = load i32*, i32** @stdin
%95 = call i64 @feof(i32* %94)
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %98
97: ; preds = %93
br label %99
98: ; preds = %93
br label %69
99: ; preds = %97, %69
%100 = load i32*, i32** %8
%101 = call i32 @fclose(i32* %100)
store i32 0, i32* %4
%102 = load i8*, i8** %10
%103 = load i32, i32* %4
ret i32 %103
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [4 x i8] c"%zu\00"
@.str.1 = [14 x i8] c"/tmp/alleyes.\00"
@.str.2 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.3 = [43 x i8] c"alleyes: cannot open outfile for writing!\0A\00"
@.str.4 = [17 x i8] c"** Arguments **\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [19 x i8] c"** Environment **\0A\00"
@.str.7 = [22 x i8] c"** Standard Input **\0A\00"
@stdin = global i32* null
@.str.8 = [37 x i8] c"alleyes: error while reading stdin!\0A\00"
@.str.9 = [38 x i8] c"alleyes: error while writing stdout!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture %2) {
%4 = alloca [255 x i8]
%5 = alloca [20 x i8]
%6 = load i32, i32* @BUFSIZ
%7 = zext i32 %6 to i64
%8 = alloca i8, i64 %7
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%11 = tail call i32 @time(i32* null)
%12 = call i32 @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @strcat(i8* %9, i8* %10)
%15 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %21
17: ; preds = %3
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %3
%22 = call i64 bitcast (i32 (i8*, i32, i64, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i64 16, i64 1, i32* %15)
%23 = load i8*, i8** %1
%24 = icmp eq i8* %23, null
br i1 %24, label %35, label %25
25: ; preds = %21
%26 = ptrtoint i32* %15 to i64
%27 = trunc i64 %26 to i32
br label %28
28: ; preds = %25, %28
%29 = phi i8* [ %23, %25 ], [ %33, %28 ]
%30 = phi i8** [ %1, %25 ], [ %31, %28 ]
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %29)
%33 = load i8*, i8** %31
%34 = icmp eq i8* %33, null
br i1 %34, label %35, label %28
35: ; preds = %28, %21
%36 = call i32 @fputc(i8 signext 10, i32* %15)
%37 = call i64 bitcast (i32 (i8*, i32, i64, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i64 18, i64 1, i32* %15)
%38 = load i8*, i8** %2
%39 = icmp eq i8* %38, null
br i1 %39, label %50, label %40
40: ; preds = %35
%41 = ptrtoint i32* %15 to i64
%42 = trunc i64 %41 to i32
br label %43
43: ; preds = %40, %43
%44 = phi i8* [ %38, %40 ], [ %48, %43 ]
%45 = phi i8** [ %2, %40 ], [ %46, %43 ]
%46 = getelementptr inbounds i8*, i8** %45, i64 1
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %44)
%48 = load i8*, i8** %46
%49 = icmp eq i8* %48, null
br i1 %49, label %50, label %43
50: ; preds = %43, %35
%51 = call i32 @fputc(i8 signext 10, i32* %15)
%52 = call i64 bitcast (i32 (i8*, i32, i64, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i64 21, i64 1, i32* %15)
br label %53
53: ; preds = %74, %50
%54 = load i32, i32* @BUFSIZ
%55 = load i32*, i32** @stdin
%56 = call i64 @fread(i8* %8, i32 1, i32 %54, i32* %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %78, label %58
58: ; preds = %53
%59 = load i32*, i32** @stdin
%60 = call i64 @ferror(i32* %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %58
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%65 = call i32 @exit(i32 2)
unreachable
66: ; preds = %58
%67 = call i32 @fwrite(i8* %8, i32 1, i64 %56, i32* %15)
%68 = call i64 @ferror(i32* %15)
%69 = icmp eq i64 %68, 0
br i1 %69, label %74, label %70
70: ; preds = %66
%71 = load i32, i32* @stderr
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%73 = call i32 @exit(i32 3)
unreachable
74: ; preds = %66
%75 = load i32*, i32** @stdin
%76 = call i64 @feof(i32* %75)
%77 = icmp eq i64 %76, 0
br i1 %77, label %53, label %78
78: ; preds = %74, %53
%79 = call i32 @fclose(i32* %15)
ret i32 0
}