#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 /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int main(void) {
  FILE *f;
  unsigned long i;
  static char *ws = " \f\t\v";
  static char *al = "abcdefghijklmnopqrstuvwxyz";
  static char *i5 = "a b c d e f g h i j k l m "
                    "n o p q r s t u v w x y z "
                    "a b c d e f g h i j k l m "
                    "n o p q r s t u v w x y z "
                    "a b c d e f g h i j k l m "
                    "n\n";
  f = fopen("test0", "w");
  assert(f != NULL);
  fclose(f);
  f = fopen("test1", "w");
  assert(f != NULL);
  for (i = 0; i < ((66000ul / 26) + 1); i++)
    fputs(al, f);
  fclose(f);
  f = fopen("test2", "w");
  assert(f != NULL);
  for (i = 0; i < ((66000ul / 4) + 1); i++)
    fputs(ws, f);
  fclose(f);
  f = fopen("test3", "w");
  assert(f != NULL);
  for (i = 0; i < 66000; i++)
    fputc('\n', f);
  fclose(f);
  f = fopen("test4", "w");
  assert(f != NULL);
  fputs("word", f);
  for (i = 0; i < ((66000ul / 26) + 1); i++)
    fputs(ws, f);
  fputs("word", f);
  fclose(f);
  f = fopen("test5", "w");
  assert(f != NULL);
  for (i = 0; i < 1000; i++)
    fputs(i5, f);
  fclose(f);
  f = fopen("test6", "w");
  assert(f != NULL);
  for (i = 0; i < 66000; i++)
    fputs("word ", f);
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf3f(%rip),%rdi
lea    0xf3e(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xf15(%rip),%rdi
lea    0xf0c(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x9eb,-0x18(%rbp)
jae    11f1 <main+0xa1>
mov    0x2e79(%rip),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11c2 <main+0x72>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xeb2(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x4075,-0x18(%rbp)
jae    125a <main+0x10a>
mov    0x2e08(%rip),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    122b <main+0xdb>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xe4f(%rip),%rdi
lea    0xe3a(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x101d0,-0x18(%rbp)
jae    12c1 <main+0x171>
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1050 <fputc@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1294 <main+0x144>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdee(%rip),%rdi
lea    0xdd3(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rsi
lea    0xdc7(%rip),%rdi
call   1040 <fputs@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x9eb,-0x18(%rbp)
jae    133a <main+0x1ea>
mov    0x2d28(%rip),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    130b <main+0x1bb>
mov    -0x10(%rbp),%rsi
lea    0xd80(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd70(%rip),%rdi
lea    0xd4a(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x3e8,-0x18(%rbp)
jae    13b3 <main+0x263>
mov    0x2cbf(%rip),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1384 <main+0x234>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd0d(%rip),%rdi
lea    0xce1(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x101d0,-0x18(%rbp)
jae    141c <main+0x2cc>
mov    -0x10(%rbp),%rsi
lea    0xcd0(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    13ed <main+0x29d>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xf49(%rip),%rdi
lea    0xf48(%rip),%r14
mov    %r14,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xf22(%rip),%rdi
mov    %r14,%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    $0x9eb,%ebx
lea    0xe55(%rip),%r14
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0xffffffffffffffff,%rbx
jne    11b0 <main+0x60>
mov    %r15,%rdi
call   1030 <fclose@plt>
lea    0xed9(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    $0x4075,%ebx
lea    0xdfd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0xffffffffffffffff,%rbx
jne    1210 <main+0xc0>
mov    %r15,%rdi
call   1030 <fclose@plt>
lea    0xe7f(%rip),%rdi
lea    0xe6a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    $0x101d0,%ebx
nopl   0x0(%rax)
mov    $0xa,%edi
mov    %r14,%rsi
call   1040 <fputc@plt>
add    $0xffffffffffffffff,%rbx
jne    1260 <main+0x110>
mov    %r14,%rdi
call   1030 <fclose@plt>
lea    0xe3d(%rip),%rdi
lea    0xe22(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
lea    0xe1f(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1070 <fwrite@plt>
mov    $0x9eb,%ebx
lea    0xd3c(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0xffffffffffffffff,%rbx
jne    12d0 <main+0x180>
lea    0xdd3(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1070 <fwrite@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
lea    0xdb7(%rip),%rdi
lea    0xd91(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    $0x3e8,%ebx
lea    0xce4(%rip),%r14
nopl   0x0(%rax)
mov    $0x84,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0xffffffffffffffff,%rbx
jne    1340 <main+0x1f0>
mov    %r15,%rdi
call   1030 <fclose@plt>
lea    0xd66(%rip),%rdi
lea    0xd3a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    $0x101d0,%ebx
lea    0xd43(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0xffffffffffffffff,%rbx
jne    13a0 <main+0x250>
mov    %r15,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@main.ws = internal global i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
@.str = [5 x i8] c" \0C\09\0B\00"
@main.al = internal global i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00"
@main.i5 = internal global i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.2, i32 0, i32 0)
@.str.2 = [133 x i8] c"a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n\0A\00"
@.str.3 = [6 x i8] c"test0\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [6 x i8] c"test1\00"
@.str.6 = [6 x i8] c"test2\00"
@.str.7 = [6 x i8] c"test3\00"
@.str.8 = [6 x i8] c"test4\00"
@.str.9 = [5 x i8] c"word\00"
@.str.10 = [6 x i8] c"test5\00"
@.str.11 = [6 x i8] c"test6\00"
@.str.12 = [6 x i8] c"word \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32*, i32** %2
%10 = call i32 @fclose(i32* %9)
%11 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %11, i32** %2
%12 = load i32*, i32** %2
%13 = icmp ne i32* %12, null
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
store i64 0, i64* %3
br label %16
16: ; preds = %23, %0
%17 = load i64, i64* %3
%18 = icmp ult i64 %17, 2539
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i8*, i8** @main.al
%21 = load i32*, i32** %2
%22 = call i32 @fputs(i8* %20, i32* %21)
br label %23
23: ; preds = %19
%24 = load i64, i64* %3
%25 = add i64 %24, 1
store i64 %25, i64* %3
br label %16
26: ; preds = %16
%27 = load i32*, i32** %2
%28 = call i32 @fclose(i32* %27)
%29 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %29, i32** %2
%30 = load i32*, i32** %2
%31 = icmp ne i32* %30, null
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
store i64 0, i64* %3
br label %34
34: ; preds = %41, %26
%35 = load i64, i64* %3
%36 = icmp ult i64 %35, 16501
br i1 %36, label %37, label %44
37: ; preds = %34
%38 = load i8*, i8** @main.ws
%39 = load i32*, i32** %2
%40 = call i32 @fputs(i8* %38, i32* %39)
br label %41
41: ; preds = %37
%42 = load i64, i64* %3
%43 = add i64 %42, 1
store i64 %43, i64* %3
br label %34
44: ; preds = %34
%45 = load i32*, i32** %2
%46 = call i32 @fclose(i32* %45)
%47 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %47, i32** %2
%48 = load i32*, i32** %2
%49 = icmp ne i32* %48, null
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
store i64 0, i64* %3
br label %52
52: ; preds = %58, %44
%53 = load i64, i64* %3
%54 = icmp ult i64 %53, 66000
br i1 %54, label %55, label %61
55: ; preds = %52
%56 = load i32*, i32** %2
%57 = call i32 @fputc(i8 signext 10, i32* %56)
br label %58
58: ; preds = %55
%59 = load i64, i64* %3
%60 = add i64 %59, 1
store i64 %60, i64* %3
br label %52
61: ; preds = %52
%62 = load i32*, i32** %2
%63 = call i32 @fclose(i32* %62)
%64 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %64, i32** %2
%65 = load i32*, i32** %2
%66 = icmp ne i32* %65, null
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = load i32*, i32** %2
%70 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32* %69)
store i64 0, i64* %3
br label %71
71: ; preds = %78, %61
%72 = load i64, i64* %3
%73 = icmp ult i64 %72, 2539
br i1 %73, label %74, label %81
74: ; preds = %71
%75 = load i8*, i8** @main.ws
%76 = load i32*, i32** %2
%77 = call i32 @fputs(i8* %75, i32* %76)
br label %78
78: ; preds = %74
%79 = load i64, i64* %3
%80 = add i64 %79, 1
store i64 %80, i64* %3
br label %71
81: ; preds = %71
%82 = load i32*, i32** %2
%83 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32* %82)
%84 = load i32*, i32** %2
%85 = call i32 @fclose(i32* %84)
%86 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %86, i32** %2
%87 = load i32*, i32** %2
%88 = icmp ne i32* %87, null
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
store i64 0, i64* %3
br label %91
91: ; preds = %98, %81
%92 = load i64, i64* %3
%93 = icmp ult i64 %92, 1000
br i1 %93, label %94, label %101
94: ; preds = %91
%95 = load i8*, i8** @main.i5
%96 = load i32*, i32** %2
%97 = call i32 @fputs(i8* %95, i32* %96)
br label %98
98: ; preds = %94
%99 = load i64, i64* %3
%100 = add i64 %99, 1
store i64 %100, i64* %3
br label %91
101: ; preds = %91
%102 = load i32*, i32** %2
%103 = call i32 @fclose(i32* %102)
%104 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %104, i32** %2
%105 = load i32*, i32** %2
%106 = icmp ne i32* %105, null
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
store i64 0, i64* %3
br label %109
109: ; preds = %115, %101
%110 = load i64, i64* %3
%111 = icmp ult i64 %110, 66000
br i1 %111, label %112, label %118
112: ; preds = %109
%113 = load i32*, i32** %2
%114 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32* %113)
br label %115
115: ; preds = %112
%116 = load i64, i64* %3
%117 = add i64 %116, 1
store i64 %117, i64* %3
br label %109
118: ; preds = %109
%119 = load i32*, i32** %2
%120 = call i32 @fclose(i32* %119)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" \0C\09\0B\00"
@.str.1 = [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00"
@.str.2 = [133 x i8] c"a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n\0A\00"
@.str.3 = [6 x i8] c"test0\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [6 x i8] c"test1\00"
@.str.6 = [6 x i8] c"test2\00"
@.str.7 = [6 x i8] c"test3\00"
@.str.8 = [6 x i8] c"test4\00"
@.str.9 = [5 x i8] c"word\00"
@.str.10 = [6 x i8] c"test5\00"
@.str.11 = [6 x i8] c"test6\00"
@.str.12 = [6 x i8] c"word \00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @fclose(i32* %1)
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
br label %10
10: ; preds = %0, %10
%11 = phi i64 [ 0, %0 ], [ %13, %10 ]
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 26, i64 1, i32* %6)
%13 = add nuw nsw i64 %11, 1
%14 = icmp eq i64 %13, 2539
br i1 %14, label %15, label %10
15: ; preds = %10
%16 = tail call i32 @fclose(i32* %6)
%17 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%18 = icmp ne i32* %17, null
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
br label %21
21: ; preds = %15, %21
%22 = phi i64 [ 0, %15 ], [ %24, %21 ]
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %17)
%24 = add nuw nsw i64 %22, 1
%25 = icmp eq i64 %24, 16501
br i1 %25, label %26, label %21
26: ; preds = %21
%27 = tail call i32 @fclose(i32* %17)
%28 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp ne i32* %28, null
%30 = zext i1 %29 to i32
%31 = tail call i32 @assert(i32 %30)
br label %32
32: ; preds = %26, %32
%33 = phi i64 [ 0, %26 ], [ %35, %32 ]
%34 = tail call i32 @fputc(i8 signext 10, i32* %28)
%35 = add nuw nsw i64 %33, 1
%36 = icmp eq i64 %35, 66000
br i1 %36, label %37, label %32
37: ; preds = %32
%38 = tail call i32 @fclose(i32* %28)
%39 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp ne i32* %39, null
%41 = zext i1 %40 to i32
%42 = tail call i32 @assert(i32 %41)
%43 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 4, i64 1, i32* %39)
br label %44
44: ; preds = %37, %44
%45 = phi i64 [ 0, %37 ], [ %47, %44 ]
%46 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %39)
%47 = add nuw nsw i64 %45, 1
%48 = icmp eq i64 %47, 2539
br i1 %48, label %49, label %44
49: ; preds = %44
%50 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 4, i64 1, i32* %39)
%51 = tail call i32 @fclose(i32* %39)
%52 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%53 = icmp ne i32* %52, null
%54 = zext i1 %53 to i32
%55 = tail call i32 @assert(i32 %54)
br label %56
56: ; preds = %49, %56
%57 = phi i64 [ 0, %49 ], [ %59, %56 ]
%58 = tail call i64 @fwrite(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.2, i64 0, i64 0), i64 132, i64 1, i32* %52)
%59 = add nuw nsw i64 %57, 1
%60 = icmp eq i64 %59, 1000
br i1 %60, label %61, label %56
61: ; preds = %56
%62 = tail call i32 @fclose(i32* %52)
%63 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%64 = icmp ne i32* %63, null
%65 = zext i1 %64 to i32
%66 = tail call i32 @assert(i32 %65)
br label %67
67: ; preds = %61, %67
%68 = phi i64 [ 0, %61 ], [ %70, %67 ]
%69 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i64 5, i64 1, i32* %63)
%70 = add nuw nsw i64 %68, 1
%71 = icmp eq i64 %70, 66000
br i1 %71, label %72, label %67
72: ; preds = %67
%73 = tail call i32 @fclose(i32* %63)
ret i32 0
}