// File: /workspace/github_c_makefile_star2_O1/return5[P]c_ish_one/./src/attack.c
// Function: getInput
static void getInput(int *const run_away, int *const play) {
	wclear(prompt_win);
	switch(getch()) {
		case '1': attackEnemySelection(PLAYER,ENEMY);
			break;
		case '2': (PLAYER->defense_up == 0) ? raiseDefense(PLAYER) : (playerRetry("sorry,you cant raise your defenses any higher."), getInput(run_away,play));
			break;
		case '3': (PLAYER->special_count == 0) ? useSpecial(PLAYER,ENEMY) : (playerRetry("you cant use your special more than once per fight."), getInput(run_away,play));
			break;
		case '4': 
			*run_away = runAway();
			refreshPrompt();
			break;	
		case '5': (PLAYER->food > 0) ? eatFood() : playerRetry("sorry, you dont have any food to eat.");
			break;
		default: 
			playerRetry("sorry, wrong key pressed. try again."); 
			getInput(run_away,play);
			break;	
	}
	if (PLAYER->health < 1 || ENEMY->health < 1 || *run_away == 1) {
		*play = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb946(%rip), %r12      # 0xd118
movq (%r12), %rdi
callq 0x1090
movq 0xb7ee(%rip), %r15      # 0xcfd0
movq (%r15), %rdi
callq 0x1080
addl $-0x31, %eax
cmpl $0x4, %eax
ja 0x193a
leaq 0x5833(%rip), %rcx      # 0x7030
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb92b(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xb925(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1a6d
jmp 0x19c2
leaq 0xb905(%rip), %r13      # 0xd138
movq (%r13), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x2c(%rax)
jle 0x1965
movq (%r12), %rdi
leaq 0x6886(%rip), %rsi      # 0x80d6
xorl %eax, %eax
callq 0x1190
movq (%r12), %rdi
callq 0x10d0
movq (%r15), %rdi
callq 0x1080
movq (%r13), %rax
movq 0x28(%rax), %rax
movl (%rax), %edx
movl 0xc(%rax), %ecx
addl $0xa, %edx
movl %edx, (%rax)
decl 0x2c(%rax)
cmpl %ecx, %edx
jle 0x19c2
movl %ecx, (%rax)
jmp 0x19c2
leaq 0xb8a5(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x8(%rdi)
je 0x1973
leaq 0x5cd2(%rip), %rdi      # 0x757d
jmp 0x1941
leaq 0xb889(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x1c(%rax), %eax
addl $-0x13, %eax
leaq 0xb86d(%rip), %rcx      # 0xd138
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl $0x0, 0x4(%rcx)
jne 0x1953
cmpl $-0x7, %eax
ja 0x1953
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x18dd
cltq
imulq $0x30000001, %rax, %rax # imm = 0x30000001
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x3b, %rax
addl %ecx, %eax
movl $0x1, %ebp
cmpl $0x2, %eax
jae 0x1998
movq (%r12), %rdi
leaq 0x6715(%rip), %rsi      # 0x802d
jmp 0x19a7
leaq 0xb814(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x24(%rdi)
je 0x1988
leaq 0x5c16(%rip), %rdi      # 0x754e
jmp 0x1941
leaq 0x5c96(%rip), %rdi      # 0x75d7
callq 0x1c0c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17ba
jmp 0x19c2
movq (%r12), %rdi
cmpl $-0x6, %eax
jae 0x198f
leaq 0x674c(%rip), %rsi      # 0x80af
jmp 0x19a5
leaq 0x5c45(%rip), %rdi      # 0x75b1
callq 0x1c0c
jmp 0x19c2
leaq 0xb7c6(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1c45
jmp 0x19c2
callq 0x1bc0
jmp 0x19c2
leaq 0x66ef(%rip), %rsi      # 0x8085
jmp 0x19a5
jne 0x19ae
movq (%r12), %rdi
leaq 0x66b0(%rip), %rsi      # 0x8055
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1190
movl %ebp, (%r14)
movq (%r12), %rdi
callq 0x10d0
movq (%r15), %rdi
callq 0x1080
leaq 0xb76f(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x19ee
leaq 0xb764(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x19ee
cmpl $0x1, (%r14)
jne 0x19f4
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq