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

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printConvertedPath(int /*<<< orphan*/ *, char *);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
char *strrchr(char *, char);
void printTarget(FILE *output, char *target, char *inputFilename,
                 int indexofElektraRoot, bool isMarkdown, int lineCount) {
  char *backupTarget = target;
  char pathToLink[strlen(inputFilename) + strlen(target) + 11 + 1];
  strcpy(pathToLink, inputFilename);
  if (target[0] != '/') {
    int folderBack = 0;
    while (!strncmp("../", target, 3)) {
      ++folderBack;
      target = target + 3;
    }
    char *lastFolderDelimiter = strrchr(pathToLink, '/');
    if (lastFolderDelimiter != NULL) {
      while (folderBack > 0) {
        *lastFolderDelimiter = '\0';
        --folderBack;
        lastFolderDelimiter = strrchr(pathToLink, '/');
        if (lastFolderDelimiter == NULL) {
          fprintf(stderr, "%s:%i:0 warning: invalid link '%s'\n", inputFilename,
                  lineCount, backupTarget);
          return;
        }
      }
      strcpy(++lastFolderDelimiter, target);
    }
  } else {
    ++target;
    strcpy(&pathToLink[indexofElektraRoot], target);
  }
  struct stat st;
  if (stat(pathToLink, &st) < 0) {
    fprintf(stderr, "%s:%i:0 warning: invalid link '%s'\n", inputFilename,
            lineCount, backupTarget);
    return;
  }
  if (S_ISDIR(st.st_mode)) {
    if (target[strlen(target) - 1] == '/') {
      strcpy(&pathToLink[strlen(pathToLink)], "README.md");
    } else {
      strcpy(&pathToLink[strlen(pathToLink)], "_README.md");
    }
  }
  if (isMarkdown) {
    fprintf(output, "@ref ");
    printConvertedPath(output, &pathToLink[indexofElektraRoot]);
  } else {
    fprintf(output, "%s", pathToLink);
  }
}


x86 assembly (clang, -O0):
<printTarget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x68(%rbp),%rcx
mov    %rax,%rdx
lea    0xc(%rcx,%rdx,1),%rax
mov    %rsp,%rsi
mov    %rsi,-0x38(%rbp)
lea    0x1b(%rcx,%rdx,1),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x60(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     12f5 <printTarget+0x175>
movl   $0x0,-0x44(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xdeb(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1234 <printTarget+0xb4>
jmp    124e <printTarget+0xce>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x10(%rbp)
jmp    120a <printTarget+0x8a>
mov    -0x60(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     12f0 <printTarget+0x170>
jmp    1270 <printTarget+0xf0>
cmpl   $0x0,-0x44(%rbp)
jle    12db <printTarget+0x15b>
mov    -0x60(%rbp),%rdi
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    12d6 <printTarget+0x156>
mov    0x2d32(%rip),%rax
movslq (%rax),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x30(%rbp),%r8
lea    0xd41(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x54(%rbp)
jmp    142a <printTarget+0x2aa>
jmp    1270 <printTarget+0xf0>
mov    -0x50(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x50(%rbp)
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
jmp    1315 <printTarget+0x195>
mov    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1090 <stat@plt>
cmp    $0x0,%rax
jge    135b <printTarget+0x1db>
mov    0x2cad(%rip),%rax
movslq (%rax),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x30(%rbp),%r8
lea    0xcbc(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x54(%rbp)
jmp    142a <printTarget+0x2aa>
mov    -0x58(%rbp),%edi
call   1060 <S_ISDIR@plt>
cmp    $0x0,%rax
je     13d8 <printTarget+0x258>
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    13b7 <printTarget+0x237>
mov    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x60(%rbp),%rdi
add    %rax,%rdi
lea    0xc7c(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d3 <printTarget+0x253>
mov    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x60(%rbp),%rdi
add    %rax,%rdi
lea    0xc5a(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d8 <printTarget+0x258>
cmpl   $0x0,-0x20(%rbp)
je     140d <printTarget+0x28d>
mov    -0x8(%rbp),%rdi
lea    0xc46(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x60(%rbp),%rsi
mov    -0x8(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
call   10a0 <printConvertedPath@plt>
jmp    1423 <printTarget+0x2a3>
mov    -0x60(%rbp),%rdx
mov    -0x8(%rbp),%rdi
lea    0xc1d(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTarget>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,-0x30(%rbp)
mov    %r8d,-0x3c(%rbp)
mov    %ecx,%r13d
mov    %rdx,%rbx
mov    %rsi,%r12
mov    %rdi,%r15
mov    %rdx,%rdi
call   1050 <strlen@plt>
mov    %rax,%r14
mov    %r12,%rdi
call   1050 <strlen@plt>
add    %r14,%rax
add    $0x1b,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    %r14,%rdi
mov    %rbx,-0x50(%rbp)
mov    %rbx,%rsi
mov    %r12,%rbx
call   1040 <strcpy@plt>
cmpb   $0x2f,(%r12)
jne    121c <printTarget+0x7c>
lea    0x1(%rbx),%r12
movslq %r13d,%rdi
add    %r14,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
jmp    12ca <printTarget+0x12a>
mov    %r13d,-0x2c(%rbp)
mov    %r15,-0x48(%rbp)
lea    0xdd5(%rip),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %r13d,%r13d
mov    %rbx,%r12
test   %eax,%eax
jne    126c <printTarget+0xcc>
xor    %r13d,%r13d
lea    0xdb4(%rip),%r15
mov    %rbx,%r12
nop
add    $0x1,%r13d
add    $0x3,%r12
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1250 <printTarget+0xb0>
mov    %r14,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     12c2 <printTarget+0x122>
add    $0x1,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xffffffff,%r13d
test   %r13d,%r13d
jle    12b3 <printTarget+0x113>
movb   $0x0,(%rax)
mov    %r14,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
jne    1290 <printTarget+0xf0>
jmp    134d <printTarget+0x1ad>
add    $0x1,%rax
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    -0x48(%rbp),%r15
mov    -0x2c(%rbp),%r13d
lea    -0x38(%rbp),%rsi
mov    %r14,%rdi
call   10a0 <stat@plt>
test   %rax,%rax
js     134d <printTarget+0x1ad>
mov    -0x38(%rbp),%edi
call   1060 <S_ISDIR@plt>
test   %rax,%rax
je     131b <printTarget+0x17b>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    -0x1(%rax,%r12,1),%bl
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    (%rax,%r14,1),%rdi
cmp    $0x2f,%bl
lea    0xd1e(%rip),%rax
lea    0xd16(%rip),%rsi
cmove  %rax,%rsi
call   1040 <strcpy@plt>
cmpl   $0x0,-0x3c(%rbp)
je     1371 <printTarget+0x1d1>
lea    0xd0b(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
movslq %r13d,%rax
add    %rax,%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   10b0 <printConvertedPath@plt>
jmp    137c <printTarget+0x1dc>
mov    0x2c8c(%rip),%rax
movslq (%rax),%rdi
lea    0xca6(%rip),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x30(%rbp),%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    137c <printTarget+0x1dc>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <fputs@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [4 x i8] c"../\00"
@stderr = global i32 0
@.str.1 = [36 x i8] c"%s:%i:0 warning: invalid link '%s'\0A\00"
@.str.2 = [10 x i8] c"README.md\00"
@.str.3 = [11 x i8] c"_README.md\00"
@.str.4 = [6 x i8] c"@ref \00"
@.str.5 = [3 x i8] c"%s\00"
define void @printTarget(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca %struct.stat
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%20 = load i8*, i8** %8
store i8* %20, i8** %13
%21 = load i8*, i8** %9
%22 = call i64 @strlen(i8* %21)
%23 = load i8*, i8** %8
%24 = call i64 @strlen(i8* %23)
%25 = add i64 %22, %24
%26 = add i64 %25, 11
%27 = add i64 %26, 1
%28 = call i8* @llvm.stacksave()
store i8* %28, i8** %14
%29 = alloca i8, i64 %27
store i64 %27, i64* %15
%30 = load i8*, i8** %9
%31 = call i32 @strcpy(i8* %29, i8* %30)
%32 = load i8*, i8** %8
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 47
br i1 %36, label %37, label %78
37: ; preds = %6
store i32 0, i32* %16
br label %38
38: ; preds = %43, %37
%39 = load i8*, i8** %8
%40 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %39, i32 3)
%41 = icmp ne i32 %40, 0
%42 = xor i1 %41, true
br i1 %42, label %43, label %48
43: ; preds = %38
%44 = load i32, i32* %16
%45 = add nsw i32 %44, 1
store i32 %45, i32* %16
%46 = load i8*, i8** %8
%47 = getelementptr inbounds i8, i8* %46, i64 3
store i8* %47, i8** %8
br label %38
48: ; preds = %38
%49 = call i8* @strrchr(i8* %29, i8 signext 47)
store i8* %49, i8** %17
%50 = load i8*, i8** %17
%51 = icmp ne i8* %50, null
br i1 %51, label %52, label %77
52: ; preds = %48
br label %53
53: ; preds = %71, %52
%54 = load i32, i32* %16
%55 = icmp sgt i32 %54, 0
br i1 %55, label %56, label %72
56: ; preds = %53
%57 = load i8*, i8** %17
store i8 0, i8* %57
%58 = load i32, i32* %16
%59 = add nsw i32 %58, -1
store i32 %59, i32* %16
%60 = call i8* @strrchr(i8* %29, i8 signext 47)
store i8* %60, i8** %17
%61 = load i8*, i8** %17
%62 = icmp eq i8* %61, null
br i1 %62, label %63, label %71
63: ; preds = %56
%64 = load i32, i32* @stderr
%65 = sext i32 %64 to i64
%66 = inttoptr i64 %65 to i32*
%67 = load i8*, i8** %9
%68 = load i32, i32* %12
%69 = load i8*, i8** %13
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %67, i32 %68, i8* %69)
store i32 1, i32* %18
br label %135
71: ; preds = %56
br label %53
72: ; preds = %53
%73 = load i8*, i8** %17
%74 = getelementptr inbounds i8, i8* %73, i32 1
store i8* %74, i8** %17
%75 = load i8*, i8** %8
%76 = call i32 @strcpy(i8* %74, i8* %75)
br label %77
77: ; preds = %72, %48
br label %86
78: ; preds = %6
%79 = load i8*, i8** %8
%80 = getelementptr inbounds i8, i8* %79, i32 1
store i8* %80, i8** %8
%81 = load i32, i32* %10
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8, i8* %29, i64 %82
%84 = load i8*, i8** %8
%85 = call i32 @strcpy(i8* %83, i8* %84)
br label %86
86: ; preds = %78, %77
%87 = call i64 @stat(i8* %29, %struct.stat* %19)
%88 = icmp slt i64 %87, 0
br i1 %88, label %89, label %97
89: ; preds = %86
%90 = load i32, i32* @stderr
%91 = sext i32 %90 to i64
%92 = inttoptr i64 %91 to i32*
%93 = load i8*, i8** %9
%94 = load i32, i32* %12
%95 = load i8*, i8** %13
%96 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %93, i32 %94, i8* %95)
store i32 1, i32* %18
br label %135
97: ; preds = %86
%98 = getelementptr inbounds %struct.stat, %struct.stat* %19, i32 0, i32 0
%99 = load i32, i32* %98
%100 = call i64 @S_ISDIR(i32 %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %120
102: ; preds = %97
%103 = load i8*, i8** %8
%104 = load i8*, i8** %8
%105 = call i64 @strlen(i8* %104)
%106 = sub i64 %105, 1
%107 = getelementptr inbounds i8, i8* %103, i64 %106
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp eq i32 %109, 47
br i1 %110, label %111, label %115
111: ; preds = %102
%112 = call i64 @strlen(i8* %29)
%113 = getelementptr inbounds i8, i8* %29, i64 %112
%114 = call i32 @strcpy(i8* %113, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %119
115: ; preds = %102
%116 = call i64 @strlen(i8* %29)
%117 = getelementptr inbounds i8, i8* %29, i64 %116
%118 = call i32 @strcpy(i8* %117, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %119
119: ; preds = %115, %111
br label %120
120: ; preds = %119, %97
%121 = load i32, i32* %11
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %131
123: ; preds = %120
%124 = load i32*, i32** %7
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%126 = load i32*, i32** %7
%127 = load i32, i32* %10
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %29, i64 %128
%130 = call i32 @printConvertedPath(i32* %126, i8* %129)
br label %134
131: ; preds = %120
%132 = load i32*, i32** %7
%133 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %29)
br label %134
134: ; preds = %131, %123
store i32 0, i32* %18
br label %135
135: ; preds = %134, %89, %63
%136 = load i8*, i8** %14
%137 = load i32, i32* %18
switch i32 %137, label %139 [
i32 0, label %138
i32 1, label %138
]
138: ; preds = %135, %135
ret void
139: ; preds = %135
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [4 x i8] c"../\00"
@stderr = global i32 0
@.str.1 = [36 x i8] c"%s:%i:0 warning: invalid link '%s'\0A\00"
@.str.2 = [10 x i8] c"README.md\00"
@.str.3 = [11 x i8] c"_README.md\00"
@.str.4 = [6 x i8] c"@ref \00"
define void @printTarget(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.stat
%8 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%9 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%10 = add i64 %8, 12
%11 = add i64 %10, %9
%12 = alloca i8, i64 %11
%13 = call i32 @strcpy(i8* %12, i8* %2)
%14 = load i8, i8* %1
%15 = icmp eq i8 %14, 47
br i1 %15, label %47, label %16
16: ; preds = %6
%17 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1, i32 3)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %16, %19
%20 = phi i32 [ %22, %19 ], [ 0, %16 ]
%21 = phi i8* [ %23, %19 ], [ %1, %16 ]
%22 = add nuw nsw i32 %20, 1
%23 = getelementptr inbounds i8, i8* %21, i64 3
%24 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %23, i32 3)
%25 = icmp eq i32 %24, 0
br i1 %25, label %19, label %26
26: ; preds = %19, %16
%27 = phi i8* [ %1, %16 ], [ %23, %19 ]
%28 = phi i32 [ 0, %16 ], [ %22, %19 ]
%29 = call i8* @strrchr(i8* %12, i8 signext 47)
%30 = icmp eq i8* %29, null
br i1 %30, label %52, label %31
31: ; preds = %26, %35
%32 = phi i32 [ %36, %35 ], [ %28, %26 ]
%33 = phi i8* [ %37, %35 ], [ %29, %26 ]
%34 = icmp sgt i32 %32, 0
br i1 %34, label %35, label %44
35: ; preds = %31
store i8 0, i8* %33
%36 = add nsw i32 %32, -1
%37 = call i8* @strrchr(i8* %12, i8 signext 47)
%38 = icmp eq i8* %37, null
br i1 %38, label %39, label %31
39: ; preds = %35
%40 = load i32, i32* @stderr
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i32*
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %5, i8* %1)
br label %87
44: ; preds = %31
%45 = getelementptr inbounds i8, i8* %33, i64 1
%46 = call i32 @strcpy(i8* %45, i8* %27)
br label %52
47: ; preds = %6
%48 = getelementptr inbounds i8, i8* %1, i64 1
%49 = sext i32 %3 to i64
%50 = getelementptr inbounds i8, i8* %12, i64 %49
%51 = call i32 @strcpy(i8* %50, i8* %48)
br label %52
52: ; preds = %44, %26, %47
%53 = phi i8* [ %48, %47 ], [ %27, %26 ], [ %27, %44 ]
%54 = bitcast %struct.stat* %7 to i8*
%55 = call i64 @stat(i8* %12, %struct.stat* %7)
%56 = icmp slt i64 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %52
%58 = load i32, i32* @stderr
%59 = sext i32 %58 to i64
%60 = inttoptr i64 %59 to i32*
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %5, i8* %1)
br label %86
62: ; preds = %52
%63 = getelementptr inbounds %struct.stat, %struct.stat* %7, i64 0, i32 0
%64 = load i32, i32* %63
%65 = call i64 @S_ISDIR(i32 %64)
%66 = icmp eq i64 %65, 0
br i1 %66, label %77, label %67
67: ; preds = %62
%68 = call i64 @strlen(i8* dereferenceable(1) %53)
%69 = add i64 %68, -1
%70 = getelementptr inbounds i8, i8* %53, i64 %69
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 47
%73 = call i64 @strlen(i8* %12)
%74 = getelementptr inbounds i8, i8* %12, i64 %73
%75 = select i1 %72, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0)
%76 = call i32 @strcpy(i8* %74, i8* %75)
br label %77
77: ; preds = %67, %62
%78 = icmp eq i32 %4, 0
br i1 %78, label %84, label %79
79: ; preds = %77
%80 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 5, i64 1, i32* %0)
%81 = sext i32 %3 to i64
%82 = getelementptr inbounds i8, i8* %12, i64 %81
%83 = call i32 @printConvertedPath(i32* %0, i8* %82)
br label %86
84: ; preds = %77
%85 = call i32 @fputs(i8* %12, i32* %0)
br label %86
86: ; preds = %79, %84, %57
br label %87
87: ; preds = %39, %86
ret void
}