#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*/ SIGCHLD;
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ SIGUSR2;
int /*<<< orphan*/ signal_set(int /*<<< orphan*/, void *, int /*<<< orphan*/ *);
void signal_handlers_clear(void *state) {
  signal_set(SIGHUP, state, NULL);
  signal_set(SIGINT, state, NULL);
  signal_set(SIGTERM, state, NULL);
  signal_set(SIGCHLD, state, NULL);
  signal_set(SIGUSR1, state, NULL);
  signal_set(SIGUSR2, state, NULL);
}


x86 assembly (clang, -O0):
<signal_handlers_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <signal_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handlers_clear>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <signal_set@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <signal_set@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <signal_set@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <signal_set@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <signal_set@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
pop    %rbx
jmp    1030 <signal_set@plt>

LLVM IR (-O0):
@SIGHUP = global i32 0
@SIGINT = global i32 0
@SIGTERM = global i32 0
@SIGCHLD = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define void @signal_handlers_clear(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @SIGHUP
%4 = load i8*, i8** %2
%5 = call i32 @signal_set(i32 %3, i8* %4, i32* null)
%6 = load i32, i32* @SIGINT
%7 = load i8*, i8** %2
%8 = call i32 @signal_set(i32 %6, i8* %7, i32* null)
%9 = load i32, i32* @SIGTERM
%10 = load i8*, i8** %2
%11 = call i32 @signal_set(i32 %9, i8* %10, i32* null)
%12 = load i32, i32* @SIGCHLD
%13 = load i8*, i8** %2
%14 = call i32 @signal_set(i32 %12, i8* %13, i32* null)
%15 = load i32, i32* @SIGUSR1
%16 = load i8*, i8** %2
%17 = call i32 @signal_set(i32 %15, i8* %16, i32* null)
%18 = load i32, i32* @SIGUSR2
%19 = load i8*, i8** %2
%20 = call i32 @signal_set(i32 %18, i8* %19, i32* null)
ret void
}

LLVM IR (-O2):
@SIGHUP = global i32 0
@SIGINT = global i32 0
@SIGTERM = global i32 0
@SIGCHLD = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define void @signal_handlers_clear(i8* %0) {
%2 = load i32, i32* @SIGHUP
%3 = tail call i32 @signal_set(i32 %2, i8* %0, i32* null)
%4 = load i32, i32* @SIGINT
%5 = tail call i32 @signal_set(i32 %4, i8* %0, i32* null)
%6 = load i32, i32* @SIGTERM
%7 = tail call i32 @signal_set(i32 %6, i8* %0, i32* null)
%8 = load i32, i32* @SIGCHLD
%9 = tail call i32 @signal_set(i32 %8, i8* %0, i32* null)
%10 = load i32, i32* @SIGUSR1
%11 = tail call i32 @signal_set(i32 %10, i8* %0, i32* null)
%12 = load i32, i32* @SIGUSR2
%13 = tail call i32 @signal_set(i32 %12, i8* %0, i32* null)
ret void
}