#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 LINE_MAX;
int PrintHelp();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs_unlocked(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
unsigned long long strtoull(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  if (argc == 1) {
    printf("No arguments provided.\n");
    return PrintHelp();
  }
  unsigned long long int count = 0;
  int do_act[argc];
  for (int a = argc; a-- > 0;) {
    do_act[a] = 0;
  }
  int iSit = 1;
  for (int b = 1; b < argc; b++) {
    if (strcmp(argv[b], "-c") == 0) {
      if (b < argc) {
        b++;
        count = strtoull(argv[b], NULL, 10);
      }
    } else if (strcmp(argv[b], "-f") == 0) {
      iSit++;
    } else if (strcmp(argv[b], "-h") == 0) {
      return PrintHelp();
    } else {
      do_act[b] = iSit;
      if (iSit == 2) {
        iSit--;
      }
    }
  }
  FILE *file;
  char line[LINE_MAX];
  char *temp;
  for (unsigned long long int c = count; c-- > 0;) {
    for (int d = 1; d < argc; d++) {
      switch (do_act[d]) {
      case 0:
        break;
      case 1:
        fputs_unlocked(argv[d], stdout);
        break;
      case 2: {
        file = fopen(argv[d], "r");
        while ((temp = fgets(line, LINE_MAX, file)) != NULL) {
          fputs_unlocked(temp, stdout);
        }
        free(temp);
        fclose(file);
      } break;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11ce <main+0x3e>
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <PrintHelp@plt>
mov    %eax,-0x4(%rbp)
jmp    149a <main+0x30a>
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x2c(%rbp)
cmp    $0x0,%eax
jle    122b <main+0x9b>
mov    -0x68(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    1203 <main+0x73>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    134a <main+0x1ba>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdc0(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    129f <main+0x10f>
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    129a <main+0x10a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1080 <strtoull@plt>
mov    %rax,-0x18(%rbp)
jmp    1337 <main+0x1a7>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd69(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12cf <main+0x13f>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1332 <main+0x1a2>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd3c(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1307 <main+0x177>
mov    $0x0,%al
call   10b0 <PrintHelp@plt>
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x38(%rbp)
jmp    1493 <main+0x303>
mov    -0x68(%rbp),%rax
mov    -0x30(%rbp),%edx
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
cmpl   $0x2,-0x30(%rbp)
jne    1328 <main+0x198>
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30(%rbp)
jmp    132d <main+0x19d>
jmp    1332 <main+0x1a2>
jmp    1337 <main+0x1a7>
jmp    133c <main+0x1ac>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1239 <main+0xa9>
mov    0x2c97(%rip),%rax
mov    (%rax),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x58(%rbp)
cmp    $0x0,%rax
jbe    1485 <main+0x2f5>
movl   $0x1,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1480 <main+0x2f0>
mov    -0x68(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x74(%rbp)
test   %eax,%eax
je     13e0 <main+0x250>
jmp    13be <main+0x22e>
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
je     13e5 <main+0x255>
jmp    13cf <main+0x23f>
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
je     1404 <main+0x274>
jmp    146d <main+0x2dd>
jmp    146d <main+0x2dd>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2be0(%rip),%rax
mov    (%rax),%esi
call   1070 <fputs_unlocked@plt>
jmp    146d <main+0x2dd>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc0a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x70(%rbp),%rdi
mov    0x2bbd(%rip),%rax
mov    (%rax),%esi
mov    -0x40(%rbp),%rdx
call   1060 <fgets@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
je     145b <main+0x2cb>
mov    -0x50(%rbp),%rdi
mov    0x2b89(%rip),%rax
mov    (%rax),%esi
call   1070 <fputs_unlocked@plt>
jmp    1420 <main+0x290>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1472 <main+0x2e2>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1397 <main+0x207>
jmp    1377 <main+0x1e7>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x1,%edi
jne    11d7 <main+0x37>
lea    0xe4e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <PrintHelp@plt>
mov    %edi,%r12d
mov    %rsp,%rcx
mov    %edi,%edx
mov    %rsp,%rdi
lea    0xf(,%rdx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
test   %r12d,%r12d
jle    13c5 <main+0x225>
mov    %rsi,-0x48(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x50(%rbp)
lea    0x0(,%rdx,4),%rdx
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
xor    %esi,%esi
call   1060 <memset@plt>
mov    $0x1,%ebx
mov    $0x1,%r13d
mov    -0x48(%rbp),%r15
jmp    1261 <main+0xc1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%r14),%ebx
mov    0x8(%r15,%r14,8),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1090 <strtoull@plt>
mov    %rax,-0x30(%rbp)
add    $0x1,%ebx
cmp    %r12d,%ebx
jge    12c6 <main+0x126>
movslq %ebx,%r14
mov    (%r15,%r14,8),%rdi
lea    0xd91(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1240 <main+0xa0>
mov    (%r15,%r14,8),%rdi
lea    0xd7f(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     12c0 <main+0x120>
mov    (%r15,%r14,8),%rdi
lea    0xd6d(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13c9 <main+0x229>
mov    -0x38(%rbp),%rax
mov    %r13d,(%rax,%r14,4)
cmp    $0x2,%r13d
mov    $0x1,%eax
cmove  %eax,%r13d
jmp    1259 <main+0xb9>
xchg   %ax,%ax
add    $0x1,%r13d
jmp    1259 <main+0xb9>
mov    0x2d1b(%rip),%r14
mov    (%r14),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x30(%rbp),%rax
test   %rax,%rax
je     13c1 <main+0x221>
mov    0x2ce3(%rip),%r12
mov    -0x48(%rbp),%r15
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%rdx
jmp    131d <main+0x17d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x30(%rbp),%rax
test   %rax,%rax
je     13c1 <main+0x221>
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
mov    $0x1,%r13d
jmp    1354 <main+0x1b4>
nopl   (%rax)
xor    %edi,%edi
call   1030 <free@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    -0x48(%rbp),%r15
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%rdx
add    $0x1,%r13
cmp    %rcx,%r13
je     1310 <main+0x170>
mov    (%rdx,%r13,4),%eax
cmp    $0x2,%eax
je     1380 <main+0x1e0>
cmp    $0x1,%eax
jne    134b <main+0x1ab>
mov    (%r15,%r13,8),%rdi
mov    (%r12),%esi
call   1080 <fputs_unlocked@plt>
mov    -0x38(%rbp),%rdx
mov    -0x50(%rbp),%rcx
jmp    134b <main+0x1ab>
nopl   0x0(%rax)
mov    (%r15,%r13,8),%rdi
lea    0xc7e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%r15
mov    (%r14),%esi
mov    %rbx,%rdi
mov    %rax,%rdx
nopl   0x0(%rax)
call   1070 <fgets@plt>
test   %rax,%rax
je     1330 <main+0x190>
mov    (%r12),%esi
mov    %rax,%rdi
call   1080 <fputs_unlocked@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
mov    %r15,%rdx
jmp    13a0 <main+0x200>
xor    %eax,%eax
jmp    13d0 <main+0x230>
xor    %eax,%eax
jmp    13d4 <main+0x234>
xor    %eax,%eax
call   10c0 <PrintHelp@plt>
mov    -0x40(%rbp),%rcx
mov    %rcx,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"No arguments provided.\0A\00"
@.str.1 = [3 x i8] c"-c\00"
@.str.2 = [3 x i8] c"-f\00"
@.str.3 = [3 x i8] c"-h\00"
@LINE_MAX = global i32 0
@stdout = global i32 0
@.str.4 = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i64
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %23
20: ; preds = %2
%21 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (...) @PrintHelp()
store i32 %22, i32* %3
br label %159
23: ; preds = %2
store i64 0, i64* %6
%24 = load i32, i32* %4
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %7
%27 = alloca i32, i64 %25
store i64 %25, i64* %8
%28 = load i32, i32* %4
store i32 %28, i32* %9
br label %29
29: ; preds = %33, %23
%30 = load i32, i32* %9
%31 = add nsw i32 %30, -1
store i32 %31, i32* %9
%32 = icmp sgt i32 %30, 0
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %27, i64 %35
store i32 0, i32* %36
br label %29
37: ; preds = %29
store i32 1, i32* %10
store i32 1, i32* %11
br label %38
38: ; preds = %99, %37
%39 = load i32, i32* %11
%40 = load i32, i32* %4
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %102
42: ; preds = %38
%43 = load i8**, i8*** %5
%44 = load i32, i32* %11
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %64
50: ; preds = %42
%51 = load i32, i32* %11
%52 = load i32, i32* %4
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %63
54: ; preds = %50
%55 = load i32, i32* %11
%56 = add nsw i32 %55, 1
store i32 %56, i32* %11
%57 = load i8**, i8*** %5
%58 = load i32, i32* %11
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8*, i8** %57, i64 %59
%61 = load i8*, i8** %60
%62 = call i64 @strtoull(i8* %61, i32* null, i32 10)
store i64 %62, i64* %6
br label %63
63: ; preds = %54, %50
br label %98
64: ; preds = %42
%65 = load i8**, i8*** %5
%66 = load i32, i32* %11
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
%70 = call i64 @strcmp(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %64
%73 = load i32, i32* %10
%74 = add nsw i32 %73, 1
store i32 %74, i32* %10
br label %97
75: ; preds = %64
%76 = load i8**, i8*** %5
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i8*, i8** %79
%81 = call i64 @strcmp(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %75
%84 = call i32 (...) @PrintHelp()
store i32 %84, i32* %3
store i32 1, i32* %12
br label %157
85: ; preds = %75
%86 = load i32, i32* %10
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %27, i64 %88
store i32 %86, i32* %89
%90 = load i32, i32* %10
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %95
92: ; preds = %85
%93 = load i32, i32* %10
%94 = add nsw i32 %93, -1
store i32 %94, i32* %10
br label %95
95: ; preds = %92, %85
br label %96
96: ; preds = %95
br label %97
97: ; preds = %96, %72
br label %98
98: ; preds = %97, %63
br label %99
99: ; preds = %98
%100 = load i32, i32* %11
%101 = add nsw i32 %100, 1
store i32 %101, i32* %11
br label %38
102: ; preds = %38
%103 = load i32, i32* @LINE_MAX
%104 = zext i32 %103 to i64
%105 = alloca i8, i64 %104
store i64 %104, i64* %14
%106 = load i64, i64* %6
store i64 %106, i64* %16
br label %107
107: ; preds = %155, %102
%108 = load i64, i64* %16
%109 = add i64 %108, -1
store i64 %109, i64* %16
%110 = icmp ugt i64 %108, 0
br i1 %110, label %111, label %156
111: ; preds = %107
store i32 1, i32* %17
br label %112
112: ; preds = %152, %111
%113 = load i32, i32* %17
%114 = load i32, i32* %4
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %155
116: ; preds = %112
%117 = load i32, i32* %17
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %27, i64 %118
%120 = load i32, i32* %119
switch i32 %120, label %151 [
i32 0, label %121
i32 1, label %122
i32 2, label %130
]
121: ; preds = %116
br label %151
122: ; preds = %116
%123 = load i8**, i8*** %5
%124 = load i32, i32* %17
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8*, i8** %123, i64 %125
%127 = load i8*, i8** %126
%128 = load i32, i32* @stdout
%129 = call i32 @fputs_unlocked(i8* %127, i32 %128)
br label %151
130: ; preds = %116
%131 = load i8**, i8*** %5
%132 = load i32, i32* %17
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8*, i8** %131, i64 %133
%135 = load i8*, i8** %134
%136 = call i32* @fopen(i8* %135, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %136, i32** %13
br label %137
137: ; preds = %142, %130
%138 = load i32, i32* @LINE_MAX
%139 = load i32*, i32** %13
%140 = call i8* @fgets(i8* %105, i32 %138, i32* %139)
store i8* %140, i8** %15
%141 = icmp ne i8* %140, null
br i1 %141, label %142, label %146
142: ; preds = %137
%143 = load i8*, i8** %15
%144 = load i32, i32* @stdout
%145 = call i32 @fputs_unlocked(i8* %143, i32 %144)
br label %137
146: ; preds = %137
%147 = load i8*, i8** %15
%148 = call i32 @free(i8* %147)
%149 = load i32*, i32** %13
%150 = call i32 @fclose(i32* %149)
br label %151
151: ; preds = %116, %146, %122, %121
br label %152
152: ; preds = %151
%153 = load i32, i32* %17
%154 = add nsw i32 %153, 1
store i32 %154, i32* %17
br label %112
155: ; preds = %112
br label %107
156: ; preds = %107
store i32 0, i32* %3
store i32 1, i32* %12
br label %157
157: ; preds = %156, %83
%158 = load i8*, i8** %7
br label %159
159: ; preds = %157, %20
%160 = load i32, i32* %3
ret i32 %160
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"-c\00"
@.str.2 = [3 x i8] c"-f\00"
@.str.3 = [3 x i8] c"-h\00"
@LINE_MAX = global i32 0
@stdout = global i32 0
@.str.4 = [2 x i8] c"r\00"
@str = [23 x i8] c"No arguments provided.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @PrintHelp()
br label %93
7: ; preds = %2
%8 = zext i32 %0 to i64
%9 = tail call i8* @llvm.stacksave()
%10 = alloca i32, i64 %8
%11 = icmp sgt i32 %0, 0
br i1 %11, label %12, label %91
12: ; preds = %7
%13 = bitcast i32* %10 to i8*
%14 = shl nuw nsw i64 %8, 2
br label %15
15: ; preds = %12, %46
%16 = phi i64 [ %49, %46 ], [ 0, %12 ]
%17 = phi i32 [ %50, %46 ], [ 1, %12 ]
%18 = phi i32 [ %47, %46 ], [ 1, %12 ]
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %15
%25 = add nsw i32 %17, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %1, i64 %26
%28 = load i8*, i8** %27
%29 = tail call i64 @strtoull(i8* nocapture %28, i32* null, i32 10)
br label %46
30: ; preds = %15
%31 = load i8*, i8** %20
%32 = tail call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = add nsw i32 %18, 1
br label %46
36: ; preds = %30
%37 = load i8*, i8** %20
%38 = tail call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = tail call i32 (...) @PrintHelp()
br label %91
42: ; preds = %36
%43 = getelementptr inbounds i32, i32* %10, i64 %19
store i32 %18, i32* %43
%44 = icmp eq i32 %18, 2
%45 = select i1 %44, i32 1, i32 %18
br label %46
46: ; preds = %42, %24, %34
%47 = phi i32 [ %18, %24 ], [ %35, %34 ], [ %45, %42 ]
%48 = phi i32 [ %25, %24 ], [ %17, %34 ], [ %17, %42 ]
%49 = phi i64 [ %29, %24 ], [ %16, %34 ], [ %16, %42 ]
%50 = add nsw i32 %48, 1
%51 = icmp slt i32 %50, %0
br i1 %51, label %15, label %52
52: ; preds = %46
%53 = load i32, i32* @LINE_MAX
%54 = zext i32 %53 to i64
%55 = alloca i8, i64 %54
%56 = icmp eq i64 %49, 0
br i1 %56, label %91, label %59
57: ; preds = %88
%58 = icmp eq i64 %61, 0
br i1 %58, label %91, label %59
59: ; preds = %52, %57
%60 = phi i64 [ %61, %57 ], [ %49, %52 ]
%61 = add i64 %60, -1
br label %62
62: ; preds = %59, %88
%63 = phi i64 [ 1, %59 ], [ %89, %88 ]
%64 = getelementptr inbounds i32, i32* %10, i64 %63
%65 = load i32, i32* %64
switch i32 %65, label %88 [
i32 2, label %71
i32 1, label %66
]
66: ; preds = %62
%67 = getelementptr inbounds i8*, i8** %1, i64 %63
%68 = load i8*, i8** %67
%69 = load i32, i32* @stdout
%70 = call i32 @fputs_unlocked(i8* %68, i32 %69)
br label %88
71: ; preds = %62
%72 = getelementptr inbounds i8*, i8** %1, i64 %63
%73 = load i8*, i8** %72
%74 = call i32* @fopen(i8* %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%75 = load i32, i32* @LINE_MAX
%76 = call i8* @fgets(i8* %55, i32 %75, i32* %74)
%77 = icmp eq i8* %76, null
br i1 %77, label %85, label %78
78: ; preds = %71, %78
%79 = phi i8* [ %83, %78 ], [ %76, %71 ]
%80 = load i32, i32* @stdout
%81 = call i32 @fputs_unlocked(i8* %79, i32 %80)
%82 = load i32, i32* @LINE_MAX
%83 = call i8* @fgets(i8* %55, i32 %82, i32* %74)
%84 = icmp eq i8* %83, null
br i1 %84, label %85, label %78
85: ; preds = %78, %71
%86 = call i32 @free(i8* null)
%87 = call i32 @fclose(i32* %74)
br label %88
88: ; preds = %66, %85, %62
%89 = add nuw nsw i64 %63, 1
%90 = icmp eq i64 %89, %8
br i1 %90, label %57, label %62
91: ; preds = %57, %7, %52, %40
%92 = phi i32 [ %41, %40 ], [ 0, %52 ], [ 0, %7 ], [ 0, %57 ]
br label %93
93: ; preds = %91, %4
%94 = phi i32 [ %6, %4 ], [ %92, %91 ]
ret i32 %94
}