// File: /workspace/github_c_makefile_star2_O1/ajpaulson[P]srogue11/rip.c
// Function: showpack
void showpack(bool winner,char *howso)
{
	char *iname;
	int cnt, worth, ch;
	struct linked_list *item;
	struct object *obj;

	idenpack();
	cnt = 1;
	clear();
	if (winner)
		mvaddstr(0, 0, "   Worth  Item");
	else
		mvprintw(0, 0, "Contents of your pack %s:\n",howso);
	ch = 'a';
	for (item = pack; item != NULL; item = next(item)) {
		obj = OBJPTR(item);
		iname = inv_name(obj, FALSE);
		if (winner) {
			worth = get_worth(obj);
			worth *= obj->o_count;
			mvprintw(cnt, 0, "  %6d  %s",worth,iname);
			purse += worth;
		}
		else {
			mvprintw(cnt, 0, "%c) %s\n",ch,iname);
			ch = npch(ch);
		}
		if (++cnt >= LINES - 2 && next(item) != NULL) {
			cnt = 1;
			mvaddstr(LINES - 1, 0, morestr);
			refresh();
			wait_for(stdscr, ' ');
			clear();
		}
	}
	mvprintw(cnt + 1,0,"--- %d  Gold Pieces ---",oldpurse);
	refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %r12d
xorl %eax, %eax
callq 0x10cbf
movq 0x169ee(%rip), %rbx     # 0x29f30
movq (%rbx), %rdi
callq 0x6120
testl %r12d, %r12d
je 0x13576
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x1358b
movq (%rbx), %rdi
leaq 0xec25(%rip), %rsi      # 0x2218f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
jmp 0x1358b
leaq 0xec21(%rip), %rdx      # 0x2219e
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x62c0
leaq 0x1a6ce(%rip), %rax     # 0x2dc60
movq 0x68(%rax), %rbx
testq %rbx, %rbx
je 0x136ae
movl $0x61, 0x4(%rsp)
movl $0x1, %r13d
movq 0x169fc(%rip), %rbp     # 0x29fb0
movq 0x10(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1aaa4
movq %rax, %r15
testb %r12b, %r12b
je 0x1360c
movq %r14, %rdi
callq 0x1bd69
movl %r12d, %ebp
movl %eax, %r12d
imull 0x24(%r14), %r12d
movl %r13d, %edi
xorl %esi, %esi
leaq 0xebd0(%rip), %rdx      # 0x221b9
movl %r12d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x62c0
leaq 0x1a26f(%rip), %rax     # 0x2d86c
addl %r12d, (%rax)
movl %ebp, %r12d
movq 0x169a6(%rip), %rbp     # 0x29fb0
jmp 0x1363a
movl %r13d, %edi
xorl %esi, %esi
leaq 0xebab(%rip), %rdx      # 0x221c3
movl 0x4(%rsp), %r14d
movl %r14d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x62c0
movsbl %r14b, %edi
callq 0xbdeb
movsbl %al, %eax
movl %eax, 0x4(%rsp)
incl %r13d
movl (%rbp), %esi
leal -0x2(%rsi), %eax
cmpl %eax, %r13d
jl 0x1369d
cmpq $0x0, (%rbx)
je 0x1369d
movq 0x168db(%rip), %r14     # 0x29f30
movq (%r14), %rdi
decl %esi
xorl %edx, %edx
callq 0x6490
cmpl $-0x1, %eax
je 0x1367a
movq (%r14), %rdi
leaq 0x16cbe(%rip), %rsi     # 0x2a32e
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6550
movq (%r14), %rdi
callq 0x6200
movq (%r14), %rdi
movl $0x20, %esi
callq 0xb95e
movq (%r14), %rdi
callq 0x6120
movl $0x1, %r13d
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x135b4
incl %r13d
jmp 0x136b4
movl $0x2, %r13d
movl 0x1f806(%rip), %ecx     # 0x32ec0
leaq 0xeb0a(%rip), %rdx      # 0x221cb
movl %r13d, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x62c0
movq 0x1685c(%rip), %rax     # 0x29f30
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6200