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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, int, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ *strstr(char *, char *);
int main(int argc, char **argv) {
  char line[128];
  long lineno = 0;
  char *pattern;
  char ch;
  int except = 0, number = 0;
  FILE *fp;
  while (--argc > 0 && *(*++argv) == '-') {
    while ((ch = *++(*argv)) != '\0') {
      switch (ch) {
      case 'x':
        except = 1;
        break;
      case 'n':
        number = 1;
        break;
      default:
        fprintf(stderr, "find: illeagal option %c\n", ch);
        break;
      }
    }
  }
  if (argc-- < 2) {
    fprintf(stderr, "usage: find -x -n pattern file1 [file2 ...]\n");
    return 0;
  }
  pattern = *argv;
  printf("argc is %d, pattern is '%s'\n", argc, pattern);
  while (argc-- > 0) {
    if ((fp = fopen(*++argv, "r")) == NULL) {
      fprintf(stderr, "error opening file %s\n", *argv);
      continue;
    }
    while (fgets(line, sizeof(line), fp) != NULL) {
      lineno++;
      if ((strstr(line, pattern) != NULL) != except) {
        if (number) {
          fprintf(stdout, "%ld ", lineno);
        }
        fprintf(stdout, "%s: %s", *argv, line);
      }
    }
    fclose(fp);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x98(%rbp)
movl   $0x0,-0xa8(%rbp)
movl   $0x0,-0xac(%rbp)
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xb9(%rbp)
jle    11d4 <main+0x74>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
test   $0x1,%al
jne    11e7 <main+0x87>
jmp    1287 <main+0x127>
jmp    11ec <main+0x8c>
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
mov    0x1(%rax),%al
mov    %al,-0xa1(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1282 <main+0x122>
movsbl -0xa1(%rbp),%eax
mov    %eax,-0xc0(%rbp)
sub    $0x6e,%eax
je     1250 <main+0xf0>
jmp    122d <main+0xcd>
mov    -0xc0(%rbp),%eax
sub    $0x78,%eax
jne    125f <main+0xff>
jmp    1241 <main+0xe1>
movl   $0x1,-0xa8(%rbp)
jmp    127d <main+0x11d>
movl   $0x1,-0xac(%rbp)
jmp    127d <main+0x11d>
mov    0x2d7a(%rip),%rax
mov    (%rax),%edi
movsbl -0xa1(%rbp),%edx
lea    0xd8a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    11ec <main+0x8c>
jmp    1198 <main+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x2,%eax
jge    12be <main+0x15e>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
lea    0xd6f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    141a <main+0x2ba>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xa0(%rbp),%rdx
lea    0xd6a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    1413 <main+0x2b3>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
lea    0xd54(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0xb8(%rbp)
cmp    $0x0,%rax
jne    1349 <main+0x1e9>
mov    0x2cb3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd29(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    12e2 <main+0x182>
jmp    134e <main+0x1ee>
lea    -0x90(%rbp),%rdi
mov    -0xb8(%rbp),%rdx
mov    $0x80,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1402 <main+0x2a2>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0xa0(%rbp),%rsi
call   1080 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cmp    -0xa8(%rbp),%eax
je     13fd <main+0x29d>
cmpl   $0x0,-0xac(%rbp)
je     13d8 <main+0x278>
mov    0x2c17(%rip),%rax
mov    (%rax),%edi
mov    -0x98(%rbp),%rdx
lea    0xcac(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2bf9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    -0x90(%rbp),%rcx
lea    0xc8c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    134e <main+0x1ee>
mov    -0xb8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    12e2 <main+0x182>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
cmp    $0x2,%edi
jl     122e <main+0xce>
mov    %rsi,%rbx
mov    %edi,%r15d
lea    0xe79(%rip),%r13
movl   $0x0,0xc(%rsp)
xor    %r12d,%r12d
jmp    11b5 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0xc(%rsp),%ebp
mov    %ebp,0xc(%rsp)
lea    -0x1(%r15),%eax
cmp    $0x3,%r15d
mov    %eax,%r15d
jl     122e <main+0xce>
mov    0x8(%rbx),%r14
add    $0x8,%rbx
cmpb   $0x2d,(%r14)
jne    1228 <main+0xc8>
lea    0x1(%r14),%rax
mov    %rax,(%rbx)
mov    0x1(%r14),%cl
test   %cl,%cl
je     11a0 <main+0x40>
mov    0x2e07(%rip),%r14
mov    0xc(%rsp),%ebp
jmp    1202 <main+0xa2>
nop
mov    (%r14),%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%rbx),%rax
lea    0x1(%rax),%rdx
mov    %rdx,(%rbx)
movzbl 0x1(%rax),%ecx
mov    %rdx,%rax
test   %cl,%cl
je     11a4 <main+0x44>
movsbl %cl,%edx
cmp    $0x78,%edx
je     1220 <main+0xc0>
cmp    $0x6e,%edx
jne    11e0 <main+0x80>
mov    $0x1,%ebp
jmp    11f0 <main+0x90>
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%r12d
jmp    11f0 <main+0x90>
cmp    $0x2,%r15d
ja     1259 <main+0xf9>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
lea    0xddc(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    -0x2(%r15),%esi
lea    0xde3(%rip),%rdi
mov    %r14,%rdx
call   1040 <printf@plt>
add    $0xfffffffd,%r15d
lea    0xded(%rip),%r13
xor    %eax,%eax
mov    %rax,0x10(%rsp)
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx),%rdi
mov    %r13,%rsi
call   1070 <fopen@plt>
test   %rax,%rax
jne    12cf <main+0x16f>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdb3(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    -0x1(%r15),%eax
add    $0x8,%rbx
test   %r15d,%r15d
mov    %eax,%r15d
jg     1290 <main+0x130>
jmp    1245 <main+0xe5>
mov    %rax,%rbp
mov    %r15,0x18(%rsp)
lea    0x20(%rsp),%r15
jmp    12f6 <main+0x196>
xchg   %ax,%ax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xd96(%rip),%rsi
mov    %r15,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r15,%rdi
mov    $0x80,%esi
mov    %rbp,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1355 <main+0x1f5>
addq   $0x1,0x10(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
call   1080 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
cmp    %ecx,%r12d
je     12f6 <main+0x196>
cmpl   $0x0,0xc(%rsp)
mov    0x2ca3(%rip),%rax
je     12e0 <main+0x180>
mov    (%rax),%edi
lea    0xd3d(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x2c85(%rip),%rax
jmp    12e0 <main+0x180>
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    0x18(%rsp),%rax
lea    -0x1(%rax),%r15d
test   %eax,%eax
jg     127e <main+0x11e>
jmp    1245 <main+0xe5>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"find: illeagal option %c\0A\00"
@.str.1 = [45 x i8] c"usage: find -x -n pattern file1 [file2 ...]\0A\00"
@.str.2 = [29 x i8] c"argc is %d, pattern is '%s'\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [23 x i8] c"error opening file %s\0A\00"
@stdout = global i32 0
@.str.5 = [5 x i8] c"%ld \00"
@.str.6 = [7 x i8] c"%s: %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [128 x i8]
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %7
store i32 0, i32* %10
store i32 0, i32* %11
br label %13
13: ; preds = %45, %2
%14 = load i32, i32* %4
%15 = add nsw i32 %14, -1
store i32 %15, i32* %4
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i32 1
store i8** %19, i8*** %5
%20 = load i8*, i8** %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 45
br label %24
24: ; preds = %17, %13
%25 = phi i1 [ false, %13 ], [ %23, %17 ]
br i1 %25, label %26, label %46
26: ; preds = %24
br label %27
27: ; preds = %44, %26
%28 = load i8**, i8*** %5
%29 = load i8*, i8** %28
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %28
%31 = load i8, i8* %30
store i8 %31, i8* %9
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %45
34: ; preds = %27
%35 = load i8, i8* %9
%36 = sext i8 %35 to i32
switch i32 %36, label %39 [
i32 120, label %37
i32 110, label %38
]
37: ; preds = %34
store i32 1, i32* %10
br label %44
38: ; preds = %34
store i32 1, i32* %11
br label %44
39: ; preds = %34
%40 = load i32, i32* @stderr
%41 = load i8, i8* %9
%42 = sext i8 %41 to i32
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %39, %38, %37
br label %27
45: ; preds = %27
br label %13
46: ; preds = %24
%47 = load i32, i32* %4
%48 = add nsw i32 %47, -1
store i32 %48, i32* %4
%49 = icmp slt i32 %47, 2
br i1 %49, label %50, label %53
50: ; preds = %46
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %108
53: ; preds = %46
%54 = load i8**, i8*** %5
%55 = load i8*, i8** %54
store i8* %55, i8** %8
%56 = load i32, i32* %4
%57 = load i8*, i8** %8
%58 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %56, i8* %57)
br label %59
59: ; preds = %104, %69, %53
%60 = load i32, i32* %4
%61 = add nsw i32 %60, -1
store i32 %61, i32* %4
%62 = icmp sgt i32 %60, 0
br i1 %62, label %63, label %107
63: ; preds = %59
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i32 1
store i8** %65, i8*** %5
%66 = load i8*, i8** %65
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %67, i32** %12
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %74
69: ; preds = %63
%70 = load i32, i32* @stderr
%71 = load i8**, i8*** %5
%72 = load i8*, i8** %71
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %72)
br label %59
74: ; preds = %63
br label %75
75: ; preds = %103, %74
%76 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%77 = load i32*, i32** %12
%78 = call i32* @fgets(i8* %76, i32 128, i32* %77)
%79 = icmp ne i32* %78, null
br i1 %79, label %80, label %104
80: ; preds = %75
%81 = load i64, i64* %7
%82 = add nsw i64 %81, 1
store i64 %82, i64* %7
%83 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%84 = load i8*, i8** %8
%85 = call i32* @strstr(i8* %83, i8* %84)
%86 = icmp ne i32* %85, null
%87 = zext i1 %86 to i32
%88 = load i32, i32* %10
%89 = icmp ne i32 %87, %88
br i1 %89, label %90, label %103
90: ; preds = %80
%91 = load i32, i32* %11
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %97
93: ; preds = %90
%94 = load i32, i32* @stdout
%95 = load i64, i64* %7
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %95)
br label %97
97: ; preds = %93, %90
%98 = load i32, i32* @stdout
%99 = load i8**, i8*** %5
%100 = load i8*, i8** %99
%101 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %100, i8* %101)
br label %103
103: ; preds = %97, %80
br label %75
104: ; preds = %75
%105 = load i32*, i32** %12
%106 = call i32 @fclose(i32* %105)
br label %59
107: ; preds = %59
store i32 0, i32* %3
br label %108
108: ; preds = %107, %50
%109 = load i32, i32* %3
ret i32 %109
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"find: illeagal option %c\0A\00"
@.str.1 = [45 x i8] c"usage: find -x -n pattern file1 [file2 ...]\0A\00"
@.str.2 = [29 x i8] c"argc is %d, pattern is '%s'\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [23 x i8] c"error opening file %s\0A\00"
@stdout = global i32 0
@.str.5 = [5 x i8] c"%ld \00"
@.str.6 = [7 x i8] c"%s: %s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %10, label %44
6: ; preds = %35, %20
%7 = phi i32 [ %12, %20 ], [ %37, %35 ]
%8 = phi i32 [ %11, %20 ], [ %38, %35 ]
%9 = icmp sgt i32 %13, 2
br i1 %9, label %10, label %44
10: ; preds = %2, %6
%11 = phi i32 [ %8, %6 ], [ 0, %2 ]
%12 = phi i32 [ %7, %6 ], [ 0, %2 ]
%13 = phi i32 [ %15, %6 ], [ %0, %2 ]
%14 = phi i8** [ %16, %6 ], [ %1, %2 ]
%15 = add nsw i32 %13, -1
%16 = getelementptr inbounds i8*, i8** %14, i64 1
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 45
br i1 %19, label %20, label %42
20: ; preds = %10
%21 = getelementptr inbounds i8, i8* %17, i64 1
store i8* %21, i8** %16
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %6, label %24
24: ; preds = %20, %35
%25 = phi i8* [ %39, %35 ], [ %21, %20 ]
%26 = phi i8 [ %40, %35 ], [ %22, %20 ]
%27 = phi i32 [ %38, %35 ], [ %11, %20 ]
%28 = phi i32 [ %37, %35 ], [ %12, %20 ]
%29 = sext i8 %26 to i32
switch i32 %29, label %31 [
i32 120, label %35
i32 110, label %30
]
30: ; preds = %24
br label %35
31: ; preds = %24
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %29)
%34 = load i8*, i8** %16
br label %35
35: ; preds = %24, %31, %30
%36 = phi i8* [ %34, %31 ], [ %25, %30 ], [ %25, %24 ]
%37 = phi i32 [ %28, %31 ], [ %28, %30 ], [ 1, %24 ]
%38 = phi i32 [ %27, %31 ], [ 1, %30 ], [ %27, %24 ]
%39 = getelementptr inbounds i8, i8* %36, i64 1
store i8* %39, i8** %16
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 0
br i1 %41, label %6, label %24
42: ; preds = %10
%43 = icmp ult i32 %13, 3
br i1 %43, label %44, label %47
44: ; preds = %6, %2, %42
%45 = load i32, i32* @stderr
%46 = tail call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
br label %95
47: ; preds = %42
%48 = add nsw i32 %13, -2
%49 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %48, i8* %17)
%50 = add nsw i32 %13, -3
%51 = icmp eq i32 %11, 0
br label %52
52: ; preds = %47, %90
%53 = phi i32 [ %50, %47 ], [ %93, %90 ]
%54 = phi i8** [ %16, %47 ], [ %59, %90 ]
%55 = phi i64 [ 0, %47 ], [ %91, %90 ]
br label %56
56: ; preds = %52, %66
%57 = phi i32 [ %53, %52 ], [ %70, %66 ]
%58 = phi i8** [ %54, %52 ], [ %59, %66 ]
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = call i32* @fopen(i8* %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%62 = icmp eq i32* %61, null
br i1 %62, label %66, label %63
63: ; preds = %56
%64 = call i32* @fgets(i8* %4, i32 128, i32* %61)
%65 = icmp eq i32* %64, null
br i1 %65, label %90, label %72
66: ; preds = %56
%67 = load i32, i32* @stderr
%68 = load i8*, i8** %59
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %68)
%70 = add nsw i32 %57, -1
%71 = icmp sgt i32 %57, 0
br i1 %71, label %56, label %95
72: ; preds = %63, %87
%73 = phi i64 [ %74, %87 ], [ %55, %63 ]
%74 = add nsw i64 %73, 1
%75 = call i32* @strstr(i8* %4, i8* dereferenceable(1) %17)
%76 = icmp ne i32* %75, null
%77 = zext i1 %76 to i32
%78 = icmp eq i32 %12, %77
br i1 %78, label %87, label %79
79: ; preds = %72
br i1 %51, label %83, label %80
80: ; preds = %79
%81 = load i32, i32* @stdout
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %74)
br label %83
83: ; preds = %80, %79
%84 = load i32, i32* @stdout
%85 = load i8*, i8** %59
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %85, i8* %4)
br label %87
87: ; preds = %83, %72
%88 = call i32* @fgets(i8* %4, i32 128, i32* %61)
%89 = icmp eq i32* %88, null
br i1 %89, label %90, label %72
90: ; preds = %87, %63
%91 = phi i64 [ %55, %63 ], [ %74, %87 ]
%92 = call i32 @fclose(i32* %61)
%93 = add nsw i32 %57, -1
%94 = icmp sgt i32 %57, 0
br i1 %94, label %52, label %95
95: ; preds = %90, %66, %44
ret i32 0
}