// File: /workspace/github_cpp_makefile_star2_O3/XxAdi101xX[P]ChamberCrawler/Character/Character.cc
// Function: Character::getInfo() const
Info Character::getInfo() const {
	Info characterInfo;

	// sets fields with proper info
	characterInfo.race = this->getRace();
	characterInfo.gold = this->wallet;
	characterInfo.HP = this->getHP();
	characterInfo.attackValue = this->getTotalAttack();
	characterInfo.defenceValue = this->getTotalDefence();

	characterInfo.coordinates = (this->currentCell)->getCoords();

	if (this->getRace() == Race::Dragon) {
		characterInfo.displayChar = CHAR_DRAGON;
	}

	else if (this->getRace() == Race::Drow) {
		characterInfo.displayChar = CHAR_DROW;
	}

    else if (this->getRace() == Race::Dwarf) {
        characterInfo.displayChar = CHAR_DWARF;
    }

    else if (this->getRace() == Race::Elf) {
        characterInfo.displayChar = CHAR_ELF;
    }

    else if (this->getRace() == Race::Goblin) {
        characterInfo.displayChar = CHAR_GOBLIN;
    }

    else if (this->getRace() == Race::Halfling) {
        characterInfo.displayChar = CHAR_HALFLING;
    }

    else if (this->getRace() == Race::Human) {
        characterInfo.displayChar = CHAR_HUMAN;
    }

    else if (this->getRace() == Race::Merchant) {
        characterInfo.displayChar = CHAR_MERCHANT;
    }

    else if (this->getRace() == Race::Orc) {
        characterInfo.displayChar = CHAR_ORC;
    }

    else if (this->getRace() == Race::Shade) {
        characterInfo.displayChar = CHAR_SHADE;
    }

    else if (this->getRace() == Race::Troll) {
        characterInfo.displayChar = CHAR_TROLL;
    }
    
	else if (this->getRace() == Race::Vampire) {
        characterInfo.displayChar = CHAR_VAMPIRE;
    }

    else {
        characterInfo.displayChar = CHAR_PLAYER;
    }

	characterInfo.lastAction = this->lastAction;

	return characterInfo;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
leaq 0x48(%rdi), %rcx
movq %rcx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movb %al, 0x48(%rdi)
movb %al, 0x58(%rdi)
movl 0x4c(%rsi), %eax
movl %eax, (%rdi)
movl 0x60(%rsi), %eax
movl %eax, 0x4(%rdi)
movl 0x34(%rsi), %eax
movl %eax, 0x8(%rdi)
movl 0x38(%rsi), %r15d
movl 0x3c(%rsi), %ebp
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x58(%rax)
addl %r15d, %ebp
addl %eax, %ebp
movl %ebp, 0xc(%rbx)
movl 0x40(%r14), %r15d
movl 0x44(%r14), %ebp
movq (%r14), %rax
movq %r14, %rdi
callq *0x60(%rax)
addl %r15d, %ebp
addl %eax, %ebp
movl %ebp, 0x10(%rbx)
movq 0x50(%r14), %rsi
movq %rsp, %rdi
callq 0x14fc4
movq 0x18(%rbx), %rdi
movq 0x28(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x19325
subq %rdi, %rsi
callq 0x5280
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x19325
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x5280
leaq 0x38(%rbx), %rdi
movl 0x4c(%r14), %eax
movb $0x40, %cl
cmpq $0xc, %rax
jae 0x1933f
leaq 0x6d73(%rip), %rcx      # 0x200af
movb (%rax,%rcx), %cl
movb %cl, 0x30(%rbx)
addq $0x68, %r14
movq %r14, %rsi
callq 0x5180
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1935e
movq %rax, %r14
movq %rbx, %rdi
callq 0x121ec
movq %r14, %rdi
callq 0x53e0
nop