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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ incOK(char *, char **, char **, char **, int /*<<< orphan*/ **);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
char *strstr(char *, char *);
void processFile(char *fn, FILE *in, FILE *out) {
  char *s, *e, rec[10000], *ifn = NULL;
  FILE *incFile;
  int comment = 0;
  int nl = 0;
  while (fgets(rec, sizeof(rec), in)) {
    nl++;
    if (comment == 0 && incOK(rec, &s, &e, &ifn, &incFile)) {
      if (incFile) {
        fprintf(out, "// resolved:  >>>> %s", s);
        processFile(ifn, incFile, out);
        fprintf(out, "// back from: >>>> %s", s);
      } else {
        fprintf(stderr, "%s:%d File not found: %s\n", fn, nl, s);
      }
    } else {
      s = rec;
      if (comment == 1) {
        if ((e = strstr(s, "\r\n"))) {
          strcpy(s, e + 2);
          comment = 0;
        } else if ((e = strstr(s, "\n"))) {
          strcpy(s, e + 1);
          comment = 0;
        }
      } else if (comment == 2) {
        if ((e = strstr(s, "*/"))) {
          strcpy(s, e + 2);
          comment = 0;
        } else {
          continue;
        }
      }
      while ((s = strstr(s, "/"))) {
        if (*(s + 1) == '/') {
          if ((e = strstr(s + 2, "\r\n"))) {
            strcpy(s, e + 2);
          } else if ((e = strstr(s + 2, "\n"))) {
            strcpy(s, e + 1);
          } else {
            *s = 0;
            comment = 1;
            break;
          }
        } else if (*(s + 1) == '*') {
          if ((e = strstr(s + 2, "*/"))) {
            strcpy(s, e + 2);
          } else {
            *s = 0;
            comment = 2;
            break;
          }
        } else {
          s++;
        }
      }
      fprintf(out, "%s", rec);
    }
  }
  free(fn);
  fclose(in);
}


x86 assembly (clang, -O0):
<processFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2760,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x2748(%rbp)
movl   $0x0,-0x2754(%rbp)
movl   $0x0,-0x2758(%rbp)
lea    -0x2740(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x2710,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     14ed <processFile+0x36d>
mov    -0x2758(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2758(%rbp)
cmpl   $0x0,-0x2754(%rbp)
jne    129e <processFile+0x11e>
lea    -0x2740(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x2748(%rbp),%rcx
lea    -0x2750(%rbp),%r8
call   10a0 <incOK@plt>
cmp    $0x0,%rax
je     129e <processFile+0x11e>
cmpq   $0x0,-0x2750(%rbp)
je     1273 <processFile+0xf3>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x2748(%rbp),%rdi
mov    -0x2750(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1070 <processFile@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xdaf(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1299 <processFile+0x119>
mov    0x2d66(%rip),%rax
movslq (%rax),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x2758(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    0xd9a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    14e8 <processFile+0x368>
lea    -0x2740(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x2754(%rbp)
jne    1337 <processFile+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xd85(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     12f4 <processFile+0x174>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x2,%rsi
call   1040 <strcpy@plt>
movl   $0x0,-0x2754(%rbp)
jmp    1332 <processFile+0x1b2>
mov    -0x20(%rbp),%rdi
lea    0xd48(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     132d <processFile+0x1ad>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x1,%rsi
call   1040 <strcpy@plt>
movl   $0x0,-0x2754(%rbp)
jmp    1332 <processFile+0x1b2>
jmp    1391 <processFile+0x211>
cmpl   $0x2,-0x2754(%rbp)
jne    138c <processFile+0x20c>
mov    -0x20(%rbp),%rdi
lea    0xcfa(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1382 <processFile+0x202>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x2,%rsi
call   1040 <strcpy@plt>
movl   $0x0,-0x2754(%rbp)
jmp    1387 <processFile+0x207>
jmp    11b6 <processFile+0x36>
jmp    138c <processFile+0x20c>
jmp    1391 <processFile+0x211>
jmp    1396 <processFile+0x216>
mov    -0x20(%rbp),%rdi
lea    0xca9(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     14cf <processFile+0x34f>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
jne    1455 <processFile+0x2d5>
mov    -0x20(%rbp),%rdi
add    $0x2,%rdi
lea    0xc72(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     13fd <processFile+0x27d>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x2,%rsi
call   1040 <strcpy@plt>
jmp    1450 <processFile+0x2d0>
mov    -0x20(%rbp),%rdi
add    $0x2,%rdi
lea    0xc3b(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1435 <processFile+0x2b5>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x1,%rsi
call   1040 <strcpy@plt>
jmp    144b <processFile+0x2cb>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x2754(%rbp)
jmp    14cf <processFile+0x34f>
jmp    1450 <processFile+0x2d0>
jmp    14ca <processFile+0x34a>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2a,%eax
jne    14b9 <processFile+0x339>
mov    -0x20(%rbp),%rdi
add    $0x2,%rdi
lea    0xbd4(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     149e <processFile+0x31e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x2,%rsi
call   1040 <strcpy@plt>
jmp    14b4 <processFile+0x334>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x2,-0x2754(%rbp)
jmp    14cf <processFile+0x34f>
jmp    14c5 <processFile+0x345>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14ca <processFile+0x34a>
jmp    1396 <processFile+0x216>
mov    -0x18(%rbp),%rdi
lea    -0x2740(%rbp),%rdx
lea    0xb32(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    11b6 <processFile+0x36>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
add    $0x2760,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2758,%rsp
mov    %rdx,0x20(%rsp)
mov    %rsi,%rdx
mov    %rdi,0x18(%rsp)
movq   $0x0,0x38(%rsp)
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x2710,%esi
mov    %rdx,0x28(%rsp)
call   1080 <fgets@plt>
test   %rax,%rax
je     1470 <processFile+0x2d0>
xor    %r14d,%r14d
lea    0x8(%rsp),%rbx
xor    %r13d,%r13d
jmp    1228 <processFile+0x88>
mov    $0x2,%r13d
movb   $0x0,(%r15)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    0x20(%rsp),%rsi
call   1070 <fputs@plt>
mov    %rbp,%rdi
mov    $0x2710,%esi
mov    0x28(%rsp),%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1470 <processFile+0x2d0>
add    $0x1,%r14d
test   %r13d,%r13d
je     1290 <processFile+0xf0>
mov    %rbp,0x8(%rsp)
cmp    $0x2,%r13d
je     1320 <processFile+0x180>
cmp    $0x1,%r13d
jne    1356 <processFile+0x1b6>
mov    %rbp,%rdi
lea    0xdf2(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
jne    133d <processFile+0x19d>
mov    %rbp,%rdi
mov    $0xa,%esi
call   1060 <strchr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     1465 <processFile+0x2c5>
add    $0x1,%rax
jmp    1341 <processFile+0x1a1>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %rbx,%rsi
lea    0x10(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x30(%rsp),%r8
call   10c0 <incOK@plt>
test   %rax,%rax
je     134e <processFile+0x1ae>
cmpq   $0x0,0x30(%rsp)
je     1422 <processFile+0x282>
mov    0x8(%rsp),%rdx
xor    %r13d,%r13d
mov    %rbp,%r15
mov    %rbx,%rbp
mov    0x20(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd24(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x38(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    %rbx,%rdx
call   1090 <processFile@plt>
mov    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %rbp,%rbx
mov    %r15,%rbp
lea    0xd0c(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    120d <processFile+0x6d>
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%rdi
lea    0xd1f(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     144f <processFile+0x2af>
add    $0x2,%rax
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
jmp    1353 <processFile+0x1b3>
mov    %rbp,0x8(%rsp)
xor    %r13d,%r13d
mov    0x8(%rsp),%rdi
mov    $0x2f,%esi
call   1060 <strchr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1200 <processFile+0x60>
mov    %rax,%r15
jmp    13a9 <processFile+0x209>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
mov    %r15,0x8(%rsp)
mov    0x8(%rsp),%rdi
mov    $0x2f,%esi
call   1060 <strchr@plt>
mov    %rax,%r15
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1200 <processFile+0x60>
movzbl 0x1(%r15),%eax
cmp    $0x2a,%al
je     13f0 <processFile+0x250>
cmp    $0x2f,%al
jne    1380 <processFile+0x1e0>
lea    0x2(%r15),%r12
mov    %r12,%rdi
lea    0xc82(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
jne    140e <processFile+0x26e>
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <strchr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     145a <processFile+0x2ba>
add    $0x1,%rax
jmp    1412 <processFile+0x272>
lea    0x2(%r15),%rdi
lea    0xc4e(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     11f4 <processFile+0x54>
add    $0x2,%rax
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
jmp    1389 <processFile+0x1e9>
mov    0x2bb7(%rip),%rax
movslq (%rax),%rdi
mov    0x8(%rsp),%r8
xor    %r13d,%r13d
lea    0xbf1(%rip),%rsi
mov    0x18(%rsp),%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    120d <processFile+0x6d>
mov    $0x2,%r13d
jmp    120d <processFile+0x6d>
mov    $0x1,%r13d
jmp    11fa <processFile+0x5a>
mov    $0x1,%r13d
jmp    1356 <processFile+0x1b6>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1050 <fclose@plt>
add    $0x2758,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"// resolved: >>>> %s\00"
@.str.1 = [22 x i8] c"// back from: >>>> %s\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"%s:%d File not found: %s\0A\00"
@.str.3 = [3 x i8] c"\0D\0A\00"
@.str.5 = [3 x i8] c"*/\00"
define void @processFile(i8* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [10000 x i8]
%7 = alloca i8*
%8 = alloca i32*
%9 = bitcast i8** %4 to i8*
%10 = bitcast i8** %5 to i8*
%11 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%12 = bitcast i8** %7 to i8*
store i8* null, i8** %7
%13 = bitcast i32** %8 to i8*
%14 = call i64 @fgets(i8* %11, i32 10000, i32* %1)
%15 = icmp eq i64 %14, 0
br i1 %15, label %103, label %16
16: ; preds = %3, %99
%17 = phi i32 [ %19, %99 ], [ 0, %3 ]
%18 = phi i32 [ %100, %99 ], [ 0, %3 ]
%19 = add nuw nsw i32 %17, 1
%20 = icmp eq i32 %18, 0
br i1 %20, label %21, label %41
21: ; preds = %16
%22 = call i64 @incOK(i8* %11, i8** %4, i8** %5, i8** %7, i32** %8)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
store i8* %11, i8** %4
br label %60
25: ; preds = %21
%26 = load i32*, i32** %8
%27 = icmp eq i32* %26, null
br i1 %27, label %35, label %28
28: ; preds = %25
%29 = load i8*, i8** %4
%30 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %29)
%31 = load i8*, i8** %7
%32 = load i32*, i32** %8
%33 = load i8*, i8** %4
%34 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %33)
br label %99
35: ; preds = %25
%36 = load i32, i32* @stderr
%37 = sext i32 %36 to i64
%38 = inttoptr i64 %37 to i32*
%39 = load i8*, i8** %4
%40 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %19, i8* %39)
br label %99
41: ; preds = %16
store i8* %11, i8** %4
switch i32 %18, label %60 [
i32 1, label %42
i32 2, label %54
]
42: ; preds = %41
%43 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i8* %43, i8** %5
%44 = icmp eq i8* %43, null
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = getelementptr inbounds i8, i8* %43, i64 2
%47 = call i32 @strcpy(i8* %11, i8* %46)
br label %60
48: ; preds = %42
%49 = call i8* @strchr(i8* dereferenceable(1) %11, i32 10)
store i8* %49, i8** %5
%50 = icmp eq i8* %49, null
br i1 %50, label %60, label %51
51: ; preds = %48
%52 = getelementptr inbounds i8, i8* %49, i64 1
%53 = call i32 @strcpy(i8* %11, i8* %52)
br label %60
54: ; preds = %41
%55 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %55, i8** %5
%56 = icmp eq i8* %55, null
br i1 %56, label %99, label %57
57: ; preds = %54
%58 = getelementptr inbounds i8, i8* %55, i64 2
%59 = call i32 @strcpy(i8* %11, i8* %58)
br label %60
60: ; preds = %24, %41, %57, %45, %51, %48
%61 = phi i32 [ 0, %45 ], [ 0, %51 ], [ 1, %48 ], [ 0, %57 ], [ %18, %41 ], [ 0, %24 ]
%62 = load i8*, i8** %4
%63 = call i8* @strchr(i8* dereferenceable(1) %62, i32 47)
store i8* %63, i8** %4
%64 = icmp eq i8* %63, null
br i1 %64, label %96, label %65
65: ; preds = %60, %90
%66 = phi i8* [ %92, %90 ], [ %63, %60 ]
%67 = getelementptr inbounds i8, i8* %66, i64 1
%68 = load i8, i8* %67
switch i8 %68, label %89 [
i8 47, label %69
i8 42, label %82
]
69: ; preds = %65
%70 = getelementptr inbounds i8, i8* %66, i64 2
%71 = call i8* @strstr(i8* %70, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i8* %71, i8** %5
%72 = icmp eq i8* %71, null
br i1 %72, label %76, label %73
73: ; preds = %69
%74 = getelementptr inbounds i8, i8* %71, i64 2
%75 = call i32 @strcpy(i8* %66, i8* %74)
br label %90
76: ; preds = %69
%77 = call i8* @strchr(i8* %70, i32 10)
store i8* %77, i8** %5
%78 = icmp eq i8* %77, null
br i1 %78, label %94, label %79
79: ; preds = %76
%80 = getelementptr inbounds i8, i8* %77, i64 1
%81 = call i32 @strcpy(i8* %66, i8* %80)
br label %90
82: ; preds = %65
%83 = getelementptr inbounds i8, i8* %66, i64 2
%84 = call i8* @strstr(i8* %83, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %84, i8** %5
%85 = icmp eq i8* %84, null
br i1 %85, label %94, label %86
86: ; preds = %82
%87 = getelementptr inbounds i8, i8* %84, i64 2
%88 = call i32 @strcpy(i8* %66, i8* %87)
br label %90
89: ; preds = %65
store i8* %67, i8** %4
br label %90
90: ; preds = %86, %89, %73, %79
%91 = load i8*, i8** %4
%92 = call i8* @strchr(i8* dereferenceable(1) %91, i32 47)
store i8* %92, i8** %4
%93 = icmp eq i8* %92, null
br i1 %93, label %96, label %65
94: ; preds = %82, %76
%95 = phi i32 [ 1, %76 ], [ 2, %82 ]
store i8 0, i8* %66
br label %96
96: ; preds = %90, %94, %60
%97 = phi i32 [ %61, %60 ], [ %95, %94 ], [ %61, %90 ]
%98 = call i32 @fputs(i8* %11, i32* %2)
br label %99
99: ; preds = %96, %35, %28, %54
%100 = phi i32 [ 2, %54 ], [ 0, %28 ], [ 0, %35 ], [ %97, %96 ]
%101 = call i64 @fgets(i8* %11, i32 10000, i32* %1)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %16
103: ; preds = %99, %3
%104 = call i32 @free(i8* %0)
%105 = call i32 @fclose(i32* %1)
ret void
}