// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x150a5(%rip), %rdi     # 0x1d40f
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xb178
xorl %eax, %eax
callq 0xb447
movl %eax, %ebx
leaq 0x254dd(%rip), %rax     # 0x2d860
andl $0x0, (%rax)
cmpb $0x2a, %bl
jne 0x840f
leaq 0x28642(%rip), %r15     # 0x309d8
movq (%r15), %rdi
callq 0x6120
leaq 0x2373b(%rip), %r12     # 0x2bae0
pushq $0x17
popq %r13
pushq $-0x1
popq %rbx
movl %ebp, %eax
xorl %edx, %edx
divl %r13d
cmpb $0x0, (%r12)
movq (%r15), %rdi
je 0x8445
imull $-0x17, %eax, %esi
addl %ebp, %esi
cmpl $0x17, %ebp
movl $0x0, %edx
pushq $0x28
popq %rax
cmovael %eax, %edx
callq 0x6470
cmpl $-0x1, %eax
je 0x83f8
movq (%r15), %r14
movsbl (%r12), %edi
callq 0x6400
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x6530
movq (%r15), %rdi
movq 0x8(%r12), %rsi
movl %ebx, %edx
callq 0x6530
incl %ebp
addq $0x10, %r12
jmp 0x83ac
movsbl %bl, %ebp
leaq 0x285b7(%rip), %rax     # 0x309d0
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
leaq 0x236b4(%rip), %r14     # 0x2bae0
movb (%r14), %al
testb %al, %al
je 0x84cc
cmpb %bl, %al
je 0x84d0
addq $0x10, %r14
jmp 0x842c
movq 0x21b74(%rip), %rax     # 0x29fc0
movl (%rax), %esi
decl %esi
xorl %edx, %edx
callq 0x6470
movq (%r15), %rdi
leaq 0x21e9f(%rip), %rsi     # 0x2a300
xorl %eax, %eax
callq 0x64f0
movq (%r15), %rdi
callq 0x6200
movq (%r15), %rdi
pushq $0x20
popq %rsi
callq 0xb399
movq (%r15), %rdi
callq 0x6120
movq (%r15), %rdi
callq 0x6200
leaq 0x2853e(%rip), %r14     # 0x309d0
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
movq (%r14), %rdi
callq 0x6480
movq (%r14), %rdi
testq %rdi, %rdi
je 0x84b4
movswl 0x4(%rdi), %ebx
incl %ebx
pushq $0x1
popq %rcx
xorl %esi, %esi
movl %ebx, %edx
callq 0x61b0
leaq 0x253cc(%rip), %rax     # 0x2d893
movb $0x0, (%rax)
jmp 0x850b
xorl %eax, %eax
jmp 0x84ef
movl %ebp, %edi
callq 0x6400
movq 0x8(%r14), %rdx
leaq 0x19022(%rip), %rdi     # 0x21504
movq %rax, %rsi
xorl %eax, %eax
callq 0xb178
movb (%r14), %al
cmpb %bl, %al
je 0x850b
movl %ebp, %edi
callq 0x6400
leaq 0x14f38(%rip), %rdi     # 0x1d439
movq %rax, %rsi
xorl %eax, %eax
callq 0xb178
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq