// File: /workspace/github_cpp_makefile_star2_O3/malcolmyeh[P]CC3K/game.cc
// Function: Controller::newFloor()
void Controller::newFloor() {
	Floor *tmpf = this->floor;
	Display *tmpd = this->display;
	Player *play = tmpf->player;
	int level = tmpf->getLevel() + 1;
	bool hostile = tmpf->getHostile();
	bool spawned = tmpf->getSpawned();
	char type;
	int HP = play->getHP();
	int gold = play->getGold();
	int Atk = play->getPlayer()->getAtk();
	int Def = play->getPlayer()->getDef();
	bool hasBarrier = play->barrier();

	if (play->getRace() == "Human") { type = 'h'; }
	if (play->getRace() == "Orc") { type = 'o'; }
	if (play->getRace() == "Elf") { type = 'e'; }
	if (play->getRace() == "Dwarf") { type = 'd'; }

	this->floor = new Floor(level, hostile, spawned);
	this->display = new Display();
	this->display->readFloor("map.txt");
	for (int i = 0; i < 25; i++) {
		for (int j = 0; j < 79; j++) {
			char c = this->display->getChar(i, j);
			floor->displayGrid[i][j] = c;
			floor->defaultGrid[i][j] = c;
		}
	}

	this->floor->initNext(type, HP, gold, Atk, Def, hasBarrier);
	this->display->updateDisplay(floor);
	delete tmpf;
	delete tmpd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, -0x78(%rbp)
movq 0xfe0(%r14), %rbx
movq %r14, %rdi
callq 0xa2ba
movl %eax, %r12d
movq %r14, %rdi
callq 0x7320
movb %al, -0x2b(%rbp)
movq %r14, -0x70(%rbp)
movq %r14, %rdi
callq 0xa2c2
movb %al, -0x2a(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movl %eax, -0x44(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, -0x40(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x8(%rcx)
movl %eax, -0x3c(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movl %eax, -0x38(%rbp)
movq %rbx, %rdi
callq 0xab32
movb %al, -0x29(%rbp)
movq (%rbx), %rax
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4fd1(%rip), %rsi      # 0x1d9b0
movq %r13, %rdi
callq 0x4070
movq (%r13), %rdi
leaq -0x58(%rbp), %r14
cmpq %r14, %rdi
je 0x18a00
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movq (%rbx), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4fbd(%rip), %rsi      # 0x1d9d0
movq %r13, %rdi
callq 0x4070
movl %eax, -0x34(%rbp)
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x18a33
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movq (%rbx), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4c20(%rip), %rsi      # 0x1d666
movq %r13, %rdi
callq 0x4070
movl %eax, -0x30(%rbp)
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x18a66
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
incl %r12d
movq (%rbx), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4fe1(%rip), %rsi      # 0x1da5d
movq %r13, %rdi
callq 0x4070
movl %eax, %ebx
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x18a9b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4170
movl $0xff8, %edi            # imm = 0xFF8
callq 0x4160
movq %rax, %r13
movzbl -0x2b(%rbp), %edx
movzbl -0x2a(%rbp), %ecx
movq %rax, %rdi
movl %r12d, %esi
callq 0x5818
movq %r13, (%r15)
movl $0x7b7, %edi            # imm = 0x7B7
callq 0x4160
movq %rax, %r12
movl $0x7b7, %edx            # imm = 0x7B7
movq %rax, %rdi
xorl %esi, %esi
callq 0x40d0
movq %r12, 0x8(%r15)
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x53aa(%rip), %rsi      # 0x1de9a
leaq 0x53aa(%rip), %rdx      # 0x1dea1
leaq -0x98(%rbp), %r13
movq %r13, %rdi
callq 0x501a
movq %r12, %rdi
movq %r13, %rsi
callq 0x53bc
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x18b2c
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x4170
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%r15), %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x5800
movq (%r15), %rcx
addq %r14, %rcx
movb %al, 0x820(%r13,%rcx)
movq (%r15), %rcx
addq %r14, %rcx
movb %al, 0x6(%r13,%rcx)
incq %r13
cmpq $0x4f, %r13
jne 0x18b35
incq %r12
addq $0x4f, %r14
cmpq $0x19, %r12
jne 0x18b32
cmpl $0x0, -0x34(%rbp)
movl $0x6f, %eax
movl $0x68, %ecx
cmovel %eax, %ecx
cmpl $0x0, -0x30(%rbp)
movl $0x65, %eax
cmovnel %ecx, %eax
testl %ebx, %ebx
movl $0x64, %esi
cmovnel %eax, %esi
movq (%r15), %rdi
movzbl -0x29(%rbp), %eax
movl %eax, (%rsp)
movl -0x44(%rbp), %edx
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x38(%rbp), %r9d
callq 0x6b4c
movq (%r15), %rsi
movq 0x8(%r15), %rdi
callq 0x57ce
movq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0x5862
movl $0xff8, %esi            # imm = 0xFF8
movq %rbx, %rdi
callq 0x4170
movl $0x7b7, %esi            # imm = 0x7B7
movq -0x78(%rbp), %rdi
callq 0x4170
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x18c24
movq -0x88(%rbp), %rsi
incq %rsi
jmp 0x18c1f
movq %rax, %rbx
movl $0xff8, %esi            # imm = 0xFF8
movq %r13, %rdi
callq 0x4170
movq %rbx, %rdi
callq 0x4250