#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 */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *strstr(char *, char *);
int match_line(int fd, char *str) {
  char buff[32768] = {'\0'};
  char *pc;
  struct fileslines {
    int fd;
    int linenum;
  };
  static struct fileslines fl[512] = {{0, 0}};
  int linenum = 1;
  char eol = 0;
  char eof = 0;
  int nfd = 1;
  int f;
  for (f = 0; f < 512; f++) {
    if (fl[f].fd == fd) {
      linenum = fl[f].linenum;
      nfd = 0;
      break;
    }
  }
  if (nfd == 1) {
    for (f = 0; f < 512; f++) {
      if (fl[f].fd == 0) {
        fl[f].fd = fd;
        fl[f].linenum = 1;
        linenum = 1;
        break;
      }
    }
  }
  while (1) {
    for (pc = buff; pc != &buff[32768 - 1]; ++pc) {
      if (read(fd, pc, 1) != 1) {
        *pc = '\0';
        eof = 1;
        break;
      }
      if (*pc == '\n') {
        ++pc;
        *pc = '\0';
        eol = 1;
        break;
      }
    }
    if (eof) {
      if (strstr(buff, str) == NULL) {
        fl[f].linenum = 0;
        return 0;
      } else {
        fl[f].linenum = linenum;
        return linenum;
      }
    }
    if (eol) {
      if (strstr(buff, str) == NULL) {
        (fl[f].linenum)++;
        linenum++;
        continue;
      } else {
        (fl[f].linenum)++;
        return linenum++;
      }
    } else {
      buff[32768 - 1] = '\0';
      fprintf(stderr, "\nCritical error: line buffer too small!\n");
      exit(-1);
    }
  }
}


x86 assembly (clang, -O0):
<match_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8030,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8010(%rbp),%rdi
xor    %esi,%esi
mov    $0x8000,%edx
call   1030 <memset@plt>
movl   $0x1,-0x801c(%rbp)
movb   $0x0,-0x801d(%rbp)
movb   $0x0,-0x801e(%rbp)
movl   $0x1,-0x8024(%rbp)
movl   $0x0,-0x8028(%rbp)
cmpl   $0x200,-0x8028(%rbp)
jge    120b <match_line+0xbb>
movslq -0x8028(%rbp),%rcx
lea    0x2ea1(%rip),%rax
mov    (%rax,%rcx,8),%eax
cmp    -0x8(%rbp),%eax
jne    11f2 <match_line+0xa2>
movslq -0x8028(%rbp),%rcx
lea    0x2e87(%rip),%rax
mov    0x4(%rax,%rcx,8),%eax
mov    %eax,-0x801c(%rbp)
movl   $0x0,-0x8024(%rbp)
jmp    120b <match_line+0xbb>
jmp    11f7 <match_line+0xa7>
mov    -0x8028(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8028(%rbp)
jmp    11a1 <match_line+0x51>
cmpl   $0x1,-0x8024(%rbp)
jne    12a1 <match_line+0x151>
movl   $0x0,-0x8028(%rbp)
cmpl   $0x200,-0x8028(%rbp)
jge    129c <match_line+0x14c>
movslq -0x8028(%rbp),%rcx
lea    0x2e20(%rip),%rax
cmpl   $0x0,(%rax,%rcx,8)
jne    1283 <match_line+0x133>
mov    -0x8(%rbp),%edx
movslq -0x8028(%rbp),%rcx
lea    0x2e05(%rip),%rax
mov    %edx,(%rax,%rcx,8)
movslq -0x8028(%rbp),%rcx
lea    0x2df4(%rip),%rax
movl   $0x1,0x4(%rax,%rcx,8)
movl   $0x1,-0x801c(%rbp)
jmp    129c <match_line+0x14c>
jmp    1288 <match_line+0x138>
mov    -0x8028(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8028(%rbp)
jmp    1222 <match_line+0xd2>
jmp    12a1 <match_line+0x151>
jmp    12a6 <match_line+0x156>
lea    -0x8010(%rbp),%rax
mov    %rax,-0x8018(%rbp)
mov    -0x8018(%rbp),%rax
lea    -0x8010(%rbp),%rcx
add    $0x7fff,%rcx
cmp    %rcx,%rax
je     135c <match_line+0x20c>
mov    -0x8(%rbp),%edi
mov    -0x8018(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
je     1305 <match_line+0x1b5>
mov    -0x8018(%rbp),%rax
movb   $0x0,(%rax)
movb   $0x1,-0x801e(%rbp)
jmp    135c <match_line+0x20c>
mov    -0x8018(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1340 <match_line+0x1f0>
mov    -0x8018(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8018(%rbp)
mov    -0x8018(%rbp),%rax
movb   $0x0,(%rax)
movb   $0x1,-0x801d(%rbp)
jmp    135c <match_line+0x20c>
jmp    1345 <match_line+0x1f5>
mov    -0x8018(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8018(%rbp)
jmp    12b4 <match_line+0x164>
cmpb   $0x0,-0x801e(%rbp)
je     13cb <match_line+0x27b>
lea    -0x8010(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strstr@plt>
cmp    $0x0,%rax
jne    13a5 <match_line+0x255>
movslq -0x8028(%rbp),%rcx
lea    0x2ccf(%rip),%rax
movl   $0x0,0x4(%rax,%rcx,8)
movl   $0x0,-0x4(%rbp)
jmp    1482 <match_line+0x332>
mov    -0x801c(%rbp),%edx
movslq -0x8028(%rbp),%rcx
lea    0x2ca7(%rip),%rax
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x801c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1482 <match_line+0x332>
cmpb   $0x0,-0x801d(%rbp)
je     145f <match_line+0x30f>
lea    -0x8010(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strstr@plt>
cmp    $0x0,%rax
jne    1426 <match_line+0x2d6>
movslq -0x8028(%rbp),%rcx
lea    0x2c60(%rip),%rax
mov    0x4(%rax,%rcx,8),%edx
add    $0x1,%edx
lea    0x2c52(%rip),%rax
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x801c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x801c(%rbp)
jmp    12a6 <match_line+0x156>
movslq -0x8028(%rbp),%rcx
lea    0x2c2c(%rip),%rax
mov    0x4(%rax,%rcx,8),%edx
add    $0x1,%edx
lea    0x2c1e(%rip),%rax
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x801c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x801c(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1482 <match_line+0x332>
movb   $0x0,-0x11(%rbp)
mov    0x2b76(%rip),%rax
mov    (%rax),%edi
lea    0xb8d(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x8030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8018,%rsp
mov    %rsi,0x8(%rsp)
mov    %edi,%ebp
lea    0x10(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x8000,%edx
xor    %esi,%esi
call   1030 <memset@plt>
lea    0x2ede(%rip),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %ebp,(%rcx,%rbx,8)
je     122a <match_line+0xda>
cmp    %ebp,0x8(%rcx,%rbx,8)
je     121a <match_line+0xca>
cmp    %ebp,0x10(%rcx,%rbx,8)
je     1220 <match_line+0xd0>
cmp    %ebp,0x18(%rcx,%rbx,8)
je     1226 <match_line+0xd6>
add    $0x4,%rbx
cmp    $0x200,%rbx
jne    1190 <match_line+0x40>
mov    $0x3,%edx
xor    %ebx,%ebx
mov    %rcx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpl   $0x0,-0x18(%rcx,%rdx,8)
je     132b <match_line+0x1db>
cmpl   $0x0,-0x10(%rcx,%rdx,8)
je     130c <match_line+0x1bc>
cmpl   $0x0,-0x8(%rcx,%rdx,8)
je     1316 <match_line+0x1c6>
cmpl   $0x0,(%rcx,%rdx,8)
je     1323 <match_line+0x1d3>
add    $0x4,%rbx
add    $0x20,%rax
add    $0x4,%rdx
cmp    $0x203,%rdx
jne    11d0 <match_line+0x80>
mov    $0x200,%ebx
jmp    133e <match_line+0x1ee>
add    $0x1,%rbx
jmp    122a <match_line+0xda>
add    $0x2,%rbx
jmp    122a <match_line+0xda>
add    $0x3,%rbx
mov    %ebx,%eax
lea    0x2e2d(%rip),%rcx
mov    0x4(%rcx,%rax,8),%r12d
mov    %ebx,%r13d
mov    $0x1,%r15b
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rsp,%r14,1),%rbx
add    $0x10,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
jne    12ca <match_line+0x17a>
cmpb   $0xa,(%rbx)
je     1290 <match_line+0x140>
add    $0x1,%r14
cmp    $0x7fff,%r14
jne    1250 <match_line+0x100>
test   $0x1,%r15b
je     1296 <match_line+0x146>
jmp    1349 <match_line+0x1f9>
nopl   0x0(%rax)
movb   $0x0,0x11(%rsp,%r14,1)
lea    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1070 <strstr@plt>
lea    0x2db4(%rip),%rdx
mov    0x4(%rdx,%r13,8),%ecx
add    $0x1,%ecx
test   %rax,%rax
jne    12f2 <match_line+0x1a2>
mov    %ecx,0x4(%rdx,%r13,8)
add    $0x1,%r12d
xor    %r15d,%r15d
jmp    123e <match_line+0xee>
movb   $0x0,0x10(%rsp,%r14,1)
lea    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1070 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %ecx,%r12d
mov    %r12d,%ecx
lea    0x2d6e(%rip),%rdx
mov    %ecx,0x4(%rdx,%r13,8)
mov    %r12d,%eax
add    $0x8018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
or     $0x1,%rbx
add    $0x8,%rax
jmp    132b <match_line+0x1db>
add    $0x10,%rax
add    $0xffffffffffffffff,%rdx
mov    %rdx,%rbx
jmp    132b <match_line+0x1db>
or     $0x3,%rbx
add    $0x18,%rax
mov    %ebx,%ecx
mov    %ebp,(%rax)
lea    0x2d2a(%rip),%rax
movl   $0x1,0x4(%rax,%rcx,8)
mov    $0x1,%r12d
jmp    1238 <match_line+0xe8>
movb   $0x0,0x800f(%rsp)
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
lea    0xc9f(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.fileslines = type { i32, i32 }
@match_line.fl = internal global [512 x %struct.fileslines] zeroinitializer
@stderr = global i32 0
@.str = [41 x i8] c"\0ACritical error: line buffer too small!\0A\00"
define i32 @match_line(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [32768 x i8]
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
%13 = bitcast [32768 x i8]* %6 to i8*
store i32 1, i32* %8
store i8 0, i8* %9
store i8 0, i8* %10
store i32 1, i32* %11
store i32 0, i32* %12
br label %14
14: ; preds = %32, %2
%15 = load i32, i32* %12
%16 = icmp slt i32 %15, 512
br i1 %16, label %17, label %35
17: ; preds = %14
%18 = load i32, i32* %12
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %19
%21 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load i32, i32* %4
%24 = icmp eq i32 %22, %23
br i1 %24, label %25, label %31
25: ; preds = %17
%26 = load i32, i32* %12
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %27
%29 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %28, i32 0, i32 1
%30 = load i32, i32* %29
store i32 %30, i32* %8
store i32 0, i32* %11
br label %35
31: ; preds = %17
br label %32
32: ; preds = %31
%33 = load i32, i32* %12
%34 = add nsw i32 %33, 1
store i32 %34, i32* %12
br label %14
35: ; preds = %25, %14
%36 = load i32, i32* %11
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %64
38: ; preds = %35
store i32 0, i32* %12
br label %39
39: ; preds = %60, %38
%40 = load i32, i32* %12
%41 = icmp slt i32 %40, 512
br i1 %41, label %42, label %63
42: ; preds = %39
%43 = load i32, i32* %12
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %44
%46 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %59
49: ; preds = %42
%50 = load i32, i32* %4
%51 = load i32, i32* %12
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %52
%54 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %53, i32 0, i32 0
store i32 %50, i32* %54
%55 = load i32, i32* %12
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %56
%58 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %57, i32 0, i32 1
store i32 1, i32* %58
store i32 1, i32* %8
br label %63
59: ; preds = %42
br label %60
60: ; preds = %59
%61 = load i32, i32* %12
%62 = add nsw i32 %61, 1
store i32 %62, i32* %12
br label %39
63: ; preds = %49, %39
br label %64
64: ; preds = %63, %35
br label %65
65: ; preds = %64, %119
%66 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
store i8* %66, i8** %7
br label %67
67: ; preds = %88, %65
%68 = load i8*, i8** %7
%69 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 32767
%70 = icmp ne i8* %68, %69
br i1 %70, label %71, label %91
71: ; preds = %67
%72 = load i32, i32* %4
%73 = load i8*, i8** %7
%74 = call i32 @read(i32 %72, i8* %73, i32 1)
%75 = icmp ne i32 %74, 1
br i1 %75, label %76, label %78
76: ; preds = %71
%77 = load i8*, i8** %7
store i8 0, i8* %77
store i8 1, i8* %10
br label %91
78: ; preds = %71
%79 = load i8*, i8** %7
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 10
br i1 %82, label %83, label %87
83: ; preds = %78
%84 = load i8*, i8** %7
%85 = getelementptr inbounds i8, i8* %84, i32 1
store i8* %85, i8** %7
%86 = load i8*, i8** %7
store i8 0, i8* %86
store i8 1, i8* %9
br label %91
87: ; preds = %78
br label %88
88: ; preds = %87
%89 = load i8*, i8** %7
%90 = getelementptr inbounds i8, i8* %89, i32 1
store i8* %90, i8** %7
br label %67
91: ; preds = %83, %76, %67
%92 = load i8, i8* %10
%93 = icmp ne i8 %92, 0
br i1 %93, label %94, label %111
94: ; preds = %91
%95 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%96 = load i8*, i8** %5
%97 = call i32* @strstr(i8* %95, i8* %96)
%98 = icmp eq i32* %97, null
br i1 %98, label %99, label %104
99: ; preds = %94
%100 = load i32, i32* %12
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %101
%103 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %102, i32 0, i32 1
store i32 0, i32* %103
store i32 0, i32* %3
br label %142
104: ; preds = %94
%105 = load i32, i32* %8
%106 = load i32, i32* %12
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %107
%109 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %108, i32 0, i32 1
store i32 %105, i32* %109
%110 = load i32, i32* %8
store i32 %110, i32* %3
br label %142
111: ; preds = %91
%112 = load i8, i8* %9
%113 = icmp ne i8 %112, 0
br i1 %113, label %114, label %137
114: ; preds = %111
%115 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%116 = load i8*, i8** %5
%117 = call i32* @strstr(i8* %115, i8* %116)
%118 = icmp eq i32* %117, null
br i1 %118, label %119, label %128
119: ; preds = %114
%120 = load i32, i32* %12
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %121
%123 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %122, i32 0, i32 1
%124 = load i32, i32* %123
%125 = add nsw i32 %124, 1
store i32 %125, i32* %123
%126 = load i32, i32* %8
%127 = add nsw i32 %126, 1
store i32 %127, i32* %8
br label %65
128: ; preds = %114
%129 = load i32, i32* %12
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %130
%132 = getelementptr inbounds %struct.fileslines, %struct.fileslines* %131, i32 0, i32 1
%133 = load i32, i32* %132
%134 = add nsw i32 %133, 1
store i32 %134, i32* %132
%135 = load i32, i32* %8
%136 = add nsw i32 %135, 1
store i32 %136, i32* %8
store i32 %135, i32* %3
br label %142
137: ; preds = %111
%138 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 32767
store i8 0, i8* %138
%139 = load i32, i32* @stderr
%140 = call i32 @fprintf(i32 %139, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%141 = call i32 @exit(i32 -1)
unreachable
142: ; preds = %128, %104, %99
%143 = load i32, i32* %3
ret i32 %143
}

LLVM IR (-O2):
%struct.fileslines = type { i32, i32 }
@match_line.fl = internal unnamed_addr global [512 x %struct.fileslines] zeroinitializer
@stderr = global i32 0
@.str = [41 x i8] c"\0ACritical error: line buffer too small!\0A\00"
define i32 @match_line(i32 %0, i8* nocapture %1) {
%3 = alloca [32768 x i8]
%4 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %30, %2
%6 = phi i64 [ 0, %2 ], [ %31, %30 ]
%7 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %6, i32 0
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %15
10: ; preds = %25, %20, %15, %5
%11 = phi i64 [ %6, %5 ], [ %16, %15 ], [ %21, %20 ], [ %26, %25 ]
%12 = and i64 %11, 4294967295
%13 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %12, i32 1
%14 = load i32, i32* %13
br label %61
15: ; preds = %5
%16 = or i64 %6, 1
%17 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %16, i32 0
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, %0
br i1 %19, label %10, label %20
20: ; preds = %15
%21 = or i64 %6, 2
%22 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %21, i32 0
%23 = load i32, i32* %22
%24 = icmp eq i32 %23, %0
br i1 %24, label %10, label %25
25: ; preds = %20
%26 = or i64 %6, 3
%27 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %26, i32 0
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, %0
br i1 %29, label %10, label %30
30: ; preds = %25
%31 = add nuw nsw i64 %6, 4
%32 = icmp eq i64 %31, 512
br i1 %32, label %33, label %5
33: ; preds = %30, %58
%34 = phi i64 [ %59, %58 ], [ 0, %30 ]
%35 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %34, i32 0
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %53, %48, %43, %33
%39 = phi i64 [ %34, %33 ], [ %44, %43 ], [ %49, %48 ], [ %54, %53 ]
%40 = phi i32* [ %35, %33 ], [ %45, %43 ], [ %50, %48 ], [ %55, %53 ]
%41 = and i64 %39, 4294967295
store i32 %0, i32* %40
%42 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %41, i32 1
store i32 1, i32* %42
br label %61
43: ; preds = %33
%44 = or i64 %34, 1
%45 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %44, i32 0
%46 = load i32, i32* %45
%47 = icmp eq i32 %46, 0
br i1 %47, label %38, label %48
48: ; preds = %43
%49 = or i64 %34, 2
%50 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %49, i32 0
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 0
br i1 %52, label %38, label %53
53: ; preds = %48
%54 = or i64 %34, 3
%55 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %54, i32 0
%56 = load i32, i32* %55
%57 = icmp eq i32 %56, 0
br i1 %57, label %38, label %58
58: ; preds = %53
%59 = add nuw nsw i64 %34, 4
%60 = icmp eq i64 %59, 512
br i1 %60, label %61, label %33
61: ; preds = %58, %10, %38
%62 = phi i32 [ 1, %38 ], [ %14, %10 ], [ 1, %58 ]
%63 = phi i64 [ %39, %38 ], [ %11, %10 ], [ 512, %58 ]
%64 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 32767
%65 = and i64 %63, 4294967295
%66 = getelementptr inbounds [512 x %struct.fileslines], [512 x %struct.fileslines]* @match_line.fl, i64 0, i64 %65, i32 1
br label %67
67: ; preds = %91, %61
%68 = phi i32 [ %62, %61 ], [ %92, %91 ]
%69 = phi i1 [ true, %61 ], [ false, %91 ]
br label %70
70: ; preds = %67, %79
%71 = phi i8* [ %4, %67 ], [ %77, %79 ]
%72 = call i32 @read(i32 %0, i8* %71, i32 1)
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %81
74: ; preds = %70
%75 = load i8, i8* %71
%76 = icmp eq i8 %75, 10
%77 = getelementptr inbounds i8, i8* %71, i64 1
br i1 %76, label %78, label %79
78: ; preds = %74
store i8 0, i8* %77
br label %86
79: ; preds = %74
%80 = icmp eq i8* %77, %64
br i1 %80, label %85, label %70
81: ; preds = %70
store i8 0, i8* %71
%82 = call i32* @strstr(i8* %4, i8* dereferenceable(1) %1)
%83 = icmp eq i32* %82, null
%84 = select i1 %83, i32 0, i32 %68
br label %97
85: ; preds = %79
br i1 %69, label %93, label %86
86: ; preds = %78, %85
%87 = call i32* @strstr(i8* %4, i8* dereferenceable(1) %1)
%88 = icmp eq i32* %87, null
%89 = load i32, i32* %66
%90 = add nsw i32 %89, 1
br i1 %88, label %91, label %97
91: ; preds = %86
store i32 %90, i32* %66
%92 = add nsw i32 %68, 1
br label %67
93: ; preds = %85
store i8 0, i8* %64
%94 = load i32, i32* @stderr
%95 = call i32 @fprintf(i32 %94, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%96 = call i32 @exit(i32 -1)
unreachable
97: ; preds = %86, %81
%98 = phi i32 [ %84, %81 ], [ %90, %86 ]
%99 = phi i32 [ %84, %81 ], [ %68, %86 ]
store i32 %98, i32* %66
ret i32 %99
}