// File: /workspace/github_cpp_makefile_star2_O1/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::newPlayer(Deck&)
void Player::newPlayer(Deck &deck){
    for(int i = 0; i < 2; ++i){
        hand.at(i).clear(); 
        size[i] = 0;
    }
    hand.clear();

    GTokenNum = BTokenNum = 0;

    // initialize all points to zero
    for (int i = 0; i < 3; ++i)
        point[i] = 0;

    Card tmpC;
    size[0] = size[1] = 0;

    vector<Card> cards;
    vector<Card> herds;

    // draw five cards from deck, if card == CAMEL put it in herds 
    for (int i = 0; i < 5; ++i){
        tmpC = deck.drawCard();
        if (tmpC.getCard() == "CAMEL"){
            herds.push_back(tmpC);
            size[1]++;
        }
        else{
            cards.push_back(tmpC);
            size[0]++;
        }
    }

    hand.push_back(cards);
    hand.push_back(herds);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq 0x10(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0xa599
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %rbx
cmpq %rbp, %rbx
je 0xa434
leaq (%rax,%rcx,8), %r13
movq %rbp, %r12
movq %r12, %rdi
callq 0x92e2
addq $0x20, %r12
cmpq %rbx, %r12
jne 0xa41f
movq %rbp, 0x8(%r13)
movl $0x0, 0x40(%r14,%r15,4)
leaq 0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
je 0xa3e0
movq 0x8(%r14), %r12
movq 0x10(%r14), %rbx
cmpq %r12, %rbx
je 0xa46e
movq %r12, %r15
movq %r15, %rdi
callq 0x8cac
addq $0x18, %r15
cmpq %rbx, %r15
jne 0xa459
movq %r12, 0x10(%r14)
leaq 0x8(%r14), %rax
movq %rax, (%rsp)
xorl %ebx, %ebx
movq %rbx, 0x58(%r14)
movq %rbx, 0x48(%r14)
movl $0x0, 0x50(%r14)
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x9248
movq %rbx, 0x40(%r14)
leaq 0x30(%rsp), %rax
movq %rbx, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x10(%rsp), %rax
movq %rbx, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x5, %ebp
leaq 0x48(%rsp), %r15
movq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8c24
movq %r12, %rdi
movq %r15, %rsi
callq 0x20e0
movq %r15, %rdi
callq 0x92e2
movq %r15, %rdi
movq %r12, %rsi
callq 0x92fe
movq %r15, %rdi
leaq 0x5c88(%rip), %rsi      # 0x1017e
callq 0x2080
movl %eax, %r13d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xa51a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21a0
testl %r13d, %r13d
je 0xa532
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x8c6e
incl 0x40(%r14)
jmp 0xa543
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x8c6e
incl 0x44(%r14)
decl %ebp
jne 0xa4c3
leaq 0x30(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0xbbb8
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xbbb8
leaq 0x10(%rsp), %rdi
callq 0x8cac
leaq 0x30(%rsp), %rdi
callq 0x8cac
leaq 0x68(%rsp), %rdi
callq 0x92e2
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5da8(%rip), %rdi      # 0x10348
movq %r15, %rsi
xorl %eax, %eax
callq 0x21f0
jmp 0xa5bf
jmp 0xa5bf
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x92e2
jmp 0xa5c2
jmp 0xa5bf
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8cac
leaq 0x30(%rsp), %rdi
callq 0x8cac
leaq 0x68(%rsp), %rdi
callq 0x92e2
movq %rbx, %rdi
callq 0x2280