// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %r15
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %bpl
xorl %ebx, %ebx
movq %rdi, 0x10(%rsp)
movq 0x8(%r15), %rax
movq 0x10(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rbx, %rdx
jbe 0xa573
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %r14
movq 0x8(%rax,%rcx,8), %r13
cmpq %r14, %r13
je 0xa413
leaq (%rax,%rcx,8), %r15
movq %r14, %r12
movq %r12, %rdi
callq 0x9292
addq $0x20, %r12
cmpq %r13, %r12
jne 0xa3f9
movq %r14, 0x8(%r15)
movq 0x10(%rsp), %r15
movl $0x0, 0x40(%r15,%rbx,4)
movl $0x1, %ebx
testb $0x1, %bpl
movl $0x0, %ebp
jne 0xa3ba
movq 0x8(%r15), %r14
movq 0x10(%r15), %r12
cmpq %r14, %r12
je 0xa451
movq %r14, %rbx
movq %rbx, %rdi
callq 0x8c54
addq $0x18, %rbx
cmpq %r12, %rbx
jne 0xa43c
movq %r14, 0x10(%r15)
xorl %ebx, %ebx
movq %rbx, 0x58(%r15)
movq %rbx, 0x48(%r15)
movl $0x0, 0x50(%r15)
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0x91f8
movq %rbx, 0x40(%r15)
leaq 0x40(%rsp), %rax
movq %rbx, 0x10(%rax)
xorps %xmm0, %xmm0
movq %rax, %r14
movaps %xmm0, (%rax)
leaq 0x20(%rsp), %rax
movq %rbx, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x5, %ebp
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0x8bcc
movq %r12, %rdi
movq %rbx, %rsi
callq 0x20e0
movq %rbx, %rdi
callq 0x9292
movq %rbx, %rdi
movq %r12, %rsi
callq 0x92ae
movq %rbx, %rdi
leaq 0x5cad(%rip), %rsi      # 0x1017e
callq 0x2080
movl %eax, %r13d
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xa4f5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21a0
testl %r13d, %r13d
je 0xa50b
movq %r14, %rdi
movq %r12, %rsi
callq 0x8c16
incl 0x40(%r15)
jmp 0xa51c
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x8c16
incl 0x44(%r15)
decl %ebp
jne 0xa49c
leaq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbb58
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xbb58
leaq 0x20(%rsp), %rdi
callq 0x8c54
leaq 0x40(%rsp), %rdi
callq 0x8c54
leaq 0x78(%rsp), %rdi
callq 0x9292
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5dde(%rip), %rdi      # 0x10358
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21f0
jmp 0xa599
jmp 0xa599
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x9292
jmp 0xa59c
jmp 0xa599
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8c54
leaq 0x40(%rsp), %rdi
callq 0x8c54
leaq 0x78(%rsp), %rdi
callq 0x9292
movq %rbx, %rdi
callq 0x2280