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

/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ execle(char *, char *, char *, char *, char *, char *,
                          char const *, char *, char const *, char const *,
                          char const *, int /*<<< orphan*/ *, char **);
int /*<<< orphan*/ exit(int);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ geteuid();
int setuid(int /*<<< orphan*/);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int waitpid(int, int *, int /*<<< orphan*/);
int add_mount(const char *progname, const char *fsname, const char *mnt,
              const char *type, const char *opts) {
  int res;
  int status;
  sigset_t blockmask;
  sigset_t oldmask;
  sigemptyset(&blockmask);
  sigaddset(&blockmask, SIGCHLD);
  res = sigprocmask(SIG_BLOCK, &blockmask, &oldmask);
  if (res == -1) {
    fprintf(stderr, "%s: sigprocmask: %s\n", progname, strerror(errno));
    return -1;
  }
  res = fork();
  if (res == -1) {
    fprintf(stderr, "%s: fork: %s\n", progname, strerror(errno));
    goto out_restore;
  }
  if (res == 0) {
    char *env = NULL;
    sigprocmask(SIG_SETMASK, &oldmask, NULL);
    if (setuid(geteuid()) == -1) {
      fprintf(stderr, "%s: setuid: %s\n", progname, strerror(errno));
      res = -1;
      goto out_restore;
    }
    execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", "-f", "-t",
           type, "-o", opts, fsname, mnt, NULL, &env);
    fprintf(stderr, "%s: failed to execute /bin/mount: %s\n", progname,
            strerror(errno));
    exit(1);
  }
  res = waitpid(res, &status, 0);
  if (res == -1)
    fprintf(stderr, "%s: waitpid: %s\n", progname, strerror(errno));
  if (status != 0)
    res = -1;
out_restore:
  sigprocmask(SIG_SETMASK, &oldmask, NULL);
  return res;
}


x86 assembly (clang, -O0):
<add_mount>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xd8,%rsp
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
lea    -0x54(%rbp),%rdi
call   1060 <sigemptyset@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%esi
lea    -0x54(%rbp),%rdi
call   10c0 <sigaddset@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
lea    -0x54(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0xffffffff,-0x4c(%rbp)
jne    1256 <add_mount+0xa6>
mov    0x2db7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x6c(%rbp),%edi
mov    -0x68(%rbp),%rdx
mov    %rax,%rcx
lea    0xdbb(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x1c(%rbp)
jmp    1483 <add_mount+0x2d3>
mov    $0x0,%al
call   10d0 <fork@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0xffffffff,-0x4c(%rbp)
jne    12a7 <add_mount+0xf7>
mov    0x2d5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x7c(%rbp),%edi
mov    -0x78(%rbp),%rdx
mov    %rax,%rcx
lea    0xd78(%rip),%rsi
call   1050 <fprintf@plt>
jmp    1467 <add_mount+0x2b7>
cmpl   $0x0,-0x4c(%rbp)
jne    13f2 <add_mount+0x242>
movq   $0x0,-0x60(%rbp)
mov    0x2d28(%rip),%rax
mov    (%rax),%edi
lea    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    $0x0,%al
call   1040 <geteuid@plt>
mov    %eax,%edi
call   10a0 <setuid@plt>
cmp    $0xffffffff,%eax
jne    1336 <add_mount+0x186>
mov    0x2ce3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x8c(%rbp),%edi
mov    -0x88(%rbp),%rdx
mov    %rax,%rcx
lea    0xcfe(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4c(%rbp)
jmp    1467 <add_mount+0x2b7>
mov    -0x40(%rbp),%r15
mov    -0x48(%rbp),%rbx
mov    -0x30(%rbp),%r11
mov    -0x38(%rbp),%r10
lea    0xce6(%rip),%rsi
lea    0xcea(%rip),%rdx
lea    0xcf5(%rip),%rcx
lea    0xcf1(%rip),%r8
lea    0xced(%rip),%r9
lea    0xce9(%rip),%r14
xor    %eax,%eax
lea    -0x60(%rbp),%rax
mov    %rsi,%rdi
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
movq   $0x0,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1090 <execle@plt>
mov    0x2c25(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x9c(%rbp),%edi
mov    -0x98(%rbp),%rdx
mov    %rax,%rcx
lea    0xc79(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x4c(%rbp),%edi
lea    -0x50(%rbp),%rsi
xor    %edx,%edx
call   1070 <waitpid@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0xffffffff,-0x4c(%rbp)
jne    1451 <add_mount+0x2a1>
mov    0x2bbc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xac(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    0x2b9a(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0xac(%rbp),%edi
mov    -0xa8(%rbp),%rdx
mov    %rax,%rcx
lea    0xc36(%rip),%rsi
call   1050 <fprintf@plt>
cmpl   $0x0,-0x50(%rbp)
je     1462 <add_mount+0x2b2>
movl   $0xffffffff,-0x4c(%rbp)
jmp    1467 <add_mount+0x2b7>
mov    0x2b7a(%rip),%rax
mov    (%rax),%edi
lea    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_mount>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r15
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r12
mov    %rdi,%r13
lea    0x14(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <sigemptyset@plt>
mov    0x2dff(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10c0 <sigaddset@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rdx
mov    %rbp,%rsi
call   1030 <sigprocmask@plt>
cmp    $0xffffffff,%eax
je     123d <add_mount+0x8d>
xor    %eax,%eax
call   10d0 <fork@plt>
test   %eax,%eax
je     1272 <add_mount+0xc2>
cmp    $0xffffffff,%eax
jne    12d9 <add_mount+0x129>
mov    0x2daf(%rip),%rax
mov    (%rax),%ebx
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xddd(%rip),%rsi
jmp    12c5 <add_mount+0x115>
mov    0x2d8c(%rip),%rax
mov    (%rax),%ebx
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xda5(%rip),%rsi
mov    %ebx,%edi
mov    %r13,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    133a <add_mount+0x18a>
movq   $0x0,0x8(%rsp)
mov    0x2d66(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
xor    %eax,%eax
call   1040 <geteuid@plt>
mov    %eax,%edi
call   10a0 <setuid@plt>
cmp    $0xffffffff,%eax
jne    134b <add_mount+0x19b>
mov    0x2d22(%rip),%rax
mov    (%rax),%ebx
mov    0x2d11(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd5e(%rip),%rsi
mov    %ebx,%edi
mov    %r13,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    1325 <add_mount+0x175>
lea    0x8(%rsp),%rsi
xor    %r14d,%r14d
mov    %eax,%edi
xor    %edx,%edx
call   1070 <waitpid@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    131c <add_mount+0x16c>
mov    0x2cd8(%rip),%rax
mov    (%rax),%ebx
mov    0x2cc7(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd73(%rip),%rsi
mov    %ebx,%edi
mov    %r13,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
cmp    0x8(%rsp),%r14d
sbb    %ebx,%ebx
or     %ebp,%ebx
mov    0x2cbc(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
sub    $0x8,%rsp
lea    0x10(%rsp),%rax
lea    0xcfe(%rip),%rbp
lea    0xcd1(%rip),%rdi
lea    0xcd5(%rip),%rdx
lea    0xce0(%rip),%rcx
lea    0xcdc(%rip),%r8
lea    0xcd8(%rip),%r9
mov    %rdi,%rsi
push   %rax
push   $0x0
push   %rbx
push   %r12
push   %r15
push   %rbp
push   %r14
call   1090 <execle@plt>
add    $0x40,%rsp
mov    0x2c34(%rip),%rax
mov    (%rax),%ebx
mov    0x2c23(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xca9(%rip),%rsi
mov    %ebx,%edi
mov    %r13,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_BLOCK = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"%s: sigprocmask: %s\0A\00"
@errno = global i32 0
@.str.1 = [14 x i8] c"%s: fork: %s\0A\00"
@SIG_SETMASK = global i32 0
@.str.2 = [16 x i8] c"%s: setuid: %s\0A\00"
@.str.3 = [11 x i8] c"/bin/mount\00"
@.str.4 = [18 x i8] c"--no-canonicalize\00"
@.str.5 = [3 x i8] c"-i\00"
@.str.6 = [3 x i8] c"-f\00"
@.str.7 = [3 x i8] c"-t\00"
@.str.8 = [3 x i8] c"-o\00"
@.str.9 = [38 x i8] c"%s: failed to execute /bin/mount: %s\0A\00"
@.str.10 = [17 x i8] c"%s: waitpid: %s\0A\00"
define i32 @add_mount(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
%17 = call i32 @sigemptyset(i32* %14)
%18 = load i32, i32* @SIGCHLD
%19 = call i32 @sigaddset(i32* %14, i32 %18)
%20 = load i32, i32* @SIG_BLOCK
%21 = call i32 @sigprocmask(i32 %20, i32* %14, i32* %15)
store i32 %21, i32* %12
%22 = load i32, i32* %12
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %30
24: ; preds = %5
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %7
%27 = load i32, i32* @errno
%28 = call i8* @strerror(i32 %27)
%29 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %26, i8* %28)
store i32 -1, i32* %6
br label %87
30: ; preds = %5
%31 = call i32 (...) @fork()
store i32 %31, i32* %12
%32 = load i32, i32* %12
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %40
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = load i8*, i8** %7
%37 = load i32, i32* @errno
%38 = call i8* @strerror(i32 %37)
%39 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %36, i8* %38)
br label %83
40: ; preds = %30
%41 = load i32, i32* %12
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %67
43: ; preds = %40
store i8* null, i8** %16
%44 = load i32, i32* @SIG_SETMASK
%45 = call i32 @sigprocmask(i32 %44, i32* %15, i32* null)
%46 = call i32 (...) @geteuid()
%47 = call i32 @setuid(i32 %46)
%48 = icmp eq i32 %47, -1
br i1 %48, label %49, label %55
49: ; preds = %43
%50 = load i32, i32* @stderr
%51 = load i8*, i8** %7
%52 = load i32, i32* @errno
%53 = call i8* @strerror(i32 %52)
%54 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %51, i8* %53)
store i32 -1, i32* %12
br label %83
55: ; preds = %43
%56 = load i8*, i8** %10
%57 = load i8*, i8** %11
%58 = load i8*, i8** %8
%59 = load i8*, i8** %9
%60 = call i32 @execle(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %57, i8* %58, i8* %59, i32* null, i8** %16)
%61 = load i32, i32* @stderr
%62 = load i8*, i8** %7
%63 = load i32, i32* @errno
%64 = call i8* @strerror(i32 %63)
%65 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8* %62, i8* %64)
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %40
%68 = load i32, i32* %12
%69 = call i32 @waitpid(i32 %68, i32* %13, i32 0)
store i32 %69, i32* %12
%70 = load i32, i32* %12
%71 = icmp eq i32 %70, -1
br i1 %71, label %72, label %78
72: ; preds = %67
%73 = load i32, i32* @stderr
%74 = load i8*, i8** %7
%75 = load i32, i32* @errno
%76 = call i8* @strerror(i32 %75)
%77 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8* %74, i8* %76)
br label %78
78: ; preds = %72, %67
%79 = load i32, i32* %13
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %82
81: ; preds = %78
store i32 -1, i32* %12
br label %82
82: ; preds = %81, %78
br label %83
83: ; preds = %82, %49, %34
%84 = load i32, i32* @SIG_SETMASK
%85 = call i32 @sigprocmask(i32 %84, i32* %15, i32* null)
%86 = load i32, i32* %12
store i32 %86, i32* %6
br label %87
87: ; preds = %83, %24
%88 = load i32, i32* %6
ret i32 %88
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_BLOCK = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"%s: sigprocmask: %s\0A\00"
@errno = global i32 0
@.str.1 = [14 x i8] c"%s: fork: %s\0A\00"
@SIG_SETMASK = global i32 0
@.str.2 = [16 x i8] c"%s: setuid: %s\0A\00"
@.str.3 = [11 x i8] c"/bin/mount\00"
@.str.4 = [18 x i8] c"--no-canonicalize\00"
@.str.5 = [3 x i8] c"-i\00"
@.str.6 = [3 x i8] c"-f\00"
@.str.7 = [3 x i8] c"-t\00"
@.str.8 = [3 x i8] c"-o\00"
@.str.9 = [38 x i8] c"%s: failed to execute /bin/mount: %s\0A\00"
@.str.10 = [17 x i8] c"%s: waitpid: %s\0A\00"
define i32 @add_mount(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = bitcast i32* %6 to i8*
%11 = bitcast i32* %7 to i8*
%12 = bitcast i32* %8 to i8*
%13 = call i32 @sigemptyset(i32* %7)
%14 = load i32, i32* @SIGCHLD
%15 = call i32 @sigaddset(i32* %7, i32 %14)
%16 = load i32, i32* @SIG_BLOCK
%17 = call i32 @sigprocmask(i32 %16, i32* %7, i32* %8)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %24
19: ; preds = %5
%20 = load i32, i32* @stderr
%21 = load i32, i32* @errno
%22 = call i8* @strerror(i32 %21)
%23 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %22)
br label %66
24: ; preds = %5
%25 = call i32 (...) @fork()
switch i32 %25, label %50 [
i32 -1, label %26
i32 0, label %31
]
26: ; preds = %24
%27 = load i32, i32* @stderr
%28 = load i32, i32* @errno
%29 = call i8* @strerror(i32 %28)
%30 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %29)
br label %62
31: ; preds = %24
%32 = bitcast i8** %9 to i8*
store i8* null, i8** %9
%33 = load i32, i32* @SIG_SETMASK
%34 = call i32 @sigprocmask(i32 %33, i32* %8, i32* null)
%35 = call i32 (...) @geteuid()
%36 = call i32 @setuid(i32 %35)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %43
38: ; preds = %31
%39 = load i32, i32* @stderr
%40 = load i32, i32* @errno
%41 = call i8* @strerror(i32 %40)
%42 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %41)
br label %62
43: ; preds = %31
%44 = call i32 @execle(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %4, i8* %1, i8* %2, i32* null, i8** %9)
%45 = load i32, i32* @stderr
%46 = load i32, i32* @errno
%47 = call i8* @strerror(i32 %46)
%48 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8* %0, i8* %47)
%49 = call i32 @exit(i32 1)
unreachable
50: ; preds = %24
%51 = call i32 @waitpid(i32 %25, i32* %6, i32 0)
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %58
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = load i32, i32* @errno
%56 = call i8* @strerror(i32 %55)
%57 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8* %0, i8* %56)
br label %58
58: ; preds = %53, %50
%59 = load i32, i32* %6
%60 = icmp eq i32 %59, 0
%61 = select i1 %60, i32 %51, i32 -1
br label %62
62: ; preds = %58, %38, %26
%63 = phi i32 [ -1, %26 ], [ -1, %38 ], [ %61, %58 ]
%64 = load i32, i32* @SIG_SETMASK
%65 = call i32 @sigprocmask(i32 %64, i32* %8, i32* null)
br label %66
66: ; preds = %62, %19
%67 = phi i32 [ -1, %19 ], [ %63, %62 ]
ret i32 %67
}