// File: /workspace/github_cpp_makefile_star2_O1/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, -0x70(%rbp)
movq 0xfe0(%r14), %rbx
movq %r14, %rdi
callq 0xa37e
movl %eax, -0x30(%rbp)
movq %r14, %rdi
callq 0x7364
movb %al, -0x2b(%rbp)
movq %r14, -0x68(%rbp)
movq %r14, %rdi
callq 0xa386
movb %al, -0x2a(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movl %eax, -0x40(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, -0x3c(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x8(%rcx)
movl %eax, -0x38(%rbp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movl %eax, -0x34(%rbp)
movq %rbx, %rdi
callq 0xabf2
movb %al, -0x29(%rbp)
movq (%rbx), %rax
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4e2f(%rip), %rsi      # 0x1d9b0
movq %r12, %rdi
callq 0x4070
movq (%r12), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18ba2
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
movq (%rbx), %rax
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4e17(%rip), %rsi      # 0x1d9d0
movq %r13, %rdi
callq 0x4070
movl %eax, %r12d
movq (%r13), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18bdd
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
testl %r12d, %r12d
movl $0x6f, %eax
movl $0x68, %r14d
cmovel %eax, %r14d
movq (%rbx), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4a64(%rip), %rsi      # 0x1d666
movq %r13, %rdi
callq 0x4070
movl %eax, %r12d
movq (%r13), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18c26
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
incl -0x30(%rbp)
testl %r12d, %r12d
movzbl %r14b, %eax
movl $0x65, %r14d
cmovnel %eax, %r14d
movq (%rbx), %rax
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x4e0c(%rip), %rsi      # 0x1da5d
movq %r12, %rdi
callq 0x4070
movl %eax, %ebx
movq (%r12), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18c74
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x4170
testl %ebx, %ebx
movzbl %r14b, %eax
movl $0x64, %r13d
cmovnel %eax, %r13d
movl $0xff8, %edi            # imm = 0xFF8
callq 0x4160
movq %rax, %rbx
movzbl -0x2b(%rbp), %edx
movzbl -0x2a(%rbp), %ecx
movq %rax, %rdi
movl -0x30(%rbp), %esi
callq 0x5818
movq %rbx, (%r15)
movl $0x7b7, %edi            # imm = 0x7B7
callq 0x4160
movq %rax, %rbx
movl $0x7b7, %edx            # imm = 0x7B7
movq %rax, %rdi
xorl %esi, %esi
callq 0x40d0
movq %rbx, 0x8(%r15)
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x51c4(%rip), %rsi      # 0x1de9a
leaq 0x51c4(%rip), %rdx      # 0x1dea1
leaq -0x90(%rbp), %r12
movq %r12, %rdi
callq 0x501a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x53b8
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x18d0f
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x4170
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq 0x8(%r15), %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x5800
movq (%r15), %rcx
addq %r14, %rcx
movb %al, 0x820(%r12,%rcx)
movq (%r15), %rcx
addq %r14, %rcx
movb %al, 0x6(%r12,%rcx)
incq %r12
cmpq $0x4f, %r12
jne 0x18d17
incq %rbx
addq $0x4f, %r14
cmpq $0x19, %rbx
jne 0x18d14
movq (%r15), %rdi
movzbl -0x29(%rbp), %eax
movl %eax, (%rsp)
movzbl %r13b, %esi
movl -0x40(%rbp), %edx
movl -0x3c(%rbp), %ecx
movl -0x38(%rbp), %r8d
movl -0x34(%rbp), %r9d
callq 0x6b46
movq (%r15), %rsi
movq 0x8(%r15), %rdi
callq 0x57ce
movq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0x5862
movl $0xff8, %esi            # imm = 0xFF8
movq %rbx, %rdi
callq 0x4170
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x18dad
movl $0x7b7, %esi            # imm = 0x7B7
callq 0x4170
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x18de4
movq -0x80(%rbp), %rsi
incq %rsi
jmp 0x18ddf
movq %rax, %r15
movl $0xff8, %esi            # imm = 0xFF8
movq %rbx, %rdi
callq 0x4170
movq %r15, %rdi
callq 0x4250