// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/command.c
// Function: help
int help()
{
	extern struct h_list helpstr[];
	struct h_list *strp;
	char helpch;
	int cnt;

	strp = &helpstr[0];
	msg("Character you want help for (* for all): ");
	helpch = readchar();
	mpos = 0;
	/*
	 * If its not a *, print the right help string
	 * or an error if he typed a funny character.
	 */
	if (helpch != '*') {
		wmove(cw, 0, 0);
		while (strp->h_ch) {
			if (strp->h_ch == helpch) {
				msg("%s%s", unctrl(strp->h_ch), strp->h_desc);
				break;
			}
			strp++;
		}
		if (strp->h_ch != helpch)
			msg("Unknown character '%s'", unctrl(helpch));
		return 0;
	}
	/*
	 * Here we print help for everything.
	 * Then wait before we return to command mode
	 */
	wclear(hw);
	cnt = 0;
	while (strp->h_ch) {
		mvwaddstr(hw, cnt % 23, cnt > 22 ? 40 : 0, unctrl(strp->h_ch));
		waddstr(hw, strp->h_desc);
		cnt++;
		strp++;
	}
	wmove(hw, LINES-1, 0);
	wprintw(hw,spacemsg);
	draw(hw);
	wait_for(hw,' ');
	wclear(hw);
	draw(hw);
	wmove(cw, 0, 0);
	wclrtoeol(cw);
	touchwin(cw);
	nochange = FALSE;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x2b9f1(%rip), %rax     # 0x34af0
movq %rax, -0x10(%rbp)
leaq 0x2065d(%rip), %rdi     # 0x29767
movb $0x0, %al
callq 0xd8f0
movb $0x0, %al
callq 0xdce0
movb %al, -0x11(%rbp)
leaq 0x2dbbe(%rip), %rax     # 0x36ce0
movl $0x0, (%rax)
movsbl -0x11(%rbp), %eax
cmpl $0x2a, %eax
je 0x91ca
leaq 0x30d14(%rip), %rax     # 0x39e50
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6490
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x9195
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x9187
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x6420
movq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x24ac0(%rip), %rdi     # 0x2dc3e
movb $0x0, %al
callq 0xd8f0
jmp 0x9195
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
jmp 0x9148
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0x91be
movsbl -0x11(%rbp), %edi
callq 0x6420
movq %rax, %rsi
leaq 0x205da(%rip), %rdi     # 0x29791
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
jmp 0x9379
leaq 0x30c87(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x9281
leaq 0x30c64(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movl -0x18(%rbp), %eax
movl $0x17, %ecx
cltd
idivl %ecx
movl %edx, %esi
movl -0x18(%rbp), %ecx
xorl %edx, %edx
movl $0x28, %eax
cmpl $0x16, %ecx
cmovgl %eax, %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x9220
jmp 0x924b
leaq 0x30c31(%rip), %rax     # 0x39e58
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x6420
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6560
leaq 0x30c06(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6560
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
jmp 0x91e0
leaq 0x30bd0(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq 0x29d4e(%rip), %rax     # 0x32fe0
movl (%rax), %esi
subl $0x1, %esi
xorl %edx, %edx
callq 0x6490
leaq 0x30bb3(%rip), %rax     # 0x39e58
movq (%rax), %rdi
leaq 0x2a061(%rip), %rsi     # 0x33310
movb $0x0, %al
callq 0x6510
leaq 0x30b9b(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x61f0
leaq 0x30b8c(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movl $0x20, %esi
callq 0xdbc0
leaq 0x30b78(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
leaq 0x30b69(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x61f0
leaq 0x30b52(%rip), %rax     # 0x39e50
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6490
leaq 0x30b3f(%rip), %rax     # 0x39e50
movq (%rax), %rdi
callq 0x64a0
leaq 0x30b30(%rip), %rax     # 0x39e50
movq (%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
leaq 0x30b20(%rip), %rcx     # 0x39e50
cmpq (%rcx), %rax
je 0x934b
leaq 0x30b14(%rip), %rax     # 0x39e50
movq (%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9355
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x9355
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %edx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x61a0
leaq 0x2d9a4(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)