// File: /workspace/github_cpp_makefile_star2_O2/moloch--[P]cli-Blackjack/./Blackjack/Blackjack.cpp
// Function: Blackjack::startTurn(Player&, Dealer&)
void Blackjack::startTurn(Player & player, Dealer & dealer)
{
	deck.initialize();
    deck.shuffle(); // Shuffle the deck
    initialDeal(player, dealer);
    cout << dealer.getName() << " is showing:" << endl;
    dealer.printCurrentHand();
    cout << player.getName() << " is showing:" << endl;
    player.printCurrentHand();
    wager = player.getWager();
    player.turn(deck);  // Give player a turn
    dealer.revealCard(); // Reveal dealer's card
    findWinner(player, dealer);
    cout << "\tTotal " << player.getName() << " wins: " << playerWins;
    cout << " ($" << player.getMoney() << ")" << endl;
    cout << "\tTotal " << dealer.getName() << " wins: " << dealerWins << endl;
    cout << "\nPress enter to continue." << endl;
    player.resetHand();
    dealer.resetHand();
    cin.get();   // Pause console output until next user input
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rdi), %r12
movq %r12, %rdi
callq 0x5020
movq %r12, %rdi
callq 0x51d4
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3354
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4a02
movq 0x696d(%rip), %rdi      # 0x9fd0
movq %r13, %rsi
callq 0x2150
leaq 0x2bd5(%rip), %rsi      # 0x6247
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x4a1e
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x4a02
movq 0x6929(%rip), %rdi      # 0x9fd0
movq %r13, %rsi
callq 0x2150
leaq 0x2b91(%rip), %rsi      # 0x6247
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x4a1e
movq %r14, %rdi
callq 0x4cca
movl %eax, 0x10(%r15)
movq %r14, %rdi
movq %r12, %rsi
callq 0x4be0
movq %rbx, %rdi
callq 0x4a46
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3440
movq 0x68c6(%rip), %rdi      # 0x9fd0
leaq 0x2b43(%rip), %rsi      # 0x6254
callq 0x2180
movq %rax, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x4a02
movq %r12, %rdi
movq %r13, %rsi
callq 0x2150
leaq 0x2b23(%rip), %rsi      # 0x625c
movq %rax, %rdi
callq 0x2180
movl 0xc(%r15), %esi
movq %rax, %rdi
callq 0x2250
movq %rsp, %rdi
callq 0x20b0
movq 0x6874(%rip), %r12      # 0x9fd0
leaq 0x2b01(%rip), %rsi      # 0x6264
movq %r12, %rdi
callq 0x2180
movq %rax, %r13
movq %r14, %rdi
callq 0x4d9e
movq %r13, %rdi
movl %eax, %esi
callq 0x2250
leaq 0x2a35(%rip), %rsi      # 0x61bc
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
leaq 0x2ab6(%rip), %rsi      # 0x6254
movq %r12, %rdi
callq 0x2180
movq %rax, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4a02
movq %r12, %rdi
movq %r13, %rsi
callq 0x2150
leaq 0x2a93(%rip), %rsi      # 0x625c
movq %rax, %rdi
callq 0x2180
movl 0x8(%r15), %esi
movq %rax, %rdi
callq 0x2250
movq %rax, %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x20b0
movq 0x67dc(%rip), %rdi      # 0x9fd0
leaq 0x2a6d(%rip), %rsi      # 0x6268
callq 0x2180
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x4a52
movq %rbx, %rdi
callq 0x4a52
movq 0x67c1(%rip), %rdi      # 0x9fe0
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3838
jmp 0x3838
jmp 0x3838
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2260
nop