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

/* Variables and functions */
int EOF;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getline(char **, int *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
char *strtok(char *, char *);
int main(int argc, char *argv[]) {
  FILE *F_IR3;
  char InputFileName[] = "../test/03093-01.IR3";
  int length = 1024;
  char *TempText;
  char *Token;
  char Delimiters[] = " ()<>*;:-";
  ssize_t ErrorCode;
  F_IR3 = fopen(InputFileName, "r");
  if (F_IR3 != NULL) {
    fprintf(stderr, "Input file %s is opened Read-Only.\n", InputFileName);
  } else {
    fprintf(stderr, "Error: input file %s not found or does not exist.\n",
            InputFileName);
    exit(EXIT_FAILURE);
  }
  while (!feof(F_IR3)) {
    TempText = (char *)malloc(length + 1);
    ErrorCode = getline(&TempText, &length, F_IR3);
    if (ErrorCode != -1) {
      fprintf(stderr, "%s", TempText);
      fprintf(stderr, "Start splitting into tokens.\n");
      Token = strtok(TempText, Delimiters);
      while (Token != NULL) {
        fprintf(stderr, "%s\n", Token);
        Token = strtok(NULL, " ");
      }
      fprintf(stderr, "Ready splitting into tokens.\n");
    } else {
      if (ErrorCode == EOF) {
        fprintf(stderr, "End Of File encountered.\nDone.\n");
        exit(EXIT_FAILURE);
      } else {
        fprintf(stderr, "Error while reading line from file %s.\n",
                InputFileName);
        exit(EXIT_FAILURE);
      }
    }
  }
  ErrorCode = fclose(F_IR3);
  if (!ErrorCode) {
    fprintf(stderr, "Input file %s is closed.\n", InputFileName);
  } else {
    fprintf(stderr, "Error: input file %s not closed or does not exist.\n",
            InputFileName);
    exit(EXIT_FAILURE);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xe63(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe60(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe5e(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xe59(%rip),%al
mov    %al,-0x1c(%rbp)
movl   $0x400,-0x34(%rbp)
mov    0xe49(%rip),%rax
mov    %rax,-0x52(%rbp)
mov    0xe46(%rip),%ax
mov    %ax,-0x4a(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe39(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     121a <main+0x9a>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xe13(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1243 <main+0xc3>
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1248 <main+0xc8>
mov    -0x18(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1266 <main+0xe6>
jmp    1396 <main+0x216>
mov    -0x34(%rbp),%edi
add    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdx
lea    -0x40(%rbp),%rdi
lea    -0x34(%rbp),%rsi
call   1090 <getline@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0xffffffff,-0x58(%rbp)
je     1331 <main+0x1b1>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rdx
lea    0xdd1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d23(%rip),%rax
mov    (%rax),%edi
lea    0xdbd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x40(%rbp),%rdi
lea    -0x52(%rbp),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1315 <main+0x195>
mov    0x2cf0(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%rdx
lea    0xda4(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd96(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x48(%rbp)
jmp    12d6 <main+0x156>
mov    0x2cbc(%rip),%rax
mov    (%rax),%edi
lea    0xd7a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1391 <main+0x211>
mov    -0x58(%rbp),%eax
mov    0x2cad(%rip),%rcx
cmp    (%rcx),%eax
jne    1368 <main+0x1e8>
mov    0x2c8e(%rip),%rax
mov    (%rax),%edi
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    0x2c69(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xd61(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c46(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1248 <main+0xc8>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
jne    13cc <main+0x24c>
mov    0x2c25(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xd45(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    13f5 <main+0x275>
mov    0x2c05(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xd3f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2be2(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    0x2bcc(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movaps 0xe6b(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3352492e31302d,%rax
mov    %rax,0x1d(%rsp)
movl   $0x400,0x4(%rsp)
movabs $0x3a3b2a3e3c292820,%rax
2a 3b 3a
mov    %rax,0x28(%rsp)
movw   $0x2d,0x30(%rsp)
lea    0xe51(%rip),%rsi
lea    0x10(%rsp),%rdi
call   1070 <fopen@plt>
mov    0x2df9(%rip),%r14
mov    (%r14),%edi
test   %rax,%rax
je     1379 <main+0x1f9>
mov    %rax,%rbx
lea    0xe2c(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <feof@plt>
test   %eax,%eax
je     124b <main+0xcb>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    (%r14),%edi
test   %eax,%eax
jne    1382 <main+0x202>
lea    0xede(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x401,%edi
call   1060 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rbx,%rdx
call   1090 <getline@plt>
cmp    $0xffffffff,%eax
je     1339 <main+0x1b9>
lea    0x28(%rsp),%r12
lea    0xe1e(%rip),%r13
lea    0xe11(%rip),%rbp
lea    0xe0e(%rip),%r15
nop
mov    (%r14),%edi
mov    0x8(%rsp),%rdx
lea    0xdd9(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xdcb(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x8(%rsp),%rdi
mov    %r12,%rsi
nop
call   1080 <strtok@plt>
test   %rax,%rax
je     12f0 <main+0x170>
mov    (%r14),%edi
mov    %rbp,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %edi,%edi
mov    %r15,%rsi
jmp    12c0 <main+0x140>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <feof@plt>
test   %eax,%eax
jne    120d <main+0x8d>
mov    0x4(%rsp),%edi
add    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rbx,%rdx
call   1090 <getline@plt>
cmp    $0xffffffff,%eax
jne    1290 <main+0x110>
mov    0x2ca8(%rip),%rax
cmpl   $0xffffffff,(%rax)
mov    (%r14),%edi
jne    1358 <main+0x1d8>
lea    0xd6e(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    136b <main+0x1eb>
lea    0xd7e(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2c5e(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
lea    0xcc5(%rip),%rsi
jmp    135f <main+0x1df>
lea    0xd96(%rip),%rsi
jmp    135f <main+0x1df>

LLVM IR (-O0):
@__const.main.InputFileName = [21 x i8] c"../test/03093-01.IR3\00"
@__const.main.Delimiters = [10 x i8] c" ()<>*;:-\00"
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [36 x i8] c"Input file %s is opened Read-Only.\0A\00"
@.str.2 = [51 x i8] c"Error: input file %s not found or does not exist.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [30 x i8] c"Start splitting into tokens.\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [30 x i8] c"Ready splitting into tokens.\0A\00"
@EOF = global i32 0
@.str.8 = [32 x i8] c"End Of File encountered.\0ADone.\0A\00"
@.str.9 = [40 x i8] c"Error while reading line from file %s.\0A\00"
@.str.10 = [26 x i8] c"Input file %s is closed.\0A\00"
@.str.11 = [52 x i8] c"Error: input file %s not closed or does not exist.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [21 x i8]
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [10 x i8]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = bitcast [21 x i8]* %7 to i8*
store i32 1024, i32* %8
%14 = bitcast [10 x i8]* %11 to i8*
%15 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%16 = call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %16, i32** %6
%17 = load i32*, i32** %6
%18 = icmp ne i32* %17, null
br i1 %18, label %19, label %23
19: ; preds = %2
%20 = load i32, i32* @stderr
%21 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %29
23: ; preds = %2
%24 = load i32, i32* @stderr
%25 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @EXIT_FAILURE
%28 = call i32 @exit(i32 %27)
unreachable
29: ; preds = %19
br label %30
30: ; preds = %79, %29
%31 = load i32*, i32** %6
%32 = call i32 @feof(i32* %31)
%33 = icmp ne i32 %32, 0
%34 = xor i1 %33, true
br i1 %34, label %35, label %80
35: ; preds = %30
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
%38 = call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to i8*
store i8* %39, i8** %9
%40 = load i32*, i32** %6
%41 = call i32 @getline(i8** %9, i32* %8, i32* %40)
store i32 %41, i32* %12
%42 = load i32, i32* %12
%43 = icmp ne i32 %42, -1
br i1 %43, label %44, label %64
44: ; preds = %35
%45 = load i32, i32* @stderr
%46 = load i8*, i8** %9
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %46)
%48 = load i32, i32* @stderr
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%50 = load i8*, i8** %9
%51 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%52 = call i8* @strtok(i8* %50, i8* %51)
store i8* %52, i8** %10
br label %53
53: ; preds = %56, %44
%54 = load i8*, i8** %10
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = load i32, i32* @stderr
%58 = load i8*, i8** %10
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %58)
%60 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i8* %60, i8** %10
br label %53
61: ; preds = %53
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
br label %79
64: ; preds = %35
%65 = load i32, i32* %12
%66 = load i32, i32* @EOF
%67 = icmp eq i32 %65, %66
br i1 %67, label %68, label %73
68: ; preds = %64
%69 = load i32, i32* @stderr
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%71 = load i32, i32* @EXIT_FAILURE
%72 = call i32 @exit(i32 %71)
unreachable
73: ; preds = %64
%74 = load i32, i32* @stderr
%75 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i8* %75)
%77 = load i32, i32* @EXIT_FAILURE
%78 = call i32 @exit(i32 %77)
unreachable
79: ; preds = %61
br label %30
80: ; preds = %30
%81 = load i32*, i32** %6
%82 = call i32 @fclose(i32* %81)
store i32 %82, i32* %12
%83 = load i32, i32* %12
%84 = icmp ne i32 %83, 0
br i1 %84, label %89, label %85
85: ; preds = %80
%86 = load i32, i32* @stderr
%87 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i8* %87)
br label %95
89: ; preds = %80
%90 = load i32, i32* @stderr
%91 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.11, i64 0, i64 0), i8* %91)
%93 = load i32, i32* @EXIT_FAILURE
%94 = call i32 @exit(i32 %93)
unreachable
95: ; preds = %85
%96 = load i32, i32* @EXIT_SUCCESS
ret i32 %96
}

LLVM IR (-O2):
@__const.main.InputFileName = [21 x i8] c"../test/03093-01.IR3\00"
@__const.main.Delimiters = [10 x i8] c" ()<>*;:-\00"
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [36 x i8] c"Input file %s is opened Read-Only.\0A\00"
@.str.2 = [51 x i8] c"Error: input file %s not found or does not exist.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [30 x i8] c"Start splitting into tokens.\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [30 x i8] c"Ready splitting into tokens.\0A\00"
@EOF = global i32 0
@.str.8 = [32 x i8] c"End Of File encountered.\0ADone.\0A\00"
@.str.9 = [40 x i8] c"Error while reading line from file %s.\0A\00"
@.str.10 = [26 x i8] c"Input file %s is closed.\0A\00"
@.str.11 = [52 x i8] c"Error: input file %s not closed or does not exist.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [21 x i8]
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [10 x i8]
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%8 = bitcast i32* %4 to i8*
store i32 1024, i32* %4
%9 = bitcast i8** %5 to i8*
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%11 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32* %11, null
%13 = load i32, i32* @stderr
br i1 %12, label %23, label %14
14: ; preds = %2
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%16 = call i32 @feof(i32* %11)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %66
18: ; preds = %14
%19 = call i64 @malloc(i32 1025)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %5
%21 = call i32 @getline(i8** %5, i32* %4, i32* %11)
%22 = icmp eq i32 %21, -1
br i1 %22, label %54, label %27
23: ; preds = %2
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%25 = load i32, i32* @EXIT_FAILURE
%26 = call i32 @exit(i32 %25)
unreachable
27: ; preds = %18, %47
%28 = load i32, i32* @stderr
%29 = load i8*, i8** %5
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %29)
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%33 = load i8*, i8** %5
%34 = call i8* @strtok(i8* %33, i8* %10)
%35 = icmp eq i8* %34, null
br i1 %35, label %42, label %36
36: ; preds = %27, %36
%37 = phi i8* [ %40, %36 ], [ %34, %27 ]
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %37)
%40 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %36
42: ; preds = %36, %27
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%45 = call i32 @feof(i32* %11)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %66
47: ; preds = %42
%48 = load i32, i32* %4
%49 = add nsw i32 %48, 1
%50 = call i64 @malloc(i32 %49)
%51 = inttoptr i64 %50 to i8*
store i8* %51, i8** %5
%52 = call i32 @getline(i8** %5, i32* %4, i32* %11)
%53 = icmp eq i32 %52, -1
br i1 %53, label %54, label %27
54: ; preds = %47, %18
%55 = load i32, i32* @EOF
%56 = icmp eq i32 %55, -1
%57 = load i32, i32* @stderr
br i1 %56, label %58, label %62
58: ; preds = %54
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%60 = load i32, i32* @EXIT_FAILURE
%61 = call i32 @exit(i32 %60)
unreachable
62: ; preds = %54
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i8* %7)
%64 = load i32, i32* @EXIT_FAILURE
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %42, %14
%67 = call i32 @fclose(i32* %11)
%68 = icmp eq i32 %67, 0
%69 = load i32, i32* @stderr
br i1 %68, label %70, label %73
70: ; preds = %66
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i8* %7)
%72 = load i32, i32* @EXIT_SUCCESS
ret i32 %72
73: ; preds = %66
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.11, i64 0, i64 0), i8* %7)
%75 = load i32, i32* @EXIT_FAILURE
%76 = call i32 @exit(i32 %75)
unreachable
}