#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 */
char EOF;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, size_t const, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
char getc(int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t const);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
long strtol(char *, char **, int);
int main(int argc, char *argv[]) {
  FILE *file = stdin;
  long int line_number;
  long int number_of_lines = 0;
  char ch;
  char *line = NULL;
  const size_t size = 1024;
  char *endptr, *str;
  int count_from_one_flag = 0;
  if (argc < 2) {
    fprintf(stderr,
            "Usage: %s [-1] LINENUMBER [FILE]\n -1: Count from 1, instead of 0",
            argv[0]);
    exit(EXIT_FAILURE);
  }
  line = malloc(sizeof(char) * size);
  memset(line, 0, size);
  if (argv[1][0] == '-') {
    if (argv[1][1] == '1') {
      count_from_one_flag = 1;
      --argc;
      ++argv;
    } else {
      fprintf(
          stderr,
          "Usage: %s [-1] LINENUMBER [FILE]\n -1: Count from 1, instead of 0",
          argv[0]);
      free(line);
      exit(EXIT_FAILURE);
    }
  }
  str = *++argv;
  --argc;
  line_number = strtol(str, &endptr, 10);
  if (endptr == str) {
    fprintf(stderr, "First argument isn't a number\n");
    free(line);
    exit(EXIT_FAILURE);
  }
  if (count_from_one_flag == 1)
    line_number--;
  if (--argc > 0) {
    file = fopen(*++argv, "r");
    if (file == NULL) {
      perror("Error while opening file");
      free(line);
      exit(EXIT_FAILURE);
    }
  }
  while (number_of_lines < line_number) {
    ch = getc(file);
    if (ch == '\n')
      number_of_lines++;
    else if (ch == EOF) {
      fprintf(stderr, "End of file\n");
      free(line);
      exit(EXIT_FAILURE);
    }
  }
  fgets(line, size, file);
  if (line == NULL) {
    fprintf(stderr, "Error in getline\n");
    free(line);
    exit(EXIT_FAILURE);
  }
  printf(line);
  free(line);
  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    0x2e1b(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x400,-0x40(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1229 <main+0x79>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    $0x400,%edi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12cb <main+0x11b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x31,%eax
jne    1291 <main+0xe1>
movl   $0x1,-0x54(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    12c6 <main+0x116>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    12cb <main+0x11b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x50(%rbp),%rax
jne    133d <main+0x18d>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
lea    0xd22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpl   $0x1,-0x54(%rbp)
jne    1353 <main+0x1a3>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    13bb <main+0x20b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
lea    0xce1(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13b6 <main+0x206>
lea    0xcc8(%rip),%rdi
call   10b0 <perror@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2c19(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    13bb <main+0x20b>
jmp    13c0 <main+0x210>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1446 <main+0x296>
mov    -0x18(%rbp),%rdi
call   10d0 <getc@plt>
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0xa,%eax
jne    13f8 <main+0x248>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1441 <main+0x291>
movsbl -0x29(%rbp),%eax
mov    0x2bdd(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    143c <main+0x28c>
mov    0x2bbb(%rip),%rax
mov    (%rax),%edi
lea    0xc5d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2b93(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1441 <main+0x291>
jmp    13c0 <main+0x210>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmpq   $0x0,-0x38(%rbp)
jne    1491 <main+0x2e1>
mov    0x2b66(%rip),%rax
mov    (%rax),%edi
lea    0xc15(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2b3e(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x38(%rbp),%rdi
call   1040 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2b16(%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    $0x18,%rsp
mov    %rsi,%r15
cmp    $0x1,%edi
jle    130b <main+0x15b>
mov    %edi,%r13d
mov    0x2e14(%rip),%rax
mov    (%rax),%r12
mov    $0x400,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    $0x400,%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    0x8(%r15),%rbp
mov    0x0(%rbp),%r14b
cmp    $0x2d,%r14b
mov    %rbx,0x8(%rsp)
jne    121c <main+0x6c>
cmpb   $0x31,0x1(%rbp)
jne    135a <main+0x1aa>
add    $0xffffffff,%r13d
mov    0x10(%r15),%rbp
add    $0x8,%r15
lea    0x10(%rsp),%rsi
mov    %rbp,%rdi
mov    $0xa,%edx
call   1080 <strtol@plt>
cmp    %rbp,0x10(%rsp)
je     1327 <main+0x177>
mov    %rax,%rbx
xor    %ebp,%ebp
cmp    $0x2d,%r14b
sete   %r14b
cmp    $0x3,%r13d
jb     1268 <main+0xb8>
mov    0x10(%r15),%rdi
lea    0xe09(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
je     137c <main+0x1cc>
mov    %r14b,%bpl
sub    %rbp,%rbx
test   %rbx,%rbx
jle    12c9 <main+0x119>
xor    %ebp,%ebp
mov    0x2d64(%rip),%r14
jmp    1289 <main+0xd9>
xchg   %ax,%ax
add    $0x1,%rbp
cmp    %rbx,%rbp
jge    12c9 <main+0x119>
mov    %r12,%rdi
call   10d0 <getc@plt>
cmp    $0xa,%al
je     1280 <main+0xd0>
cmp    (%r14),%al
jne    1284 <main+0xd4>
mov    0x2d2f(%rip),%rax
mov    (%rax),%edi
lea    0xdd1(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    $0x400,%esi
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rbx,%rbx
je     133c <main+0x18c>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cbe(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xce2(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    12bb <main+0x10b>
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
lea    0xd0a(%rip),%rsi
jmp    12aa <main+0xfa>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
lea    0xd3c(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
jmp    12b6 <main+0x106>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xc93(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbx,%rdi
jmp    12b6 <main+0x106>
lea    0xcdf(%rip),%rdi
call   10b0 <perror@plt>
jmp    12b1 <main+0x101>

LLVM IR (-O0):
@stdin = global i32* null
@stderr = global i32 0
@.str = [65 x i8] c"Usage: %s [-1] LINENUMBER [FILE]\0A -1: Count from 1, instead of 0\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [31 x i8] c"First argument isn't a number\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [25 x i8] c"Error while opening file\00"
@EOF = global i8 0
@.str.4 = [13 x i8] c"End of file\0A\00"
@.str.5 = [18 x i8] c"Error in getline\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 i64
%8 = alloca i64
%9 = alloca i8
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32*, i32** @stdin
store i32* %15, i32** %6
store i64 0, i64* %8
store i8* null, i8** %10
store i64 1024, i64* %11
store i32 0, i32* %14
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 2
br i1 %17, label %18, label %26
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = load i32, i32* @EXIT_FAILURE
%25 = call i32 @exit(i32 %24)
unreachable
26: ; preds = %2
%27 = call i8* @malloc(i32 1024)
store i8* %27, i8** %10
%28 = load i8*, i8** %10
%29 = call i32 @memset(i8* %28, i32 0, i64 1024)
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 45
br i1 %36, label %37, label %61
37: ; preds = %26
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = getelementptr inbounds i8, i8* %40, i64 1
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 49
br i1 %44, label %45, label %50
45: ; preds = %37
store i32 1, i32* %14
%46 = load i32, i32* %4
%47 = add nsw i32 %46, -1
store i32 %47, i32* %4
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i32 1
store i8** %49, i8*** %5
br label %60
50: ; preds = %37
%51 = load i32, i32* @stderr
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 0
%54 = load i8*, i8** %53
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %54)
%56 = load i8*, i8** %10
%57 = call i32 @free(i8* %56)
%58 = load i32, i32* @EXIT_FAILURE
%59 = call i32 @exit(i32 %58)
unreachable
60: ; preds = %45
br label %61
61: ; preds = %60, %26
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i32 1
store i8** %63, i8*** %5
%64 = load i8*, i8** %63
store i8* %64, i8** %13
%65 = load i32, i32* %4
%66 = add nsw i32 %65, -1
store i32 %66, i32* %4
%67 = load i8*, i8** %13
%68 = call i64 @strtol(i8* %67, i8** %12, i32 10)
store i64 %68, i64* %7
%69 = load i8*, i8** %12
%70 = load i8*, i8** %13
%71 = icmp eq i8* %69, %70
br i1 %71, label %72, label %79
72: ; preds = %61
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%75 = load i8*, i8** %10
%76 = call i32 @free(i8* %75)
%77 = load i32, i32* @EXIT_FAILURE
%78 = call i32 @exit(i32 %77)
unreachable
79: ; preds = %61
%80 = load i32, i32* %14
%81 = icmp eq i32 %80, 1
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = load i64, i64* %7
%84 = add nsw i64 %83, -1
store i64 %84, i64* %7
br label %85
85: ; preds = %82, %79
%86 = load i32, i32* %4
%87 = add nsw i32 %86, -1
store i32 %87, i32* %4
%88 = icmp sgt i32 %87, 0
br i1 %88, label %89, label %103
89: ; preds = %85
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i32 1
store i8** %91, i8*** %5
%92 = load i8*, i8** %91
%93 = call i32* @fopen(i8* %92, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %93, i32** %6
%94 = load i32*, i32** %6
%95 = icmp eq i32* %94, null
br i1 %95, label %96, label %102
96: ; preds = %89
%97 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%98 = load i8*, i8** %10
%99 = call i32 @free(i8* %98)
%100 = load i32, i32* @EXIT_FAILURE
%101 = call i32 @exit(i32 %100)
unreachable
102: ; preds = %89
br label %103
103: ; preds = %102, %85
br label %104
104: ; preds = %131, %103
%105 = load i64, i64* %8
%106 = load i64, i64* %7
%107 = icmp slt i64 %105, %106
br i1 %107, label %108, label %132
108: ; preds = %104
%109 = load i32*, i32** %6
%110 = call signext i8 @getc(i32* %109)
store i8 %110, i8* %9
%111 = load i8, i8* %9
%112 = sext i8 %111 to i32
%113 = icmp eq i32 %112, 10
br i1 %113, label %114, label %117
114: ; preds = %108
%115 = load i64, i64* %8
%116 = add nsw i64 %115, 1
store i64 %116, i64* %8
br label %131
117: ; preds = %108
%118 = load i8, i8* %9
%119 = sext i8 %118 to i32
%120 = load i8, i8* @EOF
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %119, %121
br i1 %122, label %123, label %130
123: ; preds = %117
%124 = load i32, i32* @stderr
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%126 = load i8*, i8** %10
%127 = call i32 @free(i8* %126)
%128 = load i32, i32* @EXIT_FAILURE
%129 = call i32 @exit(i32 %128)
unreachable
130: ; preds = %117
br label %131
131: ; preds = %130, %114
br label %104
132: ; preds = %104
%133 = load i8*, i8** %10
%134 = load i32*, i32** %6
%135 = call i32 @fgets(i8* %133, i64 1024, i32* %134)
%136 = load i8*, i8** %10
%137 = icmp eq i8* %136, null
br i1 %137, label %138, label %145
138: ; preds = %132
%139 = load i32, i32* @stderr
%140 = call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%141 = load i8*, i8** %10
%142 = call i32 @free(i8* %141)
%143 = load i32, i32* @EXIT_FAILURE
%144 = call i32 @exit(i32 %143)
unreachable
145: ; preds = %132
%146 = load i8*, i8** %10
%147 = call i32 @printf(i8* %146)
%148 = load i8*, i8** %10
%149 = call i32 @free(i8* %148)
%150 = load i32, i32* @EXIT_SUCCESS
ret i32 %150
}

LLVM IR (-O2):
@stdin = global i32* null
@stderr = global i32 0
@.str = [65 x i8] c"Usage: %s [-1] LINENUMBER [FILE]\0A -1: Count from 1, instead of 0\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [31 x i8] c"First argument isn't a number\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [25 x i8] c"Error while opening file\00"
@EOF = global i8 0
@.str.4 = [13 x i8] c"End of file\0A\00"
@.str.5 = [18 x i8] c"Error in getline\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = load i32*, i32** @stdin
%5 = bitcast i8** %3 to i8*
%6 = icmp slt i32 %0, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %1
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = tail call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%15 = tail call i32 @memset(i8* %14, i32 0, i64 1024)
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 45
br i1 %19, label %20, label %35
20: ; preds = %13
%21 = getelementptr inbounds i8, i8* %17, i64 1
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 49
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = add nsw i32 %0, -1
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
br label %35
28: ; preds = %20
%29 = load i32, i32* @stderr
%30 = load i8*, i8** %1
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = tail call i32 @free(i8* %14)
%33 = load i32, i32* @EXIT_FAILURE
%34 = tail call i32 @exit(i32 %33)
unreachable
35: ; preds = %24, %13
%36 = phi i8* [ %27, %24 ], [ %17, %13 ]
%37 = phi i8** [ %16, %24 ], [ %1, %13 ]
%38 = phi i32 [ %25, %24 ], [ %0, %13 ]
%39 = call i64 @strtol(i8* %36, i8** %3, i32 10)
%40 = load i8*, i8** %3
%41 = icmp eq i8* %40, %36
br i1 %41, label %42, label %48
42: ; preds = %35
%43 = load i32, i32* @stderr
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%45 = tail call i32 @free(i8* %14)
%46 = load i32, i32* @EXIT_FAILURE
%47 = tail call i32 @exit(i32 %46)
unreachable
48: ; preds = %35
%49 = sext i1 %19 to i64
%50 = add nsw i64 %39, %49
%51 = icmp ugt i32 %38, 2
br i1 %51, label %52, label %62
52: ; preds = %48
%53 = getelementptr inbounds i8*, i8** %37, i64 2
%54 = load i8*, i8** %53
%55 = tail call i32* @fopen(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%56 = icmp eq i32* %55, null
br i1 %56, label %57, label %62
57: ; preds = %52
%58 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%59 = tail call i32 @free(i8* %14)
%60 = load i32, i32* @EXIT_FAILURE
%61 = tail call i32 @exit(i32 %60)
unreachable
62: ; preds = %52, %48
%63 = phi i32* [ %55, %52 ], [ %4, %48 ]
%64 = icmp sgt i64 %50, 0
br i1 %64, label %65, label %83
65: ; preds = %62, %80
%66 = phi i64 [ %81, %80 ], [ 0, %62 ]
%67 = tail call signext i8 @getc(i32* %63)
%68 = icmp eq i8 %67, 10
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = add nsw i64 %66, 1
br label %80
71: ; preds = %65
%72 = load i8, i8* @EOF
%73 = icmp eq i8 %67, %72
br i1 %73, label %74, label %80
74: ; preds = %71
%75 = load i32, i32* @stderr
%76 = tail call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%77 = tail call i32 @free(i8* %14)
%78 = load i32, i32* @EXIT_FAILURE
%79 = tail call i32 @exit(i32 %78)
unreachable
80: ; preds = %71, %69
%81 = phi i64 [ %70, %69 ], [ %66, %71 ]
%82 = icmp slt i64 %81, %50
br i1 %82, label %65, label %83
83: ; preds = %80, %62
%84 = tail call i32 @fgets(i8* %14, i64 1024, i32* %63)
%85 = icmp eq i8* %14, null
br i1 %85, label %86, label %92
86: ; preds = %83
%87 = load i32, i32* @stderr
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%89 = tail call i32 @free(i8* null)
%90 = load i32, i32* @EXIT_FAILURE
%91 = tail call i32 @exit(i32 %90)
unreachable
92: ; preds = %83
%93 = tail call i32 @printf(i8* %14)
%94 = tail call i32 @free(i8* %14)
%95 = load i32, i32* @EXIT_SUCCESS
ret i32 %95
}