#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*/ SIGHUP;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ alarm(int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void die() {
  alarm(0);
  signal(SIGINT, SIG_IGN);
  signal(SIGQUIT, SIG_IGN);
  signal(SIGHUP, SIG_IGN);
  signal(SIGTERM, SIG_IGN);
  clear();
  refresh();
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <alarm@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
mov    0x2e4d(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
mov    0x2e36(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
mov    0x2e08(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    $0x0,%al
call   1080 <clear@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
xor    %edi,%edi
call   1030 <alarm@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    0x2e50(%rip),%rbx
mov    (%rbx),%esi
call   1040 <signal@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1040 <signal@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1040 <signal@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1040 <signal@plt>
xor    %eax,%eax
call   1080 <clear@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
@SIGHUP = global i32 0
@SIGTERM = global i32 0
define void @die() {
%1 = call i32 @alarm(i32 0)
%2 = load i32, i32* @SIGINT
%3 = load i32, i32* @SIG_IGN
%4 = call i32 @signal(i32 %2, i32 %3)
%5 = load i32, i32* @SIGQUIT
%6 = load i32, i32* @SIG_IGN
%7 = call i32 @signal(i32 %5, i32 %6)
%8 = load i32, i32* @SIGHUP
%9 = load i32, i32* @SIG_IGN
%10 = call i32 @signal(i32 %8, i32 %9)
%11 = load i32, i32* @SIGTERM
%12 = load i32, i32* @SIG_IGN
%13 = call i32 @signal(i32 %11, i32 %12)
%14 = call i32 (...) @clear()
%15 = call i32 (...) @refresh()
%16 = call i32 (...) @endwin()
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
@SIGHUP = global i32 0
@SIGTERM = global i32 0
define void @die() {
%1 = tail call i32 @alarm(i32 0)
%2 = load i32, i32* @SIGINT
%3 = load i32, i32* @SIG_IGN
%4 = tail call i32 @signal(i32 %2, i32 %3)
%5 = load i32, i32* @SIGQUIT
%6 = load i32, i32* @SIG_IGN
%7 = tail call i32 @signal(i32 %5, i32 %6)
%8 = load i32, i32* @SIGHUP
%9 = load i32, i32* @SIG_IGN
%10 = tail call i32 @signal(i32 %8, i32 %9)
%11 = load i32, i32* @SIGTERM
%12 = load i32, i32* @SIG_IGN
%13 = tail call i32 @signal(i32 %11, i32 %12)
%14 = tail call i32 (...) @clear()
%15 = tail call i32 (...) @refresh()
%16 = tail call i32 (...) @endwin()
%17 = tail call i32 @exit(i32 0)
unreachable
}