// File: whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::Player(Deck&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Player::Player(Deck &deck, string playerName){
    Card tmpC;
    int i;
    size[0] = size[1] = 0;

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

    // draw five cards from deck, if card == CAMEL put it in herds 
    for (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);

    name = playerName;

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

    GTokenNum = BTokenNum = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdx, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
leaq 0x16c60(%rip), %rax     # 0x2ad40
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0xd0(%rbp)
callq 0x15d80
movq -0xc8(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0xc0(%rbp)
callq 0x22c0
leaq -0x38(%rbp), %rdi
callq 0x12c90
jmp 0x14115
movq -0xc8(%rbp), %rax
movl $0x0, 0x44(%rax)
movl $0x0, 0x40(%rax)
leaq -0x60(%rbp), %rdi
callq 0x11650
leaq -0x78(%rbp), %rdi
callq 0x11650
movl $0x0, -0x48(%rbp)
cmpl $0x5, -0x48(%rbp)
jge 0x1426e
movq -0x10(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x11580
jmp 0x1415f
leaq -0x38(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x11b10
jmp 0x14171
leaq -0x98(%rbp), %rdi
callq 0x12d40
leaq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x12d60
jmp 0x1418f
leaq 0x9fed(%rip), %rsi      # 0x1e183
leaq -0xb8(%rbp), %rdi
callq 0x13920
movb %al, -0xd9(%rbp)
jmp 0x141aa
leaq -0xb8(%rbp), %rdi
callq 0x2130
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x141c2
jmp 0x1423f
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x11670
jmp 0x141d1
movq -0xc8(%rbp), %rax
movl 0x44(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x44(%rax)
jmp 0x1425e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x14332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x14317
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x12d40
jmp 0x14317
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x2130
jmp 0x14317
leaq -0x60(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x11670
jmp 0x1424e
movq -0xc8(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
jmp 0x14260
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x14143
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x60(%rbp), %rsi
callq 0x15da0
jmp 0x14284
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x78(%rbp), %rsi
callq 0x15da0
jmp 0x1429a
movq -0xd8(%rbp), %rsi
movq -0xc8(%rbp), %rdi
addq $0x20, %rdi
callq 0x2040
jmp 0x142b3
movl $0x0, -0x48(%rbp)
cmpl $0x4, -0x48(%rbp)
jge 0x142de
movq -0xc8(%rbp), %rax
movslq -0x48(%rbp), %rcx
movl $0x0, 0x48(%rax,%rcx,4)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x142ba
movq -0xc8(%rbp), %rax
movl $0x0, 0x5c(%rax)
movl $0x0, 0x58(%rax)
leaq -0x78(%rbp), %rdi
callq 0x116e0
leaq -0x60(%rbp), %rdi
callq 0x116e0
leaq -0x38(%rbp), %rdi
callq 0x12d40
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x116e0
leaq -0x60(%rbp), %rdi
callq 0x116e0
leaq -0x38(%rbp), %rdi
callq 0x12d40
movq -0xc0(%rbp), %rdi
callq 0x2130
movq -0xd0(%rbp), %rdi
callq 0x15e10
movq -0x40(%rbp), %rdi
callq 0x2360
nopw %cs:(%rax,%rax)