// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movq %rdi, -0x30(%rbp)
movq %rdx, -0x60(%rbp)
movq 0x7d8(%rsi), %rax
cmpq %rax, 0x7e0(%rsi)
je 0x7e58
movq %rsi, %r15
movq -0x30(%rbp), %rcx
addq $0x10, %rcx
movq %rcx, -0x58(%rbp)
movq $-0x8, %r14
xorl %r12d, %r12d
leaq -0x60(%rbp), %rbx
movq (%rax,%r12,8), %rdi
callq 0x15c2c
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x51ba
testb %al, %al
je 0x7e37
movq 0x7d8(%r15), %rax
movq 0x7e0(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x807b
movq (%rax,%r12,8), %r13
movq %r13, %rdi
callq 0x16094
testb %al, %al
je 0x7e8b
incq %r12
movq 0x7d8(%r15), %rax
movq 0x7e0(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
addq $-0x8, %r14
cmpq %r12, %rcx
ja 0x7dec
movq -0x30(%rbp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x154ae(%rip), %rsi     # 0x1d318
leaq 0x154ae(%rip), %rdx     # 0x1d31f
movq %rbx, %rdi
callq 0x501a
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x1608a
movl %eax, %ebx
movq 0x7d8(%r15), %rax
movq 0x7e0(%r15), %rdx
movq %rax, %rcx
subq %r14, %rcx
cmpq %rdx, %rcx
je 0x7ecc
leaq (%rax,%r12,8), %rdi
leaq (%rax,%r12,8), %rsi
addq $0x8, %rsi
subq %rax, %rdx
addq %r14, %rdx
callq 0x4230
movq 0x7e0(%r15), %rdx
addq $-0x8, %rdx
movq %rdx, 0x7e0(%r15)
movq 0x18(%r13), %rdi
leaq 0x28(%r13), %rax
cmpq %rax, %rdi
je 0x7eef
movq (%rax), %rsi
incq %rsi
callq 0x4170
movl $0x38, %esi
movq %r13, %rdi
callq 0x4170
movq 0xfe0(%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *(%rax)
movl %ebx, %r15d
negl %r15d
cmovsl %ebx, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
leaq -0x70(%rbp), %r13
jb 0x7f6e
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x7f65
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x7f6b
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x7f6e
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x7f32
addl $-0x3, %r12d
jmp 0x7f6e
addl $-0x2, %r12d
jmp 0x7f6e
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq -0x80(%rbp), %r14
movq %r13, (%r14)
movq %r14, %rdi
movl $0x2d, %edx
callq 0x41b0
addq (%r14), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0xa44c
leaq 0x153b5(%rip), %rcx     # 0x1d356
movl $0xb, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4190
leaq -0x40(%rbp), %r14
movq %r14, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq -0x30(%rbp), %rbx
je 0x7fdb
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x7fe2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x50(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1535e(%rip), %rsi     # 0x1d362
callq 0x4280
movq -0x58(%rbp), %rsi
movq %rsi, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x802b
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8031
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x805d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x80(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e79
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x7e79
leaq 0x1574d(%rip), %rdi     # 0x1d7cf
movq %r12, %rsi
xorl %eax, %eax
callq 0x41e0
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x80a9
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x80a9
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x80c2
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4170
movq %rbx, %rdi
callq 0x4250