#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*/ temptitle;
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ S_ISREG(int /*<<< orphan*/);
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ lstat(char *, struct stat *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strrchr(char *, char);
int /*<<< orphan*/ *strstr(char *, char *);
int /*<<< orphan*/ toupper(char *);
void a_article_search(char *path, char *key, char *location) {
  FILE *fp;
  struct stat buf;
  char index_file[] = "/.Names";
  char titlebuf[128];
  char pathbuf[128];
  char index_path[1024];
  char filename[256];
  strcpy(index_path, path);
  strcat(index_path, index_file);
  if ((fp = fopen(index_path, "r")) == NULL) {
    return;
  }
  while (!feof(fp)) {
    bzero(filename, 80);
    strcpy(filename, path);
    fgets(titlebuf, 128, fp);
    if (strncmp(titlebuf, "Name=", 5) == 0) {
      fgets(pathbuf, 128, fp);
      if (strstr(titlebuf + 43, "(BM: BMS)") ||
          strstr(titlebuf + 43, "(BM: SYSOPS)") ||
          strstr(titlebuf + 5, "<HIDE>"))
        continue;
      char temppath[80];
      if (strncmp(pathbuf, "Path=", 5) == 0) {
        if (strncmp(pathbuf, "Path=~/", 7) == 0)
          strncpy(temppath, pathbuf + 7, 80);
        else
          strncpy(temppath, pathbuf + 5, 80);
        temppath[79] = '\0';
      }
      strcat(filename, "/");
      strcat(filename, temppath);
      filename[strlen(filename) - 1] = '\0';
      lstat(filename, &buf);
      if (S_ISDIR(buf.st_mode)) {
        char linebuf[20];
        fgets(linebuf, 20, fp);
        if (strncmp(linebuf, "Numb=", 5) == 0)
          linebuf[strlen(linebuf) - 1] = '\0';
        char nextlocate[20];
        sprintf(nextlocate, "%s%s-", location, linebuf + 5);
        a_article_search(filename, key, nextlocate);
      } else if (S_ISREG(buf.st_mode)) {
        char temptitle[64];
        bzero(temptitle, sizeof(temptitle));
        strncpy(temptitle, titlebuf + 5, 38);
        char tempupper[64];
        strcpy(tempupper, temptitle);
        char keyupper[50];
        strcpy(keyupper, key);
        toupper(tempupper);
        toupper(keyupper);
        if (strstr(tempupper, keyupper) != NULL) {
          char linebuf[20];
          fgets(linebuf, 20, fp);
          if (strncmp(linebuf, "Numb=", 5) == 0)
            linebuf[strlen(linebuf) - 1] = '\0';
          char nextlocate[32];
          sprintf(nextlocate, "%s%s", location, linebuf + 5);
          temptitle[strlen(temptitle) - 7] = '\0';
          char *filenamenum;
          char tempresult[256];
          strcpy(tempresult, filename + 19);
          filenamenum = strrchr(tempresult, '/');
          char temptitleresult[30];
          strcpy(temptitleresult, filenamenum);
          tempresult[strlen(tempresult) - strlen(filenamenum)] = '\0';
          temptitle[strlen(temptitle) - 1] = '\0';
          printf("%s,%s,%s,%s \n", nextlocate, tempresult, temptitleresult,
                 temptitle);
        } else {
          titlebuf[0] = '\0';
          pathbuf[0] = '\0';
        }
      } else {
        continue;
      }
    } else
      titlebuf[0] = '\0';
  }
  fclose(fp);
  return;
}


x86 assembly (clang, -O0):
<a_article_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x900,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0xdb2(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    -0x530(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x530(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x530(%rbp),%rdi
lea    0xd88(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1298 <a_article_search+0x68>
jmp    171a <a_article_search+0x4ea>
jmp    129d <a_article_search+0x6d>
mov    -0x20(%rbp),%rdi
call   10f0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12bb <a_article_search+0x8b>
jmp    1711 <a_article_search+0x4e1>
lea    -0x630(%rbp),%rdi
mov    $0x50,%esi
call   1120 <bzero@plt>
lea    -0x630(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x80,%esi
call   10e0 <fgets@plt>
lea    -0xb0(%rbp),%rdi
lea    0xd0b(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1705 <a_article_search+0x4d5>
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x80,%esi
call   10e0 <fgets@plt>
lea    -0xb0(%rbp),%rdi
add    $0x2b,%rdi
lea    0xcd6(%rip),%rsi
call   1150 <strstr@plt>
cmp    $0x0,%rax
jne    138b <a_article_search+0x15b>
lea    -0xb0(%rbp),%rdi
add    $0x2b,%rdi
lea    0xcbf(%rip),%rsi
call   1150 <strstr@plt>
cmp    $0x0,%rax
jne    138b <a_article_search+0x15b>
lea    -0xb0(%rbp),%rdi
add    $0x5,%rdi
lea    0xcab(%rip),%rsi
call   1150 <strstr@plt>
cmp    $0x0,%rax
je     1390 <a_article_search+0x160>
jmp    129d <a_article_search+0x6d>
lea    -0x130(%rbp),%rdi
lea    0xc90(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1418 <a_article_search+0x1e8>
lea    -0x130(%rbp),%rdi
lea    0xc74(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f5 <a_article_search+0x1c5>
lea    -0x680(%rbp),%rdi
lea    -0x130(%rbp),%rsi
add    $0x7,%rsi
mov    $0x50,%edx
call   1030 <strncpy@plt>
jmp    1411 <a_article_search+0x1e1>
lea    -0x680(%rbp),%rdi
lea    -0x130(%rbp),%rsi
add    $0x5,%rsi
mov    $0x50,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x631(%rbp)
lea    -0x630(%rbp),%rdi
lea    0xc14(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x630(%rbp),%rdi
lea    -0x680(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x630(%rbp),%rdi
call   1090 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x630(%rbp,%rax,1)
lea    -0x630(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10d0 <lstat@plt>
mov    -0x28(%rbp),%edi
call   10b0 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1507 <a_article_search+0x2d7>
lea    -0x6a0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x14,%esi
call   10e0 <fgets@plt>
lea    -0x6a0(%rbp),%rdi
lea    0xba0(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14c9 <a_article_search+0x299>
lea    -0x6a0(%rbp),%rdi
call   1090 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x6a0(%rbp,%rax,1)
lea    -0x6c0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x6a0(%rbp),%rcx
add    $0x5,%rcx
lea    0xb5c(%rip),%rsi
call   1140 <sprintf@plt>
lea    -0x630(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x6c0(%rbp),%rdx
call   1070 <a_article_search@plt>
jmp    1700 <a_article_search+0x4d0>
mov    -0x28(%rbp),%edi
call   1100 <S_ISREG@plt>
cmp    $0x0,%rax
je     16f6 <a_article_search+0x4c6>
lea    -0x700(%rbp),%rdi
mov    $0x40,%esi
call   1120 <bzero@plt>
lea    -0x700(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
add    $0x5,%rsi
mov    $0x26,%edx
call   1030 <strncpy@plt>
lea    -0x740(%rbp),%rdi
lea    -0x700(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x780(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x740(%rbp),%rdi
call   1060 <toupper@plt>
lea    -0x780(%rbp),%rdi
call   1060 <toupper@plt>
lea    -0x740(%rbp),%rdi
lea    -0x780(%rbp),%rsi
call   1150 <strstr@plt>
cmp    $0x0,%rax
je     16e3 <a_article_search+0x4b3>
lea    -0x7a0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x14,%esi
call   10e0 <fgets@plt>
lea    -0x7a0(%rbp),%rdi
lea    0xa7b(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    15ee <a_article_search+0x3be>
lea    -0x7a0(%rbp),%rdi
call   1090 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x7a0(%rbp,%rax,1)
lea    -0x7c0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x7a0(%rbp),%rcx
add    $0x5,%rcx
lea    0xa3d(%rip),%rsi
call   1140 <sprintf@plt>
lea    -0x700(%rbp),%rdi
call   1090 <strlen@plt>
sub    $0x7,%eax
cltq
movb   $0x0,-0x700(%rbp,%rax,1)
lea    -0x8d0(%rbp),%rdi
lea    -0x630(%rbp),%rsi
add    $0x13,%rsi
call   1050 <strcpy@plt>
lea    -0x8d0(%rbp),%rdi
mov    $0x2f,%esi
call   10c0 <strrchr@plt>
mov    %rax,-0x7c8(%rbp)
lea    -0x8f0(%rbp),%rdi
mov    -0x7c8(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x8d0(%rbp),%rdi
call   1090 <strlen@plt>
mov    %eax,-0x8f4(%rbp)
mov    -0x7c8(%rbp),%rdi
call   1090 <strlen@plt>
mov    %eax,%ecx
mov    -0x8f4(%rbp),%eax
sub    %ecx,%eax
cltq
movb   $0x0,-0x8d0(%rbp,%rax,1)
lea    -0x700(%rbp),%rdi
call   1090 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x700(%rbp,%rax,1)
lea    -0x7c0(%rbp),%rsi
lea    -0x8d0(%rbp),%rdx
lea    -0x8f0(%rbp),%rcx
lea    -0x700(%rbp),%r8
lea    0x974(%rip),%rdi
call   10a0 <printf@plt>
jmp    16f1 <a_article_search+0x4c1>
movb   $0x0,-0xb0(%rbp)
movb   $0x0,-0x130(%rbp)
jmp    16fb <a_article_search+0x4cb>
jmp    129d <a_article_search+0x6d>
jmp    1700 <a_article_search+0x4d0>
jmp    170c <a_article_search+0x4dc>
movb   $0x0,-0xb0(%rbp)
jmp    129d <a_article_search+0x6d>
mov    -0x20(%rbp),%rdi
call   1080 <fclose@plt>
add    $0x900,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_article_search>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8a8,%rsp
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r12
movabs $0x73656d614e2e2f,%rax
mov    %rax,0x48(%rsp)
lea    0x4a0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <strcpy@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
call   1130 <strcat@plt>
lea    0xd80(%rip),%rsi
mov    %rbx,%rdi
call   1110 <fopen@plt>
test   %rax,%rax
je     12a9 <a_article_search+0x79>
mov    %rax,%rbx
mov    %rbp,0x18(%rsp)
mov    %rax,%rdi
call   10f0 <feof@plt>
test   %eax,%eax
je     12bb <a_article_search+0x8b>
mov    %rbx,%rdi
call   1080 <fclose@plt>
add    $0x8a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x3a0(%rsp),%rbp
lea    0xd0(%rsp),%r14
lea    0xd30(%rip),%r15
jmp    12f4 <a_article_search+0xc4>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,0xd0(%rsp)
mov    %rbx,%rdi
call   10f0 <feof@plt>
test   %eax,%eax
jne    12a1 <a_article_search+0x71>
mov    %rbp,%rdi
mov    $0x50,%esi
call   1120 <bzero@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
call   1050 <strcpy@plt>
mov    %r14,%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10e0 <fgets@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    12e0 <a_article_search+0xb0>
lea    0x190(%rsp),%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10e0 <fgets@plt>
lea    0xfb(%rsp),%rdi
lea    0xcb3(%rip),%rsi
call   1150 <strstr@plt>
test   %rax,%rax
jne    12e8 <a_article_search+0xb8>
lea    0xfb(%rsp),%rdi
lea    0xca4(%rip),%rsi
call   1150 <strstr@plt>
test   %rax,%rax
jne    12e8 <a_article_search+0xb8>
lea    0xd5(%rsp),%rdi
lea    0xc94(%rip),%rsi
call   1150 <strstr@plt>
test   %rax,%rax
jne    12e8 <a_article_search+0xb8>
mov    %r13,0x8(%rsp)
lea    0x190(%rsp),%rdi
lea    0xc79(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1406 <a_article_search+0x1d6>
lea    0x190(%rsp),%rdi
lea    0xc61(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
lea    0x195(%rsp),%rsi
lea    0x197(%rsp),%rax
cmove  %rax,%rsi
lea    0x210(%rsp),%rdi
mov    $0x50,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x25f(%rsp)
mov    %rbp,%rdi
lea    0xc22(%rip),%rsi
call   1130 <strcat@plt>
mov    %rbp,%rdi
lea    0x210(%rsp),%rsi
call   1130 <strcat@plt>
mov    %rbp,%rdi
call   1090 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbp,1)
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   10d0 <lstat@plt>
mov    0x10(%rsp),%r13d
mov    %r13d,%edi
call   10b0 <S_ISDIR@plt>
test   %rax,%rax
je     14d8 <a_article_search+0x2a8>
lea    0x260(%rsp),%r13
mov    %r13,%rdi
mov    $0x14,%esi
mov    %rbx,%rdx
call   10e0 <fgets@plt>
mov    %r13,%rdi
lea    0xbbb(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    14a0 <a_article_search+0x270>
lea    0x260(%rsp),%r13
mov    %r13,%rdi
call   1090 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r13,1)
lea    0x50(%rsp),%rdi
lea    0xb8e(%rip),%rsi
mov    0x8(%rsp),%r13
mov    %r13,%rdx
lea    0x265(%rsp),%rcx
call   1140 <sprintf@plt>
mov    %rbp,%rdi
mov    0x18(%rsp),%rsi
lea    0x50(%rsp),%rdx
call   1070 <a_article_search@plt>
jmp    12e8 <a_article_search+0xb8>
mov    %r13d,%edi
call   1100 <S_ISREG@plt>
test   %rax,%rax
je     167e <a_article_search+0x44e>
lea    0x50(%rsp),%r13
mov    %r13,%rdi
mov    $0x40,%esi
call   1120 <bzero@plt>
mov    %r13,%rdi
lea    0xd5(%rsp),%rsi
mov    $0x26,%edx
call   1030 <strncpy@plt>
lea    0x150(%rsp),%rdi
mov    %r13,%rsi
call   1050 <strcpy@plt>
lea    0x360(%rsp),%r13
mov    %r13,%rdi
mov    0x18(%rsp),%rsi
call   1050 <strcpy@plt>
lea    0x150(%rsp),%rdi
call   1060 <toupper@plt>
mov    %r13,%rdi
call   1060 <toupper@plt>
lea    0x150(%rsp),%rdi
mov    %r13,%rsi
call   1150 <strstr@plt>
test   %rax,%rax
mov    0x8(%rsp),%r13
je     1688 <a_article_search+0x458>
lea    0x20(%rsp),%rdi
mov    $0x14,%esi
mov    %rbx,%rdx
call   10e0 <fgets@plt>
lea    0x20(%rsp),%rdi
lea    0xaae(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    15ab <a_article_search+0x37b>
lea    0x20(%rsp),%rdi
call   1090 <strlen@plt>
cltq
lea    0x20(%rsp),%rcx
movb   $0x0,-0x1(%rax,%rcx,1)
lea    0xb0(%rsp),%rdi
lea    0xa86(%rip),%rsi
mov    %r13,%rdx
lea    0x25(%rsp),%rcx
call   1140 <sprintf@plt>
lea    0x50(%rsp),%r13
mov    %r13,%rdi
call   1090 <strlen@plt>
cltq
movb   $0x0,-0x7(%rax,%r13,1)
lea    0x260(%rsp),%r13
mov    %r13,%rdi
lea    0x3b3(%rsp),%rsi
call   1050 <strcpy@plt>
mov    %r13,%rdi
mov    $0x2f,%esi
call   10c0 <strrchr@plt>
mov    %rax,%rsi
mov    %rax,0x40(%rsp)
lea    0x90(%rsp),%rdi
call   1050 <strcpy@plt>
mov    %r13,%rdi
call   1090 <strlen@plt>
mov    %eax,%r13d
mov    0x40(%rsp),%rdi
call   1090 <strlen@plt>
sub    %eax,%r13d
movslq %r13d,%rax
mov    0x8(%rsp),%r13
movb   $0x0,0x260(%rsp,%rax,1)
lea    0x50(%rsp),%rdi
call   1090 <strlen@plt>
cltq
lea    0x50(%rsp),%r8
movb   $0x0,-0x1(%rax,%r8,1)
lea    0x9e9(%rip),%rdi
lea    0xb0(%rsp),%rsi
lea    0x260(%rsp),%rdx
lea    0x90(%rsp),%rcx
call   10a0 <printf@plt>
jmp    12e8 <a_article_search+0xb8>
mov    0x8(%rsp),%r13
jmp    12e8 <a_article_search+0xb8>
movb   $0x0,0xd0(%rsp)
movb   $0x0,0x190(%rsp)
jmp    12e8 <a_article_search+0xb8>

LLVM IR (-O0):
%struct.stat = type { i32 }
@__const.a_article_search.index_file = [8 x i8] c"/.Names\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"Name=\00"
@.str.2 = [10 x i8] c"(BM: BMS)\00"
@.str.3 = [13 x i8] c"(BM: SYSOPS)\00"
@.str.4 = [7 x i8] c"<HIDE>\00"
@.str.5 = [6 x i8] c"Path=\00"
@.str.6 = [8 x i8] c"Path=~/\00"
@.str.7 = [2 x i8] c"/\00"
@.str.8 = [6 x i8] c"Numb=\00"
@.str.9 = [6 x i8] c"%s%s-\00"
@.str.10 = [5 x i8] c"%s%s\00"
@.str.11 = [14 x i8] c"%s,%s,%s,%s \0A\00"
define void @a_article_search(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca %struct.stat
%9 = alloca [8 x i8]
%10 = alloca [128 x i8]
%11 = alloca [128 x i8]
%12 = alloca [1024 x i8]
%13 = alloca [256 x i8]
%14 = alloca [80 x i8]
%15 = alloca [20 x i8]
%16 = alloca [20 x i8]
%17 = alloca [64 x i8]
%18 = alloca [64 x i8]
%19 = alloca [50 x i8]
%20 = alloca [20 x i8]
%21 = alloca [32 x i8]
%22 = alloca i8*
%23 = alloca [256 x i8]
%24 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%25 = bitcast [8 x i8]* %9 to i8*
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%27 = load i8*, i8** %4
%28 = call i32 @strcpy(i8* %26, i8* %27)
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%30 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%31 = call i32 @strcat(i8* %29, i8* %30)
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %33, i32** %7
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %36
35: ; preds = %3
br label %221
36: ; preds = %3
br label %37
37: ; preds = %217, %212, %72, %36
%38 = load i32*, i32** %7
%39 = call i32 @feof(i32* %38)
%40 = icmp ne i32 %39, 0
%41 = xor i1 %40, true
br i1 %41, label %42, label %218
42: ; preds = %37
%43 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%44 = call i32 @bzero(i8* %43, i32 80)
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%46 = load i8*, i8** %4
%47 = call i32 @strcpy(i8* %45, i8* %46)
%48 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%49 = load i32*, i32** %7
%50 = call i32 @fgets(i8* %48, i32 128, i32* %49)
%51 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%52 = call i64 @strncmp(i8* %51, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %215
54: ; preds = %42
%55 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%56 = load i32*, i32** %7
%57 = call i32 @fgets(i8* %55, i32 128, i32* %56)
%58 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%59 = getelementptr inbounds i8, i8* %58, i64 43
%60 = call i32* @strstr(i8* %59, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%61 = icmp ne i32* %60, null
br i1 %61, label %72, label %62
62: ; preds = %54
%63 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%64 = getelementptr inbounds i8, i8* %63, i64 43
%65 = call i32* @strstr(i8* %64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%66 = icmp ne i32* %65, null
br i1 %66, label %72, label %67
67: ; preds = %62
%68 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%69 = getelementptr inbounds i8, i8* %68, i64 5
%70 = call i32* @strstr(i8* %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%71 = icmp ne i32* %70, null
br i1 %71, label %72, label %73
72: ; preds = %67, %62, %54
br label %37
73: ; preds = %67
%74 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%75 = call i64 @strncmp(i8* %74, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %93
77: ; preds = %73
%78 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%79 = call i64 @strncmp(i8* %78, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %86
81: ; preds = %77
%82 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%83 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%84 = getelementptr inbounds i8, i8* %83, i64 7
%85 = call i32 @strncpy(i8* %82, i8* %84, i32 80)
br label %91
86: ; preds = %77
%87 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%88 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%89 = getelementptr inbounds i8, i8* %88, i64 5
%90 = call i32 @strncpy(i8* %87, i8* %89, i32 80)
br label %91
91: ; preds = %86, %81
%92 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 79
store i8 0, i8* %92
br label %93
93: ; preds = %91, %73
%94 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%95 = call i32 @strcat(i8* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%97 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%98 = call i32 @strcat(i8* %96, i8* %97)
%99 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%100 = call i32 @strlen(i8* %99)
%101 = sub nsw i32 %100, 1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 %102
store i8 0, i8* %103
%104 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%105 = call i32 @lstat(i8* %104, %struct.stat* %8)
%106 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%107 = load i32, i32* %106
%108 = call i64 @S_ISDIR(i32 %107)
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %132
110: ; preds = %93
%111 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
%112 = load i32*, i32** %7
%113 = call i32 @fgets(i8* %111, i32 20, i32* %112)
%114 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
%115 = call i64 @strncmp(i8* %114, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 5)
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %123
117: ; preds = %110
%118 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
%119 = call i32 @strlen(i8* %118)
%120 = sub nsw i32 %119, 1
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 %121
store i8 0, i8* %122
br label %123
123: ; preds = %117, %110
%124 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
%125 = load i8*, i8** %6
%126 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
%127 = getelementptr inbounds i8, i8* %126, i64 5
%128 = call i32 @sprintf(i8* %124, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %125, i8* %127)
%129 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%130 = load i8*, i8** %5
%131 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
br label %214
132: ; preds = %93
%133 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%134 = load i32, i32* %133
%135 = call i64 @S_ISREG(i32 %134)
%136 = icmp ne i64 %135, 0
br i1 %136, label %137, label %212
137: ; preds = %132
%138 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%139 = call i32 @bzero(i8* %138, i32 64)
%140 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%141 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%142 = getelementptr inbounds i8, i8* %141, i64 5
%143 = call i32 @strncpy(i8* %140, i8* %142, i32 38)
%144 = getelementptr inbounds [64 x i8], [64 x i8]* %18, i64 0, i64 0
%145 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%146 = call i32 @strcpy(i8* %144, i8* %145)
%147 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%148 = load i8*, i8** %5
%149 = call i32 @strcpy(i8* %147, i8* %148)
%150 = getelementptr inbounds [64 x i8], [64 x i8]* %18, i64 0, i64 0
%151 = call i32 @toupper(i8* %150)
%152 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%153 = call i32 @toupper(i8* %152)
%154 = getelementptr inbounds [64 x i8], [64 x i8]* %18, i64 0, i64 0
%155 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%156 = call i32* @strstr(i8* %154, i8* %155)
%157 = icmp ne i32* %156, null
br i1 %157, label %158, label %208
158: ; preds = %137
%159 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%160 = load i32*, i32** %7
%161 = call i32 @fgets(i8* %159, i32 20, i32* %160)
%162 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%163 = call i64 @strncmp(i8* %162, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 5)
%164 = icmp eq i64 %163, 0
br i1 %164, label %165, label %171
165: ; preds = %158
%166 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%167 = call i32 @strlen(i8* %166)
%168 = sub nsw i32 %167, 1
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 %169
store i8 0, i8* %170
br label %171
171: ; preds = %165, %158
%172 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%173 = load i8*, i8** %6
%174 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%175 = getelementptr inbounds i8, i8* %174, i64 5
%176 = call i32 @sprintf(i8* %172, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %173, i8* %175)
%177 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%178 = call i32 @strlen(i8* %177)
%179 = sub nsw i32 %178, 7
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 %180
store i8 0, i8* %181
%182 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%183 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%184 = getelementptr inbounds i8, i8* %183, i64 19
%185 = call i32 @strcpy(i8* %182, i8* %184)
%186 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%187 = call i8* @strrchr(i8* %186, i8 signext 47)
store i8* %187, i8** %22
%188 = getelementptr inbounds [30 x i8], [30 x i8]* %24, i64 0, i64 0
%189 = load i8*, i8** %22
%190 = call i32 @strcpy(i8* %188, i8* %189)
%191 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%192 = call i32 @strlen(i8* %191)
%193 = load i8*, i8** %22
%194 = call i32 @strlen(i8* %193)
%195 = sub nsw i32 %192, %194
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 %196
store i8 0, i8* %197
%198 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%199 = call i32 @strlen(i8* %198)
%200 = sub nsw i32 %199, 1
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 %201
store i8 0, i8* %202
%203 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%204 = getelementptr inbounds [256 x i8], [256 x i8]* %23, i64 0, i64 0
%205 = getelementptr inbounds [30 x i8], [30 x i8]* %24, i64 0, i64 0
%206 = getelementptr inbounds [64 x i8], [64 x i8]* %17, i64 0, i64 0
%207 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %203, i8* %204, i8* %205, i8* %206)
br label %211
208: ; preds = %137
%209 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
store i8 0, i8* %209
%210 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
store i8 0, i8* %210
br label %211
211: ; preds = %208, %171
br label %213
212: ; preds = %132
br label %37
213: ; preds = %211
br label %214
214: ; preds = %213, %123
br label %217
215: ; preds = %42
%216 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
store i8 0, i8* %216
br label %217
217: ; preds = %215, %214
br label %37
218: ; preds = %37
%219 = load i32*, i32** %7
%220 = call i32 @fclose(i32* %219)
br label %221
221: ; preds = %218, %35
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"Name=\00"
@.str.2 = [10 x i8] c"(BM: BMS)\00"
@.str.3 = [13 x i8] c"(BM: SYSOPS)\00"
@.str.4 = [7 x i8] c"<HIDE>\00"
@.str.5 = [6 x i8] c"Path=\00"
@.str.6 = [8 x i8] c"Path=~/\00"
@.str.7 = [2 x i8] c"/\00"
@.str.8 = [6 x i8] c"Numb=\00"
@.str.9 = [6 x i8] c"%s%s-\00"
@.str.10 = [5 x i8] c"%s%s\00"
@.str.11 = [14 x i8] c"%s,%s,%s,%s \0A\00"
define void @a_article_search(i8* %0, i8* %1, i8* %2) {
%4 = alloca %struct.stat
%5 = alloca i64
%6 = alloca [128 x i8]
%7 = alloca [128 x i8]
%8 = alloca [1024 x i8]
%9 = alloca [256 x i8]
%10 = alloca [80 x i8]
%11 = alloca [20 x i8]
%12 = alloca [20 x i8]
%13 = alloca [64 x i8]
%14 = alloca [64 x i8]
%15 = alloca [50 x i8]
%16 = alloca [20 x i8]
%17 = alloca [32 x i8]
%18 = alloca [256 x i8]
%19 = alloca [30 x i8]
%20 = bitcast %struct.stat* %4 to i8*
%21 = bitcast i64* %5 to i8*
store i64 32481142780079663, i64* %5
%22 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%26 = call i32 @strcpy(i8* %24, i8* %0)
%27 = call i32 @strcat(i8* %24, i8* %21)
%28 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %149, label %30
30: ; preds = %3
%31 = call i32 @feof(i32* %28)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %147
33: ; preds = %30
%34 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 43
%35 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 5
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%37 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 5
%38 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 7
%39 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 79
%40 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%42 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 0, i64 0
%43 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 5
%44 = getelementptr inbounds [64 x i8], [64 x i8]* %13, i64 0, i64 0
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%46 = getelementptr inbounds [50 x i8], [50 x i8]* %15, i64 0, i64 0
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
%48 = getelementptr inbounds [32 x i8], [32 x i8]* %17, i64 0, i64 0
%49 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 5
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 0
%51 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 19
%52 = getelementptr inbounds [30 x i8], [30 x i8]* %19, i64 0, i64 0
br label %53
53: ; preds = %33, %69
%54 = call i32 @bzero(i8* %25, i32 80)
%55 = call i32 @strcpy(i8* %25, i8* %0)
%56 = call i32 @fgets(i8* %22, i32 128, i32* %28)
%57 = call i64 @strncmp(i8* %22, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %146
59: ; preds = %53
%60 = call i32 @fgets(i8* %23, i32 128, i32* %28)
%61 = call i32* @strstr(i8* %34, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %69
63: ; preds = %59
%64 = call i32* @strstr(i8* %34, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%65 = icmp eq i32* %64, null
br i1 %65, label %66, label %69
66: ; preds = %63
%67 = call i32* @strstr(i8* %35, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%68 = icmp eq i32* %67, null
br i1 %68, label %72, label %69
69: ; preds = %146, %144, %59, %63, %66, %145
%70 = call i32 @feof(i32* %28)
%71 = icmp eq i32 %70, 0
br i1 %71, label %53, label %147
72: ; preds = %66
%73 = call i64 @strncmp(i8* %23, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %80
75: ; preds = %72
%76 = call i64 @strncmp(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%77 = icmp eq i64 %76, 0
%78 = select i1 %77, i8* %38, i8* %37
%79 = call i32 @strncpy(i8* %36, i8* %78, i32 80)
store i8 0, i8* %39
br label %80
80: ; preds = %75, %72
%81 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%82 = call i32 @strcat(i8* %25, i8* %36)
%83 = call i32 @strlen(i8* %25)
%84 = add nsw i32 %83, -1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 %85
store i8 0, i8* %86
%87 = call i32 @lstat(i8* %25, %struct.stat* %4)
%88 = load i32, i32* %40
%89 = call i64 @S_ISDIR(i32 %88)
%90 = icmp eq i64 %89, 0
br i1 %90, label %102, label %91
91: ; preds = %80
%92 = call i32 @fgets(i8* %41, i32 20, i32* %28)
%93 = call i64 @strncmp(i8* %41, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 5)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %91
%96 = call i32 @strlen(i8* %41)
%97 = add nsw i32 %96, -1
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 %98
store i8 0, i8* %99
br label %100
100: ; preds = %95, %91
%101 = call i32 @sprintf(i8* %42, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %2, i8* %43)
br label %144
102: ; preds = %80
%103 = call i64 @S_ISREG(i32 %88)
%104 = icmp eq i64 %103, 0
br i1 %104, label %145, label %105
105: ; preds = %102
%106 = call i32 @bzero(i8* %44, i32 64)
%107 = call i32 @strncpy(i8* %44, i8* %35, i32 38)
%108 = call i32 @strcpy(i8* %45, i8* %44)
%109 = call i32 @strcpy(i8* %46, i8* %1)
%110 = call i32 @toupper(i8* %45)
%111 = call i32 @toupper(i8* %46)
%112 = call i32* @strstr(i8* %45, i8* %46)
%113 = icmp eq i32* %112, null
br i1 %113, label %142, label %114
114: ; preds = %105
%115 = call i32 @fgets(i8* %47, i32 20, i32* %28)
%116 = call i64 @strncmp(i8* %47, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 5)
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %123
118: ; preds = %114
%119 = call i32 @strlen(i8* %47)
%120 = add nsw i32 %119, -1
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 %121
store i8 0, i8* %122
br label %123
123: ; preds = %118, %114
%124 = call i32 @sprintf(i8* %48, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %2, i8* %49)
%125 = call i32 @strlen(i8* %44)
%126 = add nsw i32 %125, -7
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [64 x i8], [64 x i8]* %13, i64 0, i64 %127
store i8 0, i8* %128
%129 = call i32 @strcpy(i8* %50, i8* %51)
%130 = call i8* @strrchr(i8* %50, i8 signext 47)
%131 = call i32 @strcpy(i8* %52, i8* %130)
%132 = call i32 @strlen(i8* %50)
%133 = call i32 @strlen(i8* %130)
%134 = sub nsw i32 %132, %133
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 %135
store i8 0, i8* %136
%137 = call i32 @strlen(i8* %44)
%138 = add nsw i32 %137, -1
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [64 x i8], [64 x i8]* %13, i64 0, i64 %139
store i8 0, i8* %140
%141 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %48, i8* %50, i8* %52, i8* %44)
br label %143
142: ; preds = %105
store i8 0, i8* %22
store i8 0, i8* %23
br label %143
143: ; preds = %142, %123
br label %144
144: ; preds = %143, %100
br label %69
145: ; preds = %102
br label %69
146: ; preds = %53
store i8 0, i8* %22
br label %69
147: ; preds = %69, %30
%148 = call i32 @fclose(i32* %28)
br label %149
149: ; preds = %3, %147
ret void
}