// File: /workspace/github_c_makefile_star2_O2/return5[P]c_ish_one/./src/attack.c
// Function: attackEnemy
int attackEnemy(int *const continue_game) {
	int run_away = 0;
	int ran_away = 0; //returned value of run_away before it is reset. needed for running away from a building.
	int play = 1;
	setPlayerStrings();
	wclear(prompt_win);
	wprintw(prompt_win,"%s",ENEMY->prompt);
	refreshPrompt();
	while (play == 1) {
		playerTurn(&play,&run_away);
		if (play == 1) {
			computerTurn(&play);
		}
	}
	(PLAYER->health > 0) ? (playerAliveReset(&run_away,&ran_away)) : (*continue_game = 0);
	return ran_away;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rdi, 0x8(%rsp)
andl $0x0, 0x4(%rsp)
movl $0x1, (%rsp)
leaq 0xcda0(%rip), %rbp      # 0xe140
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5f57(%rip), %rsi      # 0x730a
leaq 0x1f0(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1180
movq %r14, %rdi
callq 0x10a0
movw $0x2e, %bx
movw %bx, 0x200(%rsp,%rax)
movups 0x8a73(%rip), %xmm0     # 0x9e53
movups %xmm0, 0x1f0(%rsp,%rax)
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5f2e(%rip), %rsi      # 0x7329
leaq 0x330(%rsp), %rdi
xorl %eax, %eax
callq 0x1180
movw %bx, 0x170(%rsp)
movaps 0x6d37(%rip), %xmm0     # 0x8150
movaps %xmm0, 0x150(%rsp)
movaps 0x6d38(%rip), %xmm0     # 0x8160
movaps %xmm0, 0x160(%rsp)
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5f0a(%rip), %rsi      # 0x734d
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1180
movq %r14, %rdi
callq 0x10a0
movabsq $0x64206425206f6420, %rcx # imm = 0x64206425206F6420
movq %rcx, 0xb0(%rsp,%rax)
movabsq $0x2e6567616d6164, %rcx # imm = 0x2E6567616D6164
movq %rcx, 0xb7(%rsp,%rax)
leaq 0xccb0(%rip), %rbx      # 0xe138
movq (%rbx), %rax
movq 0x28(%rax), %rax
movl 0x30(%rax), %ecx
cmpl $0x2, %ecx
je 0x14f4
cmpl $0x1, %ecx
je 0x14cc
testl %ecx, %ecx
jne 0x155b
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5ed2(%rip), %rsi      # 0x7389
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x1180
leaq 0x5f02(%rip), %rsi      # 0x73cc
jmp 0x1539
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5f1c(%rip), %rsi      # 0x73fb
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x1180
leaq 0x5f42(%rip), %rsi      # 0x7434
jmp 0x1539
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x5f5f(%rip), %rsi      # 0x7466
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1180
movq %r14, %rdi
callq 0x10a0
movups 0x901a(%rip), %xmm0     # 0xa53f
movups %xmm0, 0x10(%rsp,%rax)
movl $0x2e6567, 0x20(%rsp,%rax) # imm = 0x2E6567
leaq 0x5f53(%rip), %rsi      # 0x748c
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x290(%rsp), %rdi
xorl %eax, %eax
callq 0x1180
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x48(%rax), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x1050
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x50(%rax), %rdi
leaq 0x330(%rsp), %rsi
callq 0x1050
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x68(%rax), %rdi
leaq 0x150(%rsp), %rsi
callq 0x1050
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x78(%rax), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1050
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x88(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1050
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq 0x90(%rax), %rdi
leaq 0x290(%rsp), %rsi
callq 0x1050
leaq 0xcb2a(%rip), %r12      # 0xe118
movq (%r12), %rdi
callq 0x1090
movq (%r12), %rdi
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0xa0(%rax), %rdx
leaq 0x5d15(%rip), %rsi      # 0x7326
xorl %eax, %eax
callq 0x1190
callq 0x1769
pushq $0x1
popq %rax
leaq 0x4(%rsp), %r14
movq %rsp, %r15
leaq 0x5e97(%rip), %r13      # 0x74c6
movq (%rbx), %rcx
movq 0x28(%rcx), %rcx
cmpl $0x1, %eax
jne 0x16da
cmpl $0x0, 0x4(%rcx)
je 0x166d
movq (%r12), %rdi
callq 0x1090
movq (%r12), %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1190
movq (%rbx), %rax
movq 0x28(%rax), %rax
decl 0x4(%rax)
callq 0x1769
jmp 0x167d
callq 0x198a
movq %r14, %rdi
movq %r15, %rsi
callq 0x1789
cmpl $0x1, (%rsp)
jne 0x16d2
movq (%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x0, 0x4(%rax)
je 0x16ca
movq (%r12), %rdi
callq 0x1090
movq (%r12), %rdi
movq (%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x6a7e(%rip), %rsi      # 0x812f
xorl %eax, %eax
callq 0x1190
movq (%rbp), %rax
movq 0x28(%rax), %rax
decl 0x4(%rax)
callq 0x1769
jmp 0x16d2
movq %r15, %rdi
callq 0x261c
movl (%rsp), %eax
jmp 0x162f
cmpl $0x0, (%rcx)
jle 0x1706
movl 0x28(%rcx), %eax
movl %eax, 0x14(%rcx)
andl $0x0, 0x24(%rcx)
andq $0x0, 0x4(%rcx)
movl 0x4(%rsp), %eax
movq (%rbp), %rcx
testl %eax, %eax
je 0x1712
movb 0x20(%rcx), %dl
movb %dl, 0x21(%rcx)
movb $0x65, 0x20(%rcx)
jmp 0x1757
movq 0x8(%rsp), %rax
andl $0x0, (%rax)
xorl %eax, %eax
jmp 0x1757
movl 0xc(%rcx), %edx
xorl %eax, %eax
cmpl $0x1, %edx
jne 0x1724
leaq 0xc(%rcx), %rsi
xorl %edx, %edx
jmp 0x172c
movq 0x30(%rcx), %rsi
addq $0xc, %rsi
andl $0x0, (%rsi)
leaq 0xc9ea(%rip), %rsi      # 0xe120
addl $0xa, (%rsi)
cmpb $0x65, 0x20(%rcx)
jne 0x1757
cmpl $0x5, %edx
ja 0x174f
movb $0x78, %sil
pushq $0x2c
popq %rdi
btl %edx, %edi
jb 0x1753
movb 0x21(%rcx), %sil
movb %sil, 0x20(%rcx)
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq