#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*/ SIGABRT;
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIGCONT;
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ SIGILL;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ SIGSTOP;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ SIGTTIN;
int /*<<< orphan*/ SIGTTOU;
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ SIGUSR2;
scalar_t__ strcasecmp(char const *, char const *);
int strtol(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int ouroboros_config_get_signal(const char *name) {
  int signal = strtol(name, NULL, 0);
  if (signal)
    return signal;
  struct {
    const char *name;
    int value;
  } data[] = {
      {"SIGHUP", SIGHUP},   {"SIGINT", SIGINT},
      {"SIGQUIT", SIGQUIT}, {"SIGILL", SIGILL},
      {"SIGABRT", SIGABRT}, {"SIGFPE", SIGFPE},
      {"SIGKILL", SIGKILL}, {"SIGSEGV", SIGSEGV},
      {"SIGPIPE", SIGPIPE}, {"SIGALRM", SIGALRM},
      {"SIGTERM", SIGTERM}, {"SIGUSR1", SIGUSR1},
      {"SIGUSR2", SIGUSR2}, {"SIGCHLD", SIGCHLD},
      {"SIGCONT", SIGCONT}, {"SIGSTOP", SIGSTOP},
      {"SIGTSTP", SIGTSTP}, {"SIGTTIN", SIGTTIN},
      {"SIGTTOU", SIGTTOU}, {NULL, 0},
  };
  int i = 0;
  do {
    if (strcasecmp(data[i].name, name) == 0)
      return data[i].value;
  } while (data[++i].name != NULL);
  return 0;
}


x86 assembly (clang, -O0):
<ouroboros_config_get_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1156 <ouroboros_config_get_signal+0x36>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    13f9 <ouroboros_config_get_signal+0x2d9>
lea    0xea3(%rip),%rax
mov    %rax,-0x160(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x158(%rbp)
lea    0xe8d(%rip),%rax
mov    %rax,-0x150(%rbp)
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x148(%rbp)
lea    0xe77(%rip),%rax
mov    %rax,-0x140(%rbp)
mov    0x2e03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x138(%rbp)
lea    0xe62(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0x2dbe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x128(%rbp)
lea    0xe4c(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0x2d79(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x118(%rbp)
lea    0xe37(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0x2da4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x108(%rbp)
lea    0xe21(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0x2d47(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xf8(%rbp)
lea    0xe0c(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0x2d92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xe8(%rbp)
lea    0xdf7(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0x2d15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd8(%rbp)
lea    0xde2(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0x2d50(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc8(%rbp)
lea    0xdcd(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2d23(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb8(%rbp)
lea    0xdb8(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2d2e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa8(%rbp)
lea    0xda3(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2ca9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x98(%rbp)
lea    0xd8e(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0x2cb4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
lea    0xd79(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0x2cd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x78(%rbp)
lea    0xd6a(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0x2c3b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
lea    0xd5b(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2c64(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
lea    0xd4c(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2c45(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
lea    0xd3d(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2c86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x164(%rbp)
movslq -0x164(%rbp),%rcx
lea    -0x160(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    13c3 <ouroboros_config_get_signal+0x2a3>
movslq -0x164(%rbp),%rcx
lea    -0x160(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13f9 <ouroboros_config_get_signal+0x2d9>
jmp    13c8 <ouroboros_config_get_signal+0x2a8>
mov    -0x164(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x164(%rbp)
movslq %eax,%rcx
lea    -0x160(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
cmpq   $0x0,(%rax)
jne    1378 <ouroboros_config_get_signal+0x258>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ouroboros_config_get_signal>:
push   %r15
push   %r14
push   %rbx
sub    $0x140,%rsp
mov    %rdi,%r14
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
test   %eax,%eax
jne    13ab <ouroboros_config_get_signal+0x28b>
lea    0xeb9(%rip),%rdi
mov    %rdi,(%rsp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
lea    0x10(%rsp),%r15
lea    0xea3(%rip),%rax
mov    %rax,0x10(%rsp)
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
lea    0xe91(%rip),%rax
mov    %rax,0x20(%rsp)
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
lea    0xe80(%rip),%rax
mov    %rax,0x30(%rsp)
mov    0x2dde(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
lea    0xe6e(%rip),%rax
mov    %rax,0x40(%rsp)
mov    0x2d9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
lea    0xe5d(%rip),%rax
mov    %rax,0x50(%rsp)
mov    0x2dcc(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
lea    0xe4b(%rip),%rax
mov    %rax,0x60(%rsp)
mov    0x2d73(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x68(%rsp)
lea    0xe3a(%rip),%rax
mov    %rax,0x70(%rsp)
mov    0x2dc2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x78(%rsp)
lea    0xe29(%rip),%rax
mov    %rax,0x80(%rsp)
mov    0x2d46(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x88(%rsp)
lea    0xe12(%rip),%rax
mov    %rax,0x90(%rsp)
mov    0x2d7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x98(%rsp)
lea    0xdfb(%rip),%rax
mov    %rax,0xa0(%rsp)
mov    0x2d50(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xa8(%rsp)
lea    0xde4(%rip),%rax
mov    %rax,0xb0(%rsp)
mov    0x2d59(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xb8(%rsp)
lea    0xdcd(%rip),%rax
mov    %rax,0xc0(%rsp)
mov    0x2cd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc8(%rsp)
lea    0xdb6(%rip),%rax
mov    %rax,0xd0(%rsp)
mov    0x2cdb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xd8(%rsp)
lea    0xd9f(%rip),%rax
mov    %rax,0xe0(%rsp)
mov    0x2cf4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xe8(%rsp)
lea    0xd88(%rip),%rax
mov    %rax,0xf0(%rsp)
mov    0x2c55(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xf8(%rsp)
lea    0xd71(%rip),%rax
mov    %rax,0x100(%rsp)
mov    0x2c76(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x108(%rsp)
lea    0xd5a(%rip),%rax
mov    %rax,0x110(%rsp)
mov    0x2c4f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x118(%rsp)
lea    0xd43(%rip),%rax
mov    %rax,0x120(%rsp)
mov    0x2c88(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x128(%rsp)
movq   $0x0,0x130(%rsp)
movl   $0x0,0x138(%rsp)
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     13a1 <ouroboros_config_get_signal+0x281>
add    $0x1,%rbx
mov    (%r15),%rdi
add    $0x10,%r15
test   %rdi,%rdi
jne    1380 <ouroboros_config_get_signal+0x260>
xor    %eax,%eax
jmp    13ab <ouroboros_config_get_signal+0x28b>
mov    %ebx,%eax
shl    $0x4,%rax
mov    0x8(%rsp,%rax,1),%eax
add    $0x140,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.anon = type { i8*, i32 }
@.str = [7 x i8] c"SIGHUP\00"
@SIGHUP = global i32 0
@.str.1 = [7 x i8] c"SIGINT\00"
@SIGINT = global i32 0
@.str.2 = [8 x i8] c"SIGQUIT\00"
@SIGQUIT = global i32 0
@.str.3 = [7 x i8] c"SIGILL\00"
@SIGILL = global i32 0
@.str.4 = [8 x i8] c"SIGABRT\00"
@SIGABRT = global i32 0
@.str.5 = [7 x i8] c"SIGFPE\00"
@SIGFPE = global i32 0
@.str.6 = [8 x i8] c"SIGKILL\00"
@SIGKILL = global i32 0
@.str.7 = [8 x i8] c"SIGSEGV\00"
@SIGSEGV = global i32 0
@.str.8 = [8 x i8] c"SIGPIPE\00"
@SIGPIPE = global i32 0
@.str.9 = [8 x i8] c"SIGALRM\00"
@SIGALRM = global i32 0
@.str.10 = [8 x i8] c"SIGTERM\00"
@SIGTERM = global i32 0
@.str.11 = [8 x i8] c"SIGUSR1\00"
@SIGUSR1 = global i32 0
@.str.12 = [8 x i8] c"SIGUSR2\00"
@SIGUSR2 = global i32 0
@.str.13 = [8 x i8] c"SIGCHLD\00"
@SIGCHLD = global i32 0
@.str.14 = [8 x i8] c"SIGCONT\00"
@SIGCONT = global i32 0
@.str.15 = [8 x i8] c"SIGSTOP\00"
@SIGSTOP = global i32 0
@.str.16 = [8 x i8] c"SIGTSTP\00"
@SIGTSTP = global i32 0
@.str.17 = [8 x i8] c"SIGTTIN\00"
@SIGTTIN = global i32 0
@.str.18 = [8 x i8] c"SIGTTOU\00"
@SIGTTOU = global i32 0
define i32 @ouroboros_config_get_signal(i8* nocapture %0) {
%2 = alloca [20 x %struct.anon]
%3 = tail call i32 @strtol(i8* nocapture %0, i32* null, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %82
5: ; preds = %1
%6 = bitcast [20 x %struct.anon]* %2 to i8*
%7 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 0, i32 1
%9 = load i32, i32* @SIGHUP
store i32 %9, i32* %8
%10 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 1, i32 1
%12 = load i32, i32* @SIGINT
store i32 %12, i32* %11
%13 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 2, i32 1
%15 = load i32, i32* @SIGQUIT
store i32 %15, i32* %14
%16 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 3, i32 1
%18 = load i32, i32* @SIGILL
store i32 %18, i32* %17
%19 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %19
%20 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 4, i32 1
%21 = load i32, i32* @SIGABRT
store i32 %21, i32* %20
%22 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8** %22
%23 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 5, i32 1
%24 = load i32, i32* @SIGFPE
store i32 %24, i32* %23
%25 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %25
%26 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 6, i32 1
%27 = load i32, i32* @SIGKILL
store i32 %27, i32* %26
%28 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 7, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %28
%29 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 7, i32 1
%30 = load i32, i32* @SIGSEGV
store i32 %30, i32* %29
%31 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 8, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %31
%32 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 8, i32 1
%33 = load i32, i32* @SIGPIPE
store i32 %33, i32* %32
%34 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 9, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %34
%35 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 9, i32 1
%36 = load i32, i32* @SIGALRM
store i32 %36, i32* %35
%37 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 10, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %37
%38 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 10, i32 1
%39 = load i32, i32* @SIGTERM
store i32 %39, i32* %38
%40 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 11, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 11, i32 1
%42 = load i32, i32* @SIGUSR1
store i32 %42, i32* %41
%43 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 12, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8** %43
%44 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 12, i32 1
%45 = load i32, i32* @SIGUSR2
store i32 %45, i32* %44
%46 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 13, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8** %46
%47 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 13, i32 1
%48 = load i32, i32* @SIGCHLD
store i32 %48, i32* %47
%49 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 14, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i8** %49
%50 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 14, i32 1
%51 = load i32, i32* @SIGCONT
store i32 %51, i32* %50
%52 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 15, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8** %52
%53 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 15, i32 1
%54 = load i32, i32* @SIGSTOP
store i32 %54, i32* %53
%55 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 16, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %55
%56 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 16, i32 1
%57 = load i32, i32* @SIGTSTP
store i32 %57, i32* %56
%58 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 17, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %58
%59 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 17, i32 1
%60 = load i32, i32* @SIGTTIN
store i32 %60, i32* %59
%61 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 18, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8** %61
%62 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 18, i32 1
%63 = load i32, i32* @SIGTTOU
store i32 %63, i32* %62
%64 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 19, i32 0
store i8* null, i8** %64
%65 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 19, i32 1
store i32 0, i32* %65
br label %66
66: ; preds = %75, %5
%67 = phi i8* [ %78, %75 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %5 ]
%68 = phi i64 [ %76, %75 ], [ 0, %5 ]
%69 = tail call i64 @strcasecmp(i8* %67, i8* %0)
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %66
%72 = and i64 %68, 4294967295
%73 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 %72, i32 1
%74 = load i32, i32* %73
br label %80
75: ; preds = %66
%76 = add nuw i64 %68, 1
%77 = getelementptr inbounds [20 x %struct.anon], [20 x %struct.anon]* %2, i64 0, i64 %76, i32 0
%78 = load i8*, i8** %77
%79 = icmp eq i8* %78, null
br i1 %79, label %80, label %66
80: ; preds = %75, %71
%81 = phi i32 [ %74, %71 ], [ 0, %75 ]
br label %82
82: ; preds = %1, %80
%83 = phi i32 [ %81, %80 ], [ %3, %1 ]
ret i32 %83
}