// File: /workspace/github_c_makefile_star2_O2/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, 0x4(%rsp)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x62d0
movq %r14, %rdi
callq 0x6080
movq %rax, %r14
movq 0x17f37(%rip), %r13     # 0x29f38
movq (%r13), %rdi
callq 0x6120
movq (%r13), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
callq 0x6470
leaq 0xe519(%rip), %rbx      # 0x20538
leaq 0xca6a(%rip), %r15      # 0x1ea90
xorl %r12d, %r12d
cmpq $0x4c, %r12
je 0x12046
movslq (%r12,%rbx), %rsi
addq %rbx, %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x64c0
addq $0x4, %r12
jmp 0x12029
movq (%r13), %r15
leaq 0x1be7f(%rip), %rdi     # 0x2ded0
callq 0x6170
incq %rax
shrq %rax
pushq $0x24
popq %rbp
movl %ebp, %edx
subl %eax, %edx
pushq $0xa
popq %rsi
movq %r15, %rdi
callq 0x6470
cmpl $-0x1, %eax
je 0x12086
movq (%r13), %rdi
leaq 0x1be52(%rip), %rsi     # 0x2ded0
pushq $-0x1
popq %rdx
callq 0x6530
movzbl 0x4(%rsp), %edi
callq 0x121ef
movq %rax, %r15
movq (%r13), %rdi
pushq $0xc
popq %rsi
pushq $0x2b
popq %rdx
callq 0x6470
cmpl $-0x1, %eax
je 0x120c1
movq (%r13), %r12
movq %r15, %rdi
callq 0xcb3d
pushq $-0x1
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x6530
movq (%r13), %r12
movq %r15, %rdi
callq 0x6170
incq %rax
shrq %rax
movl %ebp, %edx
subl %eax, %edx
pushq $0xe
popq %rsi
movq %r12, %rdi
callq 0x6470
cmpl $-0x1, %eax
je 0x120f6
movq (%r13), %rdi
pushq $-0x1
popq %rdx
movq %r15, %rsi
callq 0x6530
leaq 0x1b75f(%rip), %rbx     # 0x2d85c
movl (%rbx), %ecx
pushq $-0xa
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
addl %eax, %ecx
movl %ecx, (%rbx)
leaq 0xdd17(%rip), %rsi      # 0x1fe29
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x64d0
movq (%r13), %r12
movq %r15, %rdi
callq 0x6170
incq %rax
shrq %rax
subl %eax, %ebp
pushq $0x10
popq %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0x1215a
movq (%r13), %rdi
leaq 0x10(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0x6530
movl 0xc(%r14), %ecx
movl 0x10(%r14), %edx
incl %edx
movl $0x76c, %r8d            # imm = 0x76C
addl 0x14(%r14), %r8d
leaq 0x1bd0b(%rip), %rdi     # 0x2de80
leaq 0xdcbc(%rip), %rsi      # 0x1fe38
xorl %eax, %eax
callq 0x64d0
movq (%r13), %rdi
pushq $0x12
popq %rsi
pushq $0x20
popq %rdx
callq 0x6470
cmpl $-0x1, %eax
je 0x121aa
movq (%r13), %rdi
leaq 0x1bcde(%rip), %rsi     # 0x2de80
pushq $-0x1
popq %rdx
callq 0x6530
movq (%r13), %rdi
movq 0x17e0b(%rip), %rax     # 0x29fc0
movl (%rax), %esi
decl %esi
xorl %edx, %edx
callq 0x6470
movq (%r13), %rdi
callq 0x6200
movl (%rbx), %edi
movsbl 0x4(%rsp), %edx
xorl %esi, %esi
callq 0x1222b
xorl %edi, %edi
xorl %eax, %eax
callq 0xbfec
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq