#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*/ regex_t;

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ ESRCH;
int /*<<< orphan*/ PATH_MAX;
int REG_EXTENDED;
int REG_NOSUB;
int /*<<< orphan*/ die(char *);
scalar_t__ errno;
int /*<<< orphan*/ printf(char *, char *, char *);
int readlink(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ regcomp(int /*<<< orphan*/ *, char *, int);
scalar_t__ regexec(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                   int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
char *strerror(scalar_t__);
int /*<<< orphan*/ version();
int main(int argc, char *argv[]) {
  char buf[PATH_MAX + 1];
  regex_t re;
  int i;
  if (argc < 2)
    die("Usage: pwdx pid...\n");
  regcomp(&re, "^((/proc/+)?[1-9][0-9]*|-V|--version)$",
          REG_EXTENDED | REG_NOSUB);
  for (i = 1; i < argc; i++) {
    if (regexec(&re, argv[i], 0, NULL, 0) != 0) {
      snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]);
      die(buf);
    }
    if (!strcmp("-V", argv[i]) || !strcmp("--version", argv[i]))
      version();
  }
  regfree(&re);
  for (i = 1; i < argc; i++) {
    char *s = buf;
    int len;
    if (argv[i][0] != '/')
      snprintf(buf, sizeof buf, "/proc/%s/cwd", argv[i]);
    else
      snprintf(buf, sizeof buf, "%s/cwd", argv[i]);
    if ((len = readlink(buf, buf, PATH_MAX)) < 0) {
      s = strerror(errno == ENOENT ? ESRCH : errno);
    } else {
      buf[len] = 0;
    }
    printf("%s: %s\n", argv[i], s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e33(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %rax,-0x48(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11ff <main+0x5f>
lea    0xe06(%rip),%rdi
call   10b0 <die@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edx
mov    0x2dc9(%rip),%rax
or     (%rax),%edx
lea    -0x24(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   1070 <regcomp@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e4 <main+0x144>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    -0x24(%rbp),%rdi
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%ecx
mov    %r8d,%edx
call   10a0 <regexec@plt>
cmp    $0x0,%rax
je     1288 <main+0xe8>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xdc1(%rip),%rdx
call   1060 <snprintf@plt>
mov    -0x40(%rbp),%rdi
call   10b0 <die@plt>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xdbe(%rip),%rdi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     12ca <main+0x12a>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xda0(%rip),%rdi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12d1 <main+0x131>
mov    $0x0,%al
call   1090 <version@plt>
jmp    12d6 <main+0x136>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1228 <main+0x88>
lea    -0x24(%rbp),%rdi
call   1040 <regfree@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    140d <main+0x26d>
mov    -0x40(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1347 <main+0x1a7>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xd29(%rip),%rdx
call   1060 <snprintf@plt>
jmp    1369 <main+0x1c9>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xd08(%rip),%rdx
call   1060 <snprintf@plt>
mov    -0x40(%rbp),%rsi
mov    0x2c7c(%rip),%rax
mov    (%rax),%edx
mov    %rsi,%rdi
call   1030 <readlink@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jge    13d7 <main+0x237>
mov    0x2c3f(%rip),%rax
mov    (%rax),%rax
mov    0x2c1d(%rip),%rcx
cmp    (%rcx),%rax
jne    13b7 <main+0x217>
mov    0x2c05(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
jmp    13c5 <main+0x225>
mov    0x2c12(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
call   10c0 <strerror@plt>
mov    %rax,-0x30(%rbp)
jmp    13e3 <main+0x243>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x30(%rbp),%rdx
lea    0xc79(%rip),%rdi
call   1050 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12f4 <main+0x154>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r15
mov    %edi,%r14d
mov    0x2e32(%rip),%rax
mov    (%rax),%ebx
add    $0x1,%ebx
mov    %rsp,%r12
lea    0xf(%rbx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmp    $0x1,%edi
jg     11e5 <main+0x45>
lea    0xe20(%rip),%rdi
call   10b0 <die@plt>
mov    0x2ddc(%rip),%rax
mov    0x2de5(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0xe16(%rip),%rsi
lea    -0x2c(%rbp),%rdi
call   1070 <regcomp@plt>
cmp    $0x1,%r14d
jle    12a3 <main+0x103>
mov    %r14d,-0x30(%rbp)
mov    %r14d,%eax
mov    %rax,-0x38(%rbp)
mov    $0x1,%r14d
jmp    1241 <main+0xa1>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1090 <version@plt>
add    $0x1,%r14
cmp    %r14,-0x38(%rbp)
je     12b1 <main+0x111>
mov    (%r15,%r14,8),%rsi
lea    -0x2c(%rbp),%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10a0 <regexec@plt>
test   %rax,%rax
je     1277 <main+0xd7>
mov    (%r15,%r14,8),%rcx
mov    %r12,%rdi
mov    %ebx,%esi
lea    0xdd1(%rip),%rdx
call   1060 <snprintf@plt>
mov    %r12,%rdi
call   10b0 <die@plt>
mov    (%r15,%r14,8),%r13
lea    0xdd7(%rip),%rdi
mov    %r13,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1230 <main+0x90>
lea    0xdc7(%rip),%rdi
mov    %r13,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    1237 <main+0x97>
jmp    1230 <main+0x90>
lea    -0x2c(%rbp),%rdi
call   1040 <regfree@plt>
jmp    1366 <main+0x1c6>
mov    %rbx,%r14
lea    -0x2c(%rbp),%rdi
call   1040 <regfree@plt>
cmpl   $0x2,-0x30(%rbp)
jl     1366 <main+0x1c6>
mov    $0x1,%ebx
lea    0xda0(%rip),%r13
jmp    1300 <main+0x160>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%eax
movb   $0x0,(%r12,%rax,1)
mov    %r12,%rdx
mov    (%r15,%rbx,8),%rsi
mov    %r13,%rdi
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,-0x38(%rbp)
je     1366 <main+0x1c6>
mov    (%r15,%rbx,8),%rcx
cmpb   $0x2f,(%rcx)
lea    0xd58(%rip),%rdx
lea    0xd57(%rip),%rax
cmove  %rax,%rdx
mov    %r12,%rdi
mov    %r14d,%esi
call   1060 <snprintf@plt>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %r12,%rsi
call   1030 <readlink@plt>
test   %eax,%eax
jns    12e0 <main+0x140>
mov    0x2c8d(%rip),%rax
mov    (%rax),%rdi
mov    0x2c6b(%rip),%rax
cmp    (%rax),%rdi
jne    135c <main+0x1bc>
mov    0x2c57(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
mov    %rax,%rdx
jmp    12ea <main+0x14a>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@.str = [20 x i8] c"Usage: pwdx pid...\0A\00"
@.str.1 = [39 x i8] c"^((/proc/+)?[1-9][0-9]*|-V|--version)$\00"
@REG_EXTENDED = global i32 0
@REG_NOSUB = global i32 0
@.str.2 = [30 x i8] c"pwdx: invalid process id: %s\0A\00"
@.str.3 = [3 x i8] c"-V\00"
@.str.4 = [10 x i8] c"--version\00"
@.str.5 = [13 x i8] c"/proc/%s/cwd\00"
@.str.6 = [7 x i8] c"%s/cwd\00"
@errno = global i64 0
@ENOENT = global i64 0
@ESRCH = global i64 0
@.str.7 = [8 x i8] c"%s: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* @PATH_MAX
%13 = add nsw i32 %12, 1
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %6
%16 = alloca i8, i64 %14
store i64 %14, i64* %7
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 2
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %2
%22 = load i32, i32* @REG_EXTENDED
%23 = load i32, i32* @REG_NOSUB
%24 = or i32 %22, %23
%25 = call i32 @regcomp(i32* %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %24)
store i32 1, i32* %9
br label %26
26: ; preds = %66, %21
%27 = load i32, i32* %9
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %69
30: ; preds = %26
%31 = load i8**, i8*** %5
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i64 @regexec(i32* %8, i8* %35, i32 0, i32* null, i32 0)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %47
38: ; preds = %30
%39 = trunc i64 %14 to i32
%40 = load i8**, i8*** %5
%41 = load i32, i32* %9
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 @snprintf(i8* %16, i32 %39, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %44)
%46 = call i32 @die(i8* %16)
br label %47
47: ; preds = %38, %30
%48 = load i8**, i8*** %5
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
%52 = load i8*, i8** %51
%53 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %52)
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %63
55: ; preds = %47
%56 = load i8**, i8*** %5
%57 = load i32, i32* %9
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = call i32 @strcmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %60)
%62 = icmp ne i32 %61, 0
br i1 %62, label %65, label %63
63: ; preds = %55, %47
%64 = call i32 (...) @version()
br label %65
65: ; preds = %63, %55
br label %66
66: ; preds = %65
%67 = load i32, i32* %9
%68 = add nsw i32 %67, 1
store i32 %68, i32* %9
br label %26
69: ; preds = %26
%70 = call i32 @regfree(i32* %8)
store i32 1, i32* %9
br label %71
71: ; preds = %128, %69
%72 = load i32, i32* %9
%73 = load i32, i32* %4
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %131
75: ; preds = %71
store i8* %16, i8** %10
%76 = load i8**, i8*** %5
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i8*, i8** %79
%81 = getelementptr inbounds i8, i8* %80, i64 0
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp ne i32 %83, 47
br i1 %84, label %85, label %93
85: ; preds = %75
%86 = trunc i64 %14 to i32
%87 = load i8**, i8*** %5
%88 = load i32, i32* %9
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8*, i8** %87, i64 %89
%91 = load i8*, i8** %90
%92 = call i32 @snprintf(i8* %16, i32 %86, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %91)
br label %101
93: ; preds = %75
%94 = trunc i64 %14 to i32
%95 = load i8**, i8*** %5
%96 = load i32, i32* %9
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %95, i64 %97
%99 = load i8*, i8** %98
%100 = call i32 @snprintf(i8* %16, i32 %94, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %99)
br label %101
101: ; preds = %93, %85
%102 = load i32, i32* @PATH_MAX
%103 = call i32 @readlink(i8* %16, i8* %16, i32 %102)
store i32 %103, i32* %11
%104 = icmp slt i32 %103, 0
br i1 %104, label %105, label %116
105: ; preds = %101
%106 = load i64, i64* @errno
%107 = load i64, i64* @ENOENT
%108 = icmp eq i64 %106, %107
br i1 %108, label %109, label %111
109: ; preds = %105
%110 = load i64, i64* @ESRCH
br label %113
111: ; preds = %105
%112 = load i64, i64* @errno
br label %113
113: ; preds = %111, %109
%114 = phi i64 [ %110, %109 ], [ %112, %111 ]
%115 = call i8* @strerror(i64 %114)
store i8* %115, i8** %10
br label %120
116: ; preds = %101
%117 = load i32, i32* %11
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %16, i64 %118
store i8 0, i8* %119
br label %120
120: ; preds = %116, %113
%121 = load i8**, i8*** %5
%122 = load i32, i32* %9
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8*, i8** %121, i64 %123
%125 = load i8*, i8** %124
%126 = load i8*, i8** %10
%127 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* %125, i8* %126)
br label %128
128: ; preds = %120
%129 = load i32, i32* %9
%130 = add nsw i32 %129, 1
store i32 %130, i32* %9
br label %71
131: ; preds = %71
store i32 0, i32* %3
%132 = load i8*, i8** %6
%133 = load i32, i32* %3
ret i32 %133
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@.str = [20 x i8] c"Usage: pwdx pid...\0A\00"
@.str.1 = [39 x i8] c"^((/proc/+)?[1-9][0-9]*|-V|--version)$\00"
@REG_EXTENDED = global i32 0
@REG_NOSUB = global i32 0
@.str.2 = [30 x i8] c"pwdx: invalid process id: %s\0A\00"
@.str.3 = [3 x i8] c"-V\00"
@.str.4 = [10 x i8] c"--version\00"
@.str.5 = [13 x i8] c"/proc/%s/cwd\00"
@.str.6 = [7 x i8] c"%s/cwd\00"
@errno = global i64 0
@ENOENT = global i64 0
@ESRCH = global i64 0
@.str.7 = [8 x i8] c"%s: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = load i32, i32* @PATH_MAX
%5 = add nsw i32 %4, 1
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = bitcast i32* %3 to i8*
%9 = icmp slt i32 %0, 2
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* @REG_EXTENDED
%14 = load i32, i32* @REG_NOSUB
%15 = or i32 %14, %13
%16 = call i32 @regcomp(i32* %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = icmp sgt i32 %0, 1
br i1 %17, label %20, label %18
18: ; preds = %12
%19 = call i32 @regfree(i32* %3)
br label %75
20: ; preds = %12
%21 = zext i32 %0 to i64
br label %22
22: ; preds = %20, %41
%23 = phi i64 [ 1, %20 ], [ %42, %41 ]
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = call i64 @regexec(i32* %3, i8* %25, i32 0, i32* null, i32 0)
%27 = icmp eq i64 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %22
%29 = load i8*, i8** %24
%30 = call i32 @snprintf(i8* %7, i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = call i32 @die(i8* %7)
br label %32
32: ; preds = %28, %22
%33 = load i8*, i8** %24
%34 = call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* dereferenceable(1) %33)
%35 = icmp eq i32 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %32
%37 = call i32 @strcmp(i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* dereferenceable(1) %33)
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36, %32
%40 = call i32 (...) @version()
br label %41
41: ; preds = %36, %39
%42 = add nuw nsw i64 %23, 1
%43 = icmp eq i64 %42, %21
br i1 %43, label %44, label %22
44: ; preds = %41
%45 = call i32 @regfree(i32* %3)
br i1 %17, label %46, label %75
46: ; preds = %44
%47 = zext i32 %0 to i64
br label %48
48: ; preds = %46, %69
%49 = phi i64 [ 1, %46 ], [ %73, %69 ]
%50 = getelementptr inbounds i8*, i8** %1, i64 %49
%51 = load i8*, i8** %50
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 47
%54 = select i1 %53, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0)
%55 = call i32 @snprintf(i8* %7, i32 %5, i8* %54, i8* %51)
%56 = load i32, i32* @PATH_MAX
%57 = call i32 @readlink(i8* %7, i8* %7, i32 %56)
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %66
59: ; preds = %48
%60 = load i64, i64* @errno
%61 = load i64, i64* @ENOENT
%62 = icmp eq i64 %60, %61
%63 = load i64, i64* @ESRCH
%64 = select i1 %62, i64 %63, i64 %60
%65 = call i8* @strerror(i64 %64)
br label %69
66: ; preds = %48
%67 = zext i32 %57 to i64
%68 = getelementptr inbounds i8, i8* %7, i64 %67
store i8 0, i8* %68
br label %69
69: ; preds = %66, %59
%70 = phi i8* [ %65, %59 ], [ %7, %66 ]
%71 = load i8*, i8** %50
%72 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* %71, i8* %70)
%73 = add nuw nsw i64 %49, 1
%74 = icmp eq i64 %73, %47
br i1 %74, label %75, label %48
75: ; preds = %69, %18, %44
ret i32 0
}