#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 < (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((void *)0);
  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)
movslq -0xc(%rbp),%rax
cmp    $0x18,%rax
jae    1394 <a_thread_func+0x234>
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    0x2c67(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
lea    -0x4(%rbp),%rdx
call   1060 <pthread_sigmask@plt>
cmpl   $0x0,-0xc(%rbp)
jle    1381 <a_thread_func+0x221>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1331 <a_thread_func+0x1d1>
movslq -0x10(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    -0x4(%rbp),%rdi
call   1070 <sigismember@plt>
cmp    $0x1,%eax
je     131e <a_thread_func+0x1be>
movl   $0x1,-0x14(%rbp)
jmp    1323 <a_thread_func+0x1c3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12f1 <a_thread_func+0x191>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
cmp    $0x18,%rax
jae    137c <a_thread_func+0x21c>
movslq -0x10(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    -0x4(%rbp),%rdi
call   1070 <sigismember@plt>
cmp    $0x0,%eax
je     1369 <a_thread_func+0x209>
movl   $0x1,-0x14(%rbp)
jmp    136e <a_thread_func+0x20e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    133a <a_thread_func+0x1da>
jmp    1381 <a_thread_func+0x221>
jmp    1386 <a_thread_func+0x226>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1299 <a_thread_func+0x139>
cmpl   $0x0,-0x14(%rbp)
je     13b6 <a_thread_func+0x256>
lea    0xc5b(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffffffffffff,%rdi
call   1050 <pthread_exit@plt>
lea    0xc58(%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 = %109, %0
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = icmp ult i64 %57, 24
br i1 %58, label %59, label %112
59: ; preds = %55
%60 = call i32 @sigemptyset(i32* %1)
%61 = call i32 @sigemptyset(i32* %2)
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = call i32 @sigaddset(i32* %2, i32 %65)
%67 = load i32, i32* @SIG_BLOCK
%68 = call i32 @pthread_sigmask(i32 %67, i32* %2, i32* %1)
%69 = load i32, i32* %3
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %108
71: ; preds = %59
store i32 0, i32* %4
br label %72
72: ; preds = %85, %71
%73 = load i32, i32* %4
%74 = load i32, i32* %3
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %88
76: ; preds = %72
%77 = load i32, i32* %4
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %78
%80 = load i32, i32* %79
%81 = call i32 @sigismember(i32* %1, i32 %80)
%82 = icmp ne i32 %81, 1
br i1 %82, label %83, label %84
83: ; preds = %76
store i32 1, i32* %5
br label %84
84: ; preds = %83, %76
br label %85
85: ; preds = %84
%86 = load i32, i32* %4
%87 = add nsw i32 %86, 1
store i32 %87, i32* %4
br label %72
88: ; preds = %72
%89 = load i32, i32* %3
%90 = add nsw i32 %89, 1
store i32 %90, i32* %4
br label %91
91: ; preds = %104, %88
%92 = load i32, i32* %4
%93 = sext i32 %92 to i64
%94 = icmp ult i64 %93, 24
br i1 %94, label %95, label %107
95: ; preds = %91
%96 = load i32, i32* %4
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [24 x i32], [24 x i32]* %6, i64 0, i64 %97
%99 = load i32, i32* %98
%100 = call i32 @sigismember(i32* %1, i32 %99)
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %95
store i32 1, i32* %5
br label %103
103: ; preds = %102, %95
br label %104
104: ; preds = %103
%105 = load i32, i32* %4
%106 = add nsw i32 %105, 1
store i32 %106, i32* %4
br label %91
107: ; preds = %91
br label %108
108: ; preds = %107, %59
br label %109
109: ; preds = %108
%110 = load i32, i32* %3
%111 = add nsw i32 %110, 1
store i32 %111, i32* %3
br label %55
112: ; preds = %55
%113 = load i32, i32* %5
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %112
%116 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%117 = call i32 @pthread_exit(i8* inttoptr (i64 -1 to i8*))
br label %118
118: ; preds = %115, %112
%119 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%120 = 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
}