// File: /workspace/github_c_makefile_star2_O1/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 0x17139(%rip), %r13     # 0x29f30
movq (%r13), %rdi
callq 0x6120
movq (%r13), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x6490
leaq 0xf6a9(%rip), %rbx      # 0x224c0
leaq 0xdc72(%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 0x12e21
movq (%r13), %r15
leaq 0x1b099(%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 0x12e80
movq (%r13), %rdi
leaq 0x1b06a(%rip), %rsi     # 0x2dee0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movl %ebp, 0x4(%rsp)
movzbl %bpl, %edi
callq 0x13016
movq %rax, %r15
movq (%r13), %rdi
movl $0xc, %esi
movl $0x2b, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x12ec4
movq (%r13), %r12
movq %r15, %rdi
callq 0xd320
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 0x12f05
movq (%r13), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
leaq 0x1a960(%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 0xee83(%rip), %rsi      # 0x21db1
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 0x12f78
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 0x1aefd(%rip), %rdi     # 0x2de90
leaq 0xee26(%rip), %rsi      # 0x21dc0
xorl %eax, %eax
callq 0x64f0
movq (%r13), %rdi
movl $0x12, %esi
movl $0x20, %edx
callq 0x6490
cmpl $-0x1, %eax
movl 0x4(%rsp), %ebp
je 0x12fd2
movq (%r13), %rdi
leaq 0x1aec8(%rip), %rsi     # 0x2de90
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movq (%r13), %rdi
movq 0x16fd3(%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 0x13052
xorl %edi, %edi
xorl %eax, %eax
callq 0xc715
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq