#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*/ fflush(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
char *find_root_source(char *, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
char *strstr(char *, char *);
char *source_name(char *wdir, char *node, char *param) {
  int i, j;
  char buffer[1024], source[256], *p, *q, *ret_pt;
  FILE *infile;
  buffer[0] = 0x0;
  strcat(buffer, wdir);
  strcat(buffer, "/graph.dot");
  infile = fopen(buffer, "r");
  if (infile == NULL) {
    fprintf(stderr, "declare_vars: file open error, %s\n", buffer);
    fflush(NULL);
    return NULL;
  }
  while (fgets(buffer, 1024, infile)) {
    if (p = strstr(buffer, "->")) {
      if (q = strstr(p, node)) {
        while (*q != ':')
          q++;
        q += 4;
        if (strstr(q, param)) {
          i = j = 0;
          while (buffer + i != p - 1) {
            if (!strncmp(buffer + i, ":out", 4)) {
              source[j++] = '_';
              i++;
            } else if (!strncmp(buffer + i, ":in_", 4)) {
              source[j++] = '_';
              i += 4;
            } else
              source[j++] = buffer[i++];
          }
          buffer[i] = source[j] = 0x0;
          ret_pt = find_root_source(wdir, buffer);
          if (ret_pt)
            return ret_pt;
          else {
            ret_pt = (char *)malloc(j + 1);
            i = 0;
            while (source[i] != 0x0)
              ret_pt[i] = source[i++];
            ret_pt[i] = 0x0;
            return ret_pt;
          }
        }
      }
    }
  }
  return (char *)0x0;
}


x86 assembly (clang, -O0):
<source_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x550,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movb   $0x0,-0x430(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x430(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x430(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x550(%rbp)
cmpq   $0x0,-0x550(%rbp)
jne    122b <source_name+0x9b>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
lea    -0x430(%rbp),%rdx
lea    0xdfd(%rip),%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movq   $0x0,-0x8(%rbp)
jmp    14c2 <source_name+0x332>
jmp    1230 <source_name+0xa0>
lea    -0x430(%rbp),%rdi
mov    -0x550(%rbp),%rdx
mov    $0x400,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     14ba <source_name+0x32a>
lea    -0x430(%rbp),%rdi
lea    0xdd0(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x538(%rbp)
cmp    $0x0,%rax
je     14b5 <source_name+0x325>
mov    -0x538(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x540(%rbp)
cmp    $0x0,%rax
je     14b0 <source_name+0x320>
jmp    129c <source_name+0x10c>
mov    -0x540(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     12c6 <source_name+0x136>
mov    -0x540(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x540(%rbp)
jmp    129c <source_name+0x10c>
mov    -0x540(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x540(%rbp)
mov    -0x540(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
je     14ab <source_name+0x31b>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x430(%rbp),%rax
movslq -0x24(%rbp),%rcx
add    %rcx,%rax
mov    -0x538(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
je     13ea <source_name+0x25a>
lea    -0x430(%rbp),%rdi
movslq -0x24(%rbp),%rax
add    %rax,%rdi
lea    0xcfc(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    136d <source_name+0x1dd>
mov    -0x28(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x28(%rbp)
cltq
movb   $0x5f,-0x530(%rbp,%rax,1)
5f
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13e5 <source_name+0x255>
lea    -0x430(%rbp),%rdi
movslq -0x24(%rbp),%rax
add    %rax,%rdi
lea    0xcb6(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    13b8 <source_name+0x228>
mov    -0x28(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x28(%rbp)
cltq
movb   $0x5f,-0x530(%rbp,%rax,1)
5f
mov    -0x24(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x24(%rbp)
jmp    13e0 <source_name+0x250>
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
cltq
mov    -0x430(%rbp,%rax,1),%cl
mov    -0x28(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x28(%rbp)
cltq
mov    %cl,-0x530(%rbp,%rax,1)
jmp    13e5 <source_name+0x255>
jmp    1300 <source_name+0x170>
movslq -0x28(%rbp),%rax
movb   $0x0,-0x530(%rbp,%rax,1)
movslq -0x24(%rbp),%rax
movb   $0x0,-0x430(%rbp,%rax,1)
mov    -0x10(%rbp),%rdi
lea    -0x430(%rbp),%rsi
call   1040 <find_root_source@plt>
mov    %rax,-0x548(%rbp)
cmpq   $0x0,-0x548(%rbp)
je     1437 <source_name+0x2a7>
mov    -0x548(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14c2 <source_name+0x332>
mov    -0x28(%rbp),%edi
add    $0x1,%edi
call   1070 <malloc@plt>
mov    %rax,-0x548(%rbp)
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
movsbl -0x530(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     148c <source_name+0x2fc>
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
cltq
mov    -0x530(%rbp,%rax,1),%dl
mov    -0x548(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1450 <source_name+0x2c0>
mov    -0x548(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x548(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14c2 <source_name+0x332>
jmp    14b0 <source_name+0x320>
jmp    14b5 <source_name+0x325>
jmp    1230 <source_name+0xa0>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x550,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<source_name>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r14
movb   $0x0,0x110(%rsp)
lea    0x110(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   10a0 <strcat@plt>
lea    0xe34(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xe30(%rip),%rsi
mov    %rbx,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1330 <source_name+0x1a0>
mov    %rax,%rbp
lea    0x110(%rsp),%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     132c <source_name+0x19c>
mov    %r14,0x8(%rsp)
lea    0xe17(%rip),%r15
lea    0x110(%rsp),%r14
jmp    1249 <source_name+0xb9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbp,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     132c <source_name+0x19c>
mov    %r14,%rdi
mov    %r15,%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
je     1230 <source_name+0xa0>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r13,%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
je     1230 <source_name+0xa0>
add    $0x3,%rax
cmpb   $0x3a,-0x3(%rax)
lea    0x1(%rax),%rax
jne    1270 <source_name+0xe0>
mov    %rax,%rdi
mov    %r12,%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
je     1230 <source_name+0xa0>
add    $0xffffffffffffffff,%rbx
xor    %r12d,%r12d
cmp    %rbx,%r14
je     136e <source_name+0x1de>
lea    0x110(%rsp),%rbp
lea    0xd8a(%rip),%r15
lea    0xd88(%rip),%r14
xor    %r13d,%r13d
jmp    12e5 <source_name+0x155>
cs nopw 0x0(%rax,%rax,1)
nop
movb   $0x5f,0x10(%rsp,%r12,1)
add    $0x1,%r13d
add    $0x1,%r12
movslq %r13d,%rax
lea    (%rsp,%rax,1),%rbp
add    $0x110,%rbp
cmp    %rbx,%rbp
je     136b <source_name+0x1db>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12c0 <source_name+0x130>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1320 <source_name+0x190>
add    $0x1,%r13d
movzbl 0x0(%rbp),%eax
mov    %al,0x10(%rsp,%r12,1)
jmp    12ca <source_name+0x13a>
nopl   0x0(%rax)
movb   $0x5f,0x10(%rsp,%r12,1)
add    $0x4,%r13d
jmp    12ca <source_name+0x13a>
xor    %ebx,%ebx
jmp    1356 <source_name+0x1c6>
mov    0x2ca9(%rip),%rax
mov    (%rax),%edi
lea    0xccd(%rip),%rsi
lea    0x110(%rsp),%rdx
call   1060 <fprintf@plt>
xor    %ebx,%ebx
xor    %edi,%edi
call   1080 <fflush@plt>
mov    %rbx,%rax
add    $0x518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%r14
mov    %r12d,%eax
movb   $0x0,0x10(%rsp,%rax,1)
movb   $0x0,(%r14)
lea    0x110(%rsp),%rsi
mov    0x8(%rsp),%rdi
call   1040 <find_root_source@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1356 <source_name+0x1c6>
add    $0x1,%r12d
mov    %r12d,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    0x10(%rsp),%al
test   %al,%al
je     13c9 <source_name+0x239>
xor    %ecx,%ecx
nopl   (%rax)
mov    %al,0x1(%rbx,%rcx,1)
movzbl 0x11(%rsp,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    13b0 <source_name+0x220>
mov    %ecx,%eax
movb   $0x0,(%rbx,%rax,1)
jmp    1356 <source_name+0x1c6>
xor    %eax,%eax
movb   $0x0,(%rbx,%rax,1)
jmp    1356 <source_name+0x1c6>

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

LLVM IR (-O2):
@.str = [11 x i8] c"/graph.dot\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [35 x i8] c"declare_vars: file open error, %s\0A\00"
@.str.3 = [3 x i8] c"->\00"
@.str.4 = [5 x i8] c":out\00"
@.str.5 = [5 x i8] c":in_\00"
define i8* @source_name(i8* %0, i8* nocapture %1, i8* nocapture %2) {
%4 = alloca [1024 x i8]
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
store i8 0, i8* %6
%8 = call i32 @strcat(i8* %6, i8* %0)
%9 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = call i64 @fgets(i8* %6, i32 1024, i32* %10)
%14 = icmp eq i64 %13, 0
br i1 %14, label %93, label %19
15: ; preds = %3
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%18 = call i32 @fflush(i32* null)
br label %93
19: ; preds = %12, %90
%20 = call i8* @strstr(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i8* %20, null
br i1 %21, label %90, label %22
22: ; preds = %19
%23 = call i8* @strstr(i8* %20, i8* dereferenceable(1) %1)
%24 = icmp eq i8* %23, null
br i1 %24, label %90, label %25
25: ; preds = %22, %25
%26 = phi i8* [ %29, %25 ], [ %23, %22 ]
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 58
%29 = getelementptr inbounds i8, i8* %26, i64 1
br i1 %28, label %30, label %25
30: ; preds = %25
%31 = getelementptr inbounds i8, i8* %26, i64 4
%32 = call i8* @strstr(i8* %31, i8* dereferenceable(1) %2)
%33 = icmp eq i8* %32, null
br i1 %33, label %90, label %34
34: ; preds = %30
%35 = getelementptr inbounds i8, i8* %20, i64 -1
%36 = icmp eq i8* %6, %35
br i1 %36, label %64, label %37
37: ; preds = %34, %56
%38 = phi i64 [ %58, %56 ], [ 0, %34 ]
%39 = phi i8* [ %60, %56 ], [ %6, %34 ]
%40 = phi i32 [ %57, %56 ], [ 0, %34 ]
%41 = call i32 @strncmp(i8* %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %37
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %38
store i8 95, i8* %44
%45 = add nsw i32 %40, 1
br label %56
46: ; preds = %37
%47 = call i32 @strncmp(i8* %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %38
store i8 95, i8* %50
%51 = add nsw i32 %40, 4
br label %56
52: ; preds = %46
%53 = add nsw i32 %40, 1
%54 = load i8, i8* %39
%55 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %38
store i8 %54, i8* %55
br label %56
56: ; preds = %49, %52, %43
%57 = phi i32 [ %53, %52 ], [ %51, %49 ], [ %45, %43 ]
%58 = add nuw i64 %38, 1
%59 = sext i32 %57 to i64
%60 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %59
%61 = icmp eq i8* %60, %35
br i1 %61, label %62, label %37
62: ; preds = %56
%63 = trunc i64 %58 to i32
br label %64
64: ; preds = %62, %34
%65 = phi i32 [ 0, %34 ], [ %63, %62 ]
%66 = phi i8* [ %6, %34 ], [ %35, %62 ]
%67 = zext i32 %65 to i64
%68 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %67
store i8 0, i8* %68
store i8 0, i8* %66
%69 = call i8* @find_root_source(i8* %0, i8* %6)
%70 = icmp eq i8* %69, null
br i1 %70, label %71, label %93
71: ; preds = %64
%72 = add nuw nsw i32 %65, 1
%73 = call i64 @malloc(i32 %72)
%74 = inttoptr i64 %73 to i8*
%75 = load i8, i8* %7
%76 = icmp eq i8 %75, 0
br i1 %76, label %87, label %77
77: ; preds = %71, %77
%78 = phi i64 [ %80, %77 ], [ 0, %71 ]
%79 = phi i8 [ %83, %77 ], [ %75, %71 ]
%80 = add nuw nsw i64 %78, 1
%81 = getelementptr inbounds i8, i8* %74, i64 %80
store i8 %79, i8* %81
%82 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %80
%83 = load i8, i8* %82
%84 = icmp eq i8 %83, 0
br i1 %84, label %85, label %77
85: ; preds = %77
%86 = and i64 %80, 4294967295
br label %87
87: ; preds = %85, %71
%88 = phi i64 [ 0, %71 ], [ %86, %85 ]
%89 = getelementptr inbounds i8, i8* %74, i64 %88
store i8 0, i8* %89
br label %93
90: ; preds = %22, %30, %19
%91 = call i64 @fgets(i8* %6, i32 1024, i32* %10)
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %19
93: ; preds = %90, %12, %64, %87, %15
%94 = phi i8* [ null, %15 ], [ %74, %87 ], [ %69, %64 ], [ null, %12 ], [ null, %90 ]
ret i8* %94
}