// File: whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::TakeCamel(Market&, Deck&)
void Player::TakeCamel(Market &M, Deck &D){
    int i;
    int n = M.getSize();
    vector<int> L;
    // take all CAMEL cards in market into herds
    for (i = 0; i < n; ++i){
        Card tmpC = M.getGoods(i+1);
        if (tmpC.getCard() == "CAMEL"){ 
            setHand(tmpC);
            L.push_back(i);
        }
    }

    // delete all the CAMEL cards in market
    int m = L.size();
    M.delGoods(L.at(0)+1);
    for (i = 1; i < m; ++i)
        M.delGoods(L.at(i)-i+1);

    // fill up the market from deck
    M.setGoods(D);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x132a0
movl %eax, -0x20(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x15ff0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x153c2
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
incl %edx
leaq -0x58(%rbp), %rdi
callq 0x132c0
jmp 0x152be
leaq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x12d60
jmp 0x152d0
leaq 0x8eac(%rip), %rsi      # 0x1e183
leaq -0x88(%rbp), %rdi
callq 0x13920
movb %al, -0xb9(%rbp)
jmp 0x152eb
leaq -0x88(%rbp), %rdi
callq 0x2130
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x15306
jmp 0x1539d
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x121a0
jmp 0x15318
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x14750
jmp 0x1532d
leaq -0xa8(%rbp), %rdi
callq 0x12d40
leaq -0x38(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x16010
jmp 0x15348
jmp 0x1539d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x15494
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x153b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2130
jmp 0x153b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x12d40
jmp 0x153b4
leaq -0x58(%rbp), %rdi
callq 0x12d40
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1529e
leaq -0x58(%rbp), %rdi
callq 0x12d40
jmp 0x15494
leaq -0x38(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x9b40
movq -0xd8(%rbp), %rdi
movl %eax, -0xac(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x9b60
movq %rax, -0xc8(%rbp)
jmp 0x153fc
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rax
movl (%rax), %esi
incl %esi
callq 0x133d0
jmp 0x15415
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xac(%rbp), %eax
jge 0x15473
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x9b60
movq %rax, -0xe0(%rbp)
jmp 0x15448
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rax
movl (%rax), %esi
movl -0x1c(%rbp), %eax
subl %eax, %esi
incl %esi
callq 0x133d0
jmp 0x15466
jmp 0x15468
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1541c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13450
jmp 0x15482
leaq -0x38(%rbp), %rdi
callq 0x9900
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x9900
movq -0x60(%rbp), %rdi
callq 0x2360
nopw %cs:(%rax,%rax)