// File: /workspace/github_cpp_makefile_star2_O1/moloch--[P]cli-Blackjack/./Blackjack/Deck.cpp
// Function: Deck::initialize()
void Deck::initialize()
{
	reset();
    deckCounter = 0; // Location in deck
    // Iterate through each suit, creating cards on the way
    for(unsigned int suitIndex = 0;suitIndex < suits.size();++suitIndex)
    {
        // Create number cards for the current suit
        for(int numberIndex = 2;numberIndex <= 10;++numberIndex)
        {
            Card card(suits[suitIndex], numberIndex, numberIndex);
            deckOfCards.push_back(card);
        }
        // Create face cards for the current suit
        for(unsigned int faceIndex = 0;faceIndex < faceCards.size();++faceIndex)
        {
            Card card(suits[suitIndex], 10, faceCards[faceIndex]);
            deckOfCards.push_back(card);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x48(%rdi), %rax
cmpq %rax, 0x40(%rdi)
je 0x6202
leaq -0x50(%rax), %rdi
movq %rdi, 0x48(%rbx)
movq -0x50(%rax), %rax
callq *(%rax)
movq 0x48(%rbx), %rax
cmpq %rax, 0x40(%rbx)
jne 0x61ea
movl $0x0, 0x8(%rbx)
movq 0x30(%rbx), %rax
cmpq 0x28(%rbx), %rax
je 0x63d4
leaq 0x40(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x78(%rsp), %r15
xorl %edx, %edx
leaq 0x88(%rsp), %r12
leaq 0x40(%rsp), %r14
xorl %ecx, %ecx
movq %rbx, 0x8(%rsp)
movq %rcx, 0x60(%rsp)
movl $0x2, %r13d
shlq $0x5, %rdx
movq %rdx, 0x10(%rsp)
movq %r14, %rbx
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq %r15, 0x68(%rsp)
movq 0x10(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x33f8
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
movl %r13d, %ecx
callq 0x4404
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x62a6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5386
movq %rbx, %r14
movq %r12, %rdi
callq 0x4544
incl %r13d
cmpl $0xb, %r13d
jne 0x624f
movq 0x8(%rsp), %rbx
movq 0x18(%rbx), %rax
cmpq 0x10(%rbx), %rax
movq 0x10(%rsp), %rbp
je 0x63b0
movl $0x1, %r13d
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
leaq 0x50(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq (%rax,%rbp), %rsi
movq 0x8(%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x33f8
movq 0x10(%rbx), %rax
shlq $0x5, %r15
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax,%r15), %rsi
movq 0x8(%rax,%r15), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x33f8
movq %r12, %rdi
movq %r14, %rsi
movl $0xa, %edx
movq %r15, %rcx
callq 0x429c
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6364
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6380
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5386
movq %r12, %rdi
callq 0x4544
movq 0x18(%rbx), %rax
subq 0x10(%rbx), %rax
movl %r13d, %r15d
sarq $0x5, %rax
incl %r13d
cmpq %r15, %rax
ja 0x62e8
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
movq 0x60(%rsp), %rcx
incl %ecx
sarq $0x5, %rax
movq %rcx, %rdx
cmpq %rcx, %rax
leaq 0x78(%rsp), %r15
ja 0x623b
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x640a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x640a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x644e
movq 0x50(%rsp), %rsi
jmp 0x6434
jmp 0x643e
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x644e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x644e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x4544
movq %rbx, %rdi
callq 0x2230