#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 {
  scalar_t__ st_dev;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
#define EACCES 130
#define EISDIR 129
int ENOTSUP;
#define EPERM 128
int /*<<< orphan*/ O_RDONLY;
int dirfd(int /*<<< orphan*/ *);
int errno;
int /*<<< orphan*/ error_at_line(int /*<<< orphan*/, int, char *, int, char *,
                                 char const *);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ *opendir(char const *);
char *realloc(char *, int);
int stat(char const *, struct stat *);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char const *);
int open_aufs_fd(const char *path, DIR **rdp) {
  int err, l, e;
  struct stat base, st;
  char *parent, *p;
  *rdp = NULL;
  err = open(path, O_RDONLY);
  if (err >= 0)
    goto out;
  switch (errno) {
  case EISDIR:
    *rdp = opendir(path);
    if (*rdp) {
      err = dirfd(*rdp);
      goto out;
    }
    break;
  case EACCES:
  case EPERM:
    break;
  default:
    goto out;
  }
  err = stat(path, &base);
  if (err)
    goto out;
  parent = malloc(strlen(path) + sizeof("/.."));
  if (!parent)
    goto out;
  l = strlen(path);
  while (path[l - 1] == '/')
    l--;
  memcpy(parent, path, l);
  parent[l - 1] = 0;
  while (1) {
    strcat(parent, "/..");
    err = stat(parent, &st);
    if (err)
      break;
    err = -1;
    errno = ENOTSUP;
    if (st.st_dev != base.st_dev) {
      error_at_line(0, errno,
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/cvmfs/aufs2-util/refs/"
                    "heads/master/libau/pathconf.c",
                    110, "cannot handle %s\n", path);
      break;
    }
    *rdp = opendir(parent);
    if (*rdp) {
      err = dirfd(*rdp);
      break;
    }
    p = realloc(parent, strlen(parent) + sizeof("/.."));
    if (p)
      parent = p;
    else
      break;
  }
  e = errno;
  free(parent);
  errno = e;
out:
  return err;
}


x86 assembly (clang, -O0):
<open_aufs_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    0x2e12(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     11ef <open_aufs_fd+0x3f>
jmp    1433 <open_aufs_fd+0x283>
mov    0x2dda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
sub    $0x80,%eax
je     126b <open_aufs_fd+0xbb>
jmp    120b <open_aufs_fd+0x5b>
mov    -0x44(%rbp),%eax
sub    $0x81,%eax
je     1231 <open_aufs_fd+0x81>
jmp    121e <open_aufs_fd+0x6e>
mov    -0x44(%rbp),%eax
sub    $0x82,%eax
je     126b <open_aufs_fd+0xbb>
jmp    1270 <open_aufs_fd+0xc0>
mov    -0x8(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1266 <open_aufs_fd+0xb6>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1070 <dirfd@plt>
mov    %eax,-0x14(%rbp)
jmp    1433 <open_aufs_fd+0x283>
jmp    1275 <open_aufs_fd+0xc5>
jmp    1275 <open_aufs_fd+0xc5>
jmp    1433 <open_aufs_fd+0x283>
mov    -0x8(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1080 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1294 <open_aufs_fd+0xe4>
jmp    1433 <open_aufs_fd+0x283>
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
cltq
add    $0x4,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12be <open_aufs_fd+0x10e>
jmp    1433 <open_aufs_fd+0x283>
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    12f2 <open_aufs_fd+0x142>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    12ca <open_aufs_fd+0x11a>
mov    -0x38(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1090 <memcpy@plt>
mov    -0x38(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rdi
lea    0xce2(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x38(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1080 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1342 <open_aufs_fd+0x192>
jmp    1412 <open_aufs_fd+0x262>
movl   $0xffffffff,-0x14(%rbp)
mov    0x2c90(%rip),%rax
mov    (%rax),%ecx
mov    0x2c77(%rip),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1395 <open_aufs_fd+0x1e5>
mov    0x2c60(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%r9
xor    %edi,%edi
lea    0xc85(%rip),%rdx
mov    $0x6e,%ecx
lea    0xd07(%rip),%r8
call   1040 <error_at_line@plt>
jmp    1412 <open_aufs_fd+0x262>
mov    -0x38(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     13ca <open_aufs_fd+0x21a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1070 <dirfd@plt>
mov    %eax,-0x14(%rbp)
jmp    1412 <open_aufs_fd+0x262>
mov    -0x38(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x50(%rbp),%rdi
cltq
add    $0x4,%rax
mov    %eax,%esi
call   10b0 <realloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     1408 <open_aufs_fd+0x258>
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    140d <open_aufs_fd+0x25d>
jmp    1412 <open_aufs_fd+0x262>
jmp    1313 <open_aufs_fd+0x163>
mov    0x2bb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%ecx
mov    0x2b9f(%rip),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_aufs_fd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
movq   $0x0,(%rsi)
mov    0x2e16(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,%ebp
test   %eax,%eax
js     11f0 <open_aufs_fd+0x40>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2dd9(%rip),%rax
mov    (%rax),%eax
cmp    $0x80,%eax
je     1234 <open_aufs_fd+0x84>
cmp    $0x82,%eax
je     1234 <open_aufs_fd+0x84>
cmp    $0x81,%eax
jne    11df <open_aufs_fd+0x2f>
mov    %r15,%rdi
call   1050 <opendir@plt>
mov    %rax,(%r14)
test   %rax,%rax
je     1234 <open_aufs_fd+0x84>
mov    %rax,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <dirfd@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1080 <stat@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    11df <open_aufs_fd+0x2f>
mov    %r15,%rdi
call   1060 <strlen@plt>
lea    0x4(%rax),%edi
call   10a0 <malloc@plt>
test   %rax,%rax
je     1317 <open_aufs_fd+0x167>
mov    %rax,%rbp
mov    %r15,%rdi
call   1060 <strlen@plt>
movslq %eax,%rbx
lea    0x1(%rbx),%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%edx
cmpb   $0x2f,-0x1(%r15,%rbx,1)
lea    -0x1(%rbx),%rbx
je     1280 <open_aufs_fd+0xd0>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1090 <memcpy@plt>
movb   $0x0,0x0(%rbp,%rbx,1)
mov    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
nopl   0x0(%rax)
mov    %rbp,%rbx
mov    %rbp,%rdi
lea    0xd43(%rip),%rsi
call   10d0 <strcat@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1080 <stat@plt>
test   %eax,%eax
jne    134a <open_aufs_fd+0x19a>
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
mov    0x2cef(%rip),%rax
mov    %esi,(%rax)
cmp    %r12,0x8(%rsp)
jne    131e <open_aufs_fd+0x16e>
mov    %rbx,%rdi
call   1050 <opendir@plt>
mov    %rax,(%r14)
test   %rax,%rax
jne    1342 <open_aufs_fd+0x192>
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    0x4(%rax),%esi
mov    %rbx,%rdi
call   10b0 <realloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    12b0 <open_aufs_fd+0x100>
jmp    133b <open_aufs_fd+0x18b>
xor    %ebp,%ebp
jmp    11df <open_aufs_fd+0x2f>
lea    0xcdf(%rip),%rdx
lea    0xd66(%rip),%r8
xor    %edi,%edi
mov    $0x6e,%ecx
mov    %r15,%r9
call   1040 <error_at_line@plt>
mov    $0xffffffff,%ebp
jmp    134c <open_aufs_fd+0x19c>
mov    %rax,%rdi
call   1070 <dirfd@plt>
mov    %eax,%ebp
mov    0x2c7d(%rip),%r15
mov    (%r15),%r14d
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14d,(%r15)
jmp    11df <open_aufs_fd+0x2f>

LLVM IR (-O0):
%struct.stat = type { i64 }
@O_RDONLY = global i32 0
@errno = global i32 0
@.str = [4 x i8] c"/..\00"
@ENOTSUP = global i32 0
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cvmfs/aufs2-util/refs/heads/master/libau/pathconf.c\00"
@.str.2 = [18 x i8] c"cannot handle %s\0A\00"
define i32 @open_aufs_fd(i8* %0, i32** %1) {
%3 = alloca i8*
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.stat
%9 = alloca %struct.stat
%10 = alloca i8*
%11 = alloca i8*
store i8* %0, i8** %3
store i32** %1, i32*** %4
%12 = load i32**, i32*** %4
store i32* null, i32** %12
%13 = load i8*, i8** %3
%14 = load i32, i32* @O_RDONLY
%15 = call i32 @open(i8* %13, i32 %14)
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = icmp sge i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %2
br label %125
19: ; preds = %2
%20 = load i32, i32* @errno
switch i32 %20, label %34 [
i32 129, label %21
i32 130, label %33
i32 128, label %33
]
21: ; preds = %19
%22 = load i8*, i8** %3
%23 = call i32* @opendir(i8* %22)
%24 = load i32**, i32*** %4
store i32* %23, i32** %24
%25 = load i32**, i32*** %4
%26 = load i32*, i32** %25
%27 = icmp ne i32* %26, null
br i1 %27, label %28, label %32
28: ; preds = %21
%29 = load i32**, i32*** %4
%30 = load i32*, i32** %29
%31 = call i32 @dirfd(i32* %30)
store i32 %31, i32* %5
br label %125
32: ; preds = %21
br label %35
33: ; preds = %19, %19
br label %35
34: ; preds = %19
br label %125
35: ; preds = %33, %32
%36 = load i8*, i8** %3
%37 = call i32 @stat(i8* %36, %struct.stat* %8)
store i32 %37, i32* %5
%38 = load i32, i32* %5
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %35
br label %125
41: ; preds = %35
%42 = load i8*, i8** %3
%43 = call i32 @strlen(i8* %42)
%44 = sext i32 %43 to i64
%45 = add i64 %44, 4
%46 = trunc i64 %45 to i32
%47 = call i8* @malloc(i32 %46)
store i8* %47, i8** %10
%48 = load i8*, i8** %10
%49 = icmp ne i8* %48, null
br i1 %49, label %51, label %50
50: ; preds = %41
br label %125
51: ; preds = %41
%52 = load i8*, i8** %3
%53 = call i32 @strlen(i8* %52)
store i32 %53, i32* %6
br label %54
54: ; preds = %63, %51
%55 = load i8*, i8** %3
%56 = load i32, i32* %6
%57 = sub nsw i32 %56, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %55, i64 %58
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 47
br i1 %62, label %63, label %66
63: ; preds = %54
%64 = load i32, i32* %6
%65 = add nsw i32 %64, -1
store i32 %65, i32* %6
br label %54
66: ; preds = %54
%67 = load i8*, i8** %10
%68 = load i8*, i8** %3
%69 = load i32, i32* %6
%70 = call i32 @memcpy(i8* %67, i8* %68, i32 %69)
%71 = load i8*, i8** %10
%72 = load i32, i32* %6
%73 = sub nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %71, i64 %74
store i8 0, i8* %75
br label %76
76: ; preds = %66, %119
%77 = load i8*, i8** %10
%78 = call i32 @strcat(i8* %77, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%79 = load i8*, i8** %10
%80 = call i32 @stat(i8* %79, %struct.stat* %9)
store i32 %80, i32* %5
%81 = load i32, i32* %5
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %84
83: ; preds = %76
br label %120
84: ; preds = %76
store i32 -1, i32* %5
%85 = load i32, i32* @ENOTSUP
store i32 %85, i32* @errno
%86 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%87 = load i64, i64* %86
%88 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%89 = load i64, i64* %88
%90 = icmp ne i64 %87, %89
br i1 %90, label %91, label %95
91: ; preds = %84
%92 = load i32, i32* @errno
%93 = load i8*, i8** %3
%94 = call i32 @error_at_line(i32 0, i32 %92, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %93)
br label %120
95: ; preds = %84
%96 = load i8*, i8** %10
%97 = call i32* @opendir(i8* %96)
%98 = load i32**, i32*** %4
store i32* %97, i32** %98
%99 = load i32**, i32*** %4
%100 = load i32*, i32** %99
%101 = icmp ne i32* %100, null
br i1 %101, label %102, label %106
102: ; preds = %95
%103 = load i32**, i32*** %4
%104 = load i32*, i32** %103
%105 = call i32 @dirfd(i32* %104)
store i32 %105, i32* %5
br label %120
106: ; preds = %95
%107 = load i8*, i8** %10
%108 = load i8*, i8** %10
%109 = call i32 @strlen(i8* %108)
%110 = sext i32 %109 to i64
%111 = add i64 %110, 4
%112 = trunc i64 %111 to i32
%113 = call i8* @realloc(i8* %107, i32 %112)
store i8* %113, i8** %11
%114 = load i8*, i8** %11
%115 = icmp ne i8* %114, null
br i1 %115, label %116, label %118
116: ; preds = %106
%117 = load i8*, i8** %11
store i8* %117, i8** %10
br label %119
118: ; preds = %106
br label %120
119: ; preds = %116
br label %76
120: ; preds = %118, %102, %91, %83
%121 = load i32, i32* @errno
store i32 %121, i32* %7
%122 = load i8*, i8** %10
%123 = call i32 @free(i8* %122)
%124 = load i32, i32* %7
store i32 %124, i32* @errno
br label %125
125: ; preds = %120, %50, %40, %34, %28, %18
%126 = load i32, i32* %5
ret i32 %126
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@O_RDONLY = global i32 0
@errno = global i32 0
@.str = [4 x i8] c"/..\00"
@ENOTSUP = global i32 0
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cvmfs/aufs2-util/refs/heads/master/libau/pathconf.c\00"
@.str.2 = [18 x i8] c"cannot handle %s\0A\00"
define i32 @open_aufs_fd(i8* %0, i32** nocapture writeonly %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.stat
%5 = bitcast %struct.stat* %3 to i8*
%6 = bitcast %struct.stat* %4 to i8*
store i32* null, i32** %1
%7 = load i32, i32* @O_RDONLY
%8 = tail call i32 @open(i8* %0, i32 %7)
%9 = icmp sgt i32 %8, -1
br i1 %9, label %66, label %10
10: ; preds = %2
%11 = load i32, i32* @errno
switch i32 %11, label %66 [
i32 129, label %12
i32 130, label %17
i32 128, label %17
]
12: ; preds = %10
%13 = tail call i32* @opendir(i8* %0)
store i32* %13, i32** %1
%14 = icmp eq i32* %13, null
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 @dirfd(i32* %13)
br label %66
17: ; preds = %10, %10, %12
%18 = call i32 @stat(i8* %0, %struct.stat* %3)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %66
20: ; preds = %17
%21 = tail call i32 @strlen(i8* %0)
%22 = add i32 %21, 4
%23 = tail call i8* @malloc(i32 %22)
%24 = icmp eq i8* %23, null
br i1 %24, label %66, label %25
25: ; preds = %20
%26 = tail call i32 @strlen(i8* %0)
%27 = sext i32 %26 to i64
br label %28
28: ; preds = %28, %25
%29 = phi i64 [ %30, %28 ], [ %27, %25 ]
%30 = add i64 %29, -1
%31 = getelementptr inbounds i8, i8* %0, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 47
br i1 %33, label %28, label %34
34: ; preds = %28
%35 = trunc i64 %29 to i32
%36 = tail call i32 @memcpy(i8* %23, i8* %0, i32 %35)
%37 = getelementptr inbounds i8, i8* %23, i64 %30
store i8 0, i8* %37
%38 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%39 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%40 = load i64, i64* %39
br label %41
41: ; preds = %57, %34
%42 = phi i8* [ %23, %34 ], [ %60, %57 ]
%43 = tail call i32 @strcat(i8* %42, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%44 = call i32 @stat(i8* %42, %struct.stat* %4)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %62
46: ; preds = %41
%47 = load i32, i32* @ENOTSUP
store i32 %47, i32* @errno
%48 = load i64, i64* %38
%49 = icmp eq i64 %48, %40
br i1 %49, label %52, label %50
50: ; preds = %46
%51 = tail call i32 @error_at_line(i32 0, i32 %47, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %62
52: ; preds = %46
%53 = tail call i32* @opendir(i8* %42)
store i32* %53, i32** %1
%54 = icmp eq i32* %53, null
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = tail call i32 @dirfd(i32* %53)
br label %62
57: ; preds = %52
%58 = tail call i32 @strlen(i8* %42)
%59 = add i32 %58, 4
%60 = tail call i8* @realloc(i8* %42, i32 %59)
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %41
62: ; preds = %57, %41, %55, %50
%63 = phi i32 [ -1, %50 ], [ %56, %55 ], [ %44, %41 ], [ -1, %57 ]
%64 = load i32, i32* @errno
%65 = tail call i32 @free(i8* %42)
store i32 %64, i32* @errno
br label %66
66: ; preds = %20, %17, %10, %2, %62, %15
%67 = phi i32 [ %8, %2 ], [ %8, %10 ], [ %18, %17 ], [ %63, %62 ], [ 0, %20 ], [ %16, %15 ]
ret i32 %67
}