// File: /workspace/github_cpp_makefile_star2_O3/malcolmyeh[P]CC3K/floor.cc
// Function: Floor::buyMerchant(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string Floor::buyMerchant(std::string option){
	if (option == "b"){
		if (this->player->getGold() >= 3){
			this->player->updateGold(-3);
			this->player->increaseDef(2);
			return "You purchased a Buckler Shield (Def: " + std::to_string(this->player->getDef()) + "). ";
		} else {
			return "You are too poor. ";
		}
	} else if (option == "t"){
		if (this->player->getGold() >= 6){
			this->player->updateGold(-6);
			this->player->increaseDef(5);
			return "You purchased a Targe Shield (Def: " + std::to_string(this->player->getDef()) + "). ";
		} else {
			return "You are too poor. ";
		}
	} else if (option == "p"){
		if (this->player->getGold() >= 12){
			this->player->updateGold(-12);
			this->player->increaseDef(8);
			return "You purchased a Pavise Shield (Def: " + std::to_string(this->player->getDef()) + "). ";
		} else {
			return "You are too poor. ";
		}
	} else if (option == "n"){
		if (this->player->getGold() >= 3){
			this->player->updateGold(-3);
			this->player->increaseAtk(2);
			return "You purchased a Nodachi (Atk: " + std::to_string(this->player->getAtk()) + "). ";
		} else {
			return "You are too poor. ";
		}
	} else if (option == "k"){
		if (this->player->getGold() >= 7){
			this->player->updateGold(-7);
			this->player->increaseAtk(5);
			return "You purchased a Katana (Atk: " + std::to_string(this->player->getAtk()) + "). ";
		} else {
			return "You are too poor. ";
		}
	} else if (option == "u"){
		if (this->player->getGold() >= 15){
			this->player->updateGold(-15);
			this->player->increaseAtk(8);
			return "You purchased an Uchigatana (Atk: " + std::to_string(this->player->getAtk()) + "). ";
		} else {
			return "You are too poor. ";
		}
	}
	return "Sorry I don't have that item. ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14e0f(%rip), %rsi     # 0x1d4da
movq %rdx, %rdi
callq 0x4070
testl %eax, %eax
je 0x8768
leaq 0x14a95(%rip), %rsi     # 0x1d177
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x881a
leaq 0x14e40(%rip), %rsi     # 0x1d539
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x88cc
leaq 0x152a4(%rip), %rsi     # 0x1d9b4
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x897e
leaq 0x14e58(%rip), %rsi     # 0x1d57f
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8a30
leaq 0x14e61(%rip), %rsi     # 0x1d59f
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8aab
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14e68(%rip), %rsi     # 0x1d5c4
leaq 0x14e7f(%rip), %rdx     # 0x1d5e2
jmp 0x8b5f
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x2, %esi
callq 0xb578
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %r15d
movl %eax, %r14d
negl %r14d
cmovsl %eax, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x8b75
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8b6c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8b72
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8b75
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x87d8
addl $-0x3, %r12d
jmp 0x8b75
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x6, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x5, %esi
callq 0xb578
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %r15d
movl %eax, %r14d
negl %r14d
cmovsl %eax, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x8c21
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8c18
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8c1e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8c21
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x888a
addl $-0x3, %r12d
jmp 0x8c21
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xc, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x8, %esi
callq 0xb578
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %r15d
movl %eax, %r14d
negl %r14d
cmovsl %eax, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x8ccd
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8cc4
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8cca
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8ccd
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x893c
addl $-0x3, %r12d
jmp 0x8ccd
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x2, %esi
callq 0xb56e
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, %r15d
movl %eax, %r14d
negl %r14d
cmovsl %eax, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x8d79
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8d70
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8d76
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8d79
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x89ee
addl $-0x3, %r12d
jmp 0x8d79
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x7, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff9, %esi       # imm = 0xFFFFFFF9
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x5, %esi
callq 0xb56e
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0xa3a2
leaq 0x14af7(%rip), %rsi     # 0x1d581
leaq -0x48(%rbp), %rdi
movq %r14, %rdx
callq 0xa328
leaq 0x15158(%rip), %rdx     # 0x1dbf5
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2cb
jmp 0x8b24
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xf, %eax
jl 0x8b4a
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x8, %esi
callq 0xb56e
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0xa3a2
leaq 0x14a9c(%rip), %rsi     # 0x1d5a1
leaq -0x48(%rbp), %rdi
movq %r14, %rdx
callq 0xa328
leaq 0x150dd(%rip), %rdx     # 0x1dbf5
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2cb
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b3d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x8e73
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x149aa(%rip), %rsi     # 0x1d502
leaq 0x149b5(%rip), %rdx     # 0x1d514
movq %rbx, %rdi
callq 0x501a
jmp 0x8e84
addl $-0x2, %r12d
jmp 0x8b75
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x41b0
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0xa44c
leaq 0x1492d(%rip), %rcx     # 0x1d4dc
movl $0x25, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4190
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8be5
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8bec
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14fe7(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8e17
addl $-0x2, %r12d
jmp 0x8c21
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x41b0
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0xa44c
leaq 0x148ba(%rip), %rcx     # 0x1d515
movl $0x23, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4190
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8c91
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8c98
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14f3b(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8e17
addl $-0x2, %r12d
jmp 0x8ccd
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x41b0
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0xa44c
leaq 0x14834(%rip), %rcx     # 0x1d53b
movl $0x24, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4190
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8d3d
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8d44
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14e8f(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8e17
addl $-0x2, %r12d
jmp 0x8d79
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x41b0
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0xa44c
leaq 0x147ad(%rip), %rcx     # 0x1d560
movl $0x1e, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4190
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8de9
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8df0
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14de3(%rip), %rsi     # 0x1dbf5
callq 0x4280
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x8e39
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8e3f
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x8e6b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8e84
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8e9a
jmp 0x8eb8
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ebb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x8ebb
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x8ef6
jmp 0x8ed1
jmp 0x8eeb
jmp 0x8ed1
jmp 0x8eeb
jmp 0x8ed1
jmp 0x8eeb
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x8eee
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x8eee
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8f07
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movq %rbx, %rdi
callq 0x4250
nop