// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc97a(%rip), %r15      # 0xe118
movq (%r15), %rdi
callq 0x1090
movq 0xc823(%rip), %rax      # 0xdfd0
movq (%rax), %rdi
callq 0x1080
addl $-0x31, %eax
cmpl $0x4, %eax
ja 0x18d8
leaq 0x5898(%rip), %rcx      # 0x7060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc960(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rdi
leaq 0xc95a(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x19f4
jmp 0x1952
leaq 0xc93a(%rip), %r12      # 0xe138
movq (%r12), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x2c(%rax)
jle 0x1902
movq (%r15), %rdi
leaq 0x68ec(%rip), %rsi      # 0x8106
xorl %eax, %eax
callq 0x1190
callq 0x1769
movq (%r12), %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 0x1952
movl %ecx, (%rax)
jmp 0x1952
leaq 0xc8e7(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x8(%rdi)
je 0x1910
leaq 0x5d44(%rip), %rdi      # 0x75ad
jmp 0x18df
leaq 0xc8ce(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x1c(%rax), %eax
addl $-0x13, %eax
leaq 0xc8b2(%rip), %rcx      # 0xe138
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
cmpl $0x0, 0x4(%rcx)
jne 0x18f1
cmpl $-0x7, %eax
ja 0x18f1
pushq $0x2
popq %rdi
callq 0x1d8c
pushq $0x1
popq %rbp
cmpl $0x2, %eax
jae 0x1935
movq (%r15), %rdi
leaq 0x67a7(%rip), %rsi      # 0x805d
jmp 0x1943
leaq 0xc876(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, 0x24(%rdi)
je 0x1925
leaq 0x5ca8(%rip), %rdi      # 0x757e
jmp 0x18df
leaq 0x5d28(%rip), %rdi      # 0x7607
callq 0x1aef
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1789
jmp 0x1952
movq (%r15), %rdi
cmpl $-0x6, %eax
jae 0x192c
leaq 0x67df(%rip), %rsi      # 0x80df
jmp 0x1941
leaq 0x5cd8(%rip), %rdi      # 0x75e1
callq 0x1aef
jmp 0x1952
leaq 0xc829(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rsi
callq 0x1b16
jmp 0x1952
callq 0x1abe
jmp 0x1952
leaq 0x6782(%rip), %rsi      # 0x80b5
jmp 0x1941
jne 0x194a
movq (%r15), %rdi
leaq 0x6744(%rip), %rsi      # 0x8085
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1190
movl %ebp, (%r14)
callq 0x1769
leaq 0xc7df(%rip), %rax      # 0xe138
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x197e
leaq 0xc7d4(%rip), %rax      # 0xe140
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpl $0x0, (%rax)
jle 0x197e
cmpl $0x1, (%r14)
jne 0x1981
andl $0x0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq