#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 sigaction {
  int /*<<< orphan*/ sa_handler;
  int /*<<< orphan*/ sa_mask;
  scalar_t__ sa_flags;
};
typedef int /*<<< orphan*/ sigset_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int EINTR;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ _exit(int);
int errno;
int /*<<< orphan*/ execl(char *, char *, char *, char const *, char *);
int /*<<< orphan*/ fork();
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             struct sigaction *);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int waitpid(int /*<<< orphan*/, int *, int /*<<< orphan*/);
int system(const char *command) {
  sigset_t blockMask, origMask;
  struct sigaction saIgnore, saOrigQuit, saOrigInt, saDefault;
  pid_t childPid;
  int status, savedErrno;
  if (command == NULL)
    return system(":") == 0;
  sigemptyset(&blockMask);
  sigaddset(&blockMask, SIGCHLD);
  sigprocmask(SIG_BLOCK, &blockMask, &origMask);
  saIgnore.sa_handler = SIG_IGN;
  saIgnore.sa_flags = 0;
  sigemptyset(&saIgnore.sa_mask);
  sigaction(SIGINT, &saIgnore, &saOrigInt);
  sigaction(SIGQUIT, &saIgnore, &saOrigQuit);
  switch (childPid = fork()) {
  case -1:
    status = -1;
    break;
  case 0:
    saDefault.sa_handler = SIG_DFL;
    saDefault.sa_flags = 0;
    sigemptyset(&saDefault.sa_mask);
    if (saOrigInt.sa_handler != SIG_IGN)
      sigaction(SIGINT, &saDefault, NULL);
    if (saOrigQuit.sa_handler != SIG_IGN)
      sigaction(SIGQUIT, &saDefault, NULL);
    sigprocmask(SIG_SETMASK, &origMask, NULL);
    execl("/bin/sh", "sh", "-c", command, (char *)NULL);
    _exit(127);
  default:
    while (waitpid(childPid, &status, 0) == -1) {
      if (errno != EINTR) {
        status = -1;
        break;
      }
    }
    break;
  }
  savedErrno = errno;
  sigprocmask(SIG_SETMASK, &origMask, NULL);
  sigaction(SIGINT, &saOrigInt, NULL);
  sigaction(SIGQUIT, &saOrigQuit, NULL);
  errno = savedErrno;
  return status;
}


x86 assembly (clang, -O0):
<system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11c9 <system+0x39>
lea    0xe4f(%rip),%rdi
call   1070 <system@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    13e2 <system+0x252>
lea    -0x14(%rbp),%rdi
mov    %rdi,-0x78(%rbp)
call   1060 <sigemptyset@plt>
mov    -0x78(%rbp),%rdi
mov    0x2def(%rip),%rax
mov    (%rax),%esi
call   10a0 <sigaddset@plt>
mov    -0x78(%rbp),%rsi
mov    0x2dbd(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x24(%rbp),%rdi
call   1060 <sigemptyset@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
lea    -0x28(%rbp),%rsi
mov    %rsi,-0x70(%rbp)
lea    -0x48(%rbp),%rdx
call   1050 <sigaction@plt>
mov    -0x70(%rbp),%rsi
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rdx
call   1050 <sigaction@plt>
xor    %eax,%eax
call   10b0 <fork@plt>
mov    %eax,-0x5c(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x68(%rbp)
sub    $0xffffffff,%eax
je     1278 <system+0xe8>
jmp    1268 <system+0xd8>
mov    -0x68(%rbp),%eax
test   %eax,%eax
je     1284 <system+0xf4>
jmp    1338 <system+0x1a8>
movl   $0xffffffff,-0x60(%rbp)
jmp    1382 <system+0x1f2>
mov    0x2d15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
movq   $0x0,-0x50(%rbp)
lea    -0x58(%rbp),%rdi
add    $0x4,%rdi
call   1060 <sigemptyset@plt>
mov    -0x48(%rbp),%eax
mov    0x2d19(%rip),%rcx
cmp    (%rcx),%eax
je     12cd <system+0x13d>
mov    0x2d2a(%rip),%rax
mov    (%rax),%edi
lea    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <sigaction@plt>
mov    -0x38(%rbp),%eax
mov    0x2cf1(%rip),%rcx
cmp    (%rcx),%eax
je     12f5 <system+0x165>
mov    0x2cfa(%rip),%rax
mov    (%rax),%edi
lea    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <sigaction@plt>
mov    0x2cdc(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    -0x10(%rbp),%rcx
lea    0xcec(%rip),%rdi
lea    0xcea(%rip),%rsi
lea    0xce6(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1090 <execl@plt>
mov    $0x7f,%edi
call   1040 <_exit@plt>
jmp    133d <system+0x1ad>
mov    -0x5c(%rbp),%edi
lea    -0x60(%rbp),%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    137d <system+0x1ed>
mov    0x2c5d(%rip),%rax
mov    (%rax),%eax
mov    0x2c44(%rip),%rcx
cmp    (%rcx),%eax
je     1378 <system+0x1e8>
movl   $0xffffffff,-0x60(%rbp)
jmp    137d <system+0x1ed>
jmp    133d <system+0x1ad>
jmp    1382 <system+0x1f2>
mov    0x2c2f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <sigaction@plt>
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <sigaction@plt>
mov    -0x64(%rbp),%ecx
mov    0x2bde(%rip),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
test   %rdi,%rdi
je     12c5 <system+0x135>
mov    %rdi,%rbx
lea    0x34(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <sigemptyset@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10a0 <sigaddset@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rdx
mov    %rbp,%rsi
call   1030 <sigprocmask@plt>
mov    0x2de3(%rip),%r12
mov    (%r12),%eax
mov    %eax,0x20(%rsp)
movq   $0x0,0x28(%rsp)
lea    0x24(%rsp),%rdi
call   1060 <sigemptyset@plt>
mov    0x2de1(%rip),%r15
mov    (%r15),%edi
lea    0x20(%rsp),%rbp
lea    0x38(%rsp),%rdx
mov    %rbp,%rsi
call   1050 <sigaction@plt>
mov    0x2dbd(%rip),%r14
mov    (%r14),%edi
lea    0x48(%rsp),%rdx
mov    %rbp,%rsi
call   1050 <sigaction@plt>
xor    %eax,%eax
call   10b0 <fork@plt>
cmp    $0xffffffff,%eax
je     1279 <system+0xe9>
mov    %eax,%ebp
test   %eax,%eax
je     12e9 <system+0x159>
lea    0x10(%rsp),%r12
mov    0x2d63(%rip),%r13
mov    0x2d4c(%rip),%rbx
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %r12,%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    1281 <system+0xf1>
mov    0x0(%r13),%eax
cmp    (%rbx),%eax
je     1260 <system+0xd0>
movl   $0xffffffff,0x10(%rsp)
ff
mov    0x2d30(%rip),%rbx
mov    (%rbx),%ebp
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
mov    (%r15),%edi
lea    0x38(%rsp),%rsi
xor    %edx,%edx
call   1050 <sigaction@plt>
mov    (%r14),%edi
lea    0x48(%rsp),%rsi
xor    %edx,%edx
call   1050 <sigaction@plt>
mov    %ebp,(%rbx)
mov    0x10(%rsp),%eax
jmp    12da <system+0x14a>
lea    0xd34(%rip),%rdi
call   1070 <system@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x14(%rsp),%rdi
call   1060 <sigemptyset@plt>
mov    0x38(%rsp),%eax
cmp    (%r12),%eax
je     1326 <system+0x196>
mov    (%r15),%edi
lea    0x10(%rsp),%rsi
xor    %edx,%edx
call   1050 <sigaction@plt>
mov    (%r12),%eax
cmp    %eax,0x48(%rsp)
je     133b <system+0x1ab>
mov    (%r14),%edi
lea    0x10(%rsp),%rsi
xor    %edx,%edx
call   1050 <sigaction@plt>
mov    0x2c96(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
lea    0xcab(%rip),%rdi
lea    0xca9(%rip),%rsi
lea    0xca5(%rip),%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1090 <execl@plt>
mov    $0x7f,%edi
call   1040 <_exit@plt>

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

LLVM IR (-O2):
%struct.sigaction = type { i32, i32, i64 }
@.str = [2 x i8] c":\00"
@SIGCHLD = global i32 0
@SIG_BLOCK = global i32 0
@SIG_IGN = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
@SIG_SETMASK = global i32 0
@.str.1 = [8 x i8] c"/bin/sh\00"
@.str.2 = [3 x i8] c"sh\00"
@.str.3 = [3 x i8] c"-c\00"
@errno = global i32 0
@EINTR = global i32 0
define i32 @system(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sigaction
%5 = alloca %struct.sigaction
%6 = alloca %struct.sigaction
%7 = alloca %struct.sigaction
%8 = alloca i32
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast %struct.sigaction* %4 to i8*
%12 = bitcast %struct.sigaction* %5 to i8*
%13 = bitcast %struct.sigaction* %6 to i8*
%14 = bitcast %struct.sigaction* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = icmp eq i8* %0, null
br i1 %16, label %17, label %21
17: ; preds = %1
%18 = tail call i32 @system(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
br label %82
21: ; preds = %1
%22 = call i32 @sigemptyset(i32* %2)
%23 = load i32, i32* @SIGCHLD
%24 = call i32 @sigaddset(i32* %2, i32 %23)
%25 = load i32, i32* @SIG_BLOCK
%26 = call i32 @sigprocmask(i32 %25, i32* %2, i32* %3)
%27 = load i32, i32* @SIG_IGN
%28 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %4, i64 0, i32 0
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %4, i64 0, i32 2
store i64 0, i64* %29
%30 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %4, i64 0, i32 1
%31 = call i32 @sigemptyset(i32* %30)
%32 = load i32, i32* @SIGINT
%33 = call i32 @sigaction(i32 %32, %struct.sigaction* %4, %struct.sigaction* %6)
%34 = load i32, i32* @SIGQUIT
%35 = call i32 @sigaction(i32 %34, %struct.sigaction* %4, %struct.sigaction* %5)
%36 = call i32 (...) @fork()
switch i32 %36, label %65 [
i32 -1, label %37
i32 0, label %38
]
37: ; preds = %21
store i32 -1, i32* %8
br label %73
38: ; preds = %21
%39 = load i32, i32* @SIG_DFL
%40 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %7, i64 0, i32 0
store i32 %39, i32* %40
%41 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %7, i64 0, i32 2
store i64 0, i64* %41
%42 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %7, i64 0, i32 1
%43 = call i32 @sigemptyset(i32* %42)
%44 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %6, i64 0, i32 0
%45 = load i32, i32* %44
%46 = load i32, i32* @SIG_IGN
%47 = icmp eq i32 %45, %46
br i1 %47, label %52, label %48
48: ; preds = %38
%49 = load i32, i32* @SIGINT
%50 = call i32 @sigaction(i32 %49, %struct.sigaction* %7, %struct.sigaction* null)
%51 = load i32, i32* @SIG_IGN
br label %52
52: ; preds = %48, %38
%53 = phi i32 [ %51, %48 ], [ %45, %38 ]
%54 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i64 0, i32 0
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, %53
br i1 %56, label %60, label %57
57: ; preds = %52
%58 = load i32, i32* @SIGQUIT
%59 = call i32 @sigaction(i32 %58, %struct.sigaction* %7, %struct.sigaction* null)
br label %60
60: ; preds = %57, %52
%61 = load i32, i32* @SIG_SETMASK
%62 = call i32 @sigprocmask(i32 %61, i32* %3, i32* null)
%63 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* null)
%64 = call i32 @_exit(i32 127)
unreachable
65: ; preds = %21, %68
%66 = call i32 @waitpid(i32 %36, i32* %8, i32 0)
%67 = icmp eq i32 %66, -1
br i1 %67, label %68, label %73
68: ; preds = %65
%69 = load i32, i32* @errno
%70 = load i32, i32* @EINTR
%71 = icmp eq i32 %69, %70
br i1 %71, label %65, label %72
72: ; preds = %68
store i32 -1, i32* %8
br label %73
73: ; preds = %65, %72, %37
%74 = load i32, i32* @errno
%75 = load i32, i32* @SIG_SETMASK
%76 = call i32 @sigprocmask(i32 %75, i32* %3, i32* null)
%77 = load i32, i32* @SIGINT
%78 = call i32 @sigaction(i32 %77, %struct.sigaction* %6, %struct.sigaction* null)
%79 = load i32, i32* @SIGQUIT
%80 = call i32 @sigaction(i32 %79, %struct.sigaction* %5, %struct.sigaction* null)
store i32 %74, i32* @errno
%81 = load i32, i32* %8
br label %82
82: ; preds = %73, %17
%83 = phi i32 [ %20, %17 ], [ %81, %73 ]
ret i32 %83
}