// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x150b0
movl $0x1, -0x1c(%rbp)
movq 0x1a277(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x6110
testb $0x1, -0x1(%rbp)
je 0x18d8e
movq 0x1a262(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6490
cmpl $-0x1, %eax
jne 0x18d71
jmp 0x18d8c
movq 0x1a248(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
leaq 0x13ace(%rip), %rsi     # 0x2c850
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6560
jmp 0x18da4
movq -0x10(%rbp), %rcx
xorl %esi, %esi
leaq 0x13ac4(%rip), %rdx     # 0x2c85f
movl %esi, %edi
movb $0x0, %al
callq 0x62d0
movl $0x61, -0x24(%rbp)
leaq 0x1e31e(%rip), %rax     # 0x370d0
movq 0x68(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x18f0d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x23060
movq %rax, -0x18(%rbp)
testb $0x1, -0x1(%rbp)
je 0x18e31
movq -0x38(%rbp), %rdi
callq 0x248b0
movl %eax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movl 0x24(%rax), %eax
imull -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %r8
xorl %esi, %esi
leaq 0x13a67(%rip), %rdx     # 0x2c87a
movb $0x0, %al
callq 0x62d0
movl -0x20(%rbp), %ecx
leaq 0x1deb8(%rip), %rax     # 0x36cdc
addl (%rax), %ecx
leaq 0x1deaf(%rip), %rax     # 0x36cdc
movl %ecx, (%rax)
jmp 0x18e5c
movl -0x1c(%rbp), %edi
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %r8
xorl %esi, %esi
leaq 0x13a40(%rip), %rdx     # 0x2c884
movb $0x0, %al
callq 0x62d0
movl -0x24(%rbp), %eax
movsbl %al, %edi
callq 0xe330
movsbl %al, %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq 0x1a174(%rip), %rcx     # 0x32fe0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jl 0x18efb
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x18efb
movl $0x1, -0x1c(%rbp)
movq 0x1a12f(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movq 0x1a145(%rip), %rax     # 0x32fe0
movl (%rax), %esi
subl $0x1, %esi
xorl %edx, %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x18eae
jmp 0x18ec9
movq 0x1a10b(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
leaq 0x1a46f(%rip), %rsi     # 0x3332e
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6560
movq 0x1a0f0(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x61f0
movq 0x1a0e1(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
movl $0x20, %esi
callq 0xdbc0
movq 0x1a0cd(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x6110
jmp 0x18efd
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x18dba
movl -0x1c(%rbp), %edi
addl $0x1, %edi
movl 0x23417(%rip), %ecx     # 0x3c330
xorl %esi, %esi
leaq 0x1396a(%rip), %rdx     # 0x2c88c
movb $0x0, %al
callq 0x62d0
movq 0x1a090(%rip), %rax     # 0x32fc0
movq (%rax), %rdi
callq 0x61f0
addq $0x40, %rsp
popq %rbp
retq
nop