// File: /workspace/github_cpp_makefile_star2_O1/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 0x14d59(%rip), %rsi     # 0x1d4da
movq %rdx, %rdi
callq 0x4070
testl %eax, %eax
je 0x881e
leaq 0x149df(%rip), %rsi     # 0x1d177
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x88d0
leaq 0x14d8a(%rip), %rsi     # 0x1d539
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8982
leaq 0x151ee(%rip), %rsi     # 0x1d9b4
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8a34
leaq 0x14da2(%rip), %rsi     # 0x1d57f
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8ae6
leaq 0x14dab(%rip), %rsi     # 0x1d59f
movq %r15, %rdi
callq 0x4070
testl %eax, %eax
je 0x8b61
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14db2(%rip), %rsi     # 0x1d5c4
leaq 0x14dc9(%rip), %rdx     # 0x1d5e2
jmp 0x8c15
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x2, %esi
callq 0xb63a
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 0x8c2b
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8c22
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8c28
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8c2b
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x888e
addl $-0x3, %r12d
jmp 0x8c2b
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x6, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x5, %esi
callq 0xb63a
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 0x8cd7
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8cce
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8cd4
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8cd7
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x8940
addl $-0x3, %r12d
jmp 0x8cd7
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xc, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x8, %esi
callq 0xb63a
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 0x8d83
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8d7a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8d80
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8d83
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x89f2
addl $-0x3, %r12d
jmp 0x8d83
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x2, %esi
callq 0xb630
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 0x8e2f
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x8e26
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8e2c
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8e2f
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x8aa4
addl $-0x3, %r12d
jmp 0x8e2f
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x7, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff9, %esi       # imm = 0xFFFFFFF9
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x5, %esi
callq 0xb630
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0xa466
leaq 0x14a41(%rip), %rsi     # 0x1d581
leaq -0x48(%rbp), %rdi
movq %r14, %rdx
callq 0xa3ec
leaq 0x150a2(%rip), %rdx     # 0x1dbf5
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa38f
jmp 0x8bda
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xf, %eax
jl 0x8c00
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq *(%rax)
movq 0xfe0(%r14), %rdi
movl $0x8, %esi
callq 0xb630
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0xa466
leaq 0x149e6(%rip), %rsi     # 0x1d5a1
leaq -0x48(%rbp), %rdi
movq %r14, %rdx
callq 0xa3ec
leaq 0x15027(%rip), %rdx     # 0x1dbf5
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa38f
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8bf3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x8f29
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x148f4(%rip), %rsi     # 0x1d502
leaq 0x148ff(%rip), %rdx     # 0x1d514
movq %rbx, %rdi
callq 0x501a
jmp 0x8f3a
addl $-0x2, %r12d
jmp 0x8c2b
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 0xa510
leaq 0x14877(%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 0x8c9b
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8ca2
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 0x14f31(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8ecd
addl $-0x2, %r12d
jmp 0x8cd7
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 0xa510
leaq 0x14804(%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 0x8d47
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8d4e
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 0x14e85(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8ecd
addl $-0x2, %r12d
jmp 0x8d83
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 0xa510
leaq 0x1477e(%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 0x8df3
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8dfa
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 0x14dd9(%rip), %rsi     # 0x1dbf5
callq 0x4280
jmp 0x8ecd
addl $-0x2, %r12d
jmp 0x8e2f
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 0xa510
leaq 0x146f7(%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 0x8e9f
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8ea6
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 0x14d2d(%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 0x8eef
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8ef5
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 0x8f21
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8f3a
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 0x8f50
jmp 0x8f6e
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f71
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x8f71
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x8fac
jmp 0x8f87
jmp 0x8fa1
jmp 0x8f87
jmp 0x8fa1
jmp 0x8f87
jmp 0x8fa1
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x8fa4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4170
jmp 0x8fa4
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8fbd
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movq %rbx, %rdi
callq 0x4250
nop