#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;

/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIG_BLOCK;
scalar_t__ pthread_sigmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/ *);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ smr_panic(char *, char *, int);
void bio_block_signal(void) {
  sigset_t sigset;
  sigemptyset(&sigset);
  sigaddset(&sigset, SIGALRM);
  if (pthread_sigmask(SIG_BLOCK, &sigset, NULL) != 0) {
    smr_panic("pthread_sigmask failed",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cl9200/nbase-arc/refs/heads/master/"
              "smr/replicator/bio.c",
              583);
  }
}


x86 assembly (clang, -O0):
<bio_block_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <sigemptyset@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1060 <sigaddset@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <pthread_sigmask@plt>
cmp    $0x0,%rax
je     119b <bio_block_signal+0x5b>
lea    0xe76(%rip),%rdi
lea    0xe86(%rip),%rsi
mov    $0x247,%edx
call   1040 <smr_panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bio_block_signal>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sigemptyset@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <sigaddset@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1050 <pthread_sigmask@plt>
test   %rax,%rax
je     1193 <bio_block_signal+0x53>
lea    0xe7e(%rip),%rdi
lea    0xe8e(%rip),%rsi
mov    $0x247,%edx
call   1040 <smr_panic@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGALRM = global i32 0
@SIG_BLOCK = global i32 0
@.str = [23 x i8] c"pthread_sigmask failed\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cl9200/nbase-arc/refs/heads/master/smr/replicator/bio.c\00"
define void @bio_block_signal() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGALRM
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i64 @pthread_sigmask(i32 %5, i32* %1, i32* null)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @smr_panic(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 583)
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@SIG_BLOCK = global i32 0
@.str = [23 x i8] c"pthread_sigmask failed\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cl9200/nbase-arc/refs/heads/master/smr/replicator/bio.c\00"
define void @bio_block_signal() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGALRM
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_BLOCK
%7 = call i64 @pthread_sigmask(i32 %6, i32* %1, i32* null)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 @smr_panic(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 583)
br label %11
11: ; preds = %9, %0
ret void
}