// File: malcolmyeh[P]CC3K/floor.cc
// Function: Floor::dragonPosition(Posn)
Posn Floor::dragonPosition(Posn pos) {
	Posn p;
	do {
		int i = rand() % 8;
		std::string dir[8] = {"ea", "we", "no", "so", "ne", "nw", "sw", "se"};
		p = pos.getNew(dir[i]);
	} while (!this->validTile(p));
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x54a0
callq 0x4090
movl %eax, %edx
addl $0x7, %edx
testl %eax, %eax
movl %eax, %ecx
cmovsl %edx, %ecx
andl $-0x8, %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x144(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x190(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x4300
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rdx
leaq 0x17cdf(%rip), %rsi     # 0x1e1a3
callq 0x4270
jmp 0x64cb
leaq -0x100(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13d(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x4300
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rdx
leaq 0x17c9e(%rip), %rsi     # 0x1e1a6
callq 0x4270
jmp 0x650f
leaq -0xe0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13e(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x4300
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rdx
leaq 0x17c5d(%rip), %rsi     # 0x1e1a9
callq 0x4270
jmp 0x6553
leaq -0xc0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x13f(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x4300
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rdx
leaq 0x17c1c(%rip), %rsi     # 0x1e1ac
callq 0x4270
jmp 0x6597
leaq -0xa0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x140(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x4300
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rdx
leaq 0x17bdb(%rip), %rsi     # 0x1e1af
callq 0x4270
jmp 0x65db
leaq -0x80(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x141(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x4300
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rdx
leaq 0x17b9d(%rip), %rsi     # 0x1e1b2
callq 0x4270
jmp 0x661c
leaq -0x60(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x142(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x4300
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rdx
leaq 0x17b62(%rip), %rsi     # 0x1e1b8
callq 0x4270
jmp 0x665d
leaq -0x40(%rbp), %rax
movq %rax, -0x200(%rbp)
movq %rax, -0x128(%rbp)
leaq -0x143(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x4300
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %rdx
leaq 0x17b1e(%rip), %rsi     # 0x1e1b5
callq 0x4270
jmp 0x669e
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
movslq -0x1c(%rbp), %rax
shlq $0x5, %rax
leaq -0x120(%rbp,%rax), %rsi
leaq -0x170(%rbp), %rdi
callq 0x40e0
jmp 0x6723
leaq -0x10(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x5240
movq %rax, -0x208(%rbp)
jmp 0x673c
movq -0x208(%rbp), %rax
movq %rax, -0x14c(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
callq 0x5470
jmp 0x675c
leaq -0x170(%rbp), %rdi
callq 0x4130
leaq -0x120(%rbp), %rax
movq %rax, -0x218(%rbp)
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x220(%rbp)
callq 0x4130
movq -0x218(%rbp), %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x210(%rbp)
jne 0x6783
jmp 0x67b6
movq -0x180(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rsi
callq 0x63d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x6467
movq -0x8(%rbp), %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x68aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x689e
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 0x68fd
jmp 0x694a
movq -0x128(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x228(%rbp)
je 0x6948
movq -0x228(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x230(%rbp)
callq 0x4130
movq -0x230(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x228(%rbp)
jne 0x6917
jmp 0x694a
jmp 0x69cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x6981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4130
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 0x699c
jmp 0x69cf
movq -0x138(%rbp), %rdi
callq 0x42f0
nopl (%rax,%rax)