#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 /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ find_topics(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int /*<<< orphan*/ process_lines(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  FILE *infile, *outfile, *htmlfile;
  if (argc != 4) {
    fprintf(stderr, "Usage: %s inputrawfile outputhelpfile outputhtmlfile\n",
            argv[0]);
    return 1;
  }
  if (!strcmp(argv[1], argv[2])) {
    fprintf(stderr,
            "%s: cannot use same file for input rawfile and output helpfile\n",
            argv[0]);
    return 1;
  }
  if (!strcmp(argv[1], argv[3])) {
    fprintf(stderr,
            "%s: cannot use same file for input rawfile and output htmlfile\n",
            argv[0]);
    return 1;
  }
  if (!strcmp(argv[3], argv[2])) {
    fprintf(stderr, "%s: cannot use same file for htmlfile and helpfile\n",
            argv[0]);
    return 1;
  }
  if (!strcmp(argv[1], "-")) {
    infile = stdin;
  } else {
    if (!(infile = fopen(argv[1], "rb"))) {
      fprintf(stderr, "%s: cannot read %s\n", argv[0], argv[1]);
      return 1;
    }
  }
  if (!(outfile = fopen(argv[2], "wb"))) {
    fprintf(stderr, "%s: cannot write to %s\n", argv[0], argv[2]);
    return 1;
  }
  if (!(htmlfile = fopen(argv[3], "wb"))) {
    fprintf(stderr, "%s: cannot write to %s\n", argv[0], argv[3]);
    return 1;
  }
  find_topics(infile);
  fseek(infile, 0L, SEEK_SET);
  process_lines(infile, outfile, htmlfile);
  fclose(infile);
  fclose(outfile);
  fclose(htmlfile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11ba <main+0x4a>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1202 <main+0x92>
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    124a <main+0xda>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe3f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1292 <main+0x122>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe37(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe49(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12c2 <main+0x152>
mov    0x2d32(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    131b <main+0x1ab>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1b(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1316 <main+0x1a6>
mov    0x2ced(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
jmp    131b <main+0x1ab>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xdd9(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    136f <main+0x1ff>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xdaa(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd85(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    13c3 <main+0x253>
mov    0x2c40(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rcx
lea    0xd56(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1415 <main+0x2a5>
mov    -0x18(%rbp),%rdi
call   1080 <find_topics@plt>
mov    -0x18(%rbp),%rdi
mov    0x2bf9(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1060 <fseek@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1090 <process_lines@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x4,%edi
jne    11f1 <main+0x81>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1206 <main+0x96>
mov    0x18(%rbx),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     121b <main+0xab>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1230 <main+0xc0>
lea    0xf2a(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     125d <main+0xed>
lea    0xf15(%rip),%rsi
mov    %r14,%rdi
call   1070 <fopen@plt>
test   %rax,%rax
je     12f0 <main+0x180>
mov    %rax,%r14
mov    0x10(%rbx),%r15
jmp    1267 <main+0xf7>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdfc(%rip),%rsi
jmp    1243 <main+0xd3>
mov    0x2dcb(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe1d(%rip),%rsi
jmp    1243 <main+0xd3>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe48(%rip),%rsi
jmp    1243 <main+0xd3>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe73(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    0x2d84(%rip),%rax
mov    (%rax),%r14
lea    0xe95(%rip),%rsi
mov    %r15,%rdi
call   1070 <fopen@plt>
test   %rax,%rax
je     12de <main+0x16e>
mov    %rax,%r15
mov    0x18(%rbx),%rdi
lea    0xe7a(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     1309 <main+0x199>
mov    %rax,%r12
mov    %r14,%rdi
call   1080 <find_topics@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edx
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <fseek@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1090 <process_lines@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    %r12,%rdi
call   1030 <fclose@plt>
jmp    124f <main+0xdf>
mov    0x2cf3(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
mov    0x10(%rbx),%rcx
jmp    1319 <main+0x1a9>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
mov    0x8(%rbx),%rcx
lea    0xde8(%rip),%rsi
jmp    1320 <main+0x1b0>
mov    0x2cc8(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
mov    0x18(%rbx),%rcx
lea    0xde6(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    124a <main+0xda>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Usage: %s inputrawfile outputhelpfile outputhtmlfile\0A\00"
@.str.1 = [64 x i8] c"%s: cannot use same file for input rawfile and output helpfile\0A\00"
@.str.2 = [64 x i8] c"%s: cannot use same file for input rawfile and output htmlfile\0A\00"
@.str.3 = [52 x i8] c"%s: cannot use same file for htmlfile and helpfile\0A\00"
@.str.4 = [2 x i8] c"-\00"
@stdin = global i32* null
@.str.5 = [3 x i8] c"rb\00"
@.str.6 = [20 x i8] c"%s: cannot read %s\0A\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [24 x i8] c"%s: cannot write to %s\0A\00"
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 4
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %132
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @strcmp(i8* %20, i8* %23)
%25 = icmp ne i32 %24, 0
br i1 %25, label %32, label %26
26: ; preds = %17
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i8* %30)
store i32 1, i32* %3
br label %132
32: ; preds = %17
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 3
%38 = load i8*, i8** %37
%39 = call i32 @strcmp(i8* %35, i8* %38)
%40 = icmp ne i32 %39, 0
br i1 %40, label %47, label %41
41: ; preds = %32
%42 = load i32, i32* @stderr
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 0
%45 = load i8*, i8** %44
%46 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i8* %45)
store i32 1, i32* %3
br label %132
47: ; preds = %32
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 3
%50 = load i8*, i8** %49
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 2
%53 = load i8*, i8** %52
%54 = call i32 @strcmp(i8* %50, i8* %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %62, label %56
56: ; preds = %47
%57 = load i32, i32* @stderr
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 0
%60 = load i8*, i8** %59
%61 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* %60)
store i32 1, i32* %3
br label %132
62: ; preds = %47
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 1
%65 = load i8*, i8** %64
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %70, label %68
68: ; preds = %62
%69 = load i32*, i32** @stdin
store i32* %69, i32** %6
br label %86
70: ; preds = %62
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 1
%73 = load i8*, i8** %72
%74 = call i32* @fopen(i8* %73, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %74, i32** %6
%75 = icmp ne i32* %74, null
br i1 %75, label %85, label %76
76: ; preds = %70
%77 = load i32, i32* @stderr
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 0
%80 = load i8*, i8** %79
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 1
%83 = load i8*, i8** %82
%84 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %80, i8* %83)
store i32 1, i32* %3
br label %132
85: ; preds = %70
br label %86
86: ; preds = %85, %68
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 2
%89 = load i8*, i8** %88
%90 = call i32* @fopen(i8* %89, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %90, i32** %7
%91 = icmp ne i32* %90, null
br i1 %91, label %101, label %92
92: ; preds = %86
%93 = load i32, i32* @stderr
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 0
%96 = load i8*, i8** %95
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 2
%99 = load i8*, i8** %98
%100 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %96, i8* %99)
store i32 1, i32* %3
br label %132
101: ; preds = %86
%102 = load i8**, i8*** %5
%103 = getelementptr inbounds i8*, i8** %102, i64 3
%104 = load i8*, i8** %103
%105 = call i32* @fopen(i8* %104, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %105, i32** %8
%106 = icmp ne i32* %105, null
br i1 %106, label %116, label %107
107: ; preds = %101
%108 = load i32, i32* @stderr
%109 = load i8**, i8*** %5
%110 = getelementptr inbounds i8*, i8** %109, i64 0
%111 = load i8*, i8** %110
%112 = load i8**, i8*** %5
%113 = getelementptr inbounds i8*, i8** %112, i64 3
%114 = load i8*, i8** %113
%115 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %111, i8* %114)
store i32 1, i32* %3
br label %132
116: ; preds = %101
%117 = load i32*, i32** %6
%118 = call i32 @find_topics(i32* %117)
%119 = load i32*, i32** %6
%120 = load i32, i32* @SEEK_SET
%121 = call i32 @fseek(i32* %119, i64 0, i32 %120)
%122 = load i32*, i32** %6
%123 = load i32*, i32** %7
%124 = load i32*, i32** %8
%125 = call i32 @process_lines(i32* %122, i32* %123, i32* %124)
%126 = load i32*, i32** %6
%127 = call i32 @fclose(i32* %126)
%128 = load i32*, i32** %7
%129 = call i32 @fclose(i32* %128)
%130 = load i32*, i32** %8
%131 = call i32 @fclose(i32* %130)
store i32 0, i32* %3
br label %132
132: ; preds = %116, %107, %92, %76, %56, %41, %26, %11
%133 = load i32, i32* %3
ret i32 %133
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Usage: %s inputrawfile outputhelpfile outputhtmlfile\0A\00"
@.str.1 = [64 x i8] c"%s: cannot use same file for input rawfile and output helpfile\0A\00"
@.str.2 = [64 x i8] c"%s: cannot use same file for input rawfile and output htmlfile\0A\00"
@.str.3 = [52 x i8] c"%s: cannot use same file for htmlfile and helpfile\0A\00"
@.str.4 = [2 x i8] c"-\00"
@stdin = global i32* null
@.str.5 = [3 x i8] c"rb\00"
@.str.6 = [20 x i8] c"%s: cannot read %s\0A\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [24 x i8] c"%s: cannot write to %s\0A\00"
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %77
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(1) %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %1
%18 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i8* %17)
br label %77
19: ; preds = %8
%20 = getelementptr inbounds i8*, i8** %1, i64 3
%21 = load i8*, i8** %20
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(1) %21)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %19
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %1
%27 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i8* %26)
br label %77
28: ; preds = %19
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(1) %12)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load i32, i32* @stderr
%33 = load i8*, i8** %1
%34 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* %33)
br label %77
35: ; preds = %28
%36 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = load i32*, i32** @stdin
br label %50
40: ; preds = %35
%41 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%42 = icmp eq i32* %41, null
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = load i8*, i8** %11
br label %50
45: ; preds = %40
%46 = load i32, i32* @stderr
%47 = load i8*, i8** %1
%48 = load i8*, i8** %9
%49 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %47, i8* %48)
br label %77
50: ; preds = %43, %38
%51 = phi i8* [ %44, %43 ], [ %12, %38 ]
%52 = phi i32* [ %41, %43 ], [ %39, %38 ]
%53 = tail call i32* @fopen(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%54 = icmp eq i32* %53, null
br i1 %54, label %55, label %60
55: ; preds = %50
%56 = load i32, i32* @stderr
%57 = load i8*, i8** %1
%58 = load i8*, i8** %11
%59 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %57, i8* %58)
br label %77
60: ; preds = %50
%61 = load i8*, i8** %20
%62 = tail call i32* @fopen(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = load i32, i32* @stderr
%66 = load i8*, i8** %1
%67 = load i8*, i8** %20
%68 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %66, i8* %67)
br label %77
69: ; preds = %60
%70 = tail call i32 @find_topics(i32* %52)
%71 = load i32, i32* @SEEK_SET
%72 = tail call i32 @fseek(i32* %52, i64 0, i32 %71)
%73 = tail call i32 @process_lines(i32* %52, i32* %53, i32* %62)
%74 = tail call i32 @fclose(i32* %52)
%75 = tail call i32 @fclose(i32* %53)
%76 = tail call i32 @fclose(i32* %62)
br label %77
77: ; preds = %69, %64, %55, %45, %31, %24, %15, %4
%78 = phi i32 [ 1, %4 ], [ 0, %69 ], [ 1, %64 ], [ 1, %55 ], [ 1, %45 ], [ 1, %31 ], [ 1, %24 ], [ 1, %15 ]
ret i32 %78
}