#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 */
scalar_t__ EOF;
int /*<<< orphan*/ bzero(char *, int);
scalar_t__ ferror(int /*<<< orphan*/);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  FILE *outfile1, *outfile2;
  char buf[(1024)];
  register int evenline = 0;
  switch (argc) {
  case 4:
    if (!freopen(argv[3], "r", stdin)) {
      fprintf(stderr, "%s: can't open %s for reading.\n", argv[0], argv[3]);
      return 1;
    }
  case 3:
    if (!(outfile1 = fopen(argv[1], "w"))) {
      fprintf(stderr, "%s: can't open %s for writing.\n", argv[0], argv[1]);
      return 1;
    }
    if (!(outfile2 = fopen(argv[2], "w"))) {
      fprintf(stderr, "%s: can't open %s for writing.\n", argv[0], argv[2]);
      return 1;
    }
    break;
  default:
    fprintf(stderr,
            "usage: %s outfile1 outfile2 [infile]\n"
            "warning: input lines greater than around %d won't work.\n",
            argv[0], (1024));
    return 1;
  }
  bzero(buf, (1024));
  while (fgets(buf, (1024), stdin)) {
    if (buf[(1024) - 2]) {
      fprintf(stderr, "%s: line longer than %d detected, terminating\n",
              argv[0], (1024));
      return 1;
    }
    if (evenline) {
      if ((fputs(buf, outfile2)) == EOF) {
        fprintf(stderr, "%s: error writing to %s\n", argv[0], argv[2]);
        return 1;
      }
    } else {
      if ((fputs(buf, outfile1)) == EOF) {
        fprintf(stderr, "%s: error writing to %s\n", argv[0], argv[1]);
        return 1;
      }
    }
    evenline = (!evenline);
  }
  if (ferror(stdin)) {
    fprintf(stderr, "%s: error reading input.\n", argv[0]);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x424(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x428(%rbp)
sub    $0x3,%eax
je     121b <main+0xab>
jmp    11aa <main+0x3a>
mov    -0x428(%rbp),%eax
sub    $0x4,%eax
jne    12c8 <main+0x158>
jmp    11be <main+0x4e>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0x2e1b(%rip),%rax
mov    (%rax),%edx
lea    0xe2a(%rip),%rsi
call   1050 <freopen@plt>
cmp    $0x0,%eax
jne    1216 <main+0xa6>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rcx
lea    0xdff(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
jmp    121b <main+0xab>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf8(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    126f <main+0xff>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xdc8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xda4(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12c3 <main+0x153>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xd74(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
jmp    12f7 <main+0x187>
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd65(%rip),%rsi
mov    $0x400,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
lea    -0x420(%rbp),%rdi
mov    $0x400,%esi
call   1090 <bzero@plt>
lea    -0x420(%rbp),%rdi
mov    0x2cd2(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     143c <main+0x2cc>
cmpb   $0x0,-0x22(%rbp)
je     1365 <main+0x1f5>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd55(%rip),%rsi
mov    $0x400,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
cmpl   $0x0,-0x424(%rbp)
je     13c9 <main+0x259>
lea    -0x420(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <fputs@plt>
mov    0x2c57(%rip),%rcx
cmp    (%rcx),%rax
jne    13c4 <main+0x254>
mov    0x2c37(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xd20(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
jmp    1420 <main+0x2b0>
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fputs@plt>
mov    0x2c00(%rip),%rcx
cmp    (%rcx),%rax
jne    141b <main+0x2ab>
mov    0x2be0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xcc9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
jmp    1420 <main+0x2b0>
cmpl   $0x0,-0x424(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x424(%rbp)
jmp    1308 <main+0x198>
mov    0x2ba5(%rip),%rax
mov    (%rax),%edi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     147e <main+0x30e>
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc7f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1485 <main+0x315>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rsi,%r12
cmp    $0x3,%edi
je     11b4 <main+0x44>
cmp    $0x4,%edi
jne    12a2 <main+0x132>
mov    0x18(%r12),%rdi
mov    0x2e4a(%rip),%rax
mov    (%rax),%edx
lea    0xe59(%rip),%rsi
call   1050 <freopen@plt>
test   %eax,%eax
je     12f3 <main+0x183>
mov    0x8(%r12),%rdi
lea    0xe62(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12c4 <main+0x154>
mov    %rax,%r14
mov    0x10(%r12),%rdi
lea    0xe45(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12d8 <main+0x168>
mov    %rax,%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1090 <bzero@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     132a <main+0x1ba>
xor    %ebp,%ebp
mov    %rsp,%rbx
mov    0x2db7(%rip),%r13
jmp    1264 <main+0xf4>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1040 <fputs@plt>
cmp    0x0(%r13),%rax
je     1377 <main+0x207>
xor    $0x1,%ebp
mov    0x2d9c(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     132a <main+0x1ba>
cmpb   $0x0,0x3fe(%rsp)
jne    135a <main+0x1ea>
mov    %rbx,%rdi
test   %ebp,%ebp
je     1230 <main+0xc0>
mov    %r15,%rsi
call   1040 <fputs@plt>
cmp    0x0(%r13),%rax
jne    1242 <main+0xd2>
mov    0x2d42(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x10(%r12),%rcx
lea    0xe31(%rip),%rsi
jmp    130c <main+0x19c>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xd8e(%rip),%rsi
mov    $0x400,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1313 <main+0x1a3>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x8(%r12),%rcx
jmp    12ea <main+0x17a>
mov    0x2cf1(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x10(%r12),%rcx
lea    0xd33(%rip),%rsi
jmp    130c <main+0x19c>
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x18(%r12),%rcx
lea    0xcf6(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
call   1030 <ferror@plt>
test   %rax,%rax
je     1373 <main+0x203>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xd99(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1313 <main+0x1a3>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xd34(%rip),%rsi
jmp    12b6 <main+0x146>
xor    %eax,%eax
jmp    1318 <main+0x1a8>
mov    0x2c52(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x8(%r12),%rcx
lea    0xd41(%rip),%rsi
jmp    130c <main+0x19c>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stdin = global i32 0
@stderr = global i32 0
@.str.1 = [32 x i8] c"%s: can't open %s for reading.\0A\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [32 x i8] c"%s: can't open %s for writing.\0A\00"
@.str.4 = [94 x i8] c"usage: %s outfile1 outfile2 [infile]\0Awarning: input lines greater than around %d won't work.\0A\00"
@.str.5 = [47 x i8] c"%s: line longer than %d detected, terminating\0A\00"
@EOF = global i64 0
@.str.6 = [25 x i8] c"%s: error writing to %s\0A\00"
@.str.7 = [26 x i8] c"%s: error reading input.\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 [1024 x i8]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
%10 = load i32, i32* %4
switch i32 %10, label %59 [
i32 4, label %11
i32 3, label %28
]
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 3
%14 = load i8*, i8** %13
%15 = load i32, i32* @stdin
%16 = call i32 @freopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %27, label %18
18: ; preds = %11
%19 = load i32, i32* @stderr
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 3
%25 = load i8*, i8** %24
%26 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %22, i8* %25)
store i32 1, i32* %3
br label %134
27: ; preds = %11
br label %28
28: ; preds = %2, %27
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %32, i32** %6
%33 = icmp ne i32* %32, null
br i1 %33, label %43, label %34
34: ; preds = %28
%35 = load i32, i32* @stderr
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %38, i8* %41)
store i32 1, i32* %3
br label %134
43: ; preds = %28
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 2
%46 = load i8*, i8** %45
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %47, i32** %7
%48 = icmp ne i32* %47, null
br i1 %48, label %58, label %49
49: ; preds = %43
%50 = load i32, i32* @stderr
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 0
%53 = load i8*, i8** %52
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 2
%56 = load i8*, i8** %55
%57 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %53, i8* %56)
store i32 1, i32* %3
br label %134
58: ; preds = %43
br label %65
59: ; preds = %2
%60 = load i32, i32* @stderr
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 0
%63 = load i8*, i8** %62
%64 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.4, i64 0, i64 0), i8* %63, i32 1024)
store i32 1, i32* %3
br label %134
65: ; preds = %58
%66 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%67 = call i32 @bzero(i8* %66, i32 1024)
br label %68
68: ; preds = %118, %65
%69 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%70 = load i32, i32* @stdin
%71 = call i64 @fgets(i8* %69, i32 1024, i32 %70)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %123
73: ; preds = %68
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 1022
%75 = load i8, i8* %74
%76 = icmp ne i8 %75, 0
br i1 %76, label %77, label %83
77: ; preds = %73
%78 = load i32, i32* @stderr
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 0
%81 = load i8*, i8** %80
%82 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* %81, i32 1024)
store i32 1, i32* %3
br label %134
83: ; preds = %73
%84 = load i32, i32* %9
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %102
86: ; preds = %83
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%88 = load i32*, i32** %7
%89 = call i64 @fputs(i8* %87, i32* %88)
%90 = load i64, i64* @EOF
%91 = icmp eq i64 %89, %90
br i1 %91, label %92, label %101
92: ; preds = %86
%93 = load i32, i32* @stderr
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 0
%96 = load i8*, i8** %95
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 2
%99 = load i8*, i8** %98
%100 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %96, i8* %99)
store i32 1, i32* %3
br label %134
101: ; preds = %86
br label %118
102: ; preds = %83
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%104 = load i32*, i32** %6
%105 = call i64 @fputs(i8* %103, i32* %104)
%106 = load i64, i64* @EOF
%107 = icmp eq i64 %105, %106
br i1 %107, label %108, label %117
108: ; preds = %102
%109 = load i32, i32* @stderr
%110 = load i8**, i8*** %5
%111 = getelementptr inbounds i8*, i8** %110, i64 0
%112 = load i8*, i8** %111
%113 = load i8**, i8*** %5
%114 = getelementptr inbounds i8*, i8** %113, i64 1
%115 = load i8*, i8** %114
%116 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %112, i8* %115)
store i32 1, i32* %3
br label %134
117: ; preds = %102
br label %118
118: ; preds = %117, %101
%119 = load i32, i32* %9
%120 = icmp ne i32 %119, 0
%121 = xor i1 %120, true
%122 = zext i1 %121 to i32
store i32 %122, i32* %9
br label %68
123: ; preds = %68
%124 = load i32, i32* @stdin
%125 = call i64 @ferror(i32 %124)
%126 = icmp ne i64 %125, 0
br i1 %126, label %127, label %133
127: ; preds = %123
%128 = load i32, i32* @stderr
%129 = load i8**, i8*** %5
%130 = getelementptr inbounds i8*, i8** %129, i64 0
%131 = load i8*, i8** %130
%132 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8* %131)
store i32 1, i32* %3
br label %134
133: ; preds = %123
store i32 0, i32* %3
br label %134
134: ; preds = %133, %127, %108, %92, %77, %59, %49, %34, %18
%135 = load i32, i32* %3
ret i32 %135
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stdin = global i32 0
@stderr = global i32 0
@.str.1 = [32 x i8] c"%s: can't open %s for reading.\0A\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [32 x i8] c"%s: can't open %s for writing.\0A\00"
@.str.4 = [94 x i8] c"usage: %s outfile1 outfile2 [infile]\0Awarning: input lines greater than around %d won't work.\0A\00"
@.str.5 = [47 x i8] c"%s: line longer than %d detected, terminating\0A\00"
@EOF = global i64 0
@.str.6 = [25 x i8] c"%s: error writing to %s\0A\00"
@.str.7 = [26 x i8] c"%s: error reading input.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
switch i32 %0, label %36 [
i32 4, label %5
i32 3, label %16
]
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 3
%7 = load i8*, i8** %6
%8 = load i32, i32* @stdin
%9 = tail call i32 @freopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %1
%14 = load i8*, i8** %6
%15 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %14)
br label %88
16: ; preds = %5, %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32* @fopen(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %26
21: ; preds = %16
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %1
%24 = load i8*, i8** %17
%25 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %23, i8* %24)
br label %88
26: ; preds = %16
%27 = getelementptr inbounds i8*, i8** %1, i64 2
%28 = load i8*, i8** %27
%29 = tail call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %40
31: ; preds = %26
%32 = load i32, i32* @stderr
%33 = load i8*, i8** %1
%34 = load i8*, i8** %27
%35 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %33, i8* %34)
br label %88
36: ; preds = %2
%37 = load i32, i32* @stderr
%38 = load i8*, i8** %1
%39 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.4, i64 0, i64 0), i8* %38, i32 1024)
br label %88
40: ; preds = %26
%41 = call i32 @bzero(i8* %4, i32 1024)
%42 = load i32, i32* @stdin
%43 = call i64 @fgets(i8* %4, i32 1024, i32 %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %80, label %45
45: ; preds = %40
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1022
br label %47
47: ; preds = %45, %75
%48 = phi i32 [ 0, %45 ], [ %76, %75 ]
%49 = load i8, i8* %46
%50 = icmp eq i8 %49, 0
br i1 %50, label %55, label %51
51: ; preds = %47
%52 = load i32, i32* @stderr
%53 = load i8*, i8** %1
%54 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* %53, i32 1024)
br label %88
55: ; preds = %47
%56 = icmp eq i32 %48, 0
br i1 %56, label %66, label %57
57: ; preds = %55
%58 = call i64 @fputs(i8* %4, i32* %29)
%59 = load i64, i64* @EOF
%60 = icmp eq i64 %58, %59
br i1 %60, label %61, label %75
61: ; preds = %57
%62 = load i32, i32* @stderr
%63 = load i8*, i8** %1
%64 = load i8*, i8** %27
%65 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %63, i8* %64)
br label %88
66: ; preds = %55
%67 = call i64 @fputs(i8* %4, i32* %19)
%68 = load i64, i64* @EOF
%69 = icmp eq i64 %67, %68
br i1 %69, label %70, label %75
70: ; preds = %66
%71 = load i32, i32* @stderr
%72 = load i8*, i8** %1
%73 = load i8*, i8** %17
%74 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %72, i8* %73)
br label %88
75: ; preds = %66, %57
%76 = xor i32 %48, 1
%77 = load i32, i32* @stdin
%78 = call i64 @fgets(i8* %4, i32 1024, i32 %77)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %47
80: ; preds = %75, %40
%81 = load i32, i32* @stdin
%82 = call i64 @ferror(i32 %81)
%83 = icmp eq i64 %82, 0
br i1 %83, label %88, label %84
84: ; preds = %80
%85 = load i32, i32* @stderr
%86 = load i8*, i8** %1
%87 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8* %86)
br label %88
88: ; preds = %80, %84, %70, %61, %51, %36, %31, %21, %11
%89 = phi i32 [ 1, %36 ], [ 1, %51 ], [ 1, %61 ], [ 1, %70 ], [ 1, %84 ], [ 1, %31 ], [ 1, %21 ], [ 1, %11 ], [ 0, %80 ]
ret i32 %89
}