#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 */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  void *sival_ptr;
};
struct TYPE_5__ {
  int si_signo;
  scalar_t__ si_errno;
  scalar_t__ si_pid;
  scalar_t__ si_code;
  TYPE_1__ si_value;
};
typedef TYPE_2__ siginfo_t;

/* Variables and functions */
int SIGABRT;
scalar_t__ SI_QUEUE;
int /*<<< orphan*/ assert(int);
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *);
void sigabrt_function(int signum, siginfo_t *info, void *arg) {
  assert(signum == SIGABRT);
  assert(info->si_signo == signum);
  printf("SIGABRT\n");
  assert(info->si_signo == signum);
  assert(info->si_errno == 0);
  assert(info->si_pid == getpid());
  assert(info->si_code == SI_QUEUE);
  assert(info->si_value.sival_ptr == (void *)0x1);
}


x86 assembly (clang, -O0):
<sigabrt_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e8b(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    0x2e05(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    $0x1,%ecx
cmp    %rcx,0x20(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigabrt_function>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e99(%rip),%rax
xor    %edi,%edi
cmp    %ebp,(%rax)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    %ebp,(%rbx)
sete   %dil
call   1050 <assert@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
cmp    %ebp,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpq   $0x0,0x8(%rbx)
sete   %dil
call   1050 <assert@plt>
mov    0x10(%rbx),%rbp
xor    %eax,%eax
call   1040 <getpid@plt>
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   1050 <assert@plt>
mov    0x18(%rbx),%rax
mov    0x2e42(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpq   $0x1,0x20(%rbx)
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <assert@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, i64, i64, i64, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i8* }
@SIGABRT = global i32 0
@.str = [9 x i8] c"SIGABRT\0A\00"
@SI_QUEUE = global i64 0
define void @sigabrt_function(i32 %0, %struct.TYPE_5__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_5__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_5__* %1, %struct.TYPE_5__** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* @SIGABRT
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%13 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = load i32, i32* %4
%16 = icmp eq i32 %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%20 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%21 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load i32, i32* %4
%24 = icmp eq i32 %22, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%28 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i32 0, i32 1
%29 = load i64, i64* %28
%30 = icmp eq i64 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%34 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %33, i32 0, i32 2
%35 = load i64, i64* %34
%36 = call i64 (...) @getpid()
%37 = icmp eq i64 %35, %36
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38)
%40 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%41 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %40, i32 0, i32 3
%42 = load i64, i64* %41
%43 = load i64, i64* @SI_QUEUE
%44 = icmp eq i64 %42, %43
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%48 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %47, i32 0, i32 4
%49 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %48, i32 0, i32 0
%50 = load i8*, i8** %49
%51 = icmp eq i8* %50, inttoptr (i64 1 to i8*)
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, i64, i64, i64, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i8* }
@SIGABRT = global i32 0
@SI_QUEUE = global i64 0
@str = [8 x i8] c"SIGABRT\00"
define void @sigabrt_function(i32 %0, %struct.TYPE_5__* nocapture %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @SIGABRT
%5 = icmp eq i32 %4, %0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, %0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, %0
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 1
%19 = load i64, i64* %18
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 2
%24 = load i64, i64* %23
%25 = tail call i64 (...) @getpid()
%26 = icmp eq i64 %24, %25
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 3
%30 = load i64, i64* %29
%31 = load i64, i64* @SI_QUEUE
%32 = icmp eq i64 %30, %31
%33 = zext i1 %32 to i32
%34 = tail call i32 @assert(i32 %33)
%35 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 4, i32 0
%36 = load i8*, i8** %35
%37 = icmp eq i8* %36, inttoptr (i64 1 to i8*)
%38 = zext i1 %37 to i32
%39 = tail call i32 @assert(i32 %38)
ret void
}