// File: /workspace/github_cpp_makefile_star2_O1/malcolmyeh[P]CC3K/floor.cc
// Function: Floor::pickGold[abi:cxx11](Posn)
std::string Floor::pickGold(Posn p) {
	for (int i = 0; i < golds.size(); i++) {
		if (golds.at(i)->getPosition() == p) {
			Gold *tmp = golds.at(i);
			if (!(tmp->isGuarded())) {
				int value = tmp->getValue();
				golds.erase(golds.begin()+i);
				delete tmp;
				this->player->updateGold(value);
				return "You picked " + std::to_string(value) + " gold. ";
			}
		}
	}
	return "invalid";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r12
movq %rdx, -0x88(%rbp)
movq 0x7d8(%rsi), %rax
cmpq %rax, 0x7e0(%rsi)
setne %r13b
je 0x80cd
movq %rsi, %r14
leaq 0x10(%r12), %rcx
movq %rcx, -0x78(%rbp)
xorl %r15d, %r15d
movq %r12, -0x80(%rbp)
movq (%rax,%r15,8), %rdi
callq 0x15d88
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x51b6
testb %al, %al
je 0x80a8
movq 0x7d8(%r14), %rax
movq 0x7e0(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x8105
movq (%rax,%r15,8), %rbx
movq %rbx, %rdi
callq 0x16208
testb %al, %al
jne 0x80a8
movb %al, -0x29(%rbp)
movq %rbx, %rdi
callq 0x161fe
movl %eax, %r12d
movq 0x7d8(%r14), %rax
movq 0x7e0(%r14), %rdx
leaq (%rax,%r15,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x7ef4
leaq (%rax,%r15,8), %rdi
subq %rsi, %rdx
callq 0x4230
movb %r13b, -0x2a(%rbp)
addq $-0x8, 0x7e0(%r14)
movq 0x18(%rbx), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x7f18
movq (%rax), %rsi
incq %rsi
callq 0x4170
movl $0x38, %esi
movq %rbx, %rdi
callq 0x4170
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl %r12d, %esi
callq *(%rax)
movl %r12d, %ebx
negl %ebx
cmovsl %r12d, %ebx
movl $0x1, %r13d
cmpl $0xa, %ebx
jb 0x7f8e
movl $0x4, %r13d
movl %ebx, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x7f85
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7f8b
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7f8e
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x7f55
addl $-0x3, %r13d
jmp 0x7f8e
addl $-0x2, %r13d
jmp 0x7f8e
decl %r13d
shrl $0x1f, %r12d
leal (%r12,%r13), %esi
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
movl $0x2d, %edx
callq 0x41b0
addq -0x70(%rbp), %r12
movq %r12, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0xa510
movl $0xb, %r8d
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x15384(%rip), %rcx     # 0x1d356
callq 0x4190
leaq -0x40(%rbp), %r13
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq -0x80(%rbp), %r12
je 0x7fff
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x8007
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x50(%rbp), %rdi
leaq 0x15339(%rip), %rsi     # 0x1d362
callq 0x4280
movq -0x78(%rbp), %rsi
movq %rsi, (%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8053
movq %rdx, (%r12)
movq (%rcx), %rdx
movq %rdx, 0x10(%r12)
jmp 0x8059
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x8086
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
movb -0x2a(%rbp), %bl
je 0x80a2
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x4170
cmpb $0x0, -0x29(%rbp)
je 0x80fe
incq %r15
movq 0x7d8(%r14), %rax
movq 0x7e0(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
seta %r13b
ja 0x7e68
leaq 0x10(%r12), %rax
movq %rax, (%r12)
leaq 0x1523b(%rip), %rsi     # 0x1d318
leaq 0x1523b(%rip), %rdx     # 0x1d31f
movq %r12, %rdi
callq 0x501a
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %bl
je 0x80cd
jmp 0x80ec
leaq 0x156c3(%rip), %rdi     # 0x1d7cf
movq %r15, %rsi
xorl %eax, %eax
callq 0x41e0
movq %rax, %rbx
jmp 0x8133
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x8133
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x814c
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x4170
movq %rbx, %rdi
callq 0x4250