#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 /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/ *);
int getopt(int, char **, char *);
int /*<<< orphan*/ helptext(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ optarg;
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ puts(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
char *strtok(char *, char const *);
int main(int argc, char *argv[]) {
  char *infile, *outfile, *line, *token;
  infile = (char *)malloc(200);
  outfile = (char *)malloc(200);
  line = (char *)malloc(2048);
  FILE *ifptr;
  FILE *ofptr;
  int opt, param_count;
  size_t len = 0;
  ssize_t read;
  const char s[2] = ",";
  param_count = 0;
  while ((opt = getopt(argc, argv, "f:o:h?")) != -1) {
    switch (opt) {
    case 'f':
      strcpy(infile, optarg);
      param_count += 7;
      break;
    case 'o':
      strcpy(outfile, optarg);
      param_count += 11;
      break;
    default:
      helptext(argv[0]);
    }
  }
  if (param_count != 18)
    helptext(argv[0]);
  printf("Input file is %s, output file is %s\n", infile, outfile);
  if (strcmp(infile, outfile) == 0) {
    puts("Input and output file may not be the same");
    helptext(argv[0]);
    exit(EXIT_FAILURE);
  }
  while ((ifptr = fopen(infile, "r")) == NULL) {
    puts("Input file can not be opened");
    helptext(argv[0]);
    exit(EXIT_FAILURE);
  }
  while ((ofptr = fopen(outfile, "w")) == NULL) {
    puts("Output file can not be opened");
    helptext(argv[0]);
    exit(EXIT_FAILURE);
  }
  while ((read = getline(&line, &len, ifptr)) != -1) {
    token = strtok(line, s);
    while (token != NULL) {
      printf("%s\n", token);
      token = strtok(NULL, s);
    }
    fprintf(ofptr, "%s\n", line);
  }
  fclose(ifptr);
  fclose(ofptr);
  free(infile);
  free(outfile);
  free(line);
  exit(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    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x800,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x50(%rbp)
mov    0xdd1(%rip),%ax
mov    %ax,-0x56(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdba(%rip),%rdx
call   10e0 <getopt@plt>
mov    %eax,-0x44(%rbp)
cmp    $0xffffffff,%eax
je     12cf <main+0xef>
mov    -0x44(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x66,%eax
je     127e <main+0x9e>
jmp    126d <main+0x8d>
mov    -0x5c(%rbp),%eax
sub    $0x6f,%eax
je     129e <main+0xbe>
jmp    12be <main+0xde>
mov    -0x18(%rbp),%rdi
mov    0x2d6f(%rip),%rax
mov    (%rax),%esi
call   1040 <strcpy@plt>
mov    -0x48(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x48(%rbp)
jmp    12ca <main+0xea>
mov    -0x20(%rbp),%rdi
mov    0x2d4f(%rip),%rax
mov    (%rax),%esi
call   1040 <strcpy@plt>
mov    -0x48(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x48(%rbp)
jmp    12ca <main+0xea>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <helptext@plt>
jmp    123a <main+0x5a>
cmpl   $0x12,-0x48(%rbp)
je     12e5 <main+0x105>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <helptext@plt>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1338 <main+0x158>
lea    0xd15(%rip),%rdi
call   1050 <puts@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <helptext@plt>
mov    0x2ca7(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    133d <main+0x15d>
mov    -0x18(%rbp),%rdi
lea    0xd10(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1381 <main+0x1a1>
lea    0xcf8(%rip),%rdi
call   1050 <puts@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <helptext@plt>
mov    0x2c5e(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    1386 <main+0x1a6>
mov    -0x20(%rbp),%rdi
lea    0xce6(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    13ca <main+0x1ea>
lea    0xcce(%rip),%rdi
call   1050 <puts@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <helptext@plt>
mov    0x2c15(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    13cf <main+0x1ef>
mov    -0x38(%rbp),%rdx
lea    -0x28(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   10f0 <getline@plt>
mov    %eax,-0x54(%rbp)
cmp    $0xffffffff,%eax
je     1449 <main+0x269>
mov    -0x28(%rbp),%rdi
lea    -0x56(%rbp),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1430 <main+0x250>
mov    -0x30(%rbp),%rsi
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x56(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <strtok@plt>
mov    %rax,-0x30(%rbp)
jmp    13fd <main+0x21d>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xbeb(%rip),%rsi
call   1090 <fprintf@plt>
jmp    13cf <main+0x1ef>
mov    -0x38(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    0x2b53(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
mov    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x800,%edi
call   10a0 <malloc@plt>
mov    %rax,0x8(%rsp)
movq   $0x0,0x18(%rsp)
movw   $0x2c,0x6(%rsp)
xor    %r15d,%r15d
lea    0xdc8(%rip),%r14
mov    0x2db9(%rip),%r12
jmp    1260 <main+0x80>
mov    (%r12),%esi
mov    0x10(%rsp),%rdi
call   1040 <strcpy@plt>
add    $0xb,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   10e0 <getopt@plt>
cmp    $0x66,%eax
je     1286 <main+0xa6>
cmp    $0x6f,%eax
je     1241 <main+0x61>
cmp    $0xffffffff,%eax
je     1298 <main+0xb8>
mov    (%rbx),%rdi
call   10b0 <helptext@plt>
jmp    1260 <main+0x80>
mov    (%r12),%esi
mov    %r13,%rdi
call   1040 <strcpy@plt>
add    $0x7,%r15d
jmp    1260 <main+0x80>
cmp    $0x12,%r15d
je     12a6 <main+0xc6>
mov    (%rbx),%rdi
call   10b0 <helptext@plt>
lea    0xd5a(%rip),%rdi
mov    %r13,%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    12d8 <main+0xf8>
lea    0xd56(%rip),%rdi
jmp    131a <main+0x13a>
lea    0xd77(%rip),%rsi
mov    %r13,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
jne    12f5 <main+0x115>
lea    0xd65(%rip),%rdi
jmp    131a <main+0x13a>
mov    %rax,%r12
mov    %r13,0x20(%rsp)
lea    0xd71(%rip),%rsi
mov    0x10(%rsp),%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
jne    1335 <main+0x155>
lea    0xd5d(%rip),%rdi
call   1050 <puts@plt>
mov    (%rbx),%rdi
call   10b0 <helptext@plt>
mov    0x2caa(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    %rax,%r13
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %r12,%rdx
call   10f0 <getline@plt>
cmp    $0xffffffff,%eax
jne    138b <main+0x1ab>
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    %r13,%rdi
call   1060 <fclose@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
lea    0x6(%rsp),%rbx
lea    0xc91(%rip),%rbp
lea    0x8(%rsp),%r14
lea    0x18(%rsp),%r15
jmp    13d7 <main+0x1f7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x8(%rsp),%rdx
mov    %r13,%rdi
mov    %rbp,%rsi
call   1090 <fprintf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   10f0 <getline@plt>
cmp    $0xffffffff,%eax
je     134f <main+0x16f>
mov    0x8(%rsp),%rdi
nopl   0x0(%rax)
mov    %rbx,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     13b0 <main+0x1d0>
mov    %rbp,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %edi,%edi
jmp    13e0 <main+0x200>

LLVM IR (-O0):
@__const.main.s = [2 x i8] c",\00"
@.str = [7 x i8] c"f:o:h?\00"
@optarg = global i32 0
@.str.1 = [37 x i8] c"Input file is %s, output file is %s\0A\00"
@.str.2 = [42 x i8] c"Input and output file may not be the same\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [29 x i8] c"Input file can not be opened\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [30 x i8] c"Output file can not be opened\00"
@.str.7 = [4 x i8] c"%s\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 i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i64
%15 = alloca i32
%16 = alloca [2 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = call i64 @malloc(i32 200)
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %6
%19 = call i64 @malloc(i32 200)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %7
%21 = call i64 @malloc(i32 2048)
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %8
store i64 0, i64* %14
%23 = bitcast [2 x i8]* %16 to i8*
store i32 0, i32* %13
br label %24
24: ; preds = %48, %2
%25 = load i32, i32* %4
%26 = load i8**, i8*** %5
%27 = call i32 @getopt(i32 %25, i8** %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %27, i32* %12
%28 = icmp ne i32 %27, -1
br i1 %28, label %29, label %49
29: ; preds = %24
%30 = load i32, i32* %12
switch i32 %30, label %43 [
i32 102, label %31
i32 111, label %37
]
31: ; preds = %29
%32 = load i8*, i8** %6
%33 = load i32, i32* @optarg
%34 = call i32 @strcpy(i8* %32, i32 %33)
%35 = load i32, i32* %13
%36 = add nsw i32 %35, 7
store i32 %36, i32* %13
br label %48
37: ; preds = %29
%38 = load i8*, i8** %7
%39 = load i32, i32* @optarg
%40 = call i32 @strcpy(i8* %38, i32 %39)
%41 = load i32, i32* %13
%42 = add nsw i32 %41, 11
store i32 %42, i32* %13
br label %48
43: ; preds = %29
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 0
%46 = load i8*, i8** %45
%47 = call i32 @helptext(i8* %46)
br label %48
48: ; preds = %43, %37, %31
br label %24
49: ; preds = %24
%50 = load i32, i32* %13
%51 = icmp ne i32 %50, 18
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 0
%55 = load i8*, i8** %54
%56 = call i32 @helptext(i8* %55)
br label %57
57: ; preds = %52, %49
%58 = load i8*, i8** %6
%59 = load i8*, i8** %7
%60 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %58, i8* %59)
%61 = load i8*, i8** %6
%62 = load i8*, i8** %7
%63 = call i64 @strcmp(i8* %61, i8* %62)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %73
65: ; preds = %57
%66 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 0
%69 = load i8*, i8** %68
%70 = call i32 @helptext(i8* %69)
%71 = load i32, i32* @EXIT_FAILURE
%72 = call i32 @exit(i32 %71)
unreachable
73: ; preds = %57
br label %74
74: ; preds = %73
%75 = load i8*, i8** %6
%76 = call i32* @fopen(i8* %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %76, i32** %10
%77 = icmp eq i32* %76, null
br i1 %77, label %78, label %86
78: ; preds = %74
%79 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 0
%82 = load i8*, i8** %81
%83 = call i32 @helptext(i8* %82)
%84 = load i32, i32* @EXIT_FAILURE
%85 = call i32 @exit(i32 %84)
unreachable
86: ; preds = %74
br label %87
87: ; preds = %86
%88 = load i8*, i8** %7
%89 = call i32* @fopen(i8* %88, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %89, i32** %11
%90 = icmp eq i32* %89, null
br i1 %90, label %91, label %99
91: ; preds = %87
%92 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 0
%95 = load i8*, i8** %94
%96 = call i32 @helptext(i8* %95)
%97 = load i32, i32* @EXIT_FAILURE
%98 = call i32 @exit(i32 %97)
unreachable
99: ; preds = %87
br label %100
100: ; preds = %116, %99
%101 = load i32*, i32** %10
%102 = call i32 @getline(i8** %8, i64* %14, i32* %101)
store i32 %102, i32* %15
%103 = icmp ne i32 %102, -1
br i1 %103, label %104, label %120
104: ; preds = %100
%105 = load i8*, i8** %8
%106 = getelementptr inbounds [2 x i8], [2 x i8]* %16, i64 0, i64 0
%107 = call i8* @strtok(i8* %105, i8* %106)
store i8* %107, i8** %9
br label %108
108: ; preds = %111, %104
%109 = load i8*, i8** %9
%110 = icmp ne i8* %109, null
br i1 %110, label %111, label %116
111: ; preds = %108
%112 = load i8*, i8** %9
%113 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %112)
%114 = getelementptr inbounds [2 x i8], [2 x i8]* %16, i64 0, i64 0
%115 = call i8* @strtok(i8* null, i8* %114)
store i8* %115, i8** %9
br label %108
116: ; preds = %108
%117 = load i32*, i32** %11
%118 = load i8*, i8** %8
%119 = call i32 @fprintf(i32* %117, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %118)
br label %100
120: ; preds = %100
%121 = load i32*, i32** %10
%122 = call i32 @fclose(i32* %121)
%123 = load i32*, i32** %11
%124 = call i32 @fclose(i32* %123)
%125 = load i8*, i8** %6
%126 = call i32 @free(i8* %125)
%127 = load i8*, i8** %7
%128 = call i32 @free(i8* %127)
%129 = load i8*, i8** %8
%130 = call i32 @free(i8* %129)
%131 = load i32, i32* @EXIT_SUCCESS
%132 = call i32 @exit(i32 %131)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"f:o:h?\00"
@optarg = global i32 0
@.str.1 = [37 x i8] c"Input file is %s, output file is %s\0A\00"
@.str.2 = [42 x i8] c"Input and output file may not be the same\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [29 x i8] c"Input file can not be opened\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [30 x i8] c"Output file can not be opened\00"
@.str.7 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i16
%6 = bitcast i8** %3 to i8*
%7 = tail call i64 @malloc(i32 200)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i64 @malloc(i32 200)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i64 @malloc(i32 2048)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %3
%13 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%14 = bitcast i16* %5 to i8*
store i16 44, i16* %5
br label %15
15: ; preds = %27, %2
%16 = phi i32 [ 0, %2 ], [ %28, %27 ]
br label %17
17: ; preds = %15, %29
%18 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
switch i32 %18, label %29 [
i32 -1, label %32
i32 102, label %19
i32 111, label %23
]
19: ; preds = %17
%20 = load i32, i32* @optarg
%21 = tail call i32 @strcpy(i8* %8, i32 %20)
%22 = add nsw i32 %16, 7
br label %27
23: ; preds = %17
%24 = load i32, i32* @optarg
%25 = tail call i32 @strcpy(i8* %10, i32 %24)
%26 = add nsw i32 %16, 11
br label %27
27: ; preds = %23, %19
%28 = phi i32 [ %22, %19 ], [ %26, %23 ]
br label %15
29: ; preds = %17
%30 = load i8*, i8** %1
%31 = tail call i32 @helptext(i8* %30)
br label %17
32: ; preds = %17
%33 = icmp eq i32 %16, 18
br i1 %33, label %37, label %34
34: ; preds = %32
%35 = load i8*, i8** %1
%36 = tail call i32 @helptext(i8* %35)
br label %37
37: ; preds = %34, %32
%38 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %10)
%39 = tail call i64 @strcmp(i8* %8, i8* %10)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%43 = load i8*, i8** %1
%44 = tail call i32 @helptext(i8* %43)
%45 = load i32, i32* @EXIT_FAILURE
%46 = tail call i32 @exit(i32 %45)
unreachable
47: ; preds = %37
%48 = tail call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %56
50: ; preds = %47
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%52 = load i8*, i8** %1
%53 = tail call i32 @helptext(i8* %52)
%54 = load i32, i32* @EXIT_FAILURE
%55 = tail call i32 @exit(i32 %54)
unreachable
56: ; preds = %47
%57 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%58 = icmp eq i32* %57, null
br i1 %58, label %62, label %59
59: ; preds = %56
%60 = call i32 @getline(i8** %3, i64* %4, i32* %48)
%61 = icmp eq i32 %60, -1
br i1 %61, label %82, label %68
62: ; preds = %56
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%64 = load i8*, i8** %1
%65 = tail call i32 @helptext(i8* %64)
%66 = load i32, i32* @EXIT_FAILURE
%67 = tail call i32 @exit(i32 %66)
unreachable
68: ; preds = %59, %77
%69 = load i8*, i8** %3
%70 = call i8* @strtok(i8* %69, i8* %14)
%71 = icmp eq i8* %70, null
br i1 %71, label %77, label %72
72: ; preds = %68, %72
%73 = phi i8* [ %75, %72 ], [ %70, %68 ]
%74 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %73)
%75 = call i8* @strtok(i8* null, i8* %14)
%76 = icmp eq i8* %75, null
br i1 %76, label %77, label %72
77: ; preds = %72, %68
%78 = load i8*, i8** %3
%79 = call i32 @fprintf(i32* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %78)
%80 = call i32 @getline(i8** %3, i64* %4, i32* %48)
%81 = icmp eq i32 %80, -1
br i1 %81, label %82, label %68
82: ; preds = %77, %59
%83 = call i32 @fclose(i32* %48)
%84 = call i32 @fclose(i32* %57)
%85 = call i32 @free(i8* %8)
%86 = call i32 @free(i8* %10)
%87 = load i8*, i8** %3
%88 = call i32 @free(i8* %87)
%89 = load i32, i32* @EXIT_SUCCESS
%90 = call i32 @exit(i32 %89)
unreachable
}