#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 SIGKILL;
int SIGPIPE;
int SIGQUIT;
int SIGSEGV;
int SIGSTOP;
int SIGTERM;
int SIGTRAP;
int SIGTSTP;
int SIGTTIN;
int SIGTTOU;
int SIGURG;
int SIGUSR1;
int SIGUSR2;
int /*<<< orphan*/ strcmp(char *, char *);
int getsig(char *signame) {
  if (!strcmp(signame, "SIGKILL"))
    return (SIGKILL);
  else if (!strcmp(signame, "SIGSTOP"))
    return (SIGSTOP);
  else if (!strcmp(signame, "SIGURG"))
    return (SIGURG);
  else if (!strcmp(signame, "SIGABRT"))
    return (SIGABRT);
  else if (!strcmp(signame, "SIGBUS"))
    return (SIGBUS);
  else if (!strcmp(signame, "SIGCHLD"))
    return (SIGCHLD);
  else if (!strcmp(signame, "SIGCONT"))
    return (SIGCONT);
  else if (!strcmp(signame, "SIGFPE"))
    return (SIGFPE);
  else if (!strcmp(signame, "SIGHUP"))
    return (SIGHUP);
  else if (!strcmp(signame, "SIGILL"))
    return (SIGILL);
  else if (!strcmp(signame, "SIGINT"))
    return (SIGINT);
  else if (!strcmp(signame, "SIGPIPE"))
    return (SIGPIPE);
  else if (!strcmp(signame, "SIGQUIT"))
    return (SIGQUIT);
  else if (!strcmp(signame, "SIGSEGV"))
    return (SIGSEGV);
  else if (!strcmp(signame, "SIGTERM"))
    return (SIGTERM);
  else if (!strcmp(signame, "SIGTSTP"))
    return (SIGTSTP);
  else if (!strcmp(signame, "SIGTTIN"))
    return (SIGTTIN);
  else if (!strcmp(signame, "SIGTTOU"))
    return (SIGTTOU);
  else if (!strcmp(signame, "SIGALRM"))
    return (SIGALRM);
  else if (!strcmp(signame, "SIGUSR1"))
    return (SIGUSR1);
  else if (!strcmp(signame, "SIGUSR2"))
    return (SIGUSR2);
  else if (!strcmp(signame, "SIGTRAP"))
    return (SIGTRAP);
  return (-1);
}


x86 assembly (clang, -O0):
<getsig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1146 <getsig+0x36>
mov    0x2e14(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1170 <getsig+0x60>
mov    0x2dd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    119a <getsig+0x8a>
mov    0x2dc8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11c4 <getsig+0xb4>
mov    0x2d8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xe50(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11ee <getsig+0xde>
mov    0x2e04(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1218 <getsig+0x108>
mov    0x2d82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xe0b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1242 <getsig+0x132>
mov    0x2d90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xde9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    126c <getsig+0x15c>
mov    0x2d36(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xdc6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1296 <getsig+0x186>
mov    0x2d64(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12c0 <getsig+0x1b0>
mov    0x2cc2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xd80(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12ea <getsig+0x1da>
mov    0x2cd0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xd5d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1314 <getsig+0x204>
mov    0x2c56(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xd3b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    133e <getsig+0x22e>
mov    0x2c6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xd19(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1368 <getsig+0x258>
mov    0x2c62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xcf7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1392 <getsig+0x282>
mov    0x2c20(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xcd5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    13bc <getsig+0x2ac>
mov    0x2bd6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xcb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    13e6 <getsig+0x2d6>
mov    0x2ba4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xc91(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1410 <getsig+0x300>
mov    0x2bd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xc6f(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    143a <getsig+0x32a>
mov    0x2b88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xc4d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1464 <getsig+0x354>
mov    0x2b76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xc2b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    148e <getsig+0x37e>
mov    0x2ae4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
mov    -0x10(%rbp),%rdi
lea    0xc09(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    14b8 <getsig+0x3a8>
mov    0x2a92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1528 <getsig+0x418>
jmp    14bd <getsig+0x3ad>
jmp    14c2 <getsig+0x3b2>
jmp    14c7 <getsig+0x3b7>
jmp    14cc <getsig+0x3bc>
jmp    14d1 <getsig+0x3c1>
jmp    14d6 <getsig+0x3c6>
jmp    14db <getsig+0x3cb>
jmp    14e0 <getsig+0x3d0>
jmp    14e5 <getsig+0x3d5>
jmp    14ea <getsig+0x3da>
jmp    14ef <getsig+0x3df>
jmp    14f4 <getsig+0x3e4>
jmp    14f9 <getsig+0x3e9>
jmp    14fe <getsig+0x3ee>
jmp    1503 <getsig+0x3f3>
jmp    1508 <getsig+0x3f8>
jmp    150d <getsig+0x3fd>
jmp    1512 <getsig+0x402>
jmp    1517 <getsig+0x407>
jmp    151c <getsig+0x40c>
jmp    1521 <getsig+0x411>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsig>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1312 <getsig+0x202>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     131e <getsig+0x20e>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     132a <getsig+0x21a>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1336 <getsig+0x226>
lea    0xeab(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1342 <getsig+0x232>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     134e <getsig+0x23e>
lea    0xe8c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     135a <getsig+0x24a>
lea    0xe7d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1363 <getsig+0x253>
lea    0xe6d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     136c <getsig+0x25c>
lea    0xe5d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1375 <getsig+0x265>
lea    0xe4d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     137e <getsig+0x26e>
lea    0xe3d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1387 <getsig+0x277>
lea    0xe2e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1390 <getsig+0x280>
lea    0xe1f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1399 <getsig+0x289>
lea    0xe10(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13a2 <getsig+0x292>
lea    0xe01(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13ab <getsig+0x29b>
lea    0xdf2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13b4 <getsig+0x2a4>
lea    0xde3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13bd <getsig+0x2ad>
lea    0xdd4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13c6 <getsig+0x2b6>
lea    0xdc5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13cf <getsig+0x2bf>
lea    0xdb6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     13d8 <getsig+0x2c8>
lea    0xda7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    0x2c36(%rip),%rcx
neg    %eax
sbb    %eax,%eax
or     (%rcx),%eax
pop    %rbx
ret
mov    0x2c37(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c13(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c27(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c0b(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c9f(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c3b(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c67(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c2e(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c7d(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bfc(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c2b(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bd2(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c09(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c20(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bff(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bd6(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bc5(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2c14(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2beb(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2bfa(%rip),%rax
jmp    13df <getsig+0x2cf>
mov    0x2b89(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"SIGKILL\00"
@SIGKILL = global i32 0
@.str.1 = [8 x i8] c"SIGSTOP\00"
@SIGSTOP = global i32 0
@.str.2 = [7 x i8] c"SIGURG\00"
@SIGURG = global i32 0
@.str.3 = [8 x i8] c"SIGABRT\00"
@SIGABRT = global i32 0
@.str.4 = [7 x i8] c"SIGBUS\00"
@SIGBUS = global i32 0
@.str.5 = [8 x i8] c"SIGCHLD\00"
@SIGCHLD = global i32 0
@.str.6 = [8 x i8] c"SIGCONT\00"
@SIGCONT = global i32 0
@.str.7 = [7 x i8] c"SIGFPE\00"
@SIGFPE = global i32 0
@.str.8 = [7 x i8] c"SIGHUP\00"
@SIGHUP = global i32 0
@.str.9 = [7 x i8] c"SIGILL\00"
@SIGILL = global i32 0
@.str.10 = [7 x i8] c"SIGINT\00"
@SIGINT = global i32 0
@.str.11 = [8 x i8] c"SIGPIPE\00"
@SIGPIPE = global i32 0
@.str.12 = [8 x i8] c"SIGQUIT\00"
@SIGQUIT = global i32 0
@.str.13 = [8 x i8] c"SIGSEGV\00"
@SIGSEGV = global i32 0
@.str.14 = [8 x i8] c"SIGTERM\00"
@SIGTERM = global i32 0
@.str.15 = [8 x i8] c"SIGTSTP\00"
@SIGTSTP = global i32 0
@.str.16 = [8 x i8] c"SIGTTIN\00"
@SIGTTIN = global i32 0
@.str.17 = [8 x i8] c"SIGTTOU\00"
@SIGTTOU = global i32 0
@.str.18 = [8 x i8] c"SIGALRM\00"
@SIGALRM = global i32 0
@.str.19 = [8 x i8] c"SIGUSR1\00"
@SIGUSR1 = global i32 0
@.str.20 = [8 x i8] c"SIGUSR2\00"
@SIGUSR2 = global i32 0
@.str.21 = [8 x i8] c"SIGTRAP\00"
@SIGTRAP = global i32 0
define i32 @getsig(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strcmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32, i32* @SIGKILL
store i32 %8, i32* %2
br label %157
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %9
%14 = load i32, i32* @SIGSTOP
store i32 %14, i32* %2
br label %157
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %15
%20 = load i32, i32* @SIGURG
store i32 %20, i32* %2
br label %157
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %21
%26 = load i32, i32* @SIGABRT
store i32 %26, i32* %2
br label %157
27: ; preds = %21
%28 = load i8*, i8** %3
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %27
%32 = load i32, i32* @SIGBUS
store i32 %32, i32* %2
br label %157
33: ; preds = %27
%34 = load i8*, i8** %3
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %33
%38 = load i32, i32* @SIGCHLD
store i32 %38, i32* %2
br label %157
39: ; preds = %33
%40 = load i8*, i8** %3
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %39
%44 = load i32, i32* @SIGCONT
store i32 %44, i32* %2
br label %157
45: ; preds = %39
%46 = load i8*, i8** %3
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%48 = icmp ne i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %45
%50 = load i32, i32* @SIGFPE
store i32 %50, i32* %2
br label %157
51: ; preds = %45
%52 = load i8*, i8** %3
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %51
%56 = load i32, i32* @SIGHUP
store i32 %56, i32* %2
br label %157
57: ; preds = %51
%58 = load i8*, i8** %3
%59 = call i32 @strcmp(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
br i1 %60, label %63, label %61
61: ; preds = %57
%62 = load i32, i32* @SIGILL
store i32 %62, i32* %2
br label %157
63: ; preds = %57
%64 = load i8*, i8** %3
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %63
%68 = load i32, i32* @SIGINT
store i32 %68, i32* %2
br label %157
69: ; preds = %63
%70 = load i8*, i8** %3
%71 = call i32 @strcmp(i8* %70, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%72 = icmp ne i32 %71, 0
br i1 %72, label %75, label %73
73: ; preds = %69
%74 = load i32, i32* @SIGPIPE
store i32 %74, i32* %2
br label %157
75: ; preds = %69
%76 = load i8*, i8** %3
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %75
%80 = load i32, i32* @SIGQUIT
store i32 %80, i32* %2
br label %157
81: ; preds = %75
%82 = load i8*, i8** %3
%83 = call i32 @strcmp(i8* %82, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%84 = icmp ne i32 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %81
%86 = load i32, i32* @SIGSEGV
store i32 %86, i32* %2
br label %157
87: ; preds = %81
%88 = load i8*, i8** %3
%89 = call i32 @strcmp(i8* %88, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%90 = icmp ne i32 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %87
%92 = load i32, i32* @SIGTERM
store i32 %92, i32* %2
br label %157
93: ; preds = %87
%94 = load i8*, i8** %3
%95 = call i32 @strcmp(i8* %94, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
%96 = icmp ne i32 %95, 0
br i1 %96, label %99, label %97
97: ; preds = %93
%98 = load i32, i32* @SIGTSTP
store i32 %98, i32* %2
br label %157
99: ; preds = %93
%100 = load i8*, i8** %3
%101 = call i32 @strcmp(i8* %100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%102 = icmp ne i32 %101, 0
br i1 %102, label %105, label %103
103: ; preds = %99
%104 = load i32, i32* @SIGTTIN
store i32 %104, i32* %2
br label %157
105: ; preds = %99
%106 = load i8*, i8** %3
%107 = call i32 @strcmp(i8* %106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%108 = icmp ne i32 %107, 0
br i1 %108, label %111, label %109
109: ; preds = %105
%110 = load i32, i32* @SIGTTOU
store i32 %110, i32* %2
br label %157
111: ; preds = %105
%112 = load i8*, i8** %3
%113 = call i32 @strcmp(i8* %112, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%114 = icmp ne i32 %113, 0
br i1 %114, label %117, label %115
115: ; preds = %111
%116 = load i32, i32* @SIGALRM
store i32 %116, i32* %2
br label %157
117: ; preds = %111
%118 = load i8*, i8** %3
%119 = call i32 @strcmp(i8* %118, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
%120 = icmp ne i32 %119, 0
br i1 %120, label %123, label %121
121: ; preds = %117
%122 = load i32, i32* @SIGUSR1
store i32 %122, i32* %2
br label %157
123: ; preds = %117
%124 = load i8*, i8** %3
%125 = call i32 @strcmp(i8* %124, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0))
%126 = icmp ne i32 %125, 0
br i1 %126, label %129, label %127
127: ; preds = %123
%128 = load i32, i32* @SIGUSR2
store i32 %128, i32* %2
br label %157
129: ; preds = %123
%130 = load i8*, i8** %3
%131 = call i32 @strcmp(i8* %130, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
%132 = icmp ne i32 %131, 0
br i1 %132, label %135, label %133
133: ; preds = %129
%134 = load i32, i32* @SIGTRAP
store i32 %134, i32* %2
br label %157
135: ; preds = %129
br label %136
136: ; preds = %135
br label %137
137: ; preds = %136
br label %138
138: ; preds = %137
br label %139
139: ; preds = %138
br label %140
140: ; preds = %139
br label %141
141: ; preds = %140
br label %142
142: ; preds = %141
br label %143
143: ; preds = %142
br label %144
144: ; preds = %143
br label %145
145: ; preds = %144
br label %146
146: ; preds = %145
br label %147
147: ; preds = %146
br label %148
148: ; preds = %147
br label %149
149: ; preds = %148
br label %150
150: ; preds = %149
br label %151
151: ; preds = %150
br label %152
152: ; preds = %151
br label %153
153: ; preds = %152
br label %154
154: ; preds = %153
br label %155
155: ; preds = %154
br label %156
156: ; preds = %155
store i32 -1, i32* %2
br label %157
157: ; preds = %156, %133, %127, %121, %115, %109, %103, %97, %91, %85, %79, %73, %67, %61, %55, %49, %43, %37, %31, %25, %19, %13, %7
%158 = load i32, i32* %2
ret i32 %158
}

LLVM IR (-O2):
@.str = [8 x i8] c"SIGKILL\00"
@SIGKILL = global i32 0
@.str.1 = [8 x i8] c"SIGSTOP\00"
@SIGSTOP = global i32 0
@.str.2 = [7 x i8] c"SIGURG\00"
@SIGURG = global i32 0
@.str.3 = [8 x i8] c"SIGABRT\00"
@SIGABRT = global i32 0
@.str.4 = [7 x i8] c"SIGBUS\00"
@SIGBUS = global i32 0
@.str.5 = [8 x i8] c"SIGCHLD\00"
@SIGCHLD = global i32 0
@.str.6 = [8 x i8] c"SIGCONT\00"
@SIGCONT = global i32 0
@.str.7 = [7 x i8] c"SIGFPE\00"
@SIGFPE = global i32 0
@.str.8 = [7 x i8] c"SIGHUP\00"
@SIGHUP = global i32 0
@.str.9 = [7 x i8] c"SIGILL\00"
@SIGILL = global i32 0
@.str.10 = [7 x i8] c"SIGINT\00"
@SIGINT = global i32 0
@.str.11 = [8 x i8] c"SIGPIPE\00"
@SIGPIPE = global i32 0
@.str.12 = [8 x i8] c"SIGQUIT\00"
@SIGQUIT = global i32 0
@.str.13 = [8 x i8] c"SIGSEGV\00"
@SIGSEGV = global i32 0
@.str.14 = [8 x i8] c"SIGTERM\00"
@SIGTERM = global i32 0
@.str.15 = [8 x i8] c"SIGTSTP\00"
@SIGTSTP = global i32 0
@.str.16 = [8 x i8] c"SIGTTIN\00"
@SIGTTIN = global i32 0
@.str.17 = [8 x i8] c"SIGTTOU\00"
@SIGTTOU = global i32 0
@.str.18 = [8 x i8] c"SIGALRM\00"
@SIGALRM = global i32 0
@.str.19 = [8 x i8] c"SIGUSR1\00"
@SIGUSR1 = global i32 0
@.str.20 = [8 x i8] c"SIGUSR2\00"
@SIGUSR2 = global i32 0
@.str.21 = [8 x i8] c"SIGTRAP\00"
@SIGTRAP = global i32 0
define i32 @getsig(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = load i32, i32* @SIGKILL
br label %111
6: ; preds = %1
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = load i32, i32* @SIGSTOP
br label %111
11: ; preds = %6
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i32, i32* @SIGURG
br label %111
16: ; preds = %11
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* @SIGABRT
br label %111
21: ; preds = %16
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i32, i32* @SIGBUS
br label %111
26: ; preds = %21
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = load i32, i32* @SIGCHLD
br label %111
31: ; preds = %26
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = load i32, i32* @SIGCONT
br label %111
36: ; preds = %31
%37 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = load i32, i32* @SIGFPE
br label %111
41: ; preds = %36
%42 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = load i32, i32* @SIGHUP
br label %111
46: ; preds = %41
%47 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = load i32, i32* @SIGILL
br label %111
51: ; preds = %46
%52 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = load i32, i32* @SIGINT
br label %111
56: ; preds = %51
%57 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = load i32, i32* @SIGPIPE
br label %111
61: ; preds = %56
%62 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = load i32, i32* @SIGQUIT
br label %111
66: ; preds = %61
%67 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = load i32, i32* @SIGSEGV
br label %111
71: ; preds = %66
%72 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = load i32, i32* @SIGTERM
br label %111
76: ; preds = %71
%77 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %76
%80 = load i32, i32* @SIGTSTP
br label %111
81: ; preds = %76
%82 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%83 = icmp eq i32 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %81
%85 = load i32, i32* @SIGTTIN
br label %111
86: ; preds = %81
%87 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = load i32, i32* @SIGTTOU
br label %111
91: ; preds = %86
%92 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %91
%95 = load i32, i32* @SIGALRM
br label %111
96: ; preds = %91
%97 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
%98 = icmp eq i32 %97, 0
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = load i32, i32* @SIGUSR1
br label %111
101: ; preds = %96
%102 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0))
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %101
%105 = load i32, i32* @SIGUSR2
br label %111
106: ; preds = %101
%107 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
%108 = icmp eq i32 %107, 0
%109 = load i32, i32* @SIGTRAP
%110 = select i1 %108, i32 %109, i32 -1
br label %111
111: ; preds = %106, %104, %99, %94, %89, %84, %79, %74, %69, %64, %59, %54, %49, %44, %39, %34, %29, %24, %19, %14, %9, %4
%112 = phi i32 [ %105, %104 ], [ %100, %99 ], [ %95, %94 ], [ %90, %89 ], [ %85, %84 ], [ %80, %79 ], [ %75, %74 ], [ %70, %69 ], [ %65, %64 ], [ %60, %59 ], [ %55, %54 ], [ %50, %49 ], [ %45, %44 ], [ %40, %39 ], [ %35, %34 ], [ %30, %29 ], [ %25, %24 ], [ %20, %19 ], [ %15, %14 ], [ %10, %9 ], [ %5, %4 ], [ %110, %106 ]
ret i32 %112
}