#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;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pthread_exit(void *);
int /*<<< orphan*/ pthread_sigmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigismember(int /*<<< orphan*/ *, int);
void *a_thread_func() {
  sigset_t oactl, tempset;
  int i, j, test_failed = 0;
  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};
  for (i = 0; i < (int)(sizeof(siglist) / sizeof(siglist[0])); i++) {
    sigemptyset(&oactl);
    sigemptyset(&tempset);
    sigaddset(&tempset, siglist[i]);
    pthread_sigmask(SIG_BLOCK, &tempset, &oactl);
    if (i > 0) {
      for (j = 0; j < i; j++) {
        if (sigismember(&oactl, siglist[j]) != 1) {
          test_failed = 1;
        }
      }
      for (j = i + 1; j < (sizeof(siglist) / sizeof(siglist[0])); j++) {
        if (sigismember(&oactl, siglist[j]) != 0) {
          test_failed = 1;
        }
      }
    }
  }
  if (test_failed != 0) {
    printf("Old set is invalid.\n");
    pthread_exit((void *)-1);
  }
  printf("Test PASSED: oactl did contain all signals that were added to the "
         "signal mask.\n");
  pthread_exit(NULL);
  return NULL;
}


x86 assembly (clang, -O0):
<a_thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x14(%rbp)
mov    0x2daf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x80(%rbp)
mov    0x2e33(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
mov    0x2e57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x78(%rbp)
mov    0x2deb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    0x2e2f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2da3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2dd7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    0x2d6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    0x2daf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    0x2dc3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    0x2d9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    0x2d6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x2dab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2d97(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2d13(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2cf7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    0x2cc3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2cd7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    0x2ceb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    0x2caf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2d03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x18,-0xc(%rbp)
jge    1390 <a_thread_func+0x230>
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
movslq -0xc(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    -0x8(%rbp),%rdi
call   1080 <sigaddset@plt>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
lea    -0x4(%rbp),%rdx
call   1060 <pthread_sigmask@plt>
cmpl   $0x0,-0xc(%rbp)
jle    137d <a_thread_func+0x21d>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    132d <a_thread_func+0x1cd>
movslq -0x10(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    -0x4(%rbp),%rdi
call   1070 <sigismember@plt>
cmp    $0x1,%eax
je     131a <a_thread_func+0x1ba>
movl   $0x1,-0x14(%rbp)
jmp    131f <a_thread_func+0x1bf>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12ed <a_thread_func+0x18d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
cmp    $0x18,%rax
jae    1378 <a_thread_func+0x218>
movslq -0x10(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    -0x4(%rbp),%rdi
call   1070 <sigismember@plt>
cmp    $0x0,%eax
je     1365 <a_thread_func+0x205>
movl   $0x1,-0x14(%rbp)
jmp    136a <a_thread_func+0x20a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1336 <a_thread_func+0x1d6>
jmp    137d <a_thread_func+0x21d>
jmp    1382 <a_thread_func+0x222>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1299 <a_thread_func+0x139>
cmpl   $0x0,-0x14(%rbp)
je     13b2 <a_thread_func+0x252>
lea    0xc5f(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffffffffffff,%rdi
call   1050 <pthread_exit@plt>
lea    0xc5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <pthread_exit@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_thread_func>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    0x2db3(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    0x2e37(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
mov    0x2ded(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
mov    0x2e20(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2e2e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
mov    0x2da1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2dd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2d67(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
mov    0x2daa(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
mov    0x2dbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2c(%rsp)
mov    0x2d98(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    0x2d63(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x34(%rsp)
mov    0x2d4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    0x2da1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x3c(%rsp)
mov    0x2d8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x40(%rsp)
mov    0x2d07(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x44(%rsp)
mov    0x2cea(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4c(%rsp)
mov    0x2cc8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x50(%rsp)
mov    0x2cdb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x54(%rsp)
mov    0x2c9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
mov    0x2cf1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x5c(%rsp)
xor    %ebx,%ebx
mov    $0x1,%ebp
lea    0x64(%rsp),%r15
mov    $0x1,%r14d
xor    %r13d,%r13d
jmp    12d2 <a_thread_func+0x172>
nopl   0x0(%rax)
add    $0x1,%rbx
add    $0x1,%rbp
cmp    $0x18,%rbx
je     1361 <a_thread_func+0x201>
mov    %r15,%rdi
call   1040 <sigemptyset@plt>
lea    0x60(%rsp),%r12
mov    %r12,%rdi
call   1040 <sigemptyset@plt>
mov    (%rsp,%rbx,4),%esi
mov    %r12,%rdi
call   1080 <sigaddset@plt>
mov    0x2c3f(%rip),%rax
mov    (%rax),%edi
mov    %r12,%rsi
mov    %r15,%rdx
call   1060 <pthread_sigmask@plt>
test   %rbx,%rbx
je     12c0 <a_thread_func+0x160>
mov    %rbp,%r12
xor    %ebp,%ebp
mov    (%rsp,%rbp,4),%esi
mov    %r15,%rdi
call   1070 <sigismember@plt>
cmp    $0x1,%eax
cmovne %r14d,%r13d
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1310 <a_thread_func+0x1b0>
mov    %r12,%rbp
cmp    $0x16,%rbx
ja     12c0 <a_thread_func+0x160>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rsp,%r12,4),%esi
mov    %r15,%rdi
call   1070 <sigismember@plt>
test   %eax,%eax
cmovne %r14d,%r13d
add    $0x1,%r12
cmp    $0x18,%r12
jne    1340 <a_thread_func+0x1e0>
jmp    12c0 <a_thread_func+0x160>
test   %r13d,%r13d
je     137e <a_thread_func+0x21e>
lea    0xce2(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffffffffffff,%rdi
call   1050 <pthread_exit@plt>
lea    0xc7b(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <pthread_exit@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
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
@SIG_BLOCK = global i32 0
@.str = [21 x i8] c"Old set is invalid.\0A\00"
@.str.1 = [80 x i8] c"Test PASSED: oactl did contain all signals that were added to the signal mask.\0A\00"
define i8* @a_thread_func() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [24 x i32]
store i32 0, i32* %5
%7 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 0
%8 = load i32, i32* @SIGABRT
store i32 %8, i32* %7
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* @SIGALRM
store i32 %10, i32* %9
%11 = getelementptr inbounds i32, i32* %9, i64 1
%12 = load i32, i32* @SIGBUS
store i32 %12, i32* %11
%13 = getelementptr inbounds i32, i32* %11, i64 1
%14 = load i32, i32* @SIGCHLD
store i32 %14, i32* %13
%15 = getelementptr inbounds i32, i32* %13, i64 1
%16 = load i32, i32* @SIGCONT
store i32 %16, i32* %15
%17 = getelementptr inbounds i32, i32* %15, i64 1
%18 = load i32, i32* @SIGFPE
store i32 %18, i32* %17
%19 = getelementptr inbounds i32, i32* %17, i64 1
%20 = load i32, i32* @SIGHUP
store i32 %20, i32* %19
%21 = getelementptr inbounds i32, i32* %19, i64 1
%22 = load i32, i32* @SIGILL
store i32 %22, i32* %21
%23 = getelementptr inbounds i32, i32* %21, i64 1
%24 = load i32, i32* @SIGINT
store i32 %24, i32* %23
%25 = getelementptr inbounds i32, i32* %23, i64 1
%26 = load i32, i32* @SIGPIPE
store i32 %26, i32* %25
%27 = getelementptr inbounds i32, i32* %25, i64 1
%28 = load i32, i32* @SIGQUIT
store i32 %28, i32* %27
%29 = getelementptr inbounds i32, i32* %27, i64 1
%30 = load i32, i32* @SIGSEGV
store i32 %30, i32* %29
%31 = getelementptr inbounds i32, i32* %29, i64 1
%32 = load i32, i32* @SIGTERM
store i32 %32, i32* %31
%33 = getelementptr inbounds i32, i32* %31, i64 1
%34 = load i32, i32* @SIGTSTP
store i32 %34, i32* %33
%35 = getelementptr inbounds i32, i32* %33, i64 1
%36 = load i32, i32* @SIGTTIN
store i32 %36, i32* %35
%37 = getelementptr inbounds i32, i32* %35, i64 1
%38 = load i32, i32* @SIGTTOU
store i32 %38, i32* %37
%39 = getelementptr inbounds i32, i32* %37, i64 1
%40 = load i32, i32* @SIGUSR1
store i32 %40, i32* %39
%41 = getelementptr inbounds i32, i32* %39, i64 1
%42 = load i32, i32* @SIGUSR2
store i32 %42, i32* %41
%43 = getelementptr inbounds i32, i32* %41, i64 1
%44 = load i32, i32* @SIGSYS
store i32 %44, i32* %43
%45 = getelementptr inbounds i32, i32* %43, i64 1
%46 = load i32, i32* @SIGTRAP
store i32 %46, i32* %45
%47 = getelementptr inbounds i32, i32* %45, i64 1
%48 = load i32, i32* @SIGURG
store i32 %48, i32* %47
%49 = getelementptr inbounds i32, i32* %47, i64 1
%50 = load i32, i32* @SIGVTALRM
store i32 %50, i32* %49
%51 = getelementptr inbounds i32, i32* %49, i64 1
%52 = load i32, i32* @SIGXCPU
store i32 %52, i32* %51
%53 = getelementptr inbounds i32, i32* %51, i64 1
%54 = load i32, i32* @SIGXFSZ
store i32 %54, i32* %53
store i32 0, i32* %3
br label %55
55: ; preds = %108, %0
%56 = load i32, i32* %3
%57 = icmp slt i32 %56, 24
br i1 %57, label %58, label %111
58: ; preds = %55
%59 = call i32 @sigemptyset(i32* %1)
%60 = call i32 @sigemptyset(i32* %2)
%61 = load i32, i32* %3
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = call i32 @sigaddset(i32* %2, i32 %64)
%66 = load i32, i32* @SIG_BLOCK
%67 = call i32 @pthread_sigmask(i32 %66, i32* %2, i32* %1)
%68 = load i32, i32* %3
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %107
70: ; preds = %58
store i32 0, i32* %4
br label %71
71: ; preds = %84, %70
%72 = load i32, i32* %4
%73 = load i32, i32* %3
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %87
75: ; preds = %71
%76 = load i32, i32* %4
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = call i32 @sigismember(i32* %1, i32 %79)
%81 = icmp ne i32 %80, 1
br i1 %81, label %82, label %83
82: ; preds = %75
store i32 1, i32* %5
br label %83
83: ; preds = %82, %75
br label %84
84: ; preds = %83
%85 = load i32, i32* %4
%86 = add nsw i32 %85, 1
store i32 %86, i32* %4
br label %71
87: ; preds = %71
%88 = load i32, i32* %3
%89 = add nsw i32 %88, 1
store i32 %89, i32* %4
br label %90
90: ; preds = %103, %87
%91 = load i32, i32* %4
%92 = sext i32 %91 to i64
%93 = icmp ult i64 %92, 24
br i1 %93, label %94, label %106
94: ; preds = %90
%95 = load i32, i32* %4
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %96
%98 = load i32, i32* %97
%99 = call i32 @sigismember(i32* %1, i32 %98)
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %94
store i32 1, i32* %5
br label %102
102: ; preds = %101, %94
br label %103
103: ; preds = %102
%104 = load i32, i32* %4
%105 = add nsw i32 %104, 1
store i32 %105, i32* %4
br label %90
106: ; preds = %90
br label %107
107: ; preds = %106, %58
br label %108
108: ; preds = %107
%109 = load i32, i32* %3
%110 = add nsw i32 %109, 1
store i32 %110, i32* %3
br label %55
111: ; preds = %55
%112 = load i32, i32* %5
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %117
114: ; preds = %111
%115 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%116 = call i32 @pthread_exit(i8* inttoptr (i64 -1 to i8*))
br label %117
117: ; preds = %114, %111
%118 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%119 = call i32 @pthread_exit(i8* null)
ret i8* null
}

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
@SIG_BLOCK = global i32 0
@str = [79 x i8] c"Test PASSED: oactl did contain all signals that were added to the signal mask.\00"
@str.2 = [20 x i8] c"Old set is invalid.\00"
define noalias i8* @a_thread_func() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [24 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [24 x i32]* %3 to i8*
%7 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 0
%8 = load i32, i32* @SIGABRT
store i32 %8, i32* %7
%9 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 1
%10 = load i32, i32* @SIGALRM
store i32 %10, i32* %9
%11 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 2
%12 = load i32, i32* @SIGBUS
store i32 %12, i32* %11
%13 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 3
%14 = load i32, i32* @SIGCHLD
store i32 %14, i32* %13
%15 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 4
%16 = load i32, i32* @SIGCONT
store i32 %16, i32* %15
%17 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 5
%18 = load i32, i32* @SIGFPE
store i32 %18, i32* %17
%19 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 6
%20 = load i32, i32* @SIGHUP
store i32 %20, i32* %19
%21 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 7
%22 = load i32, i32* @SIGILL
store i32 %22, i32* %21
%23 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 8
%24 = load i32, i32* @SIGINT
store i32 %24, i32* %23
%25 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 9
%26 = load i32, i32* @SIGPIPE
store i32 %26, i32* %25
%27 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 10
%28 = load i32, i32* @SIGQUIT
store i32 %28, i32* %27
%29 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 11
%30 = load i32, i32* @SIGSEGV
store i32 %30, i32* %29
%31 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 12
%32 = load i32, i32* @SIGTERM
store i32 %32, i32* %31
%33 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 13
%34 = load i32, i32* @SIGTSTP
store i32 %34, i32* %33
%35 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 14
%36 = load i32, i32* @SIGTTIN
store i32 %36, i32* %35
%37 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 15
%38 = load i32, i32* @SIGTTOU
store i32 %38, i32* %37
%39 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 16
%40 = load i32, i32* @SIGUSR1
store i32 %40, i32* %39
%41 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 17
%42 = load i32, i32* @SIGUSR2
store i32 %42, i32* %41
%43 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 18
%44 = load i32, i32* @SIGSYS
store i32 %44, i32* %43
%45 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 19
%46 = load i32, i32* @SIGTRAP
store i32 %46, i32* %45
%47 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 20
%48 = load i32, i32* @SIGURG
store i32 %48, i32* %47
%49 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 21
%50 = load i32, i32* @SIGVTALRM
store i32 %50, i32* %49
%51 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 22
%52 = load i32, i32* @SIGXCPU
store i32 %52, i32* %51
%53 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 23
%54 = load i32, i32* @SIGXFSZ
store i32 %54, i32* %53
br label %55
55: ; preds = %0, %88
%56 = phi i64 [ 0, %0 ], [ %90, %88 ]
%57 = phi i32 [ 0, %0 ], [ %89, %88 ]
%58 = call i32 @sigemptyset(i32* %1)
%59 = call i32 @sigemptyset(i32* %2)
%60 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 %56
%61 = load i32, i32* %60
%62 = call i32 @sigaddset(i32* %2, i32 %61)
%63 = load i32, i32* @SIG_BLOCK
%64 = call i32 @pthread_sigmask(i32 %63, i32* %2, i32* %1)
%65 = icmp eq i64 %56, 0
br i1 %65, label %88, label %68
66: ; preds = %68
%67 = icmp ult i64 %56, 23
br i1 %67, label %78, label %88
68: ; preds = %55, %68
%69 = phi i64 [ %76, %68 ], [ 0, %55 ]
%70 = phi i32 [ %75, %68 ], [ %57, %55 ]
%71 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 %69
%72 = load i32, i32* %71
%73 = call i32 @sigismember(i32* %1, i32 %72)
%74 = icmp eq i32 %73, 1
%75 = select i1 %74, i32 %70, i32 1
%76 = add nuw nsw i64 %69, 1
%77 = icmp eq i64 %76, %56
br i1 %77, label %66, label %68
78: ; preds = %66, %78
%79 = phi i64 [ %81, %78 ], [ %56, %66 ]
%80 = phi i32 [ %86, %78 ], [ %75, %66 ]
%81 = add nuw nsw i64 %79, 1
%82 = getelementptr inbounds [24 x i32], [24 x i32]* %3, i64 0, i64 %81
%83 = load i32, i32* %82
%84 = call i32 @sigismember(i32* %1, i32 %83)
%85 = icmp eq i32 %84, 0
%86 = select i1 %85, i32 %80, i32 1
%87 = icmp eq i64 %81, 23
br i1 %87, label %88, label %78
88: ; preds = %78, %66, %55
%89 = phi i32 [ %57, %55 ], [ %75, %66 ], [ %86, %78 ]
%90 = add nuw nsw i64 %56, 1
%91 = icmp eq i64 %90, 24
br i1 %91, label %92, label %55
92: ; preds = %88
%93 = icmp eq i32 %89, 0
br i1 %93, label %97, label %94
94: ; preds = %92
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
%96 = call i32 @pthread_exit(i8* inttoptr (i64 -1 to i8*))
br label %97
97: ; preds = %94, %92
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%99 = call i32 @pthread_exit(i8* null)
ret i8* null
}