// File: /workspace/github_cpp_makefile_star2_O1/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: createCharacter(Race)
shared_ptr<Character> createCharacter(Race race) {
	int tempWallet = getNormalOrSmallGoldPile();

	if (race == Race::Shade) {
		return make_shared<Shade>(tempWallet);
	}

	else if (race == Race::Drow) {
        return make_shared<Drow>(tempWallet);
	}

	else if	(race == Race::Vampire) {
        return make_shared<Vampire>(tempWallet);
	}

	else if (race == Race::Troll) {
        return make_shared<Troll>(tempWallet);
	}

	else if (race == Race::Goblin) {
        return make_shared<Goblin>(tempWallet);
	}

	else if (race == Race::Human) {
        return make_shared<Human>(tempWallet);
	}

	else if (race == Race::Dwarf) {
        return make_shared<Dwarf>(tempWallet);
	}

	else if (race == Race::Elf) {
        return make_shared<Elf>(tempWallet);
	}

	else if (race == Race::Orc) {
        return make_shared<Orc>(tempWallet);
	}

	else if (race == Race::Merchant) {
        return make_shared<Merchant>(tempWallet);
	}

	else if (race == Race::Dragon) {
        return make_shared<Dragon>(tempWallet);
	}

	else if (race == Race::Halfling) {
        return make_shared<Halfling>(tempWallet);
	}

	return nullptr;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x167cf(%rip), %r14     # 0x29e08
movq %r14, %rdi
callq 0x1a48e
leal -0x3(%rax), %ecx
cmpl $-0x2, %ecx
jb 0x13639
movl %eax, 0x4(%rsp)
cmpl $0xb, %ebp
ja 0x138e5
movl %ebp, %eax
leaq 0xc655(%rip), %rcx      # 0x1fcb4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x13f48
movq (%r14), %rsi
movq %r14, %rdi
callq 0x13fba
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x14b4c
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14bbe
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x143e0
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14452
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x1491c
movq (%r14), %rsi
movq %r14, %rdi
callq 0x1498e
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x141c8
movq (%r14), %rsi
movq %r14, %rdi
callq 0x1423a
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x142d4
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14346
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x14704
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14776
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x140bc
movq (%r14), %rsi
movq %r14, %rdi
callq 0x1412e
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x144ec
movq (%r14), %rsi
movq %r14, %rdi
callq 0x1455e
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x145f8
movq (%r14), %rsi
movq %r14, %rdi
callq 0x1466a
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x14a28
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14a9a
jmp 0x138c1
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
movq %r15, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rsi
callq 0x14810
movq (%r14), %rsi
movq %r14, %rdi
callq 0x14882
movq (%r14), %rax
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
movq 0x8(%r14), %rax
movq %r15, 0x8(%r14)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x138d7