#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 */

/* Variables and functions */
#define SIGABRT 153
#define SIGALRM 152
#define SIGBUS 151
#define SIGCONT 150
#define SIGFPE 149
#define SIGHUP 148
#define SIGILL 147
#define SIGINT 146
#define SIGIO 145
#define SIGPIPE 144
#define SIGPROF 143
#define SIGQUIT 142
#define SIGSEGV 141
#define SIGSYS 140
#define SIGTERM 139
#define SIGTRAP 138
#define SIGTSTP 137
#define SIGTTIN 136
#define SIGTTOU 135
#define SIGURG 134
#define SIGUSR1 133
#define SIGUSR2 132
#define SIGVTALRM 131
#define SIGWINCH 130
#define SIGXCPU 129
#define SIGXFSZ 128
int WTERMSIG(int);
int /*<<< orphan*/ printf(char *);
void genSignalMessage(int status) {
  printf("======= Error Detected =======\n");
  switch (WTERMSIG(status)) {
  case SIGHUP:
    printf("CHILD SIGNAL: SIGHUP\n");
    printf("\tReason:\tHangup detected on controlling terminal or death of "
           "controlling process\n");
    break;
  case SIGINT:
    printf("CHILD SIGNAL: SIGINT\n");
    printf("\tReason:\tInterrupt from keyboard\n");
    break;
  case SIGQUIT:
    printf("CHILD SIGNAL: SIGQUIT\n");
    printf("\tReason:\tQuit from keyboard\n");
    break;
  case SIGILL:
    printf("CHILD SIGNAL: SIGILL\n");
    printf("\tReason:\tQuit from keyboard\n");
    break;
  case SIGABRT:
    printf("CHILD SIGNAL: SIGABRT\n");
    printf("\tReason:\tAbort SIGNAL from abort(3)\n");
    break;
  case SIGFPE:
    printf("CHILD SIGNAL: SIGFPE\n");
    printf("\tReason:\tFloating point exception\n");
    break;
  case SIGSEGV:
    printf("CHILD SIGNAL: SIGSEGV\n");
    printf("\tReason:\tInvalid memory reference\n");
    break;
  case SIGPIPE:
    printf("CHILD SIGNAL: SIGPIPE\n");
    printf("\tReason:\tBroken pipe: write to pipe with no readers\n");
    break;
  case SIGALRM:
    printf("CHILD SIGNAL: SIGALRM\n");
    printf("\tReason:\tTimer SIGNAL from alarm(2)\n");
    break;
  case SIGTERM:
    printf("CHILD SIGNAL: SIGTERM\n");
    printf("\tReason:\tTermination SIGNAL\n");
    break;
  case SIGUSR1:
    printf("CHILD SIGNAL: SIGUSR1\n");
    printf("\tReason:\tUser-defined SIGNAL 1\n");
    break;
  case SIGUSR2:
    printf("CHILD SIGNAL: SIGUSR2\n");
    printf("\tReason:\tUser-defined SIGNAL 2\n");
    break;
  case SIGCONT:
    printf("CHILD SIGNAL: SIGCONT\n");
    printf("\tReason:\tContinue if stopped\n");
    break;
  case SIGTSTP:
    printf("CHILD SIGNAL: SIGTSTP\n");
    printf("\tReason:\tStop typed at terminal\n");
    break;
  case SIGTTIN:
    printf("CHILD SIGNAL: SIGTTIN\n");
    printf("\tReason:\tTerminal input for background process\n");
    break;
  case SIGTTOU:
    printf("CHILD SIGNAL: SIGTTOU\n");
    printf("\tReason:\tTerminal output for background process\n");
    break;
  case SIGBUS:
    printf("CHILD SIGNAL: SIGBUS\n");
    printf("\tReason:\tBus error (bad memory access)\n");
    break;
  case SIGPROF:
    printf("CHILD SIGNAL: SIGPROF\n");
    printf("\tReason:\tProfiling timer expired\n");
    break;
  case SIGSYS:
    printf("CHILD SIGNAL: SIGSYS\n");
    printf("\tReason:\tBad argument to routine (SVr4)\n");
    break;
  case SIGTRAP:
    printf("CHILD SIGNAL: SIGTRAP\n");
    printf("\tReason:\tTrace/breakpoint trap\n");
    break;
  case SIGURG:
    printf("CHILD SIGNAL: SIGURG\n");
    printf("\tReason:\tUrgent condition on socket (4.2BSD)\n");
    break;
  case SIGVTALRM:
    printf("CHILD SIGNAL: SIGVTALRM\n");
    printf("\tReason:\tVirtual alarm clock (4.2BSD)\n");
    break;
  case SIGXCPU:
    printf("CHILD SIGNAL: SIGXCPU\n");
    printf("\tReason:\tCPU time limit exceeded (4.2BSD)\n");
    break;
  case SIGXFSZ:
    printf("CHILD SIGNAL: SIGXFSZ\n");
    printf("\tReason:\tFile size limit exceeded (4.2BSD)\n");
    break;
  case SIGIO:
    printf("CHILD SIGNAL: SIGIO\n");
    printf("\tReason:\tI/O now possible (4.2BSD)\n");
    break;
  case SIGWINCH:
    printf("CHILD SIGNAL: SIGWINCH\n");
    printf("\tReason:\tWindow resize SIGNAL (4.3BSD, Sun)\n");
    break;
  default:
    printf("UNKNOWN SIGNAL ERROR\n");
    break;
  }
  printf("Child process execution FAILED\n");
}


x86 assembly (clang, -O0):
<genSignalMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xf36(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <WTERMSIG@plt>
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x19,%eax
ja     1457 <genSignalMessage+0x337>
mov    -0x10(%rbp),%rax
lea    0xea4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf1c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xf67(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xf82(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8d(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xf99(%rip),%rdi
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xf92(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xfb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbb(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xfcd(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd8(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0xfea(%rip),%rdi
call   1030 <printf@plt>
lea    0xff5(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1019(%rip),%rdi
call   1030 <printf@plt>
lea    0x1024(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1038(%rip),%rdi
call   1030 <printf@plt>
lea    0x1043(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x104f(%rip),%rdi
call   1030 <printf@plt>
lea    0x105a(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1069(%rip),%rdi
call   1030 <printf@plt>
lea    0x1074(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1083(%rip),%rdi
call   1030 <printf@plt>
lea    0x108e(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x109b(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a6(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x10b6(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c1(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x10e0(%rip),%rdi
call   1030 <printf@plt>
lea    0x10eb(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x110b(%rip),%rdi
call   1030 <printf@plt>
lea    0x1115(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x112c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1137(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1148(%rip),%rdi
call   1030 <printf@plt>
lea    0x1152(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x116a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1175(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1184(%rip),%rdi
call   1030 <printf@plt>
lea    0x118e(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x11ab(%rip),%rdi
call   1030 <printf@plt>
lea    0x11b8(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x11ce(%rip),%rdi
call   1030 <printf@plt>
lea    0x11d9(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x11f3(%rip),%rdi
call   1030 <printf@plt>
lea    0x11fe(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1219(%rip),%rdi
call   1030 <printf@plt>
lea    0x1222(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x1235(%rip),%rdi
call   1030 <printf@plt>
lea    0x1241(%rip),%rdi
call   1030 <printf@plt>
jmp    1463 <genSignalMessage+0x343>
lea    0x125d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1267(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genSignalMessage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <WTERMSIG@plt>
add    $0xffffff80,%eax
cmp    $0x19,%eax
ja     1163 <genSignalMessage+0x43>
cltq
lea    0x150d(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
lea    0x1567(%rip),%rcx
movslq (%rcx,%rax,4),%rbx
add    %rcx,%rbx
call   1030 <puts@plt>
jmp    116a <genSignalMessage+0x4a>
lea    0x14d4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"======= Error Detected =======\0A\00"
@.str.1 = [22 x i8] c"CHILD SIGNAL: SIGHUP\0A\00"
@.str.2 = [82 x i8] c"\09Reason:\09Hangup detected on controlling terminal or death of controlling process\0A\00"
@.str.3 = [22 x i8] c"CHILD SIGNAL: SIGINT\0A\00"
@.str.4 = [34 x i8] c"\09Reason:\09Interrupt from keyboard\0A\00"
@.str.5 = [23 x i8] c"CHILD SIGNAL: SIGQUIT\0A\00"
@.str.6 = [29 x i8] c"\09Reason:\09Quit from keyboard\0A\00"
@.str.7 = [22 x i8] c"CHILD SIGNAL: SIGILL\0A\00"
@.str.8 = [23 x i8] c"CHILD SIGNAL: SIGABRT\0A\00"
@.str.9 = [37 x i8] c"\09Reason:\09Abort SIGNAL from abort(3)\0A\00"
@.str.10 = [22 x i8] c"CHILD SIGNAL: SIGFPE\0A\00"
@.str.11 = [35 x i8] c"\09Reason:\09Floating point exception\0A\00"
@.str.12 = [23 x i8] c"CHILD SIGNAL: SIGSEGV\0A\00"
@.str.13 = [35 x i8] c"\09Reason:\09Invalid memory reference\0A\00"
@.str.14 = [23 x i8] c"CHILD SIGNAL: SIGPIPE\0A\00"
@.str.15 = [53 x i8] c"\09Reason:\09Broken pipe: write to pipe with no readers\0A\00"
@.str.16 = [23 x i8] c"CHILD SIGNAL: SIGALRM\0A\00"
@.str.17 = [37 x i8] c"\09Reason:\09Timer SIGNAL from alarm(2)\0A\00"
@.str.18 = [23 x i8] c"CHILD SIGNAL: SIGTERM\0A\00"
@.str.19 = [29 x i8] c"\09Reason:\09Termination SIGNAL\0A\00"
@.str.20 = [23 x i8] c"CHILD SIGNAL: SIGUSR1\0A\00"
@.str.21 = [32 x i8] c"\09Reason:\09User-defined SIGNAL 1\0A\00"
@.str.22 = [23 x i8] c"CHILD SIGNAL: SIGUSR2\0A\00"
@.str.23 = [32 x i8] c"\09Reason:\09User-defined SIGNAL 2\0A\00"
@.str.24 = [23 x i8] c"CHILD SIGNAL: SIGCONT\0A\00"
@.str.25 = [30 x i8] c"\09Reason:\09Continue if stopped\0A\00"
@.str.26 = [23 x i8] c"CHILD SIGNAL: SIGTSTP\0A\00"
@.str.27 = [33 x i8] c"\09Reason:\09Stop typed at terminal\0A\00"
@.str.28 = [23 x i8] c"CHILD SIGNAL: SIGTTIN\0A\00"
@.str.29 = [48 x i8] c"\09Reason:\09Terminal input for background process\0A\00"
@.str.30 = [23 x i8] c"CHILD SIGNAL: SIGTTOU\0A\00"
@.str.31 = [49 x i8] c"\09Reason:\09Terminal output for background process\0A\00"
@.str.32 = [22 x i8] c"CHILD SIGNAL: SIGBUS\0A\00"
@.str.33 = [40 x i8] c"\09Reason:\09Bus error (bad memory access)\0A\00"
@.str.34 = [23 x i8] c"CHILD SIGNAL: SIGPROF\0A\00"
@.str.35 = [34 x i8] c"\09Reason:\09Profiling timer expired\0A\00"
@.str.36 = [22 x i8] c"CHILD SIGNAL: SIGSYS\0A\00"
@.str.37 = [41 x i8] c"\09Reason:\09Bad argument to routine (SVr4)\0A\00"
@.str.38 = [23 x i8] c"CHILD SIGNAL: SIGTRAP\0A\00"
@.str.39 = [32 x i8] c"\09Reason:\09Trace/breakpoint trap\0A\00"
@.str.40 = [22 x i8] c"CHILD SIGNAL: SIGURG\0A\00"
@.str.41 = [46 x i8] c"\09Reason:\09Urgent condition on socket (4.2BSD)\0A\00"
@.str.42 = [25 x i8] c"CHILD SIGNAL: SIGVTALRM\0A\00"
@.str.43 = [39 x i8] c"\09Reason:\09Virtual alarm clock (4.2BSD)\0A\00"
@.str.44 = [23 x i8] c"CHILD SIGNAL: SIGXCPU\0A\00"
@.str.45 = [43 x i8] c"\09Reason:\09CPU time limit exceeded (4.2BSD)\0A\00"
@.str.46 = [23 x i8] c"CHILD SIGNAL: SIGXFSZ\0A\00"
@.str.47 = [44 x i8] c"\09Reason:\09File size limit exceeded (4.2BSD)\0A\00"
@.str.48 = [21 x i8] c"CHILD SIGNAL: SIGIO\0A\00"
@.str.49 = [36 x i8] c"\09Reason:\09I/O now possible (4.2BSD)\0A\00"
@.str.50 = [24 x i8] c"CHILD SIGNAL: SIGWINCH\0A\00"
@.str.51 = [45 x i8] c"\09Reason:\09Window resize SIGNAL (4.3BSD, Sun)\0A\00"
@.str.52 = [22 x i8] c"UNKNOWN SIGNAL ERROR\0A\00"
@.str.53 = [32 x i8] c"Child process execution FAILED\0A\00"
define void @genSignalMessage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @WTERMSIG(i32 %4)
switch i32 %5, label %84 [
i32 148, label %6
i32 146, label %9
i32 142, label %12
i32 147, label %15
i32 153, label %18
i32 149, label %21
i32 141, label %24
i32 144, label %27
i32 152, label %30
i32 139, label %33
i32 133, label %36
i32 132, label %39
i32 150, label %42
i32 137, label %45
i32 136, label %48
i32 135, label %51
i32 151, label %54
i32 143, label %57
i32 140, label %60
i32 138, label %63
i32 134, label %66
i32 131, label %69
i32 129, label %72
i32 128, label %75
i32 145, label %78
i32 130, label %81
]
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
br label %86
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %86
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
br label %86
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
br label %86
18: ; preds = %1
%19 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
br label %86
21: ; preds = %1
%22 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %86
24: ; preds = %1
%25 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0))
br label %86
27: ; preds = %1
%28 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0))
br label %86
30: ; preds = %1
%31 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.17, i64 0, i64 0))
br label %86
33: ; preds = %1
%34 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
br label %86
36: ; preds = %1
%37 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0))
br label %86
39: ; preds = %1
%40 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0))
%41 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.23, i64 0, i64 0))
br label %86
42: ; preds = %1
%43 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.25, i64 0, i64 0))
br label %86
45: ; preds = %1
%46 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
%47 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0))
br label %86
48: ; preds = %1
%49 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0))
%50 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.29, i64 0, i64 0))
br label %86
51: ; preds = %1
%52 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0))
%53 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.31, i64 0, i64 0))
br label %86
54: ; preds = %1
%55 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))
%56 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.33, i64 0, i64 0))
br label %86
57: ; preds = %1
%58 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.34, i64 0, i64 0))
%59 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.35, i64 0, i64 0))
br label %86
60: ; preds = %1
%61 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.36, i64 0, i64 0))
%62 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.37, i64 0, i64 0))
br label %86
63: ; preds = %1
%64 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.38, i64 0, i64 0))
%65 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.39, i64 0, i64 0))
br label %86
66: ; preds = %1
%67 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.40, i64 0, i64 0))
%68 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.41, i64 0, i64 0))
br label %86
69: ; preds = %1
%70 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.42, i64 0, i64 0))
%71 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.43, i64 0, i64 0))
br label %86
72: ; preds = %1
%73 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.44, i64 0, i64 0))
%74 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.45, i64 0, i64 0))
br label %86
75: ; preds = %1
%76 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.46, i64 0, i64 0))
%77 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.47, i64 0, i64 0))
br label %86
78: ; preds = %1
%79 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.48, i64 0, i64 0))
%80 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.49, i64 0, i64 0))
br label %86
81: ; preds = %1
%82 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.50, i64 0, i64 0))
%83 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.51, i64 0, i64 0))
br label %86
84: ; preds = %1
%85 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.52, i64 0, i64 0))
br label %86
86: ; preds = %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
%87 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.53, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"======= Error Detected =======\00"
@str.54 = [23 x i8] c"CHILD SIGNAL: SIGWINCH\00"
@str.55 = [44 x i8] c"\09Reason:\09Window resize SIGNAL (4.3BSD, Sun)\00"
@str.56 = [31 x i8] c"Child process execution FAILED\00"
@str.57 = [20 x i8] c"CHILD SIGNAL: SIGIO\00"
@str.58 = [35 x i8] c"\09Reason:\09I/O now possible (4.2BSD)\00"
@str.59 = [22 x i8] c"CHILD SIGNAL: SIGXFSZ\00"
@str.60 = [43 x i8] c"\09Reason:\09File size limit exceeded (4.2BSD)\00"
@str.61 = [22 x i8] c"CHILD SIGNAL: SIGXCPU\00"
@str.62 = [42 x i8] c"\09Reason:\09CPU time limit exceeded (4.2BSD)\00"
@str.63 = [24 x i8] c"CHILD SIGNAL: SIGVTALRM\00"
@str.64 = [38 x i8] c"\09Reason:\09Virtual alarm clock (4.2BSD)\00"
@str.65 = [21 x i8] c"CHILD SIGNAL: SIGURG\00"
@str.66 = [45 x i8] c"\09Reason:\09Urgent condition on socket (4.2BSD)\00"
@str.67 = [22 x i8] c"CHILD SIGNAL: SIGTRAP\00"
@str.68 = [31 x i8] c"\09Reason:\09Trace/breakpoint trap\00"
@str.69 = [21 x i8] c"CHILD SIGNAL: SIGSYS\00"
@str.70 = [40 x i8] c"\09Reason:\09Bad argument to routine (SVr4)\00"
@str.71 = [22 x i8] c"CHILD SIGNAL: SIGPROF\00"
@str.72 = [33 x i8] c"\09Reason:\09Profiling timer expired\00"
@str.73 = [21 x i8] c"CHILD SIGNAL: SIGBUS\00"
@str.74 = [39 x i8] c"\09Reason:\09Bus error (bad memory access)\00"
@str.75 = [22 x i8] c"CHILD SIGNAL: SIGTTOU\00"
@str.76 = [48 x i8] c"\09Reason:\09Terminal output for background process\00"
@str.77 = [22 x i8] c"CHILD SIGNAL: SIGTTIN\00"
@str.78 = [47 x i8] c"\09Reason:\09Terminal input for background process\00"
@str.79 = [22 x i8] c"CHILD SIGNAL: SIGTSTP\00"
@str.80 = [32 x i8] c"\09Reason:\09Stop typed at terminal\00"
@str.81 = [22 x i8] c"CHILD SIGNAL: SIGCONT\00"
@str.82 = [29 x i8] c"\09Reason:\09Continue if stopped\00"
@str.83 = [22 x i8] c"CHILD SIGNAL: SIGUSR2\00"
@str.84 = [31 x i8] c"\09Reason:\09User-defined SIGNAL 2\00"
@str.85 = [22 x i8] c"CHILD SIGNAL: SIGUSR1\00"
@str.86 = [31 x i8] c"\09Reason:\09User-defined SIGNAL 1\00"
@str.87 = [22 x i8] c"CHILD SIGNAL: SIGTERM\00"
@str.88 = [28 x i8] c"\09Reason:\09Termination SIGNAL\00"
@str.89 = [22 x i8] c"CHILD SIGNAL: SIGALRM\00"
@str.90 = [36 x i8] c"\09Reason:\09Timer SIGNAL from alarm(2)\00"
@str.91 = [22 x i8] c"CHILD SIGNAL: SIGPIPE\00"
@str.92 = [52 x i8] c"\09Reason:\09Broken pipe: write to pipe with no readers\00"
@str.93 = [22 x i8] c"CHILD SIGNAL: SIGSEGV\00"
@str.94 = [34 x i8] c"\09Reason:\09Invalid memory reference\00"
@str.95 = [21 x i8] c"CHILD SIGNAL: SIGFPE\00"
@str.96 = [34 x i8] c"\09Reason:\09Floating point exception\00"
@str.97 = [22 x i8] c"CHILD SIGNAL: SIGABRT\00"
@str.98 = [36 x i8] c"\09Reason:\09Abort SIGNAL from abort(3)\00"
@str.99 = [21 x i8] c"CHILD SIGNAL: SIGILL\00"
@str.101 = [22 x i8] c"CHILD SIGNAL: SIGQUIT\00"
@str.102 = [28 x i8] c"\09Reason:\09Quit from keyboard\00"
@str.103 = [21 x i8] c"CHILD SIGNAL: SIGINT\00"
@str.104 = [33 x i8] c"\09Reason:\09Interrupt from keyboard\00"
@str.105 = [21 x i8] c"CHILD SIGNAL: SIGHUP\00"
@str.106 = [81 x i8] c"\09Reason:\09Hangup detected on controlling terminal or death of controlling process\00"
@str.107 = [21 x i8] c"UNKNOWN SIGNAL ERROR\00"
@reltable.genSignalMessage = [26 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.59 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.61 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @str.54 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @str.63 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.83 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.85 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.65 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.75 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.77 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.79 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.67 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.87 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.69 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.93 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.101 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.71 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.91 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.57 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.103 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.99 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.105 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.95 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.81 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @str.73 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.89 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @str.97 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage to i64)) to i32)]
@reltable.genSignalMessage.109 = [26 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([43 x i8]* @str.60 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @str.62 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([44 x i8]* @str.55 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @str.64 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @str.84 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @str.86 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([45 x i8]* @str.66 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([48 x i8]* @str.76 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([47 x i8]* @str.78 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([32 x i8]* @str.80 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @str.68 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @str.88 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([40 x i8]* @str.70 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @str.94 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @str.102 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @str.72 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([52 x i8]* @str.92 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([35 x i8]* @str.58 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @str.104 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @str.102 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([81 x i8]* @str.106 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @str.96 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @str.82 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @str.74 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @str.90 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @str.98 to i64), i64 ptrtoint ([26 x i32]* @reltable.genSignalMessage.109 to i64)) to i32)]
define void @genSignalMessage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @WTERMSIG(i32 %0)
%4 = add i32 %3, -128
%5 = icmp ult i32 %4, 26
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([26 x i32]* @reltable.genSignalMessage to i8*), i64 %8)
%10 = sext i32 %4 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([26 x i32]* @reltable.genSignalMessage.109 to i8*), i64 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) %9)
br label %14
14: ; preds = %1, %6
%15 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.107, i64 0, i64 0), %1 ], [ %12, %6 ]
%16 = tail call i32 @puts(i8* dereferenceable(1) %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.56, i64 0, i64 0))
ret void
}