#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 SIGABRT;
int SIGALRM;
int SIGBUS;
int SIGCHLD;
int SIGCONT;
int SIGFPE;
int SIGHUP;
int SIGILL;
int SIGINT;
int SIGIO;
int SIGKILL;
int SIGPIPE;
int SIGPROF;
int SIGQUIT;
int SIGSEGV;
int SIGSTOP;
int SIGSYS;
int SIGTERM;
int SIGTRAP;
int SIGTSTP;
int SIGTTIN;
int SIGTTOU;
int SIGURG;
int SIGUSR1;
int SIGUSR2;
int SIGVTALRM;
int SIGWINCH;
int SIGXCPU;
int SIGXFSZ;
int signum_linux_to_bsd(int signum) {
  switch (signum) {
  case 1:
    return SIGHUP;
  case 2:
    return SIGINT;
  case 3:
    return SIGQUIT;
  case 4:
    return SIGILL;
  case 5:
    return SIGTRAP;
  case 6:
    return SIGABRT;
  case 8:
    return SIGFPE;
  case 9:
    return SIGKILL;
  case 7:
    return SIGBUS;
  case 11:
    return SIGSEGV;
  case 31:
    return SIGSYS;
  case 13:
    return SIGPIPE;
  case 14:
    return SIGALRM;
  case 15:
    return SIGTERM;
  case 23:
    return SIGURG;
  case 19:
    return SIGSTOP;
  case 20:
    return SIGTSTP;
  case 18:
    return SIGCONT;
  case 17:
    return SIGCHLD;
  case 21:
    return SIGTTIN;
  case 22:
    return SIGTTOU;
  case 29:
    return SIGIO;
  case 24:
    return SIGXCPU;
  case 25:
    return SIGXFSZ;
  case 26:
    return SIGVTALRM;
  case 27:
    return SIGPROF;
  case 28:
    return SIGWINCH;
  case 10:
    return SIGUSR1;
  case 12:
    return SIGUSR2;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<signum_linux_to_bsd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x1e,%eax
ja     131d <signum_linux_to_bsd+0x21d>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2e47(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2df6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d72(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2e29(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2df0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2db5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d0b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2cca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d31(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d70(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d17(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2cee(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2d4d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2c7c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2c7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2cca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2c81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2cb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2c7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2cce(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
mov    0x2c35(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1324 <signum_linux_to_bsd+0x224>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_linux_to_bsd>:
xor    %eax,%eax
add    $0xffffffff,%edi
cmp    $0x1e,%edi
ja     124d <signum_linux_to_bsd+0x14d>
lea    0xeeb(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    0x2ecb(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e7f(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e63(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e17(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2db3(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2daf(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e7b(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e17(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d9b(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e3f(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2e23(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d9f(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d8b(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2df7(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2ddb(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2daa(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2de9(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d18(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d87(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d6e(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2dd5(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d24(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d13(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d6a(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d29(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d68(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2d37(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2cd6(%rip),%rax
jmp    124b <signum_linux_to_bsd+0x14b>
mov    0x2ced(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SIGHUP = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGILL = global i32 0
@SIGTRAP = global i32 0
@SIGABRT = global i32 0
@SIGFPE = global i32 0
@SIGKILL = global i32 0
@SIGBUS = global i32 0
@SIGSEGV = global i32 0
@SIGSYS = global i32 0
@SIGPIPE = global i32 0
@SIGALRM = global i32 0
@SIGTERM = global i32 0
@SIGURG = global i32 0
@SIGSTOP = global i32 0
@SIGTSTP = global i32 0
@SIGCONT = global i32 0
@SIGCHLD = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGIO = global i32 0
@SIGXCPU = global i32 0
@SIGXFSZ = global i32 0
@SIGVTALRM = global i32 0
@SIGPROF = global i32 0
@SIGWINCH = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define i32 @signum_linux_to_bsd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %63 [
i32 1, label %5
i32 2, label %7
i32 3, label %9
i32 4, label %11
i32 5, label %13
i32 6, label %15
i32 8, label %17
i32 9, label %19
i32 7, label %21
i32 11, label %23
i32 31, label %25
i32 13, label %27
i32 14, label %29
i32 15, label %31
i32 23, label %33
i32 19, label %35
i32 20, label %37
i32 18, label %39
i32 17, label %41
i32 21, label %43
i32 22, label %45
i32 29, label %47
i32 24, label %49
i32 25, label %51
i32 26, label %53
i32 27, label %55
i32 28, label %57
i32 10, label %59
i32 12, label %61
]
5: ; preds = %1
%6 = load i32, i32* @SIGHUP
store i32 %6, i32* %2
br label %64
7: ; preds = %1
%8 = load i32, i32* @SIGINT
store i32 %8, i32* %2
br label %64
9: ; preds = %1
%10 = load i32, i32* @SIGQUIT
store i32 %10, i32* %2
br label %64
11: ; preds = %1
%12 = load i32, i32* @SIGILL
store i32 %12, i32* %2
br label %64
13: ; preds = %1
%14 = load i32, i32* @SIGTRAP
store i32 %14, i32* %2
br label %64
15: ; preds = %1
%16 = load i32, i32* @SIGABRT
store i32 %16, i32* %2
br label %64
17: ; preds = %1
%18 = load i32, i32* @SIGFPE
store i32 %18, i32* %2
br label %64
19: ; preds = %1
%20 = load i32, i32* @SIGKILL
store i32 %20, i32* %2
br label %64
21: ; preds = %1
%22 = load i32, i32* @SIGBUS
store i32 %22, i32* %2
br label %64
23: ; preds = %1
%24 = load i32, i32* @SIGSEGV
store i32 %24, i32* %2
br label %64
25: ; preds = %1
%26 = load i32, i32* @SIGSYS
store i32 %26, i32* %2
br label %64
27: ; preds = %1
%28 = load i32, i32* @SIGPIPE
store i32 %28, i32* %2
br label %64
29: ; preds = %1
%30 = load i32, i32* @SIGALRM
store i32 %30, i32* %2
br label %64
31: ; preds = %1
%32 = load i32, i32* @SIGTERM
store i32 %32, i32* %2
br label %64
33: ; preds = %1
%34 = load i32, i32* @SIGURG
store i32 %34, i32* %2
br label %64
35: ; preds = %1
%36 = load i32, i32* @SIGSTOP
store i32 %36, i32* %2
br label %64
37: ; preds = %1
%38 = load i32, i32* @SIGTSTP
store i32 %38, i32* %2
br label %64
39: ; preds = %1
%40 = load i32, i32* @SIGCONT
store i32 %40, i32* %2
br label %64
41: ; preds = %1
%42 = load i32, i32* @SIGCHLD
store i32 %42, i32* %2
br label %64
43: ; preds = %1
%44 = load i32, i32* @SIGTTIN
store i32 %44, i32* %2
br label %64
45: ; preds = %1
%46 = load i32, i32* @SIGTTOU
store i32 %46, i32* %2
br label %64
47: ; preds = %1
%48 = load i32, i32* @SIGIO
store i32 %48, i32* %2
br label %64
49: ; preds = %1
%50 = load i32, i32* @SIGXCPU
store i32 %50, i32* %2
br label %64
51: ; preds = %1
%52 = load i32, i32* @SIGXFSZ
store i32 %52, i32* %2
br label %64
53: ; preds = %1
%54 = load i32, i32* @SIGVTALRM
store i32 %54, i32* %2
br label %64
55: ; preds = %1
%56 = load i32, i32* @SIGPROF
store i32 %56, i32* %2
br label %64
57: ; preds = %1
%58 = load i32, i32* @SIGWINCH
store i32 %58, i32* %2
br label %64
59: ; preds = %1
%60 = load i32, i32* @SIGUSR1
store i32 %60, i32* %2
br label %64
61: ; preds = %1
%62 = load i32, i32* @SIGUSR2
store i32 %62, i32* %2
br label %64
63: ; preds = %1
store i32 0, i32* %2
br label %64
64: ; preds = %63, %61, %59, %57, %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%65 = load i32, i32* %2
ret i32 %65
}

LLVM IR (-O2):
@SIGHUP = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGILL = global i32 0
@SIGTRAP = global i32 0
@SIGABRT = global i32 0
@SIGFPE = global i32 0
@SIGKILL = global i32 0
@SIGBUS = global i32 0
@SIGSEGV = global i32 0
@SIGSYS = global i32 0
@SIGPIPE = global i32 0
@SIGALRM = global i32 0
@SIGTERM = global i32 0
@SIGURG = global i32 0
@SIGSTOP = global i32 0
@SIGTSTP = global i32 0
@SIGCONT = global i32 0
@SIGCHLD = global i32 0
@SIGTTIN = global i32 0
@SIGTTOU = global i32 0
@SIGIO = global i32 0
@SIGXCPU = global i32 0
@SIGXFSZ = global i32 0
@SIGVTALRM = global i32 0
@SIGPROF = global i32 0
@SIGWINCH = global i32 0
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define i32 @signum_linux_to_bsd(i32 %0) {
switch i32 %0, label %60 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
i32 6, label %12
i32 8, label %14
i32 9, label %16
i32 7, label %18
i32 11, label %20
i32 31, label %22
i32 13, label %24
i32 14, label %26
i32 15, label %28
i32 23, label %30
i32 19, label %32
i32 20, label %34
i32 18, label %36
i32 17, label %38
i32 21, label %40
i32 22, label %42
i32 29, label %44
i32 24, label %46
i32 25, label %48
i32 26, label %50
i32 27, label %52
i32 28, label %54
i32 10, label %56
i32 12, label %58
]
2: ; preds = %1
%3 = load i32, i32* @SIGHUP
br label %60
4: ; preds = %1
%5 = load i32, i32* @SIGINT
br label %60
6: ; preds = %1
%7 = load i32, i32* @SIGQUIT
br label %60
8: ; preds = %1
%9 = load i32, i32* @SIGILL
br label %60
10: ; preds = %1
%11 = load i32, i32* @SIGTRAP
br label %60
12: ; preds = %1
%13 = load i32, i32* @SIGABRT
br label %60
14: ; preds = %1
%15 = load i32, i32* @SIGFPE
br label %60
16: ; preds = %1
%17 = load i32, i32* @SIGKILL
br label %60
18: ; preds = %1
%19 = load i32, i32* @SIGBUS
br label %60
20: ; preds = %1
%21 = load i32, i32* @SIGSEGV
br label %60
22: ; preds = %1
%23 = load i32, i32* @SIGSYS
br label %60
24: ; preds = %1
%25 = load i32, i32* @SIGPIPE
br label %60
26: ; preds = %1
%27 = load i32, i32* @SIGALRM
br label %60
28: ; preds = %1
%29 = load i32, i32* @SIGTERM
br label %60
30: ; preds = %1
%31 = load i32, i32* @SIGURG
br label %60
32: ; preds = %1
%33 = load i32, i32* @SIGSTOP
br label %60
34: ; preds = %1
%35 = load i32, i32* @SIGTSTP
br label %60
36: ; preds = %1
%37 = load i32, i32* @SIGCONT
br label %60
38: ; preds = %1
%39 = load i32, i32* @SIGCHLD
br label %60
40: ; preds = %1
%41 = load i32, i32* @SIGTTIN
br label %60
42: ; preds = %1
%43 = load i32, i32* @SIGTTOU
br label %60
44: ; preds = %1
%45 = load i32, i32* @SIGIO
br label %60
46: ; preds = %1
%47 = load i32, i32* @SIGXCPU
br label %60
48: ; preds = %1
%49 = load i32, i32* @SIGXFSZ
br label %60
50: ; preds = %1
%51 = load i32, i32* @SIGVTALRM
br label %60
52: ; preds = %1
%53 = load i32, i32* @SIGPROF
br label %60
54: ; preds = %1
%55 = load i32, i32* @SIGWINCH
br label %60
56: ; preds = %1
%57 = load i32, i32* @SIGUSR1
br label %60
58: ; preds = %1
%59 = load i32, i32* @SIGUSR2
br label %60
60: ; preds = %1, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
%61 = phi i32 [ %59, %58 ], [ %57, %56 ], [ %55, %54 ], [ %53, %52 ], [ %51, %50 ], [ %49, %48 ], [ %47, %46 ], [ %45, %44 ], [ %43, %42 ], [ %41, %40 ], [ %39, %38 ], [ %37, %36 ], [ %35, %34 ], [ %33, %32 ], [ %31, %30 ], [ %29, %28 ], [ %27, %26 ], [ %25, %24 ], [ %23, %22 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %13, %12 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ %3, %2 ], [ 0, %1 ]
ret i32 %61
}