#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 */
int /*<<< orphan*/ Match_failure(char *, int);
#define SIGABRT 147
#define SIGALRM 146
#define SIGBUS 145
#define SIGCHLD 144
#define SIGCONT 143
#define SIGFPE 142
#define SIGHUP 141
#define SIGILL 140
#define SIGINT 139
#define SIGIO 138
#define SIGKILL 137
#define SIGPIPE 136
#define SIGQUIT 135
#define SIGSEGV 134
#define SIGSTOP 133
#define SIGTERM 132
#define SIGTRAP 131
#define SIGUSR1 130
#define SIGUSR2 129
#define SIGWINCH 128
int /*<<< orphan*/ Warning(char *, int);
const char *Signo_to_string(int signo) {
  switch (signo) {
  case 0:
    return " ( NULL )";
  case SIGHUP:
    return "SIGHUP";
  case SIGINT:
    return "SIGINT";
  case SIGQUIT:
    return "SIGQUIT";
  case SIGILL:
    return "SIGILL";
  case SIGTRAP:
    return "SIGTRAP";
  case SIGABRT:
    return "SIGABRT";
  case SIGBUS:
    return "SIGBUS";
  case SIGFPE:
    return "SIGFPE";
  case SIGKILL:
    return "SIGKILL";
  case SIGUSR1:
    return "SIGUSR1";
  case SIGSEGV:
    return "SIGSEGV";
  case SIGUSR2:
    return "SIGUSR2";
  case SIGPIPE:
    return "SIGPIPE";
  case SIGALRM:
    return "SIGALRM";
  case SIGTERM:
    return "SIGTERM";
  case SIGCHLD:
    return "SIGCHLD";
  case SIGCONT:
    return "SIGCONT";
  case SIGSTOP:
    return "SIGSTOP";
  case SIGWINCH:
    return "SIGWINCH";
  case SIGIO:
    return "SIGIO";
  default:
    Warning("Signo_to_string: signo=%d does not match\n", signo);
    return "UNKNOWN_SIGNAL";
  }
  Match_failure("Signo_to_string: signo=%d\n", signo);
  return "";
}


x86 assembly (clang, -O0):
<Signo_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x93,%rax
ja     1292 <Signo_to_string+0x182>
mov    -0x18(%rbp),%rax
lea    0xec7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1107(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x1101(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10f8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10ef(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10e7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10de(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10d6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10ce(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10c5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10bc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10ac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x10a4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x109c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x1094(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x108c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x1084(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x107c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x1074(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x106c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
lea    0x1065(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ac <Signo_to_string+0x19c>
mov    -0xc(%rbp),%esi
lea    0x1058(%rip),%rdi
call   1030 <Warning@plt>
lea    0x1076(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Signo_to_string>:
push   %rax
mov    %edi,%esi
cmp    $0x93,%edi
ja     113d <Signo_to_string+0x2d>
lea    0x112e(%rip),%rax
mov    %esi,%ecx
lea    0xed5(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x11aa(%rip),%rax
pop    %rcx
ret
lea    0x11b0(%rip),%rdi
call   1030 <Warning@plt>
lea    0x11ce(%rip),%rax
pop    %rcx
ret
lea    0x1154(%rip),%rax
pop    %rcx
ret
lea    0x113b(%rip),%rax
pop    %rcx
ret
lea    0x110c(%rip),%rax
pop    %rcx
ret
lea    0x1151(%rip),%rax
pop    %rcx
ret
lea    0x1160(%rip),%rax
pop    %rcx
ret
lea    0x111f(%rip),%rax
pop    %rcx
ret
lea    0x10d9(%rip),%rax
pop    %rcx
ret
lea    0x111d(%rip),%rax
pop    %rcx
ret
lea    0x10f4(%rip),%rax
pop    %rcx
ret
lea    0x1144(%rip),%rax
pop    %rcx
ret
lea    0x10ae(%rip),%rax
pop    %rcx
ret
lea    0x10b4(%rip),%rax
pop    %rcx
ret
lea    0x1095(%rip),%rax
pop    %rcx
ret
lea    0x10c0(%rip),%rax
pop    %rcx
ret
lea    0x10fe(%rip),%rax
pop    %rcx
ret
lea    0x10ed(%rip),%rax
pop    %rcx
ret
lea    0x109e(%rip),%rax
pop    %rcx
ret
lea    0x10cb(%rip),%rax
pop    %rcx
ret
lea    0x1084(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c" ( NULL )\00"
@.str.1 = [7 x i8] c"SIGHUP\00"
@.str.2 = [7 x i8] c"SIGINT\00"
@.str.3 = [8 x i8] c"SIGQUIT\00"
@.str.4 = [7 x i8] c"SIGILL\00"
@.str.5 = [8 x i8] c"SIGTRAP\00"
@.str.6 = [8 x i8] c"SIGABRT\00"
@.str.7 = [7 x i8] c"SIGBUS\00"
@.str.8 = [7 x i8] c"SIGFPE\00"
@.str.9 = [8 x i8] c"SIGKILL\00"
@.str.10 = [8 x i8] c"SIGUSR1\00"
@.str.11 = [8 x i8] c"SIGSEGV\00"
@.str.12 = [8 x i8] c"SIGUSR2\00"
@.str.13 = [8 x i8] c"SIGPIPE\00"
@.str.14 = [8 x i8] c"SIGALRM\00"
@.str.15 = [8 x i8] c"SIGTERM\00"
@.str.16 = [8 x i8] c"SIGCHLD\00"
@.str.17 = [8 x i8] c"SIGCONT\00"
@.str.18 = [8 x i8] c"SIGSTOP\00"
@.str.19 = [9 x i8] c"SIGWINCH\00"
@.str.20 = [6 x i8] c"SIGIO\00"
@.str.21 = [42 x i8] c"Signo_to_string: signo=%d does not match\0A\00"
@.str.22 = [15 x i8] c"UNKNOWN_SIGNAL\00"
define i8* @Signo_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %26 [
i32 0, label %5
i32 141, label %6
i32 139, label %7
i32 135, label %8
i32 140, label %9
i32 131, label %10
i32 147, label %11
i32 145, label %12
i32 142, label %13
i32 137, label %14
i32 130, label %15
i32 134, label %16
i32 129, label %17
i32 136, label %18
i32 146, label %19
i32 132, label %20
i32 144, label %21
i32 143, label %22
i32 133, label %23
i32 128, label %24
i32 138, label %25
]
5: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %29
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %29
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %29
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %29
9: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %29
10: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %29
11: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %29
12: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %29
13: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %29
14: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %29
15: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %29
16: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %29
17: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %29
18: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %29
19: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %29
20: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %29
21: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %29
22: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %29
23: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %29
24: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %29
25: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %29
26: ; preds = %1
%27 = load i32, i32* %3
%28 = call i32 @Warning(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0), i32 %27)
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %29
29: ; preds = %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
@.str = [10 x i8] c" ( NULL )\00"
@.str.1 = [7 x i8] c"SIGHUP\00"
@.str.2 = [7 x i8] c"SIGINT\00"
@.str.3 = [8 x i8] c"SIGQUIT\00"
@.str.4 = [7 x i8] c"SIGILL\00"
@.str.5 = [8 x i8] c"SIGTRAP\00"
@.str.6 = [8 x i8] c"SIGABRT\00"
@.str.7 = [7 x i8] c"SIGBUS\00"
@.str.8 = [7 x i8] c"SIGFPE\00"
@.str.9 = [8 x i8] c"SIGKILL\00"
@.str.10 = [8 x i8] c"SIGUSR1\00"
@.str.11 = [8 x i8] c"SIGSEGV\00"
@.str.12 = [8 x i8] c"SIGUSR2\00"
@.str.13 = [8 x i8] c"SIGPIPE\00"
@.str.14 = [8 x i8] c"SIGALRM\00"
@.str.15 = [8 x i8] c"SIGTERM\00"
@.str.16 = [8 x i8] c"SIGCHLD\00"
@.str.17 = [8 x i8] c"SIGCONT\00"
@.str.18 = [8 x i8] c"SIGSTOP\00"
@.str.19 = [9 x i8] c"SIGWINCH\00"
@.str.20 = [6 x i8] c"SIGIO\00"
@.str.21 = [42 x i8] c"Signo_to_string: signo=%d does not match\0A\00"
@.str.22 = [15 x i8] c"UNKNOWN_SIGNAL\00"
define i8* @Signo_to_string(i32 %0) {
switch i32 %0, label %22 [
i32 0, label %24
i32 141, label %2
i32 139, label %3
i32 135, label %4
i32 140, label %5
i32 131, label %6
i32 147, label %7
i32 145, label %8
i32 142, label %9
i32 137, label %10
i32 130, label %11
i32 134, label %12
i32 129, label %13
i32 136, label %14
i32 146, label %15
i32 132, label %16
i32 144, label %17
i32 143, label %18
i32 133, label %19
i32 128, label %20
i32 138, label %21
]
2: ; preds = %1
br label %24
3: ; preds = %1
br label %24
4: ; preds = %1
br label %24
5: ; preds = %1
br label %24
6: ; preds = %1
br label %24
7: ; preds = %1
br label %24
8: ; preds = %1
br label %24
9: ; preds = %1
br label %24
10: ; preds = %1
br label %24
11: ; preds = %1
br label %24
12: ; preds = %1
br label %24
13: ; preds = %1
br label %24
14: ; preds = %1
br label %24
15: ; preds = %1
br label %24
16: ; preds = %1
br label %24
17: ; preds = %1
br label %24
18: ; preds = %1
br label %24
19: ; preds = %1
br label %24
20: ; preds = %1
br label %24
21: ; preds = %1
br label %24
22: ; preds = %1
%23 = tail call i32 @Warning(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0), i32 %0)
br label %24
24: ; preds = %1, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%25 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), %22 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %25
}