#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 SIGABRT;
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 sig) {
  int i;
  int siglist[] = {SIGABRT, SIGALRM, SIGBUS,  SIGCHLD,   SIGCONT, SIGFPE,
                   SIGHUP,  SIGILL,  SIGINT,  SIGPIPE,   SIGQUIT, SIGSEGV,
                   SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,   SIGUSR1, SIGUSR2,
                   SIGSYS,  SIGTRAP, SIGURG,  SIGVTALRM, SIGXCPU, SIGXFSZ};
  if (sigismember(&set, sig) != 1) {
    return 1;
  }
  for (i = 0; i < (int)(sizeof(siglist) / sizeof(siglist[0])); i++) {
    if ((siglist[i] != sig)) {
      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    %esi,-0xc(%rbp)
mov    0x2e0b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    0x2e37(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    0x2df7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    0x2e2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    0x2dbf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    0x2e03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x2e17(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2dbf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2dab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2deb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    0x2d4b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2d1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2d2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x2d3f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2d0b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1030 <sigismember@plt>
cmp    $0x1,%rax
je     1260 <is_changed+0x150>
movl   $0x1,-0x4(%rbp)
jmp    12c8 <is_changed+0x1b8>
movl   $0x0,-0x10(%rbp)
cmpl   $0x18,-0x10(%rbp)
jge    12c1 <is_changed+0x1b1>
movslq -0x10(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
cmp    -0xc(%rbp),%eax
je     12ae <is_changed+0x19e>
movslq -0x10(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    -0x8(%rbp),%rdi
call   1030 <sigismember@plt>
cmp    $0x0,%rax
je     12a9 <is_changed+0x199>
movl   $0x1,-0x4(%rbp)
jmp    12c8 <is_changed+0x1b8>
jmp    12ae <is_changed+0x19e>
jmp    12b3 <is_changed+0x1a3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1267 <is_changed+0x157>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_changed>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %esi,%ebx
mov    %edi,0xc(%rsp)
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
mov    0x2e3a(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
mov    0x2dee(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2c(%rsp)
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    0x2db4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x34(%rsp)
mov    0x2df7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    0x2e0a(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x3c(%rsp)
mov    0x2de5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x40(%rsp)
mov    0x2db0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x44(%rsp)
mov    0x2d9b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
mov    0x2dee(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4c(%rsp)
mov    0x2dd9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x50(%rsp)
mov    0x2d54(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x54(%rsp)
mov    0x2d37(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x5c(%rsp)
mov    0x2d15(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x60(%rsp)
mov    0x2d28(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x64(%rsp)
mov    0x2cf3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x68(%rsp)
mov    0x2d3e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x6c(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <sigismember@plt>
mov    $0x1,%r14d
cmp    $0x1,%rax
jne    12a4 <is_changed+0x194>
xor    %ebp,%ebp
lea    0xc(%rsp),%r15
jmp    128a <is_changed+0x17a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    $0x18,%rbp
je     12a1 <is_changed+0x191>
mov    0x10(%rsp,%rbp,4),%esi
cmp    %ebx,%esi
je     1280 <is_changed+0x170>
mov    %r15,%rdi
call   1030 <sigismember@plt>
test   %rax,%rax
je     1280 <is_changed+0x170>
jmp    12a4 <is_changed+0x194>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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