// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq 0x21080
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2112c
leaq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21af0
movq -0xe0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x21b60
leaq -0x20(%rbp), %rdi
callq 0x21b90
jmp 0x21394
cmpl $0x1, -0xc(%rbp)
jne 0x2115d
leaq -0x30(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21bb0
movq -0xe0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x21c20
leaq -0x30(%rbp), %rdi
callq 0x21c50
jmp 0x21394
cmpl $0x2, -0xc(%rbp)
jne 0x2118e
leaq -0x40(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21c70
movq -0xe0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x21ce0
leaq -0x40(%rbp), %rdi
callq 0x21d10
jmp 0x21394
cmpl $0x3, -0xc(%rbp)
jne 0x211bf
leaq -0x50(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21d30
movq -0xe0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x21da0
leaq -0x50(%rbp), %rdi
callq 0x21dd0
jmp 0x21394
cmpl $0x4, -0xc(%rbp)
jne 0x211f0
leaq -0x60(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21df0
movq -0xe0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21e60
leaq -0x60(%rbp), %rdi
callq 0x21e90
jmp 0x21394
cmpl $0x5, -0xc(%rbp)
jne 0x21221
leaq -0x70(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21eb0
movq -0xe0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x21f20
leaq -0x70(%rbp), %rdi
callq 0x21f50
jmp 0x21394
cmpl $0x6, -0xc(%rbp)
jne 0x21252
leaq -0x80(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x21f70
movq -0xe0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x21fe0
leaq -0x80(%rbp), %rdi
callq 0x22010
jmp 0x21394
cmpl $0x7, -0xc(%rbp)
jne 0x2128c
leaq -0x90(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x22030
movq -0xe0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x220a0
leaq -0x90(%rbp), %rdi
callq 0x220d0
jmp 0x21394
cmpl $0x8, -0xc(%rbp)
jne 0x212c6
leaq -0xa0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x220f0
movq -0xe0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x22160
leaq -0xa0(%rbp), %rdi
callq 0x22190
jmp 0x21394
cmpl $0x9, -0xc(%rbp)
jne 0x21300
leaq -0xb0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x221b0
movq -0xe0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x22220
leaq -0xb0(%rbp), %rdi
callq 0x22250
jmp 0x21394
cmpl $0xa, -0xc(%rbp)
jne 0x21337
leaq -0xc0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x22270
movq -0xe0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x222e0
leaq -0xc0(%rbp), %rdi
callq 0x19d30
jmp 0x21394
cmpl $0xb, -0xc(%rbp)
jne 0x2136e
leaq -0xd0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x22310
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x22380
leaq -0xd0(%rbp), %rdi
callq 0x223b0
jmp 0x21394
jmp 0x21370
jmp 0x21372
jmp 0x21374
jmp 0x21376
jmp 0x21378
jmp 0x2137a
jmp 0x2137c
jmp 0x2137e
jmp 0x21380
jmp 0x21382
jmp 0x21384
movq -0xe0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x194e0
movq -0xd8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)