// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9205(%rip), %rsi      # 0x104ae
movq %rdx, %rdi
callq 0x4ac7
testb %al, %al
je 0x732f
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0x3
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x2
popq %rsi
callq 0x917c
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x91a5(%rip), %rsi      # 0x104b0
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x98a7(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
jmp 0x75eb
leaq 0x8e41(%rip), %rsi      # 0x10177
movq %r15, %rdi
callq 0x4ac7
testb %al, %al
je 0x73bc
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x6, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0x6
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x5
popq %rsi
callq 0x917c
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x9151(%rip), %rsi      # 0x104e9
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x981a(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
jmp 0x75eb
leaq 0x914a(%rip), %rsi      # 0x1050d
movq %r15, %rdi
callq 0x4ac7
testb %al, %al
je 0x7449
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xc, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0xc
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x8
popq %rsi
callq 0x917c
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x90ea(%rip), %rsi      # 0x1050f
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x978d(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
jmp 0x75eb
leaq 0x9534(%rip), %rsi      # 0x10984
movq %r15, %rdi
callq 0x4ac7
testb %al, %al
je 0x74d6
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0x3
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x2
popq %rsi
callq 0x9172
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x9082(%rip), %rsi      # 0x10534
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x9700(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
jmp 0x75eb
leaq 0x9076(%rip), %rsi      # 0x10553
movq %r15, %rdi
callq 0x4ac7
testb %al, %al
je 0x7563
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x7, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0x7
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x5
popq %rsi
callq 0x9172
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x9016(%rip), %rsi      # 0x10555
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x9673(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
jmp 0x75eb
leaq 0x9009(%rip), %rsi      # 0x10573
movq %r15, %rdi
callq 0x4ac7
testb %al, %al
je 0x7620
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xf, %eax
jl 0x75ff
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
pushq $-0xf
popq %rsi
callq *(%rax)
movq 0xfe0(%r14), %rdi
pushq $0x8
popq %rsi
callq 0x9172
movq 0xfe0(%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x851e
leaq 0x8fa9(%rip), %rsi      # 0x10575
leaq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x84f0
leaq 0x95e6(%rip), %rdx      # 0x10bc5
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x84c7
leaq -0x38(%rbp), %rdi
callq 0x40e0
leaq -0x58(%rbp), %rdi
callq 0x40e0
jmp 0x7612
leaq 0x8ed0(%rip), %rsi      # 0x104d6
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x40b0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f71(%rip), %rsi      # 0x10598
jmp 0x7606
jmp 0x763d
jmp 0x764b
jmp 0x763d
jmp 0x764b
jmp 0x763d
jmp 0x764b
jmp 0x763d
jmp 0x764b
jmp 0x763d
jmp 0x764b
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x40e0
jmp 0x764e
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x40e0
movq %rbx, %rdi
callq 0x4280
nop