// File: whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::sellVerify(std::vector<int, std::allocator<int>>&, Player&)
bool Game::sellVerify(vector<int> &hsell, Player &p){
    //check if input are within 1 to handsize
    int sellSize = hsell.size();

    if (sellSize == 0)
        return false;

    for (int i = 0; i < sellSize; ++i){
        for (int j = 0; j < sellSize; ++j){
            if ((i != j) && (hsell.at(i) == hsell.at(j)))
                return false;
        }
    }

    for (int i = 0; i < sellSize; ++i)
        if (hsell.at(i) > p.getSize(0) || hsell.at(i) < 1)
            return false;

    // check if only one good
    for (int i = 1; i < sellSize; ++i)
        if (p.getHand(0,hsell.at(i-1)-1).getCard() != p.getHand(0,hsell.at(i)-1).getCard())
            return false;
    // check if goods are DIAMOD, GOLD or SILVR?
    for (int i = 0; i < sellSize; ++i){
        string tmp = p.getHand(0,hsell.at(i)-1).getCard(); 
        if ((tmp == "DIAMD" || tmp == "GOLD" || tmp == "SILVR") && sellSize < 2)
            return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9b40
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x1b812
movb $0x0, -0x1(%rbp)
jmp 0x1bbd4
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1b88a
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1b87d
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
je 0x1b870
movq -0x18(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x9b60
movl (%rax), %eax
movl %eax, -0x118(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x9b60
movq %rax, %rcx
movl -0x118(%rbp), %eax
cmpl (%rcx), %eax
jne 0x1b870
movb $0x0, -0x1(%rbp)
jmp 0x1bbd4
jmp 0x1b872
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1b828
jmp 0x1b87f
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1b819
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1b8ed
movq -0x18(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x9b60
movl (%rax), %eax
movl %eax, -0x11c(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x14730
movl %eax, %ecx
movl -0x11c(%rbp), %eax
cmpl %ecx, %eax
jg 0x1b8d7
movq -0x18(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x9b60
cmpl $0x1, (%rax)
jge 0x1b8e0
movb $0x0, -0x1(%rbp)
jmp 0x1bbd4
jmp 0x1b8e2
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1b891
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1ba5c
movq -0x20(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x9b60
movq -0x130(%rbp), %rsi
movl (%rax), %ecx
decl %ecx
leaq -0x78(%rbp), %rdi
movq %rdi, -0x128(%rbp)
xorl %edx, %edx
callq 0x14820
movq -0x128(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x12d60
jmp 0x1b94b
movq -0x20(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x34(%rbp), %rsi
callq 0x9b60
movq %rax, -0x138(%rbp)
jmp 0x1b96c
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rax
movl (%rax), %ecx
decl %ecx
leaq -0xc8(%rbp), %rdi
xorl %edx, %edx
callq 0x14820
jmp 0x1b98e
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x12d60
jmp 0x1b9a3
leaq -0x58(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1bcf0
movb %al, -0x141(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2130
leaq -0xc8(%rbp), %rdi
callq 0x12d40
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x78(%rbp), %rdi
callq 0x12d40
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x1b9ef
jmp 0x1ba4c
movb $0x0, -0x1(%rbp)
jmp 0x1bbd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1ba3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1ba35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x12d40
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x78(%rbp), %rdi
callq 0x12d40
jmp 0x1bbe2
jmp 0x1ba4e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1b8f4
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1bbd0
movq -0x20(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xcc(%rbp), %rsi
callq 0x9b60
movq -0x158(%rbp), %rsi
movl (%rax), %ecx
decl %ecx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x150(%rbp)
xorl %edx, %edx
callq 0x14820
movq -0x150(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x12d60
jmp 0x1bac5
leaq -0x110(%rbp), %rdi
callq 0x12d40
leaq 0x2688(%rip), %rsi      # 0x1e160
leaq -0xf0(%rbp), %rdi
callq 0x13920
movb %al, -0x159(%rbp)
jmp 0x1baec
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0x1bb46
jmp 0x1baf8
leaq 0x2667(%rip), %rsi      # 0x1e166
leaq -0xf0(%rbp), %rdi
callq 0x13920
movb %al, -0x15a(%rbp)
jmp 0x1bb13
movb -0x15a(%rbp), %al
testb $0x1, %al
jne 0x1bb46
jmp 0x1bb1f
leaq 0x2645(%rip), %rsi      # 0x1e16b
leaq -0xf0(%rbp), %rdi
callq 0x13920
movb %al, -0x15b(%rbp)
jmp 0x1bb3a
movb -0x15b(%rbp), %al
testb $0x1, %al
jne 0x1bb46
jmp 0x1bb96
cmpl $0x2, -0x24(%rbp)
jge 0x1bb96
movb $0x0, -0x1(%rbp)
movl $0x1, -0x114(%rbp)
jmp 0x1bba0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x12d40
jmp 0x1bbe2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2130
jmp 0x1bbe2
movl $0x0, -0x114(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2130
movl -0x114(%rbp), %eax
testl %eax, %eax
je 0x1bbba
jmp 0x1bbb8
jmp 0x1bbd4
jmp 0x1bbbc
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x1ba66
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)