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

/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIGUSR1;
int nsjailSetSigHandler(int /*<<< orphan*/);
bool nsjailSetSigHandlers(void) {
  if (nsjailSetSigHandler(SIGINT) == false) {
    return false;
  }
  if (nsjailSetSigHandler(SIGUSR1) == false) {
    return false;
  }
  if (nsjailSetSigHandler(SIGALRM) == false) {
    return false;
  }
  if (nsjailSetSigHandler(SIGCHLD) == false) {
    return false;
  }
  if (nsjailSetSigHandler(SIGTERM) == false) {
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<nsjailSetSigHandlers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
cmp    $0x0,%eax
jne    113b <nsjailSetSigHandlers+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    11ce <nsjailSetSigHandlers+0xbe>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
cmp    $0x0,%eax
jne    115e <nsjailSetSigHandlers+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    11ce <nsjailSetSigHandlers+0xbe>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
cmp    $0x0,%eax
jne    1181 <nsjailSetSigHandlers+0x71>
movl   $0x0,-0x4(%rbp)
jmp    11ce <nsjailSetSigHandlers+0xbe>
mov    0x2e40(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
cmp    $0x0,%eax
jne    11a4 <nsjailSetSigHandlers+0x94>
movl   $0x0,-0x4(%rbp)
jmp    11ce <nsjailSetSigHandlers+0xbe>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
cmp    $0x0,%eax
jne    11c7 <nsjailSetSigHandlers+0xb7>
movl   $0x0,-0x4(%rbp)
jmp    11ce <nsjailSetSigHandlers+0xbe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsjailSetSigHandlers>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     1170 <nsjailSetSigHandlers+0x60>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
test   %eax,%eax
je     1170 <nsjailSetSigHandlers+0x60>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
test   %eax,%eax
je     1170 <nsjailSetSigHandlers+0x60>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
test   %eax,%eax
je     1170 <nsjailSetSigHandlers+0x60>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1030 <nsjailSetSigHandler@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@SIGUSR1 = global i32 0
@SIGALRM = global i32 0
@SIGCHLD = global i32 0
@SIGTERM = global i32 0
define i32 @nsjailSetSigHandlers() {
%1 = alloca i32
%2 = load i32, i32* @SIGINT
%3 = call i32 @nsjailSetSigHandler(i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 0, i32* %1
br label %27
6: ; preds = %0
%7 = load i32, i32* @SIGUSR1
%8 = call i32 @nsjailSetSigHandler(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 0, i32* %1
br label %27
11: ; preds = %6
%12 = load i32, i32* @SIGALRM
%13 = call i32 @nsjailSetSigHandler(i32 %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 0, i32* %1
br label %27
16: ; preds = %11
%17 = load i32, i32* @SIGCHLD
%18 = call i32 @nsjailSetSigHandler(i32 %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 0, i32* %1
br label %27
21: ; preds = %16
%22 = load i32, i32* @SIGTERM
%23 = call i32 @nsjailSetSigHandler(i32 %22)
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 0, i32* %1
br label %27
26: ; preds = %21
store i32 1, i32* %1
br label %27
27: ; preds = %26, %25, %20, %15, %10, %5
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGUSR1 = global i32 0
@SIGALRM = global i32 0
@SIGCHLD = global i32 0
@SIGTERM = global i32 0
define i32 @nsjailSetSigHandlers() {
%1 = load i32, i32* @SIGINT
%2 = tail call i32 @nsjailSetSigHandler(i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %21, label %4
4: ; preds = %0
%5 = load i32, i32* @SIGUSR1
%6 = tail call i32 @nsjailSetSigHandler(i32 %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %21, label %8
8: ; preds = %4
%9 = load i32, i32* @SIGALRM
%10 = tail call i32 @nsjailSetSigHandler(i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %8
%13 = load i32, i32* @SIGCHLD
%14 = tail call i32 @nsjailSetSigHandler(i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %12
%17 = load i32, i32* @SIGTERM
%18 = tail call i32 @nsjailSetSigHandler(i32 %17)
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %16, %12, %8, %4, %0
%22 = phi i32 [ 0, %0 ], [ 0, %4 ], [ 0, %8 ], [ 0, %12 ], [ %20, %16 ]
ret i32 %22
}