// File: /workspace/github_c_makefile_star2_O3/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 0xb967(%rip), %r12      # 0xd118
movq (%r12), %rdi
callq 0x1090
movq 0xb80f(%rip), %r15      # 0xcfd0
movq (%r15), %rdi
callq 0x1080
addl $-0x31, %eax
cmpl $0x4, %eax
ja 0x1919
leaq 0x5884(%rip), %rcx      # 0x7060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb94c(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xb946(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1a4c
jmp 0x19a1
leaq 0xb926(%rip), %r13      # 0xd138
movq (%r13), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x2c(%rax)
jle 0x1944
movq (%r12), %rdi
leaq 0x68d7(%rip), %rsi      # 0x8106
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 0x19a1
movl %ecx, (%rax)
jmp 0x19a1
leaq 0xb8c6(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x8(%rdi)
je 0x1952
leaq 0x5d23(%rip), %rdi      # 0x75ad
jmp 0x1920
leaq 0xb8aa(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x1c(%rax), %eax
addl $-0x13, %eax
leaq 0xb88e(%rip), %rcx      # 0xd138
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl $0x0, 0x4(%rcx)
jne 0x1932
cmpl $-0x7, %eax
ja 0x1932
callq 0x11c0
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jg 0x18bc
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 0x1977
movq (%r12), %rdi
leaq 0x6766(%rip), %rsi      # 0x805d
jmp 0x1986
leaq 0xb835(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x24(%rdi)
je 0x1967
leaq 0x5c67(%rip), %rdi      # 0x757e
jmp 0x1920
leaq 0x5ce7(%rip), %rdi      # 0x7607
callq 0x1be7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1799
jmp 0x19a1
movq (%r12), %rdi
cmpl $-0x6, %eax
jae 0x196e
leaq 0x679d(%rip), %rsi      # 0x80df
jmp 0x1984
leaq 0x5c96(%rip), %rdi      # 0x75e1
callq 0x1be7
jmp 0x19a1
leaq 0xb7e7(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1c20
jmp 0x19a1
callq 0x1b9b
jmp 0x19a1
leaq 0x6740(%rip), %rsi      # 0x80b5
jmp 0x1984
jne 0x198d
movq (%r12), %rdi
leaq 0x6701(%rip), %rsi      # 0x8085
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1190
movl %ebp, (%r14)
movq (%r12), %rdi
callq 0x10d0
movq (%r15), %rdi
callq 0x1080
leaq 0xb790(%rip), %rax      # 0xd138
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x19cd
leaq 0xb785(%rip), %rax      # 0xd140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x19cd
cmpl $0x1, (%r14)
jne 0x19d3
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq