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

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ si_code;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
#define FPE_FLTDIV 151
#define FPE_FLTINV 150
#define FPE_FLTOVF 149
#define FPE_FLTRES 148
#define FPE_FLTSUB 147
#define FPE_FLTUND 146
#define FPE_INTDIV 145
#define FPE_INTOVF 144
#define ILL_BADSTK 143
#define ILL_COPROC 142
#define ILL_ILLADR 141
#define ILL_ILLOPC 140
#define ILL_ILLOPN 139
#define ILL_ILLTRP 138
#define ILL_PRVOPC 137
#define ILL_PRVREG 136
#define SIGABRT 135
#define SIGFPE 134
#define SIGHUP 133
#define SIGILL 132
#define SIGINT 131
#define SIGQUIT 130
#define SIGSEGV 129
#define SIGTERM 128
int /*<<< orphan*/ _Exit(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ posix_print_stack_trace();
int /*<<< orphan*/ stderr;
void sig_handler(int signo, siginfo_t *siginfo, void *context) {
  (void)context;
  switch (signo) {
  case SIGHUP:
    perror("\nSIGHUP");
    exit(-2);
  case SIGINT:
    perror("\nSIGINT");
    exit(-3);
  case SIGQUIT:
    perror("\nSIGQUIT");
    exit(-4);
  case SIGSEGV:
    perror("\nSIGSEGV");
    exit(-5);
  case SIGABRT:
    perror("\nSIGABRT");
    exit(-6);
  case SIGFPE:
    switch (siginfo->si_code) {
    case FPE_INTDIV:
      fputs("Caught SIGFPE: (integer divide by zero)\n", stderr);
      break;
    case FPE_INTOVF:
      fputs("Caught SIGFPE: (integer overflow)\n", stderr);
      break;
    case FPE_FLTDIV:
      fputs("Caught SIGFPE: (floating-point divide by zero)\n", stderr);
      break;
    case FPE_FLTOVF:
      fputs("Caught SIGFPE: (floating-point overflow)\n", stderr);
      break;
    case FPE_FLTUND:
      fputs("Caught SIGFPE: (floating-point underflow)\n", stderr);
      break;
    case FPE_FLTRES:
      fputs("Caught SIGFPE: (floating-point inexact result)\n", stderr);
      break;
    case FPE_FLTINV:
      fputs("Caught SIGFPE: (floating-point invalid operation)\n", stderr);
      break;
    case FPE_FLTSUB:
      fputs("Caught SIGFPE: (sudirript out of range)\n", stderr);
      break;
    default:
      fputs("Caught SIGFPE: Arithmetic Exception\n", stderr);
    }
    perror("\nSIGFPE");
    exit(-7);
  case SIGILL:
    switch (siginfo->si_code) {
    case ILL_ILLOPC:
      fputs("Caught SIGILL: (illegal opcode)\n", stderr);
      break;
    case ILL_ILLOPN:
      fputs("Caught SIGILL: (illegal operand)\n", stderr);
      break;
    case ILL_ILLADR:
      fputs("Caught SIGILL: (illegal addressing mode)\n", stderr);
      break;
    case ILL_ILLTRP:
      fputs("Caught SIGILL: (illegal trap)\n", stderr);
      break;
    case ILL_PRVOPC:
      fputs("Caught SIGILL: (privileged opcode)\n", stderr);
      break;
    case ILL_PRVREG:
      fputs("Caught SIGILL: (privileged register)\n", stderr);
      break;
    case ILL_COPROC:
      fputs("Caught SIGILL: (coprocessor error)\n", stderr);
      break;
    case ILL_BADSTK:
      fputs("Caught SIGILL: (internal stack error)\n", stderr);
      break;
    default:
      fputs("Caught SIGILL: Illegal Instruction\n", stderr);
    }
    perror("\nSIGILL");
    exit(-8);
  case SIGTERM:
    perror("\nSIGTERM");
    exit(-9);
  default:
    perror("\nUnknown signal caught");
  }
  posix_print_stack_trace();
  _Exit(1);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x7,%eax
ja     1462 <sig_handler+0x312>
mov    -0x20(%rbp),%rax
lea    0xe7d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xecd(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffe,%edi
call   1060 <exit@plt>
lea    0xebf(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffd,%edi
call   1060 <exit@plt>
lea    0xeb1(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffc,%edi
call   1060 <exit@plt>
lea    0xea4(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffb,%edi
call   1060 <exit@plt>
lea    0xe97(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffa,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0xffffff70,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x7,%eax
ja     12f8 <sig_handler+0x1a8>
mov    -0x28(%rbp),%rax
lea    0xe21(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2db1(%rip),%rax
mov    (%rax),%esi
lea    0xe53(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d97(%rip),%rax
mov    (%rax),%esi
lea    0xe62(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d7d(%rip),%rax
mov    (%rax),%esi
lea    0xe6b(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d63(%rip),%rax
mov    (%rax),%esi
lea    0xe81(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d49(%rip),%rax
mov    (%rax),%esi
lea    0xe91(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d2f(%rip),%rax
mov    (%rax),%esi
lea    0xea2(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2d15(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2cfb(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <fputs@plt>
jmp    130d <sig_handler+0x1bd>
mov    0x2ce1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
call   1030 <fputs@plt>
lea    0xef9(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff9,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0xffffff78,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x7,%eax
ja     1421 <sig_handler+0x2d1>
mov    -0x30(%rbp),%rax
lea    0xcd8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2c88(%rip),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2c6e(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2c54(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2c3a(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2c20(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2c06(%rip),%rax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2bec(%rip),%rax
mov    (%rax),%esi
lea    0xeee(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2bd2(%rip),%rax
mov    (%rax),%esi
lea    0xef8(%rip),%rdi
call   1030 <fputs@plt>
jmp    1436 <sig_handler+0x2e6>
mov    0x2bb8(%rip),%rax
mov    (%rax),%esi
lea    0xf05(%rip),%rdi
call   1030 <fputs@plt>
lea    0xf1d(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff8,%edi
call   1060 <exit@plt>
lea    0xf0f(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff7,%edi
call   1060 <exit@plt>
lea    0xf02(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1040 <posix_print_stack_trace@plt>
mov    $0x1,%edi
call   1070 <_Exit@plt>

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
add    $0xffffff80,%edi
cmp    $0x7,%edi
ja     120f <sig_handler+0xbf>
lea    0xe9c(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x11ee(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff7,%edi
call   1060 <exit@plt>
lea    0xeef(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffb,%edi
call   1060 <exit@plt>
lea    0xed0(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffc,%edi
call   1060 <exit@plt>
lea    0xeb2(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffd,%edi
call   1060 <exit@plt>
mov    $0xffffff78,%eax
add    (%rsi),%eax
cmp    $0x7,%eax
ja     124a <sig_handler+0xfa>
cltq
lea    0xe66(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1251 <sig_handler+0x101>
lea    0xe76(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffe,%edi
call   1060 <exit@plt>
lea    0xe82(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffffa,%edi
call   1060 <exit@plt>
lea    0x1155(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1040 <posix_print_stack_trace@plt>
mov    $0x1,%edi
call   1070 <_Exit@plt>
mov    $0xffffff70,%eax
add    (%rsi),%eax
cmp    $0x7,%eax
ja     1275 <sig_handler+0x125>
cltq
lea    0xddf(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    127c <sig_handler+0x12c>
lea    0x10e5(%rip),%rdi
mov    0x2d88(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
lea    0x10f4(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff8,%edi
call   1060 <exit@plt>
lea    0xf6c(%rip),%rdi
mov    0x2d5d(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
lea    0xf7c(%rip),%rdi
call   1050 <perror@plt>
mov    $0xfffffff9,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@.str = [8 x i8] c"\0ASIGHUP\00"
@.str.1 = [8 x i8] c"\0ASIGINT\00"
@.str.2 = [9 x i8] c"\0ASIGQUIT\00"
@.str.3 = [9 x i8] c"\0ASIGSEGV\00"
@.str.4 = [9 x i8] c"\0ASIGABRT\00"
@.str.5 = [41 x i8] c"Caught SIGFPE: (integer divide by zero)\0A\00"
@stderr = global i32 0
@.str.6 = [35 x i8] c"Caught SIGFPE: (integer overflow)\0A\00"
@.str.7 = [48 x i8] c"Caught SIGFPE: (floating-point divide by zero)\0A\00"
@.str.8 = [42 x i8] c"Caught SIGFPE: (floating-point overflow)\0A\00"
@.str.9 = [43 x i8] c"Caught SIGFPE: (floating-point underflow)\0A\00"
@.str.10 = [48 x i8] c"Caught SIGFPE: (floating-point inexact result)\0A\00"
@.str.11 = [51 x i8] c"Caught SIGFPE: (floating-point invalid operation)\0A\00"
@.str.12 = [41 x i8] c"Caught SIGFPE: (sudirript out of range)\0A\00"
@.str.13 = [37 x i8] c"Caught SIGFPE: Arithmetic Exception\0A\00"
@.str.14 = [8 x i8] c"\0ASIGFPE\00"
@.str.15 = [33 x i8] c"Caught SIGILL: (illegal opcode)\0A\00"
@.str.16 = [34 x i8] c"Caught SIGILL: (illegal operand)\0A\00"
@.str.17 = [42 x i8] c"Caught SIGILL: (illegal addressing mode)\0A\00"
@.str.18 = [31 x i8] c"Caught SIGILL: (illegal trap)\0A\00"
@.str.19 = [36 x i8] c"Caught SIGILL: (privileged opcode)\0A\00"
@.str.20 = [38 x i8] c"Caught SIGILL: (privileged register)\0A\00"
@.str.21 = [36 x i8] c"Caught SIGILL: (coprocessor error)\0A\00"
@.str.22 = [39 x i8] c"Caught SIGILL: (internal stack error)\0A\00"
@.str.23 = [36 x i8] c"Caught SIGILL: Illegal Instruction\0A\00"
@.str.24 = [8 x i8] c"\0ASIGILL\00"
@.str.25 = [9 x i8] c"\0ASIGTERM\00"
@.str.26 = [23 x i8] c"\0AUnknown signal caught\00"
define void @sig_handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %4
switch i32 %8, label %95 [
i32 133, label %9
i32 131, label %12
i32 130, label %15
i32 129, label %18
i32 135, label %21
i32 134, label %24
i32 132, label %58
i32 128, label %92
]
9: ; preds = %3
%10 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 -2)
unreachable
12: ; preds = %3
%13 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @exit(i32 -3)
unreachable
15: ; preds = %3
%16 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @exit(i32 -4)
unreachable
18: ; preds = %3
%19 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @exit(i32 -5)
unreachable
21: ; preds = %3
%22 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 @exit(i32 -6)
unreachable
24: ; preds = %3
%25 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %25, i32 0, i32 0
%27 = load i32, i32* %26
switch i32 %27, label %52 [
i32 145, label %28
i32 144, label %31
i32 151, label %34
i32 149, label %37
i32 146, label %40
i32 148, label %43
i32 150, label %46
i32 147, label %49
]
28: ; preds = %24
%29 = load i32, i32* @stderr
%30 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %29)
br label %55
31: ; preds = %24
%32 = load i32, i32* @stderr
%33 = call i32 @fputs(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %32)
br label %55
34: ; preds = %24
%35 = load i32, i32* @stderr
%36 = call i32 @fputs(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0), i32 %35)
br label %55
37: ; preds = %24
%38 = load i32, i32* @stderr
%39 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), i32 %38)
br label %55
40: ; preds = %24
%41 = load i32, i32* @stderr
%42 = call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0), i32 %41)
br label %55
43: ; preds = %24
%44 = load i32, i32* @stderr
%45 = call i32 @fputs(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i32 %44)
br label %55
46: ; preds = %24
%47 = load i32, i32* @stderr
%48 = call i32 @fputs(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0), i32 %47)
br label %55
49: ; preds = %24
%50 = load i32, i32* @stderr
%51 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %50)
br label %55
52: ; preds = %24
%53 = load i32, i32* @stderr
%54 = call i32 @fputs(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %52, %49, %46, %43, %40, %37, %34, %31, %28
%56 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%57 = call i32 @exit(i32 -7)
unreachable
58: ; preds = %3
%59 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%60 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %59, i32 0, i32 0
%61 = load i32, i32* %60
switch i32 %61, label %86 [
i32 140, label %62
i32 139, label %65
i32 141, label %68
i32 138, label %71
i32 137, label %74
i32 136, label %77
i32 142, label %80
i32 143, label %83
]
62: ; preds = %58
%63 = load i32, i32* @stderr
%64 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %63)
br label %89
65: ; preds = %58
%66 = load i32, i32* @stderr
%67 = call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0), i32 %66)
br label %89
68: ; preds = %58
%69 = load i32, i32* @stderr
%70 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.17, i64 0, i64 0), i32 %69)
br label %89
71: ; preds = %58
%72 = load i32, i32* @stderr
%73 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i32 %72)
br label %89
74: ; preds = %58
%75 = load i32, i32* @stderr
%76 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0), i32 %75)
br label %89
77: ; preds = %58
%78 = load i32, i32* @stderr
%79 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.20, i64 0, i64 0), i32 %78)
br label %89
80: ; preds = %58
%81 = load i32, i32* @stderr
%82 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0), i32 %81)
br label %89
83: ; preds = %58
%84 = load i32, i32* @stderr
%85 = call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.22, i64 0, i64 0), i32 %84)
br label %89
86: ; preds = %58
%87 = load i32, i32* @stderr
%88 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.23, i64 0, i64 0), i32 %87)
br label %89
89: ; preds = %86, %83, %80, %77, %74, %71, %68, %65, %62
%90 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0))
%91 = call i32 @exit(i32 -8)
unreachable
92: ; preds = %3
%93 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.25, i64 0, i64 0))
%94 = call i32 @exit(i32 -9)
unreachable
95: ; preds = %3
%96 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
br label %97
97: ; preds = %95
%98 = call i32 (...) @posix_print_stack_trace()
%99 = call i32 @_Exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@.str = [8 x i8] c"\0ASIGHUP\00"
@.str.1 = [8 x i8] c"\0ASIGINT\00"
@.str.2 = [9 x i8] c"\0ASIGQUIT\00"
@.str.3 = [9 x i8] c"\0ASIGSEGV\00"
@.str.4 = [9 x i8] c"\0ASIGABRT\00"
@.str.5 = [41 x i8] c"Caught SIGFPE: (integer divide by zero)\0A\00"
@stderr = global i32 0
@.str.6 = [35 x i8] c"Caught SIGFPE: (integer overflow)\0A\00"
@.str.7 = [48 x i8] c"Caught SIGFPE: (floating-point divide by zero)\0A\00"
@.str.8 = [42 x i8] c"Caught SIGFPE: (floating-point overflow)\0A\00"
@.str.9 = [43 x i8] c"Caught SIGFPE: (floating-point underflow)\0A\00"
@.str.10 = [48 x i8] c"Caught SIGFPE: (floating-point inexact result)\0A\00"
@.str.11 = [51 x i8] c"Caught SIGFPE: (floating-point invalid operation)\0A\00"
@.str.12 = [41 x i8] c"Caught SIGFPE: (sudirript out of range)\0A\00"
@.str.13 = [37 x i8] c"Caught SIGFPE: Arithmetic Exception\0A\00"
@.str.14 = [8 x i8] c"\0ASIGFPE\00"
@.str.15 = [33 x i8] c"Caught SIGILL: (illegal opcode)\0A\00"
@.str.16 = [34 x i8] c"Caught SIGILL: (illegal operand)\0A\00"
@.str.17 = [42 x i8] c"Caught SIGILL: (illegal addressing mode)\0A\00"
@.str.18 = [31 x i8] c"Caught SIGILL: (illegal trap)\0A\00"
@.str.19 = [36 x i8] c"Caught SIGILL: (privileged opcode)\0A\00"
@.str.20 = [38 x i8] c"Caught SIGILL: (privileged register)\0A\00"
@.str.21 = [36 x i8] c"Caught SIGILL: (coprocessor error)\0A\00"
@.str.22 = [39 x i8] c"Caught SIGILL: (internal stack error)\0A\00"
@.str.23 = [36 x i8] c"Caught SIGILL: Illegal Instruction\0A\00"
@.str.24 = [8 x i8] c"\0ASIGILL\00"
@.str.25 = [9 x i8] c"\0ASIGTERM\00"
@.str.26 = [23 x i8] c"\0AUnknown signal caught\00"
@reltable.sig_handler = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([35 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([43 x i8]* @.str.9 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.12 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([48 x i8]* @.str.10 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @.str.8 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([51 x i8]* @.str.11 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([48 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler to i64)) to i32)]
@reltable.sig_handler.28 = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str.20 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.19 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.18 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.16 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.15 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @.str.17 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.21 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.22 to i64), i64 ptrtoint ([8 x i32]* @reltable.sig_handler.28 to i64)) to i32)]
define void @sig_handler(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
switch i32 %0, label %52 [
i32 133, label %4
i32 131, label %7
i32 130, label %10
i32 129, label %13
i32 135, label %16
i32 134, label %19
i32 132, label %34
i32 128, label %49
]
4: ; preds = %3
%5 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -2)
unreachable
7: ; preds = %3
%8 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -3)
unreachable
10: ; preds = %3
%11 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call i32 @exit(i32 -4)
unreachable
13: ; preds = %3
%14 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%15 = tail call i32 @exit(i32 -5)
unreachable
16: ; preds = %3
%17 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%18 = tail call i32 @exit(i32 -6)
unreachable
19: ; preds = %3
%20 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%21 = load i32, i32* %20
%22 = add i32 %21, -144
%23 = icmp ult i32 %22, 8
br i1 %23, label %24, label %28
24: ; preds = %19
%25 = sext i32 %22 to i64
%26 = shl i64 %25, 2
%27 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.sig_handler to i8*), i64 %26)
br label %28
28: ; preds = %19, %24
%29 = phi i8* [ %27, %24 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0), %19 ]
%30 = load i32, i32* @stderr
%31 = tail call i32 @fputs(i8* %29, i32 %30)
%32 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%33 = tail call i32 @exit(i32 -7)
unreachable
34: ; preds = %3
%35 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%36 = load i32, i32* %35
%37 = add i32 %36, -136
%38 = icmp ult i32 %37, 8
br i1 %38, label %39, label %43
39: ; preds = %34
%40 = sext i32 %37 to i64
%41 = shl i64 %40, 2
%42 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.sig_handler.28 to i8*), i64 %41)
br label %43
43: ; preds = %34, %39
%44 = phi i8* [ %42, %39 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.23, i64 0, i64 0), %34 ]
%45 = load i32, i32* @stderr
%46 = tail call i32 @fputs(i8* %44, i32 %45)
%47 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0))
%48 = tail call i32 @exit(i32 -8)
unreachable
49: ; preds = %3
%50 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.25, i64 0, i64 0))
%51 = tail call i32 @exit(i32 -9)
unreachable
52: ; preds = %3
%53 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
%54 = tail call i32 (...) @posix_print_stack_trace()
%55 = tail call i32 @_Exit(i32 1)
unreachable
}