// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/command.c
// Function: call
int call()
{
	struct object *obj;
	struct linked_list *item;
	char **guess, *elsewise;
	int wh;

	if ((item = get_item("call", 0)) == NULL)
		return 0;
	obj = OBJPTR(item);
	wh = obj->o_which;
	switch (obj->o_type) {
	case RING:
		guess = r_guess;
		elsewise = (r_guess[wh] != NULL ? r_guess[wh] : r_stones[wh]);
	when POTION:
		guess = p_guess;
		elsewise = (p_guess[wh] != NULL ? p_guess[wh] : p_colors[wh]);
	when SCROLL:
		guess = s_guess;
		elsewise = (s_guess[wh] != NULL ? s_guess[wh] : s_names[wh]);
	when STICK:
		guess = ws_guess;
		elsewise =(ws_guess[wh] != NULL ?
			ws_guess[wh] : ws_stuff[wh].ws_made);
	otherwise:
		msg("You can't call %ss anything",obj->o_typname);
		return 0;
	}
	msg("Was called \"%s\"", elsewise);
	msg(callit);
	if (guess[wh] != NULL)
		free(guess[wh]);
	strcpy(prbuf, elsewise);
	if (get_str(prbuf, cw) == NORM) {
		guess[wh] = new(strlen(prbuf) + 1);
		strcpy(guess[wh], prbuf);
	}
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x20284(%rip), %rdi     # 0x29943
xorl %esi, %esi
callq 0x14b90
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x96dc
movl $0x0, -0x4(%rbp)
jmp 0x993a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
addl $-0x21, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x1e, %eax
ja 0x9868
movq -0x38(%rbp), %rax
leaq 0x1ff22(%rip), %rcx     # 0x29638
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2ff8a(%rip), %rax     # 0x396b0
movq %rax, -0x20(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x2ff7b(%rip), %rax     # 0x396b0
cmpq $0x0, (%rax,%rcx,8)
je 0x9751
movslq -0x2c(%rbp), %rcx
leaq 0x2ff69(%rip), %rax     # 0x396b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x9764
movslq -0x2c(%rbp), %rcx
leaq 0x303b4(%rip), %rax     # 0x39b10
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x988a
leaq 0x2fe88(%rip), %rax     # 0x39600
movq %rax, -0x20(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x2fe79(%rip), %rax     # 0x39600
cmpq $0x0, (%rax,%rcx,8)
je 0x97a3
movslq -0x2c(%rbp), %rcx
leaq 0x2fe67(%rip), %rax     # 0x39600
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x97b6
movslq -0x2c(%rbp), %rcx
leaq 0x302b2(%rip), %rax     # 0x39a60
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x988a
leaq 0x2fd66(%rip), %rax     # 0x39530
movq %rax, -0x20(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x2fd57(%rip), %rax     # 0x39530
cmpq $0x0, (%rax,%rcx,8)
je 0x97f5
movslq -0x2c(%rbp), %rcx
leaq 0x2fd45(%rip), %rax     # 0x39530
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x9808
movslq -0x2c(%rbp), %rcx
leaq 0x30190(%rip), %rax     # 0x39990
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x988a
leaq 0x2ff67(%rip), %rax     # 0x39780
movq %rax, -0x20(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x2ff58(%rip), %rax     # 0x39780
cmpq $0x0, (%rax,%rcx,8)
je 0x9844
movslq -0x2c(%rbp), %rcx
leaq 0x2ff46(%rip), %rax     # 0x39780
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
jmp 0x985e
movslq -0x2c(%rbp), %rcx
leaq 0x30391(%rip), %rax     # 0x39be0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x988a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
leaq 0x200d1(%rip), %rdi     # 0x29948
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
jmp 0x993a
movq -0x28(%rbp), %rsi
leaq 0x200cf(%rip), %rdi     # 0x29964
movb $0x0, %al
callq 0xd8f0
leaq 0x29af3(%rip), %rdi     # 0x33396
movb $0x0, %al
callq 0xd8f0
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x98ca
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6040
movq -0x28(%rbp), %rsi
leaq 0x2da2b(%rip), %rdi     # 0x37300
callq 0x60d0
leaq 0x3056f(%rip), %rax     # 0x39e50
movq (%rax), %rsi
leaq 0x2da15(%rip), %rdi     # 0x37300
callq 0x13c10
cmpl $0x0, %eax
jne 0x9933
leaq 0x2da04(%rip), %rdi     # 0x37300
callq 0x6160
addq $0x1, %rax
movl %eax, %edi
callq 0xe520
movq %rax, %rdx
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2d9d2(%rip), %rsi     # 0x37300
callq 0x60d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)