#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*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
scalar_t__ isblank(char);
int mygetc(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ write_line(int /*<<< orphan*/ *, char *, int);
void convert_txt_file(char *inflname, FILE *outfl) {
  FILE *infile;
  char linebuf[16384];
  int linepos = 0, c, frstline = 1;
  int is_eof;
  infile = fopen(inflname, "rb");
  if (infile == NULL) {
    fprintf(stderr, "makecsd: error opening input file %s: %s\n", inflname,
            strerror(errno));
    exit(-1);
  }
  is_eof = 0;
  while (!is_eof) {
    linepos = 0;
    do {
      c = mygetc(infile, &is_eof);
      if (is_eof || c == '\n') {
        while (linepos && isblank(linebuf[linepos - 1]))
          linepos--;
        linebuf[linepos++] = '\n';
        if (is_eof || (linepos > 1 && linebuf[linepos - 2] != '\n'))
          break;
      } else
        linebuf[linepos++] = c;
    } while (1);
    if (is_eof)
      break;
    if (frstline) {
      int n = -1;
      frstline = 0;
      while (++n < linepos && linebuf[n] == '\n')
        ;
      if (n < linepos)
        write_line(outfl, &(linebuf[n]), linepos - n);
    } else
      write_line(outfl, &(linebuf[0]), linepos);
  }
  while (linepos && linebuf[linepos - 1] == '\n')
    linepos--;
  linebuf[linepos++] = '\n';
  write_line(outfl, &(linebuf[0]), linepos);
  fclose(infile);
  infile = NULL;
}


x86 assembly (clang, -O0):
<convert_txt_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4050,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x4024(%rbp)
movl   $0x1,-0x402c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe4e(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1214 <convert_txt_file+0x94>
mov    0x2e13(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4044(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x4040(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x4044(%rbp),%edi
mov    -0x4040(%rbp),%rdx
mov    %rax,%rcx
lea    0xdfe(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
movl   $0x0,-0x4030(%rbp)
cmpl   $0x0,-0x4030(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1237 <convert_txt_file+0xb7>
jmp    1449 <convert_txt_file+0x2c9>
movl   $0x0,-0x4024(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x4030(%rbp),%rsi
call   1060 <mygetc@plt>
mov    %eax,-0x4028(%rbp)
cmpl   $0x0,-0x4030(%rbp)
jne    1271 <convert_txt_file+0xf1>
cmpl   $0xa,-0x4028(%rbp)
jne    1332 <convert_txt_file+0x1b2>
jmp    1276 <convert_txt_file+0xf6>
xor    %eax,%eax
cmpl   $0x0,-0x4024(%rbp)
mov    %al,-0x4045(%rbp)
je     12b0 <convert_txt_file+0x130>
mov    -0x4024(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x4020(%rbp,%rax,1),%edi
ff
call   1040 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x4045(%rbp)
mov    -0x4045(%rbp),%al
test   $0x1,%al
jne    12c3 <convert_txt_file+0x143>
jmp    12d7 <convert_txt_file+0x157>
mov    -0x4024(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4024(%rbp)
jmp    1276 <convert_txt_file+0xf6>
mov    -0x4024(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4024(%rbp)
cltq
movb   $0xa,-0x4020(%rbp,%rax,1)
0a
cmpl   $0x0,-0x4030(%rbp)
jne    1328 <convert_txt_file+0x1a8>
cmpl   $0x1,-0x4024(%rbp)
jle    132d <convert_txt_file+0x1ad>
mov    -0x4024(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x4020(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
je     132d <convert_txt_file+0x1ad>
jmp    1368 <convert_txt_file+0x1e8>
jmp    1354 <convert_txt_file+0x1d4>
mov    -0x4028(%rbp),%eax
mov    %al,%cl
mov    -0x4024(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x4024(%rbp)
cltq
mov    %cl,-0x4020(%rbp,%rax,1)
jmp    1359 <convert_txt_file+0x1d9>
mov    $0x1,%al
test   $0x1,%al
jne    1241 <convert_txt_file+0xc1>
jmp    1368 <convert_txt_file+0x1e8>
cmpl   $0x0,-0x4030(%rbp)
je     137a <convert_txt_file+0x1fa>
jmp    1449 <convert_txt_file+0x2c9>
cmpl   $0x0,-0x402c(%rbp)
je     142e <convert_txt_file+0x2ae>
movl   $0xffffffff,-0x4034(%rbp)
ff ff ff
movl   $0x0,-0x402c(%rbp)
mov    -0x4034(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4034(%rbp)
xor    %eax,%eax
cmp    -0x4024(%rbp),%ecx
mov    %al,-0x4046(%rbp)
jge    13d9 <convert_txt_file+0x259>
movslq -0x4034(%rbp),%rax
movsbl -0x4020(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
sete   %al
mov    %al,-0x4046(%rbp)
mov    -0x4046(%rbp),%al
test   $0x1,%al
jne    13ec <convert_txt_file+0x26c>
jmp    13f1 <convert_txt_file+0x271>
jmp    139b <convert_txt_file+0x21b>
mov    -0x4034(%rbp),%eax
cmp    -0x4024(%rbp),%eax
jge    1429 <convert_txt_file+0x2a9>
mov    -0x10(%rbp),%rdi
movslq -0x4034(%rbp),%rax
lea    -0x4020(%rbp),%rsi
add    %rax,%rsi
mov    -0x4024(%rbp),%edx
sub    -0x4034(%rbp),%edx
call   1090 <write_line@plt>
jmp    1444 <convert_txt_file+0x2c4>
mov    -0x10(%rbp),%rdi
lea    -0x4020(%rbp),%rsi
mov    -0x4024(%rbp),%edx
call   1090 <write_line@plt>
jmp    121e <convert_txt_file+0x9e>
jmp    144e <convert_txt_file+0x2ce>
xor    %eax,%eax
cmpl   $0x0,-0x4024(%rbp)
mov    %al,-0x4047(%rbp)
je     1482 <convert_txt_file+0x302>
mov    -0x4024(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x4020(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
sete   %al
mov    %al,-0x4047(%rbp)
mov    -0x4047(%rbp),%al
test   $0x1,%al
jne    1495 <convert_txt_file+0x315>
jmp    14a9 <convert_txt_file+0x329>
mov    -0x4024(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4024(%rbp)
jmp    144e <convert_txt_file+0x2ce>
mov    -0x4024(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4024(%rbp)
cltq
movb   $0xa,-0x4020(%rbp,%rax,1)
0a
mov    -0x10(%rbp),%rdi
lea    -0x4020(%rbp),%rsi
mov    -0x4024(%rbp),%edx
call   1090 <write_line@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movq   $0x0,-0x18(%rbp)
add    $0x4050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_txt_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4018,%rsp
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbx
lea    0xe60(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     132b <convert_txt_file+0x1ab>
mov    %rax,%r13
movl   $0x0,(%rsp)
movl   $0x0,0x4(%rsp)
mov    %rsp,%r15
xor    %ebp,%ebp
jmp    11da <convert_txt_file+0x5a>
nopw   0x0(%rax,%rax,1)
movslq %ebp,%rcx
add    $0x1,%ebp
mov    %al,0x10(%rsp,%rcx,1)
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <mygetc@plt>
cmpl   $0x0,(%rsp)
jne    11f0 <convert_txt_file+0x70>
cmp    $0xa,%eax
jne    11d0 <convert_txt_file+0x50>
movslq %ebp,%r14
add    $0x2,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%r12
sub    $0x1,%r14
jb     1250 <convert_txt_file+0xd0>
mov    %ebp,%ebx
movsbl 0x10(%rsp,%r14,1),%edi
call   1040 <isblank@plt>
lea    -0x1(%rbx),%ebp
test   %rax,%rax
jne    1200 <convert_txt_file+0x80>
lea    0x1(%r12),%ebp
movslq %r12d,%rax
movb   $0xa,0x10(%rsp,%rax,1)
cmpl   $0x0,(%rsp)
jne    12d2 <convert_txt_file+0x152>
test   %r12d,%r12d
jle    11da <convert_txt_file+0x5a>
lea    -0x1(%r12),%eax
cmpb   $0xa,0x10(%rsp,%rax,1)
je     11da <convert_txt_file+0x5a>
jmp    1270 <convert_txt_file+0xf0>
nopl   0x0(%rax,%rax,1)
movb   $0xa,0x10(%rsp)
mov    $0x1,%ebp
cmpl   $0x0,(%rsp)
je     11da <convert_txt_file+0x5a>
jmp    12d2 <convert_txt_file+0x152>
cs nopw 0x0(%rax,%rax,1)
testb  $0x1,0x4(%rsp)
je     1285 <convert_txt_file+0x105>
mov    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %ebp,%edx
jmp    12bd <convert_txt_file+0x13d>
movslq %r12d,%rax
add    $0x1,%rax
lea    0xf(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sub    $0x1,%rax
jb     12c2 <convert_txt_file+0x142>
lea    0x1(%rcx),%rsi
add    $0xffffffff,%ebx
cmpb   $0xa,0x1(%rcx)
mov    %rsi,%rcx
je     12a0 <convert_txt_file+0x120>
mov    0x8(%rsp),%rdi
mov    %ebx,%edx
call   1090 <write_line@plt>
mov    $0x1,%al
mov    %eax,0x4(%rsp)
cmpl   $0x0,(%rsp)
je     11c3 <convert_txt_file+0x43>
movslq %ebp,%rax
lea    0x1(%rax),%edx
mov    %rax,%rcx
nopl   0x0(%rax,%rax,1)
sub    $0x1,%rcx
jb     12f5 <convert_txt_file+0x175>
add    $0xffffffff,%edx
cmpb   $0xa,0xf(%rsp,%rax,1)
mov    %rcx,%rax
je     12e0 <convert_txt_file+0x160>
jmp    12f7 <convert_txt_file+0x177>
xor    %edx,%edx
movslq %edx,%rax
add    $0x1,%edx
movb   $0xa,0x10(%rsp,%rax,1)
lea    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdi
call   1090 <write_line@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
add    $0x4018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cae(%rip),%rax
mov    (%rax),%ebp
mov    0x2c9d(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
lea    0xcba(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c"makecsd: error opening input file %s: %s\0A\00"
@errno = global i32 0
define void @convert_txt_file(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca [16384 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %7
store i32 1, i32* %9
%12 = load i8*, i8** %3
%13 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %13, i32** %5
%14 = load i32*, i32** %5
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8*, i8** %3
%19 = load i32, i32* @errno
%20 = call i8* @strerror(i32 %19)
%21 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %18, i8* %20)
%22 = call i32 @exit(i32 -1)
unreachable
23: ; preds = %2
store i32 0, i32* %10
br label %24
24: ; preds = %125, %23
%25 = load i32, i32* %10
%26 = icmp ne i32 %25, 0
%27 = xor i1 %26, true
br i1 %27, label %28, label %126
28: ; preds = %24
store i32 0, i32* %7
br label %29
29: ; preds = %82, %28
%30 = load i32*, i32** %5
%31 = call i32 @mygetc(i32* %30, i32* %10)
store i32 %31, i32* %8
%32 = load i32, i32* %10
%33 = icmp ne i32 %32, 0
br i1 %33, label %37, label %34
34: ; preds = %29
%35 = load i32, i32* %8
%36 = icmp eq i32 %35, 10
br i1 %36, label %37, label %74
37: ; preds = %34, %29
br label %38
38: ; preds = %51, %37
%39 = load i32, i32* %7
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %49
41: ; preds = %38
%42 = load i32, i32* %7
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = call i64 @isblank(i8 signext %46)
%48 = icmp ne i64 %47, 0
br label %49
49: ; preds = %41, %38
%50 = phi i1 [ false, %38 ], [ %48, %41 ]
br i1 %50, label %51, label %54
51: ; preds = %49
%52 = load i32, i32* %7
%53 = add nsw i32 %52, -1
store i32 %53, i32* %7
br label %38
54: ; preds = %49
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %57
store i8 10, i8* %58
%59 = load i32, i32* %10
%60 = icmp ne i32 %59, 0
br i1 %60, label %72, label %61
61: ; preds = %54
%62 = load i32, i32* %7
%63 = icmp sgt i32 %62, 1
br i1 %63, label %64, label %73
64: ; preds = %61
%65 = load i32, i32* %7
%66 = sub nsw i32 %65, 2
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp ne i32 %70, 10
br i1 %71, label %72, label %73
72: ; preds = %64, %54
br label %83
73: ; preds = %64, %61
br label %81
74: ; preds = %34
%75 = load i32, i32* %8
%76 = trunc i32 %75 to i8
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
%79 = sext i32 %77 to i64
%80 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %79
store i8 %76, i8* %80
br label %81
81: ; preds = %74, %73
br label %82
82: ; preds = %81
br i1 true, label %29, label %83
83: ; preds = %82, %72
%84 = load i32, i32* %10
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %87
86: ; preds = %83
br label %126
87: ; preds = %83
%88 = load i32, i32* %9
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %120
90: ; preds = %87
store i32 -1, i32* %11
store i32 0, i32* %9
br label %91
91: ; preds = %105, %90
%92 = load i32, i32* %11
%93 = add nsw i32 %92, 1
store i32 %93, i32* %11
%94 = load i32, i32* %7
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %103
96: ; preds = %91
%97 = load i32, i32* %11
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 10
br label %103
103: ; preds = %96, %91
%104 = phi i1 [ false, %91 ], [ %102, %96 ]
br i1 %104, label %105, label %106
105: ; preds = %103
br label %91
106: ; preds = %103
%107 = load i32, i32* %11
%108 = load i32, i32* %7
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %119
110: ; preds = %106
%111 = load i32*, i32** %4
%112 = load i32, i32* %11
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %113
%115 = load i32, i32* %7
%116 = load i32, i32* %11
%117 = sub nsw i32 %115, %116
%118 = call i32 @write_line(i32* %111, i8* %114, i32 %117)
br label %119
119: ; preds = %110, %106
br label %125
120: ; preds = %87
%121 = load i32*, i32** %4
%122 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%123 = load i32, i32* %7
%124 = call i32 @write_line(i32* %121, i8* %122, i32 %123)
br label %125
125: ; preds = %120, %119
br label %24
126: ; preds = %86, %24
br label %127
127: ; preds = %140, %126
%128 = load i32, i32* %7
%129 = icmp ne i32 %128, 0
br i1 %129, label %130, label %138
130: ; preds = %127
%131 = load i32, i32* %7
%132 = sub nsw i32 %131, 1
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %133
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 10
br label %138
138: ; preds = %130, %127
%139 = phi i1 [ false, %127 ], [ %137, %130 ]
br i1 %139, label %140, label %143
140: ; preds = %138
%141 = load i32, i32* %7
%142 = add nsw i32 %141, -1
store i32 %142, i32* %7
br label %127
143: ; preds = %138
%144 = load i32, i32* %7
%145 = add nsw i32 %144, 1
store i32 %145, i32* %7
%146 = sext i32 %144 to i64
%147 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %146
store i8 10, i8* %147
%148 = load i32*, i32** %4
%149 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%150 = load i32, i32* %7
%151 = call i32 @write_line(i32* %148, i8* %149, i32 %150)
%152 = load i32*, i32** %5
%153 = call i32 @fclose(i32* %152)
store i32* null, i32** %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c"makecsd: error opening input file %s: %s\0A\00"
@errno = global i32 0
define void @convert_txt_file(i8* %0, i32* %1) {
%3 = alloca [16384 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
%7 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i32, i32* @errno
%12 = tail call i8* @strerror(i32 %11)
%13 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %12)
%14 = tail call i32 @exit(i32 -1)
unreachable
15: ; preds = %2
store i32 0, i32* %4
br label %16
16: ; preds = %15, %78
%17 = phi i1 [ false, %15 ], [ true, %78 ]
br label %18
18: ; preds = %47, %16
%19 = phi i32 [ 0, %16 ], [ %48, %47 ]
%20 = call i32 @mygetc(i32* %7, i32* %4)
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
%23 = icmp eq i32 %20, 10
%24 = select i1 %22, i1 true, i1 %23
br i1 %24, label %25, label %57
25: ; preds = %18
%26 = sext i32 %19 to i64
br label %27
27: ; preds = %25, %30
%28 = phi i64 [ %26, %25 ], [ %31, %30 ]
%29 = icmp eq i64 %28, 0
br i1 %29, label %44, label %30
30: ; preds = %27
%31 = add nsw i64 %28, -1
%32 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = call i64 @isblank(i8 signext %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %27
36: ; preds = %30
%37 = trunc i64 %28 to i32
%38 = add nsw i32 %37, 1
%39 = shl i64 %28, 32
%40 = ashr exact i64 %39, 32
%41 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %40
store i8 10, i8* %41
%42 = load i32, i32* %4
%43 = icmp eq i32 %42, 0
br i1 %43, label %49, label %81
44: ; preds = %27
store i8 10, i8* %5
%45 = load i32, i32* %4
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %81
47: ; preds = %44, %57, %51, %49
%48 = phi i32 [ %38, %51 ], [ %38, %49 ], [ %59, %57 ], [ 1, %44 ]
br label %18
49: ; preds = %36
%50 = icmp sgt i32 %37, 0
br i1 %50, label %51, label %47
51: ; preds = %49
%52 = add i64 %28, 4294967295
%53 = and i64 %52, 4294967295
%54 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 10
br i1 %56, label %47, label %62
57: ; preds = %18
%58 = trunc i32 %20 to i8
%59 = add nsw i32 %19, 1
%60 = sext i32 %19 to i64
%61 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %60
store i8 %58, i8* %61
br label %47
62: ; preds = %51
br i1 %17, label %76, label %63
63: ; preds = %62, %67
%64 = phi i64 [ %65, %67 ], [ -1, %62 ]
%65 = add nsw i64 %64, 1
%66 = icmp eq i64 %64, %40
br i1 %66, label %78, label %67
67: ; preds = %63
%68 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %65
%69 = load i8, i8* %68
%70 = icmp eq i8 %69, 10
br i1 %70, label %63, label %71
71: ; preds = %67
%72 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %65
%73 = trunc i64 %65 to i32
%74 = sub nsw i32 %38, %73
%75 = call i32 @write_line(i32* %1, i8* %72, i32 %74)
br label %78
76: ; preds = %62
%77 = call i32 @write_line(i32* %1, i8* %5, i32 %38)
br label %78
78: ; preds = %63, %71, %76
%79 = load i32, i32* %4
%80 = icmp eq i32 %79, 0
br i1 %80, label %16, label %81
81: ; preds = %78, %36, %44
%82 = phi i32 [ 1, %44 ], [ %38, %36 ], [ %38, %78 ]
%83 = sext i32 %82 to i64
br label %84
84: ; preds = %87, %81
%85 = phi i64 [ %88, %87 ], [ %83, %81 ]
%86 = icmp eq i64 %85, 0
br i1 %86, label %94, label %87
87: ; preds = %84
%88 = add nsw i64 %85, -1
%89 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = icmp eq i8 %90, 10
br i1 %91, label %84, label %92
92: ; preds = %87
%93 = trunc i64 %85 to i32
br label %94
94: ; preds = %84, %92
%95 = phi i32 [ %93, %92 ], [ 0, %84 ]
%96 = add nsw i32 %95, 1
%97 = sext i32 %95 to i64
%98 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %97
store i8 10, i8* %98
%99 = call i32 @write_line(i32* %1, i8* %5, i32 %96)
%100 = call i32 @fclose(i32* %7)
ret void
}