#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*/ SIGHUP;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
sigset_t *signals_handled(void) {
  static sigset_t sigs;
  sigemptyset(&sigs);
  sigaddset(&sigs, SIGHUP);
  sigaddset(&sigs, SIGTERM);
  sigaddset(&sigs, SIGQUIT);
  sigaddset(&sigs, SIGINT);
  return &sigs;
}


x86 assembly (clang, -O0):
<signals_handled>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f09(%rip),%rdi
call   1030 <sigemptyset@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
lea    0x2ef4(%rip),%rdi
call   1040 <sigaddset@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
lea    0x2edf(%rip),%rdi
call   1040 <sigaddset@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
lea    0x2eca(%rip),%rdi
call   1040 <sigaddset@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
lea    0x2eb5(%rip),%rdi
call   1040 <sigaddset@plt>
lea    0x2ea9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signals_handled>:
push   %rbx
lea    0x2f0c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <sigemptyset@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <sigaddset@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <sigaddset@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <sigaddset@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <sigaddset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@signals_handled.sigs = internal global i32 0
@SIGHUP = global i32 0
@SIGTERM = global i32 0
@SIGQUIT = global i32 0
@SIGINT = global i32 0
define i32* @signals_handled() {
%1 = call i32 @sigemptyset(i32* @signals_handled.sigs)
%2 = load i32, i32* @SIGHUP
%3 = call i32 @sigaddset(i32* @signals_handled.sigs, i32 %2)
%4 = load i32, i32* @SIGTERM
%5 = call i32 @sigaddset(i32* @signals_handled.sigs, i32 %4)
%6 = load i32, i32* @SIGQUIT
%7 = call i32 @sigaddset(i32* @signals_handled.sigs, i32 %6)
%8 = load i32, i32* @SIGINT
%9 = call i32 @sigaddset(i32* @signals_handled.sigs, i32 %8)
ret i32* @signals_handled.sigs
}

LLVM IR (-O2):
@signals_handled.sigs = internal global i32 0
@SIGHUP = global i32 0
@SIGTERM = global i32 0
@SIGQUIT = global i32 0
@SIGINT = global i32 0
define i32* @signals_handled() {
%1 = tail call i32 @sigemptyset(i32* @signals_handled.sigs)
%2 = load i32, i32* @SIGHUP
%3 = tail call i32 @sigaddset(i32* @signals_handled.sigs, i32 %2)
%4 = load i32, i32* @SIGTERM
%5 = tail call i32 @sigaddset(i32* @signals_handled.sigs, i32 %4)
%6 = load i32, i32* @SIGQUIT
%7 = tail call i32 @sigaddset(i32* @signals_handled.sigs, i32 %6)
%8 = load i32, i32* @SIGINT
%9 = tail call i32 @sigaddset(i32* @signals_handled.sigs, i32 %8)
ret i32* @signals_handled.sigs
}