// File: /workspace/github_cpp_makefile_star2_O3/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, %r8
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
movq %rdx, %rbx
subq %rcx, %rbx
sarq $0x2, %rbx
testl %ebx, %ebx
je 0xebbe
movb $0x1, %bpl
jle 0xebc0
movq %rsi, %r15
movl %ebx, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
cmpq %rax, %rsi
je 0xe920
cmpq %rsi, %rbx
jbe 0xebd4
cmpq %rax, %rbx
jbe 0xebdd
movl (%rcx,%rsi,4), %edi
cmpl (%rcx,%rax,4), %edi
je 0xebbe
incq %rax
cmpq %rax, %r13
jne 0xe8fd
incq %rsi
cmpq %r13, %rsi
jne 0xe8fb
testl %ebx, %ebx
jle 0xebc0
xorl %r12d, %r12d
movq %r8, 0x8(%rsp)
xorl %ebp, %ebp
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xebf1
movl (%rcx,%r12,4), %r14d
movq %r8, %rdi
xorl %esi, %esi
callq 0xa5f8
cmpl %eax, %r14d
jg 0xebc0
movq (%r15), %rcx
movq 0x8(%r15), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %r12, %rax
jbe 0xebfd
cmpl $0x0, (%rcx,%r12,4)
movq 0x8(%rsp), %r8
jle 0xebbe
incq %r12
cmpq %r12, %r13
jne 0xe942
cmpl $0x1, %ebx
je 0xead6
movl %ebx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
decq %rax
movq %rax, 0x30(%rsp)
xorl %r13d, %r13d
leaq 0x78(%rsp), %rbp
movq %rbp, %r14
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0xec0c
movl (%rax,%r13,4), %ecx
decl %ecx
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %r8, %rsi
xorl %edx, %edx
callq 0xa6bc
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x92ae
leaq 0x1(%r13), %r12
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xec18
movl 0x4(%rax,%r13,4), %ecx
decl %ecx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xa6bc
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x92ae
movq 0x18(%rsp), %rdx
cmpq 0x40(%rsp), %rdx
jne 0xea63
movq 0x38(%rsp), %r13
testq %rdx, %rdx
je 0xea6d
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x21b0
testl %eax, %eax
setne %bpl
jmp 0xea6f
movb $0x1, %bpl
movq 0x38(%rsp), %r13
jmp 0xea6f
xorl %ebp, %ebp
leaq 0x48(%rsp), %rax
cmpq %rax, %r13
je 0xea89
movq 0x48(%rsp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x21a0
movq %r14, %rdi
callq 0x9292
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xeaad
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0x58(%rsp), %rdi
callq 0x9292
testb %bpl, %bpl
jne 0xebbe
movq %r12, %r13
cmpq %r12, 0x30(%rsp)
movq 0x8(%rsp), %r8
movq %r14, %rbp
jne 0xe9be
movl %ebx, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
leaq 0x58(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xebf1
movl (%rax,%r12,4), %ecx
decl %ecx
movq %r13, %rdi
movq %r8, %rsi
xorl %edx, %edx
callq 0xa6bc
movq %rbp, %rdi
movq %r13, %rsi
callq 0x92ae
movq %r13, %rdi
callq 0x9292
movq %rbp, %rdi
leaq 0x162c(%rip), %rsi      # 0x10160
callq 0x2080
testl %eax, %eax
je 0xeb6a
movq %rbp, %rdi
leaq 0x1a79(%rip), %rsi      # 0x105c0
callq 0x2080
testl %eax, %eax
je 0xeb6a
movq %rbp, %rdi
leaq 0x160c(%rip), %rsi      # 0x10166
callq 0x2080
cmpl $0x1, %ebx
jne 0xeb6f
testl %eax, %eax
jne 0xeb6f
jmp 0xeba2
cmpl $0x1, %ebx
je 0xeba2
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xeb8b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
incq %r12
cmpq %r12, %r14
movq 0x8(%rsp), %r8
jne 0xeaed
setbe %bpl
jmp 0xebc0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xebbe
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x177d(%rip), %rdi      # 0x10358
jmp 0xebe7
leaq 0x1774(%rip), %rdi      # 0x10358
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x21f0
leaq 0x1760(%rip), %rdi      # 0x10358
movq %r12, %rsi
jmp 0xebea
leaq 0x1754(%rip), %rdi      # 0x10358
movq %r12, %rsi
movq %rax, %rdx
jmp 0xebea
leaq 0x1745(%rip), %rdi      # 0x10358
movq %r13, %rsi
jmp 0xebea
leaq 0x1739(%rip), %rdi      # 0x10358
movq %r12, %rsi
xorl %eax, %eax
callq 0x21f0
jmp 0xec3c
jmp 0xec5d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x9292
jmp 0xec3f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xec60
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0xec60
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x9292
movq %rbx, %rdi
callq 0x2280