#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;
typedef int /*<<< orphan*/ siglist;

/* Variables and functions */
int SIGALRM;
int SIGBUS;
int SIGCHLD;
int SIGCONT;
int SIGFPE;
int SIGHUP;
int SIGILL;
int SIGINT;
int SIGPIPE;
int SIGQUIT;
int SIGSEGV;
int SIGSYS;
int SIGTERM;
int SIGTRAP;
int SIGTSTP;
int SIGTTIN;
int SIGTTOU;
int SIGURG;
int SIGUSR1;
int SIGUSR2;
int SIGVTALRM;
int SIGXCPU;
int SIGXFSZ;
scalar_t__ sigismember(int /*<<< orphan*/ *, int);
int is_changed(sigset_t set) {
  int i;
  int siglist[] = {SIGALRM, SIGBUS,  SIGCHLD,   SIGCONT, SIGFPE,  SIGHUP,
                   SIGILL,  SIGINT,  SIGPIPE,   SIGQUIT, SIGSEGV, SIGTERM,
                   SIGTSTP, SIGTTIN, SIGTTOU,   SIGUSR1, SIGUSR2, SIGSYS,
                   SIGTRAP, SIGURG,  SIGVTALRM, SIGXCPU, SIGXFSZ};
  for (i = 0; i < (int)(sizeof(siglist) / sizeof(siglist[0])); i++) {
    if (sigismember(&set, siglist[i]) != 0)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_changed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2e46(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    0x2e06(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    0x2e3a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    0x2dce(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    0x2e26(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x2e02(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2dce(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2dba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2e0e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    0x2dfa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2d76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    0x2d36(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2d3a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2d4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x2d1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x17,-0xc(%rbp)
jge    127a <is_changed+0x16a>
movslq -0xc(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    -0x8(%rbp),%rdi
call   1030 <sigismember@plt>
cmp    $0x0,%rax
je     1267 <is_changed+0x157>
movl   $0x1,-0x4(%rbp)
jmp    1281 <is_changed+0x171>
jmp    126c <is_changed+0x15c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1236 <is_changed+0x126>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_changed>:
push   %rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %edi,0xc(%rsp)
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    %esi,0x10(%rsp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2e41(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
mov    0x2e32(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2c(%rsp)
mov    0x2dc5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    0x2e08(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x34(%rsp)
mov    0x2e1b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    0x2df6(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x3c(%rsp)
mov    0x2dc1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x40(%rsp)
mov    0x2dac(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x44(%rsp)
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
mov    0x2dea(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4c(%rsp)
mov    0x2d65(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x50(%rsp)
mov    0x2d48(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x54(%rsp)
mov    0x2d23(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
mov    0x2d26(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x5c(%rsp)
mov    0x2d39(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x60(%rsp)
mov    0x2d04(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x64(%rsp)
mov    0x2d4f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x68(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <sigismember@plt>
mov    $0x1,%r14d
test   %rax,%rax
jne    1290 <is_changed+0x180>
mov    $0x1,%ebp
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
cmp    $0x17,%rbp
je     128d <is_changed+0x17d>
mov    0x10(%rsp,%rbp,4),%esi
mov    %rbx,%rdi
call   1030 <sigismember@plt>
add    $0x1,%rbp
test   %rax,%rax
je     1270 <is_changed+0x160>
jmp    1290 <is_changed+0x180>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SIGALRM = global i32 0
@SIGBUS = global i32 0
@SIGCHLD = global i32 0
@SIGCONT = global i32 0
@SIGFPE = global i32 0
@SIGHUP = global i32 0
@SIGILL = global i32 0
@SIGINT = global i32 0
@SIGPIPE = global i32 0
@SIGQUIT = global i32 0
@SIGSEGV = global i32 0
@SIGTERM = global i32 0
@SIGTSTP = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
@SIGSYS = global i32 0
@SIGTRAP = global i32 0
@SIGURG = global i32 0
@SIGVTALRM = global i32 0
@SIGXCPU = global i32 0
@SIGXFSZ = global i32 0
define i32 @is_changed(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [23 x i32]
store i32 %0, i32* %3
%6 = getelementptr inbounds [23 x i32], [23 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* @SIGALRM
store i32 %7, i32* %6
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* @SIGBUS
store i32 %9, i32* %8
%10 = getelementptr inbounds i32, i32* %8, i64 1
%11 = load i32, i32* @SIGCHLD
store i32 %11, i32* %10
%12 = getelementptr inbounds i32, i32* %10, i64 1
%13 = load i32, i32* @SIGCONT
store i32 %13, i32* %12
%14 = getelementptr inbounds i32, i32* %12, i64 1
%15 = load i32, i32* @SIGFPE
store i32 %15, i32* %14
%16 = getelementptr inbounds i32, i32* %14, i64 1
%17 = load i32, i32* @SIGHUP
store i32 %17, i32* %16
%18 = getelementptr inbounds i32, i32* %16, i64 1
%19 = load i32, i32* @SIGILL
store i32 %19, i32* %18
%20 = getelementptr inbounds i32, i32* %18, i64 1
%21 = load i32, i32* @SIGINT
store i32 %21, i32* %20
%22 = getelementptr inbounds i32, i32* %20, i64 1
%23 = load i32, i32* @SIGPIPE
store i32 %23, i32* %22
%24 = getelementptr inbounds i32, i32* %22, i64 1
%25 = load i32, i32* @SIGQUIT
store i32 %25, i32* %24
%26 = getelementptr inbounds i32, i32* %24, i64 1
%27 = load i32, i32* @SIGSEGV
store i32 %27, i32* %26
%28 = getelementptr inbounds i32, i32* %26, i64 1
%29 = load i32, i32* @SIGTERM
store i32 %29, i32* %28
%30 = getelementptr inbounds i32, i32* %28, i64 1
%31 = load i32, i32* @SIGTSTP
store i32 %31, i32* %30
%32 = getelementptr inbounds i32, i32* %30, i64 1
%33 = load i32, i32* @SIGTTIN
store i32 %33, i32* %32
%34 = getelementptr inbounds i32, i32* %32, i64 1
%35 = load i32, i32* @SIGTTOU
store i32 %35, i32* %34
%36 = getelementptr inbounds i32, i32* %34, i64 1
%37 = load i32, i32* @SIGUSR1
store i32 %37, i32* %36
%38 = getelementptr inbounds i32, i32* %36, i64 1
%39 = load i32, i32* @SIGUSR2
store i32 %39, i32* %38
%40 = getelementptr inbounds i32, i32* %38, i64 1
%41 = load i32, i32* @SIGSYS
store i32 %41, i32* %40
%42 = getelementptr inbounds i32, i32* %40, i64 1
%43 = load i32, i32* @SIGTRAP
store i32 %43, i32* %42
%44 = getelementptr inbounds i32, i32* %42, i64 1
%45 = load i32, i32* @SIGURG
store i32 %45, i32* %44
%46 = getelementptr inbounds i32, i32* %44, i64 1
%47 = load i32, i32* @SIGVTALRM
store i32 %47, i32* %46
%48 = getelementptr inbounds i32, i32* %46, i64 1
%49 = load i32, i32* @SIGXCPU
store i32 %49, i32* %48
%50 = getelementptr inbounds i32, i32* %48, i64 1
%51 = load i32, i32* @SIGXFSZ
store i32 %51, i32* %50
store i32 0, i32* %4
br label %52
52: ; preds = %64, %1
%53 = load i32, i32* %4
%54 = icmp slt i32 %53, 23
br i1 %54, label %55, label %67
55: ; preds = %52
%56 = load i32, i32* %4
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [23 x i32], [23 x i32]* %5, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = call i64 @sigismember(i32* %3, i32 %59)
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %55
store i32 1, i32* %2
br label %68
63: ; preds = %55
br label %64
64: ; preds = %63
%65 = load i32, i32* %4
%66 = add nsw i32 %65, 1
store i32 %66, i32* %4
br label %52
67: ; preds = %52
store i32 0, i32* %2
br label %68
68: ; preds = %67, %62
%69 = load i32, i32* %2
ret i32 %69
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@SIGBUS = global i32 0
@SIGCHLD = global i32 0
@SIGCONT = global i32 0
@SIGFPE = global i32 0
@SIGHUP = global i32 0
@SIGILL = global i32 0
@SIGINT = global i32 0
@SIGPIPE = global i32 0
@SIGQUIT = global i32 0
@SIGSEGV = global i32 0
@SIGTERM = global i32 0
@SIGTSTP = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
@SIGSYS = global i32 0
@SIGTRAP = global i32 0
@SIGURG = global i32 0
@SIGVTALRM = global i32 0
@SIGXCPU = global i32 0
@SIGXFSZ = global i32 0
define i32 @is_changed(i32 %0) {
%2 = alloca i32
%3 = alloca [23 x i32]
store i32 %0, i32* %2
%4 = bitcast [23 x i32]* %3 to i8*
%5 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 0
%6 = load i32, i32* @SIGALRM
store i32 %6, i32* %5
%7 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 1
%8 = load i32, i32* @SIGBUS
store i32 %8, i32* %7
%9 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 2
%10 = load i32, i32* @SIGCHLD
store i32 %10, i32* %9
%11 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 3
%12 = load i32, i32* @SIGCONT
store i32 %12, i32* %11
%13 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 4
%14 = load i32, i32* @SIGFPE
store i32 %14, i32* %13
%15 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 5
%16 = load i32, i32* @SIGHUP
store i32 %16, i32* %15
%17 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 6
%18 = load i32, i32* @SIGILL
store i32 %18, i32* %17
%19 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 7
%20 = load i32, i32* @SIGINT
store i32 %20, i32* %19
%21 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 8
%22 = load i32, i32* @SIGPIPE
store i32 %22, i32* %21
%23 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 9
%24 = load i32, i32* @SIGQUIT
store i32 %24, i32* %23
%25 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 10
%26 = load i32, i32* @SIGSEGV
store i32 %26, i32* %25
%27 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 11
%28 = load i32, i32* @SIGTERM
store i32 %28, i32* %27
%29 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 12
%30 = load i32, i32* @SIGTSTP
store i32 %30, i32* %29
%31 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 13
%32 = load i32, i32* @SIGTTIN
store i32 %32, i32* %31
%33 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 14
%34 = load i32, i32* @SIGTTOU
store i32 %34, i32* %33
%35 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 15
%36 = load i32, i32* @SIGUSR1
store i32 %36, i32* %35
%37 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 16
%38 = load i32, i32* @SIGUSR2
store i32 %38, i32* %37
%39 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 17
%40 = load i32, i32* @SIGSYS
store i32 %40, i32* %39
%41 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 18
%42 = load i32, i32* @SIGTRAP
store i32 %42, i32* %41
%43 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 19
%44 = load i32, i32* @SIGURG
store i32 %44, i32* %43
%45 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 20
%46 = load i32, i32* @SIGVTALRM
store i32 %46, i32* %45
%47 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 21
%48 = load i32, i32* @SIGXCPU
store i32 %48, i32* %47
%49 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 22
%50 = load i32, i32* @SIGXFSZ
store i32 %50, i32* %49
%51 = call i64 @sigismember(i32* %2, i32 %6)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %62
53: ; preds = %1, %57
%54 = phi i64 [ %55, %57 ], [ 0, %1 ]
%55 = add nuw nsw i64 %54, 1
%56 = icmp eq i64 %55, 23
br i1 %56, label %62, label %57
57: ; preds = %53
%58 = getelementptr inbounds [23 x i32], [23 x i32]* %3, i64 0, i64 %55
%59 = load i32, i32* %58
%60 = call i64 @sigismember(i32* %2, i32 %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %53, label %62
62: ; preds = %57, %53, %1
%63 = phi i32 [ 1, %1 ], [ 1, %57 ], [ 0, %53 ]
ret i32 %63
}