#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*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ SIGTTIN;
int /*<<< orphan*/ SIGTTOU;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void set_job_signals(void (*mode)(int)) {
  signal(SIGINT, mode);
  signal(SIGQUIT, mode);
  signal(SIGTSTP, mode);
  signal(SIGTTIN, mode);
  signal(SIGTTOU, mode);
  signal(SIGCHLD, mode);
}


x86 assembly (clang, -O0):
<set_job_signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_job_signals>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <signal@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <signal@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <signal@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <signal@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <signal@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTSTP = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGCHLD = global i32 0
define void @set_job_signals(void (i32)* %0) {
%2 = alloca void (i32)*
store void (i32)* %0, void (i32)** %2
%3 = load i32, i32* @SIGINT
%4 = load void (i32)*, void (i32)** %2
%5 = call i32 @signal(i32 %3, void (i32)* %4)
%6 = load i32, i32* @SIGQUIT
%7 = load void (i32)*, void (i32)** %2
%8 = call i32 @signal(i32 %6, void (i32)* %7)
%9 = load i32, i32* @SIGTSTP
%10 = load void (i32)*, void (i32)** %2
%11 = call i32 @signal(i32 %9, void (i32)* %10)
%12 = load i32, i32* @SIGTTIN
%13 = load void (i32)*, void (i32)** %2
%14 = call i32 @signal(i32 %12, void (i32)* %13)
%15 = load i32, i32* @SIGTTOU
%16 = load void (i32)*, void (i32)** %2
%17 = call i32 @signal(i32 %15, void (i32)* %16)
%18 = load i32, i32* @SIGCHLD
%19 = load void (i32)*, void (i32)** %2
%20 = call i32 @signal(i32 %18, void (i32)* %19)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTSTP = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGCHLD = global i32 0
define void @set_job_signals(void (i32)* %0) {
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @signal(i32 %2, void (i32)* %0)
%4 = load i32, i32* @SIGQUIT
%5 = tail call i32 @signal(i32 %4, void (i32)* %0)
%6 = load i32, i32* @SIGTSTP
%7 = tail call i32 @signal(i32 %6, void (i32)* %0)
%8 = load i32, i32* @SIGTTIN
%9 = tail call i32 @signal(i32 %8, void (i32)* %0)
%10 = load i32, i32* @SIGTTOU
%11 = tail call i32 @signal(i32 %10, void (i32)* %0)
%12 = load i32, i32* @SIGCHLD
%13 = tail call i32 @signal(i32 %12, void (i32)* %0)
ret void
}