// File: 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
subq $0x260, %rsp            # imm = 0x260
movq %rdx, -0x1f0(%rbp)
movq %rdi, %rax
movq -0x1f0(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
movq %rax, %rcx
movq %rcx, -0x1e0(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq 0x137d3(%rip), %rsi     # 0x1e42e
callq 0x5210
testb $0x1, %al
jne 0xac69
jmp 0xadb0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0xad5c
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x2, %esi
callq 0x11cf0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0xdbe0
movq -0x1f8(%rbp), %rdx
leaq 0x13740(%rip), %rsi     # 0x1e430
leaq -0x38(%rbp), %rdi
callq 0xdb90
jmp 0xacfb
movq -0x1e8(%rbp), %rdi
leaq 0x13e04(%rip), %rdx     # 0x1eb0d
leaq -0x38(%rbp), %rsi
callq 0xdb40
jmp 0xad14
leaq -0x38(%rbp), %rdi
callq 0x4130
leaq -0x58(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xad4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4130
leaq -0x58(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0x65(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x200(%rbp), %rdx
leaq 0x136d5(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xad88
leaq -0x65(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x65(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1f0(%rbp), %rdi
leaq 0x133b9(%rip), %rsi     # 0x1e177
callq 0x5210
testb $0x1, %al
jne 0xadcc
jmp 0xaf31
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x6, %eax
jl 0xaed4
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x5, %esi
callq 0x11cf0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0xdbe0
movq -0x208(%rbp), %rdx
leaq 0x13613(%rip), %rsi     # 0x1e469
leaq -0x88(%rbp), %rdi
callq 0xdb90
jmp 0xae64
movq -0x1e8(%rbp), %rdi
leaq 0x13c9b(%rip), %rdx     # 0x1eb0d
leaq -0x88(%rbp), %rsi
callq 0xdb40
jmp 0xae80
leaq -0x88(%rbp), %rdi
callq 0x4130
leaq -0xa8(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xaec3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4130
leaq -0xa8(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x210(%rbp), %rdx
leaq 0x1355a(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xaf03
leaq -0xa9(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1f0(%rbp), %rdi
leaq 0x1354e(%rip), %rsi     # 0x1e48d
callq 0x5210
testb $0x1, %al
jne 0xaf4d
jmp 0xb0b2
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xc, %eax
jl 0xb055
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x8, %esi
callq 0x11cf0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0xdbe0
movq -0x218(%rbp), %rdx
leaq 0x134b8(%rip), %rsi     # 0x1e48f
leaq -0xd0(%rbp), %rdi
callq 0xdb90
jmp 0xafe5
movq -0x1e8(%rbp), %rdi
leaq 0x13b1a(%rip), %rdx     # 0x1eb0d
leaq -0xd0(%rbp), %rsi
callq 0xdb40
jmp 0xb001
leaq -0xd0(%rbp), %rdi
callq 0x4130
leaq -0xf0(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb044
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4130
leaq -0xf0(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x220(%rbp), %rdx
leaq 0x133d9(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xb084
leaq -0xf1(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xf1(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1f0(%rbp), %rdi
leaq 0x13844(%rip), %rsi     # 0x1e904
callq 0x5210
testb $0x1, %al
jne 0xb0ce
jmp 0xb233
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x3, %eax
jl 0xb1d6
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x2, %esi
callq 0x11cd0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0x138(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0xdbe0
movq -0x228(%rbp), %rdx
leaq 0x1335c(%rip), %rsi     # 0x1e4b4
leaq -0x118(%rbp), %rdi
callq 0xdb90
jmp 0xb166
movq -0x1e8(%rbp), %rdi
leaq 0x13999(%rip), %rdx     # 0x1eb0d
leaq -0x118(%rbp), %rsi
callq 0xdb40
jmp 0xb182
leaq -0x118(%rbp), %rdi
callq 0x4130
leaq -0x138(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb1c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x4130
leaq -0x138(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0x139(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x230(%rbp), %rdx
leaq 0x13258(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xb205
leaq -0x139(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x139(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1f0(%rbp), %rdi
leaq 0x13292(%rip), %rsi     # 0x1e4d3
callq 0x5210
testb $0x1, %al
jne 0xb24f
jmp 0xb3b4
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x7, %eax
jl 0xb357
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffff9, %esi       # imm = 0xFFFFFFF9
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x5, %esi
callq 0x11cd0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0x180(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0xdbe0
movq -0x238(%rbp), %rdx
leaq 0x131fc(%rip), %rsi     # 0x1e4d5
leaq -0x160(%rbp), %rdi
callq 0xdb90
jmp 0xb2e7
movq -0x1e8(%rbp), %rdi
leaq 0x13818(%rip), %rdx     # 0x1eb0d
leaq -0x160(%rbp), %rsi
callq 0xdb40
jmp 0xb303
leaq -0x160(%rbp), %rdi
callq 0x4130
leaq -0x180(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb346
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x4130
leaq -0x180(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0x181(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x240(%rbp), %rdx
leaq 0x130d7(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xb386
leaq -0x181(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x181(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1f0(%rbp), %rdi
leaq 0x13131(%rip), %rsi     # 0x1e4f3
callq 0x5210
testb $0x1, %al
jne 0xb3d0
jmp 0xb52f
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0xf, %eax
jl 0xb4d8
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq *%rax
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movl $0x8, %esi
callq 0x11cd0
movq -0x1d8(%rbp), %rax
movq 0xfe0(%rax), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
movl %eax, %esi
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0xdbe0
movq -0x248(%rbp), %rdx
leaq 0x1309b(%rip), %rsi     # 0x1e4f5
leaq -0x1a8(%rbp), %rdi
callq 0xdb90
jmp 0xb468
movq -0x1e8(%rbp), %rdi
leaq 0x13697(%rip), %rdx     # 0x1eb0d
leaq -0x1a8(%rbp), %rsi
callq 0xdb40
jmp 0xb484
leaq -0x1a8(%rbp), %rdi
callq 0x4130
leaq -0x1c8(%rbp), %rdi
callq 0x4130
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb4c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x4130
leaq -0x1c8(%rbp), %rdi
callq 0x4130
jmp 0xb5a0
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x250(%rbp), %rdx
leaq 0x12f56(%rip), %rsi     # 0x1e456
callq 0x4270
jmp 0xb507
leaq -0x1c9(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1c9(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
jmp 0xb531
jmp 0xb533
jmp 0xb535
jmp 0xb537
jmp 0xb539
leaq -0x1ca(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x4300
movq -0x1e8(%rbp), %rdi
movq -0x258(%rbp), %rdx
leaq 0x12fb7(%rip), %rsi     # 0x1e518
callq 0x4270
jmp 0xb568
leaq -0x1ca(%rbp), %rdi
callq 0x4200
jmp 0xb590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1ca(%rbp), %rdi
callq 0x4200
jmp 0xb5a0
movq -0x1e0(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x42f0
nopl (%rax)