// File: malcolmyeh[P]CC3K/enemy.cc
// Function: Enemy::withinRange(Posn)
bool Enemy::withinRange(Posn player)
{
    Posn epos = this->getPosition();
    std::string directions[8] = {"ea", "we", "no", "so", "ne", "nw", "se", "sw"};
    for (int i = 0; i < 8; ++i)
    {
        if (epos.getNew(directions[i]) == player)
        {
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x20(%rbp)
movb $0x1, -0x144(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x188(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x4300
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rdx
leaq 0xc25b(%rip), %rsi      # 0x1e1a3
callq 0x4270
jmp 0x11f4f
leaq -0x100(%rbp), %rax
movq %rax, -0x198(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13d(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4300
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rdx
leaq 0xc21a(%rip), %rsi      # 0x1e1a6
callq 0x4270
jmp 0x11f93
leaq -0xe0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13e(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x4300
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
leaq 0xc1d9(%rip), %rsi      # 0x1e1a9
callq 0x4270
jmp 0x11fd7
leaq -0xc0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13f(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x4300
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rdx
leaq 0xc198(%rip), %rsi      # 0x1e1ac
callq 0x4270
jmp 0x1201b
leaq -0xa0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x140(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x4300
movq -0x1c8(%rbp), %rdi
movq -0x1c0(%rbp), %rdx
leaq 0xc157(%rip), %rsi      # 0x1e1af
callq 0x4270
jmp 0x1205f
leaq -0x80(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x141(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x4300
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rdx
leaq 0xc119(%rip), %rsi      # 0x1e1b2
callq 0x4270
jmp 0x120a0
leaq -0x60(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x142(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x1e0(%rbp), %rdx
leaq 0xc0db(%rip), %rsi      # 0x1e1b5
callq 0x4270
jmp 0x120e1
leaq -0x40(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x143(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x4300
movq -0x1f8(%rbp), %rdi
movq -0x1f0(%rbp), %rdx
leaq 0xc09d(%rip), %rsi      # 0x1e1b8
callq 0x4270
jmp 0x12122
movb $0x0, -0x144(%rbp)
leaq -0x143(%rbp), %rdi
callq 0x4200
leaq -0x142(%rbp), %rdi
callq 0x4200
leaq -0x141(%rbp), %rdi
callq 0x4200
leaq -0x140(%rbp), %rdi
callq 0x4200
leaq -0x13f(%rbp), %rdi
callq 0x4200
leaq -0x13e(%rbp), %rdi
callq 0x4200
leaq -0x13d(%rbp), %rdi
callq 0x4200
leaq -0x129(%rbp), %rdi
callq 0x4200
movl $0x0, -0x148(%rbp)
cmpl $0x8, -0x148(%rbp)
jge 0x123df
movslq -0x148(%rbp), %rax
shlq $0x5, %rax
leaq -0x120(%rbp,%rax), %rsi
leaq -0x170(%rbp), %rdi
callq 0x40e0
jmp 0x121c1
leaq -0x20(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x5240
movq %rax, -0x200(%rbp)
jmp 0x121da
movq -0x200(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x53f0
movb %al, -0x201(%rbp)
jmp 0x12200
leaq -0x170(%rbp), %rdi
callq 0x4130
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x1221b
jmp 0x123c9
movb $0x1, -0x1(%rbp)
movl $0x1, -0x174(%rbp)
jmp 0x123ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x12329
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x1231d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x12311
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x12305
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x122f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x122ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x122e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x143(%rbp), %rdi
callq 0x4200
leaq -0x142(%rbp), %rdi
callq 0x4200
leaq -0x141(%rbp), %rdi
callq 0x4200
leaq -0x140(%rbp), %rdi
callq 0x4200
leaq -0x13f(%rbp), %rdi
callq 0x4200
leaq -0x13e(%rbp), %rdi
callq 0x4200
leaq -0x13d(%rbp), %rdi
callq 0x4200
leaq -0x129(%rbp), %rdi
callq 0x4200
testb $0x1, -0x144(%rbp)
jne 0x12340
jmp 0x1238d
movq -0x128(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x210(%rbp)
je 0x1238b
movq -0x210(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x218(%rbp)
callq 0x4130
movq -0x218(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x210(%rbp)
jne 0x1235a
jmp 0x1238d
jmp 0x12495
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x12447
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4130
jmp 0x12447
jmp 0x123cb
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x12193
movb $0x0, -0x1(%rbp)
movl $0x1, -0x174(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x228(%rbp)
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x230(%rbp)
callq 0x4130
movq -0x228(%rbp), %rcx
movq -0x230(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x220(%rbp)
jne 0x12408
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
leaq -0x120(%rbp), %rax
movq %rax, -0x240(%rbp)
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x248(%rbp)
callq 0x4130
movq -0x240(%rbp), %rcx
movq -0x248(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x238(%rbp)
jne 0x12462
jmp 0x12495
movq -0x138(%rbp), %rdi
callq 0x42f0
nopw %cs:(%rax,%rax)