// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x8(%rsp)
movq (%rsi), %rcx
movq 0x8(%rsi), %rbx
subq %rcx, %rbx
sarq $0x2, %rbx
testl %ebx, %ebx
je 0xea7d
movq %rsi, %r15
setg %dl
jle 0xea97
movl %ebx, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
cmpq %rax, %rsi
je 0xea63
cmpq %rsi, %rbx
jbe 0xed34
cmpq %rax, %rbx
jbe 0xed3d
movl (%rcx,%rsi,4), %r8d
cmpl (%rcx,%rax,4), %r8d
je 0xea78
incq %rax
cmpq %rax, %rdi
jne 0xea42
incq %rsi
cmpq %rdi, %rsi
setb %dl
jne 0xea40
jmp 0xea97
testb $0x1, %dl
je 0xea97
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
jle 0xeafc
movl %ebx, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xed4c
movl (%rax,%r12,4), %r14d
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0xa61e
cmpl %eax, %r14d
jg 0xea7f
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xed4c
cmpl $0x0, (%rax,%r12,4)
jle 0xea7d
incq %r12
cmpq %r12, %r13
jne 0xeaaa
cmpl $0x2, %ebx
jl 0xec25
movl %ebx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
decq %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
leaq 0x58(%rsp), %r14
leaq 0x78(%rsp), %rbp
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0xed58
movl (%rax,%r13,4), %ecx
decl %ecx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xa6f2
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x92fe
leaq 0x1(%r13), %r12
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xed69
movl 0x4(%rax,%r13,4), %ecx
decl %ecx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xa6f2
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x92fe
movq 0x20(%rsp), %rdx
movb $0x1, %r13b
cmpq 0x40(%rsp), %rdx
jne 0xebc6
testq %rdx, %rdx
je 0xebc3
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x21b0
testl %eax, %eax
setne %r13b
jmp 0xebc6
xorl %r13d, %r13d
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xebe2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbp, %rdi
callq 0x92e2
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xec06
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x92e2
testb %r13b, %r13b
jne 0xea7d
movq %r12, %r13
cmpq %r12, 0x10(%rsp)
jne 0xeb21
testl %ebx, %ebx
setle %bpl
jle 0xea7f
movl %ebx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
leaq 0x58(%rsp), %rsi
leaq 0x18(%rsp), %r14
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xed4c
movq %r14, %r13
movl (%rax,%r12,4), %ecx
decl %ecx
movq %rsi, %r14
movq %rsi, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xa6f2
movq %r13, %rdi
movq %r14, %rsi
callq 0x92fe
movq %r14, %rdi
callq 0x92e2
movq %r13, %rdi
leaq 0x14c7(%rip), %rsi      # 0x10160
callq 0x2080
testl %eax, %eax
movq %r13, %r14
je 0xecd2
movq %r14, %rdi
leaq 0x1901(%rip), %rsi      # 0x105b0
callq 0x2080
testl %eax, %eax
je 0xecd2
movq %r14, %rdi
leaq 0x14a4(%rip), %rsi      # 0x10166
callq 0x2080
cmpl $0x1, %ebx
jne 0xecd7
testl %eax, %eax
jne 0xecd7
jmp 0xed0f
cmpl $0x1, %ebx
je 0xed0f
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xecf3
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
incq %r12
cmpq 0x10(%rsp), %r12
setae %bpl
leaq 0x58(%rsp), %rsi
jne 0xec4a
jmp 0xea7f
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xea7f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0xea7f
leaq 0x160d(%rip), %rdi      # 0x10348
jmp 0xed47
leaq 0x1604(%rip), %rdi      # 0x10348
movq %rax, %rsi
movq %rbx, %rdx
jmp 0xed62
leaq 0x15f5(%rip), %rdi      # 0x10348
movq %r12, %rsi
jmp 0xed62
leaq 0x15e9(%rip), %rdi      # 0x10348
movq %r13, %rsi
xorl %eax, %eax
callq 0x21f0
leaq 0x15d8(%rip), %rdi      # 0x10348
movq %r12, %rsi
xorl %eax, %eax
callq 0x21f0
jmp 0xed7e
jmp 0xed92
movq %rax, %rbx
jmp 0xedb1
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x92e2
jmp 0xed95
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xedb1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0x58(%rsp), %rdi
callq 0x92e2
movq %rbx, %rdi
callq 0x2280
nop