// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/wizard.c
// Function: whatis
int whatis(struct linked_list *what)
{
	struct object *obj;
	struct linked_list *item;
	int wh;

	if (what == NULL) {				/* we need to ask */
		if ((item = get_item("identify", 0)) == NULL)
			return 0;
	}
	else							/* no need to ask */
		item = what;
	obj = OBJPTR(item);
	setoflg(obj, ISKNOW);
	wh = obj->o_which;
	switch (obj->o_type) {
		case SCROLL:
			s_know[wh] = TRUE;
			if (s_guess[wh]) {
				free(s_guess[wh]);
				s_guess[wh] = NULL;
			}
	    when POTION:
			p_know[wh] = TRUE;
			if (p_guess[wh]) {
				free(p_guess[wh]);
				p_guess[wh] = NULL;
			}
		when STICK:
			ws_know[wh] = TRUE;
			if (ws_guess[wh]) {
				free(ws_guess[wh]);
			ws_guess[wh] = NULL;
			}
	    when RING:
			r_know[wh] = TRUE;
			if (r_guess[wh]) {
				free(r_guess[wh]);
				r_guess[wh] = NULL;
			}
	}
	if (what == NULL)
		msg(inv_name(obj, FALSE));
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x26199
leaq 0x4399(%rip), %rdi      # 0x2a513
xorl %esi, %esi
callq 0x14b90
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x26197
movl $0x0, -0x4(%rbp)
jmp 0x26343
jmp 0x261a1
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0xab50
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
addl $-0x21, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x1e, %eax
ja 0x26320
movq -0x30(%rbp), %rax
leaq 0x7fb3(%rip), %rcx      # 0x2e19c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x24(%rbp), %rcx
leaq 0x13653(%rip), %rax     # 0x39850
movb $0x1, (%rax,%rcx)
movslq -0x24(%rbp), %rcx
leaq 0x13324(%rip), %rax     # 0x39530
cmpq $0x0, (%rax,%rcx,8)
je 0x2623a
movslq -0x24(%rbp), %rcx
leaq 0x13312(%rip), %rax     # 0x39530
movq (%rax,%rcx,8), %rdi
callq 0x6040
movslq -0x24(%rbp), %rcx
leaq 0x132fe(%rip), %rax     # 0x39530
movq $0x0, (%rax,%rcx,8)
jmp 0x26320
movslq -0x24(%rbp), %rcx
leaq 0x13626(%rip), %rax     # 0x39870
movb $0x1, (%rax,%rcx)
movslq -0x24(%rbp), %rcx
leaq 0x133a7(%rip), %rax     # 0x39600
cmpq $0x0, (%rax,%rcx,8)
je 0x26287
movslq -0x24(%rbp), %rcx
leaq 0x13395(%rip), %rax     # 0x39600
movq (%rax,%rcx,8), %rdi
callq 0x6040
movslq -0x24(%rbp), %rcx
leaq 0x13381(%rip), %rax     # 0x39600
movq $0x0, (%rax,%rcx,8)
jmp 0x26320
movslq -0x24(%rbp), %rcx
leaq 0x13619(%rip), %rax     # 0x398b0
movb $0x1, (%rax,%rcx)
movslq -0x24(%rbp), %rcx
leaq 0x134da(%rip), %rax     # 0x39780
cmpq $0x0, (%rax,%rcx,8)
je 0x262d4
movslq -0x24(%rbp), %rcx
leaq 0x134c8(%rip), %rax     # 0x39780
movq (%rax,%rcx,8), %rdi
callq 0x6040
movslq -0x24(%rbp), %rcx
leaq 0x134b4(%rip), %rax     # 0x39780
movq $0x0, (%rax,%rcx,8)
jmp 0x26320
movslq -0x24(%rbp), %rcx
leaq 0x135af(%rip), %rax     # 0x39890
movb $0x1, (%rax,%rcx)
movslq -0x24(%rbp), %rcx
leaq 0x133c0(%rip), %rax     # 0x396b0
cmpq $0x0, (%rax,%rcx,8)
je 0x2631e
movslq -0x24(%rbp), %rcx
leaq 0x133ae(%rip), %rax     # 0x396b0
movq (%rax,%rcx,8), %rdi
callq 0x6040
movslq -0x24(%rbp), %rcx
leaq 0x1339a(%rip), %rax     # 0x396b0
movq $0x0, (%rax,%rcx,8)
jmp 0x26320
cmpq $0x0, -0x10(%rbp)
jne 0x2633c
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x23060
movq %rax, %rdi
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)