// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/rings.c
// Function: gethand
bool gethand(bool isrmv)
{
	int c;
	char *ptr;
	struct object *obj;

	while(1) {
		addmsg("Left or Right ring");
		if (isrmv)
			addmsg(starlist);
		addmsg("? ");
		endmsg();
		c = readchar();
		if (isupper(c))
			c = tolower(c);
		if (c == '*' && isrmv) {
			wclear(hw);
			obj = cur_ring[LEFT];
			if (obj != NULL)
				ptr = inv_name(obj, TRUE);
			else
				ptr = "none";
			wprintw(hw, "L)  %s\n\r",ptr);
			obj = cur_ring[RIGHT];
			if (obj != NULL)
				ptr = inv_name(obj, TRUE);
			else
				ptr = "none";
			wprintw(hw, "R)  %s\n\r", ptr);
			wprintw(hw, "\n\r\nWhich hand? ");
			draw(hw);
			c = readchar();
			if (isupper(c))
				c = tolower(c);
			restscr(cw);
		}
		if (c == 'l')
			return LEFT;
		else if (c == 'r')
			return RIGHT;
		else if (c == ESCAPE)
			return -1;
		mpos = 0;
		msg("L or R");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x2(%rbp)
leaq 0x14ce1(%rip), %rdi     # 0x2c3e8
movb $0x0, %al
callq 0xda30
testb $0x1, -0x2(%rbp)
je 0x17722
leaq 0x1bc85(%rip), %rdi     # 0x333a0
movb $0x0, %al
callq 0xda30
leaq 0x15478(%rip), %rdi     # 0x2cba1
movb $0x0, %al
callq 0xda30
movb $0x0, %al
callq 0xdad0
movb $0x0, %al
callq 0xdce0
movsbl %al, %eax
movl %eax, -0x8(%rbp)
callq 0x65b0
movq (%rax), %rax
movslq -0x8(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x17769
movl -0x8(%rbp), %edi
callq 0x6320
movl %eax, -0x8(%rbp)
cmpl $0x2a, -0x8(%rbp)
jne 0x17895
testb $0x1, -0x2(%rbp)
je 0x17895
leaq 0x226d4(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
leaq 0x1fa2d(%rip), %rax     # 0x371c0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x177b5
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x23060
movq %rax, -0x10(%rbp)
jmp 0x177c0
leaq 0x14c3f(%rip), %rax     # 0x2c3fb
movq %rax, -0x10(%rbp)
leaq 0x22691(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x14c2b(%rip), %rsi     # 0x2c400
movb $0x0, %al
callq 0x6510
leaq 0x1f9dd(%rip), %rax     # 0x371c0
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x17806
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x23060
movq %rax, -0x10(%rbp)
jmp 0x17811
leaq 0x14bee(%rip), %rax     # 0x2c3fb
movq %rax, -0x10(%rbp)
leaq 0x22640(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x14be3(%rip), %rsi     # 0x2c409
movb $0x0, %al
callq 0x6510
leaq 0x22624(%rip), %rax     # 0x39e58
movq (%rax), %rdi
leaq 0x14bd4(%rip), %rsi     # 0x2c412
movb $0x0, %al
callq 0x6510
leaq 0x2260c(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x61f0
movb $0x0, %al
callq 0xdce0
movsbl %al, %eax
movl %eax, -0x8(%rbp)
callq 0x65b0
movq (%rax), %rax
movslq -0x8(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x17886
movl -0x8(%rbp), %edi
callq 0x6320
movl %eax, -0x8(%rbp)
leaq 0x225c3(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0xe2d0
cmpl $0x6c, -0x8(%rbp)
jne 0x178a1
movb $0x0, -0x1(%rbp)
jmp 0x178dd
cmpl $0x72, -0x8(%rbp)
jne 0x178ad
movb $0x1, -0x1(%rbp)
jmp 0x178dd
cmpl $0x1b, -0x8(%rbp)
jne 0x178b9
movb $0x1, -0x1(%rbp)
jmp 0x178dd
jmp 0x178bb
jmp 0x178bd
leaq 0x1f41c(%rip), %rax     # 0x36ce0
movl $0x0, (%rax)
leaq 0x14b51(%rip), %rdi     # 0x2c422
movb $0x0, %al
callq 0xd8f0
jmp 0x17700
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)