// File: /workspace/github_c_makefile_star2_O3/ajpaulson[P]srogue11/rip.c
// Function: death
void death(char monst)
{
	char dp, *killer;
	struct tm *lt;
	time_t date;
	char buf[LINLEN];
	struct tm *localtime();

	time(&date);
	lt = localtime(&date);
	clear();
	move(3, 0);
	for (dp = 0; dp < RIP_LINES; dp++)
		printw("%s\n", rip[dp]);
	mvaddstr(10, 36 - ((strlen(whoami) + 1) / 2), whoami);
	killer = killname(monst);
	mvaddstr(12, 43, vowelstr(killer));
	mvaddstr(14, 36 - ((strlen(killer) + 1) / 2), killer);
	purse -= purse/10;
	sprintf(buf, "%d Gold Pieces", purse);
	mvaddstr(16, 36 - ((strlen(buf) + 1) / 2), buf);
	sprintf(prbuf, "%d/%d/%d", lt->tm_mon + 1, lt->tm_mday, 1900+lt->tm_year);
	mvaddstr(18, 32, prbuf);
	move(LINES-1, 0);
	refresh();
	score(purse, KILLED, monst);
	byebye(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x62e0
movq %r14, %rdi
callq 0x6080
movq %rax, %r14
movq 0x172a1(%rip), %r13     # 0x29f30
movq (%r13), %rdi
callq 0x6120
movq (%r13), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x6490
leaq 0xf889(%rip), %rbx      # 0x22538
leaq 0xddda(%rip), %r15      # 0x20a90
xorl %r12d, %r12d
movslq (%r12,%rbx), %rsi
addq %rbx, %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x64e0
addq $0x4, %r12
cmpq $0x4c, %r12
jne 0x12cb9
movq (%r13), %r15
leaq 0x1b201(%rip), %rdi     # 0x2dee0
callq 0x6170
incq %rax
shrq %rax
movl $0x24, %edx
subl %eax, %edx
movq %r15, %rdi
movl $0xa, %esi
callq 0x6490
cmpl $-0x1, %eax
je 0x12d18
movq (%r13), %rdi
leaq 0x1b1d2(%rip), %rsi     # 0x2dee0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movl %ebp, 0x4(%rsp)
movzbl %bpl, %edi
callq 0x12eae
movq %rax, %r15
movq (%r13), %rdi
movl $0xc, %esi
movl $0x2b, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x12d5c
movq (%r13), %r12
movq %r15, %rdi
callq 0xd2c6
movq %r12, %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movq (%r13), %r12
movq %r15, %rdi
callq 0x6170
incq %rax
shrq %rax
movl $0x24, %ebp
movl $0x24, %edx
subl %eax, %edx
movq %r12, %rdi
movl $0xe, %esi
callq 0x6490
cmpl $-0x1, %eax
je 0x12d9d
movq (%r13), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
leaq 0x1aac8(%rip), %rbx     # 0x2d86c
movslq (%rbx), %rax
imulq $-0x66666667, %rax, %rdx # imm = 0x99999999
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rdx
addl %ecx, %edx
addl %eax, %edx
movl %edx, (%rbx)
leaq 0xf063(%rip), %rsi      # 0x21e29
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x64f0
movq (%r13), %r12
movq %r15, %rdi
callq 0x6170
incq %rax
shrq %rax
subl %eax, %ebp
movq %r12, %rdi
movl $0x10, %esi
movl %ebp, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x12e10
movq (%r13), %rdi
leaq 0x10(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movl 0xc(%r14), %ecx
movl 0x10(%r14), %edx
incl %edx
movl $0x76c, %r8d            # imm = 0x76C
addl 0x14(%r14), %r8d
leaq 0x1b065(%rip), %rdi     # 0x2de90
leaq 0xf006(%rip), %rsi      # 0x21e38
xorl %eax, %eax
callq 0x64f0
movq (%r13), %rdi
movl $0x12, %esi
movl $0x20, %edx
callq 0x6490
cmpl $-0x1, %eax
movl 0x4(%rsp), %ebp
je 0x12e6a
movq (%r13), %rdi
leaq 0x1b030(%rip), %rsi     # 0x2de90
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movq (%r13), %rdi
movq 0x1713b(%rip), %rax     # 0x29fb0
movl (%rax), %esi
decl %esi
xorl %edx, %edx
callq 0x6490
movq (%r13), %rdi
callq 0x6200
movl (%rbx), %edi
movsbl %bpl, %edx
xorl %esi, %esi
callq 0x12eea
xorl %edi, %edi
xorl %eax, %eax
callq 0xc65c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq