// File: 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:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movq 0x140(%rsp), %rdi
movq %rdi, 0x88(%rsp)
addq $0x18, %rdi
movq %rdi, 0x80(%rsp)
callq 0x9470
movq 0x80(%rsp), %rdi
callq 0x97a0
movq 0x88(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rdx
callq 0x5520
movq 0x130(%rsp), %rsi
leaq 0x110(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x8650
movq 0x90(%rsp), %rsi
movq 0x846a(%rip), %rdi      # 0xdfd0
callq 0x2180
movq %rax, 0x98(%rsp)
jmp 0x5b75
movq 0x98(%rsp), %rdi
leaq 0x46c3(%rip), %rsi      # 0xa247
callq 0x21b0
movq %rax, 0x78(%rsp)
jmp 0x5b90
movq 0x78(%rsp), %rdi
movq 0x8424(%rip), %rsi      # 0xdfc0
callq 0x21f0
jmp 0x5ba3
leaq 0x110(%rsp), %rdi
callq 0x2110
movq 0x130(%rsp), %rdi
callq 0x86a0
movq 0x138(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x8650
movq 0x68(%rsp), %rsi
movq 0x83ed(%rip), %rdi      # 0xdfd0
callq 0x2180
movq %rax, 0x70(%rsp)
jmp 0x5bef
movq 0x70(%rsp), %rdi
leaq 0x464c(%rip), %rsi      # 0xa247
callq 0x21b0
movq %rax, 0x60(%rsp)
jmp 0x5c07
movq 0x60(%rsp), %rdi
movq 0x83ad(%rip), %rsi      # 0xdfc0
callq 0x21f0
jmp 0x5c1a
leaq 0xe0(%rsp), %rdi
callq 0x2110
movq 0x138(%rsp), %rdi
callq 0x86a0
movq 0x138(%rsp), %rdi
callq 0x8bb0
movq 0x88(%rsp), %rsi
movl %eax, 0x10(%rsi)
movq 0x138(%rsp), %rdi
addq $0x18, %rsi
callq 0x8a70
movq 0x130(%rsp), %rdi
callq 0x8700
movq 0x88(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rdx
callq 0x5710
movq 0x8342(%rip), %rdi      # 0xdfd0
leaq 0x45bf(%rip), %rsi      # 0xa254
callq 0x21b0
movq %rax, 0x48(%rsp)
movq 0x138(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x8650
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x2180
movq %rax, 0x58(%rsp)
jmp 0x5ccf
movq 0x58(%rsp), %rdi
leaq 0x4581(%rip), %rsi      # 0xa25c
callq 0x21b0
movq %rax, 0x40(%rsp)
jmp 0x5ce7
movq 0x40(%rsp), %rdi
movq 0x88(%rsp), %rax
movl 0xc(%rax), %esi
callq 0x22e0
jmp 0x5cfe
leaq 0xc0(%rsp), %rdi
callq 0x2110
movq 0x82be(%rip), %rdi      # 0xdfd0
movq %rdi, 0x20(%rsp)
leaq 0x4546(%rip), %rsi      # 0xa264
callq 0x21b0
movq %rax, 0x18(%rsp)
movq 0x138(%rsp), %rdi
callq 0x8cf0
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x4471(%rip), %rsi      # 0xa1bc
callq 0x21b0
movq %rax, %rdi
movq 0x8266(%rip), %rsi      # 0xdfc0
callq 0x21f0
movq 0x20(%rsp), %rdi
leaq 0x44e9(%rip), %rsi      # 0xa254
callq 0x21b0
movq %rax, 0x28(%rsp)
movq 0x130(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8650
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2180
movq %rax, 0x38(%rsp)
jmp 0x5da5
movq 0x38(%rsp), %rdi
leaq 0x44ab(%rip), %rsi      # 0xa25c
callq 0x21b0
movq %rax, 0x10(%rsp)
jmp 0x5dbd
movq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x22e0
movq %rax, 0x8(%rsp)
jmp 0x5dd9
movq 0x8(%rsp), %rdi
movq 0x81db(%rip), %rsi      # 0xdfc0
callq 0x21f0
jmp 0x5dec
leaq 0xa0(%rsp), %rdi
callq 0x2110
movq 0x81d0(%rip), %rdi      # 0xdfd0
leaq 0x4461(%rip), %rsi      # 0xa268
callq 0x21b0
movq %rax, %rdi
movq 0x81aa(%rip), %rsi      # 0xdfc0
callq 0x21f0
movq 0x138(%rsp), %rdi
callq 0x8720
movq 0x130(%rsp), %rdi
callq 0x8720
movq 0x81a4(%rip), %rdi      # 0xdfe0
callq 0x2240
addq $0x148, %rsp            # imm = 0x148
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x2110
jmp 0x5ed3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x2110
jmp 0x5ed3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x2110
jmp 0x5ed3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x2110
movq 0x108(%rsp), %rdi
callq 0x22f0