// File: whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::sellInputVerify(Player&)
vector<int> Game::sellInputVerify(Player &p){
    vector<int> temp;
    char tmp[256];
    char *token;

    cout << "Choose the cards on HANDs to sell: ";
    //cin.getline(tmp, 256);
    cin.getline(tmp, 256);

    token = strtok(tmp, " \t\n\r\f");


    while (!token){
        cout << "Invalid choice! Try again." << endl;
        cout << "Choose the cards on MARKET want to take in: ";
        cin.getline(tmp, 256);
        token = strtok(tmp, " \t\n\r\f");
    }


    temp.push_back(atoi(token));

    token = strtok(NULL, " \t\n\r\f");
    while (token){
        temp.push_back(atoi(token));
        token = strtok(NULL, " \t\n\r\f");
    }

    while (!sellVerify(temp, p)){
        temp.clear();
        cout << "Invalid choice! Try again." << endl;
        cout << "Choose the cards on HANDs to sell: ";
        cin.getline(tmp, 256);

        token = strtok(tmp, " \t\n\r\f");

        while (!token){
            cout << "Invalid choice! Try again." << endl;
            cout << "Choose the cards on MARKET want to take in: ";
            cin.getline(tmp, 256);
            token = strtok(tmp, " \t\n\r\f");
        }


        temp.push_back(atoi(token));
        token = strtok(NULL, " \t\n\r\f");
        while (token){
            temp.push_back(atoi(token));
            token = strtok(NULL, " \t\n\r\f");
        }
    }

    return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x160(%rbp)
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x15ff0
movq 0x101ed(%rip), %rdi     # 0x2afd0
leaq 0x3c95(%rip), %rsi      # 0x1ea7f
callq 0x2200
jmp 0x1adf1
movq 0x101e8(%rip), %rdi     # 0x2afe0
leaq -0x120(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x20a0
jmp 0x1ae0b
leaq -0x120(%rbp), %rdi
leaq 0x3249(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ae3b
jmp 0x1aedd
movq 0x1018e(%rip), %rdi     # 0x2afd0
leaq 0x321f(%rip), %rsi      # 0x1e068
callq 0x2200
movq %rax, -0x168(%rbp)
jmp 0x1ae57
movq -0x168(%rbp), %rdi
movq 0x1015b(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x1ae6c
movq 0x1015d(%rip), %rdi     # 0x2afd0
leaq 0x3ab4(%rip), %rsi      # 0x1e92e
callq 0x2200
jmp 0x1ae81
movq 0x10158(%rip), %rdi     # 0x2afe0
leaq -0x120(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x20a0
jmp 0x1ae9b
leaq -0x120(%rbp), %rdi
leaq 0x31b9(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
jmp 0x1ae25
movq -0x160(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
callq 0x9900
jmp 0x1b162
movq -0x128(%rbp), %rdi
callq 0x2300
movq -0x160(%rbp), %rdi
movl %eax, -0x138(%rbp)
leaq -0x138(%rbp), %rsi
callq 0x1bd20
jmp 0x1af04
xorl %eax, %eax
movl %eax, %edi
leaq 0x3153(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0x1af65
movq -0x128(%rbp), %rdi
callq 0x2300
movq -0x160(%rbp), %rdi
movl %eax, -0x13c(%rbp)
leaq -0x13c(%rbp), %rsi
callq 0x1bd20
jmp 0x1af4c
xorl %eax, %eax
movl %eax, %edi
leaq 0x310b(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
jmp 0x1af1b
jmp 0x1af67
movq -0x160(%rbp), %rsi
movq -0x150(%rbp), %rdi
movq -0x18(%rbp), %rdx
callq 0x1b7e0
movb %al, -0x169(%rbp)
jmp 0x1af86
movb -0x169(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1af97
jmp 0x1b13c
movq -0x160(%rbp), %rdi
callq 0x1bd50
movq 0x10026(%rip), %rdi     # 0x2afd0
leaq 0x30b7(%rip), %rsi      # 0x1e068
callq 0x2200
movq %rax, -0x178(%rbp)
jmp 0x1afbf
movq -0x178(%rbp), %rdi
movq 0xfff3(%rip), %rsi      # 0x2afc0
callq 0x2240
jmp 0x1afd4
movq 0xfff5(%rip), %rdi      # 0x2afd0
leaq 0x3a9d(%rip), %rsi      # 0x1ea7f
callq 0x2200
jmp 0x1afe9
movq 0xfff0(%rip), %rdi      # 0x2afe0
leaq -0x120(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x20a0
jmp 0x1b003
leaq -0x120(%rbp), %rdi
leaq 0x3051(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b030
jmp 0x1b0af
movq 0xff99(%rip), %rdi      # 0x2afd0
leaq 0x302a(%rip), %rsi      # 0x1e068
callq 0x2200
movq %rax, -0x180(%rbp)
jmp 0x1b04c
movq -0x180(%rbp), %rdi
movq 0xff66(%rip), %rsi      # 0x2afc0
callq 0x2240
jmp 0x1b061
movq 0xff68(%rip), %rdi      # 0x2afd0
leaq 0x38bf(%rip), %rsi      # 0x1e92e
callq 0x2200
jmp 0x1b076
movq 0xff63(%rip), %rdi      # 0x2afe0
leaq -0x120(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x20a0
jmp 0x1b090
leaq -0x120(%rbp), %rdi
leaq 0x2fc4(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
jmp 0x1b01d
movq -0x128(%rbp), %rdi
callq 0x2300
movq -0x160(%rbp), %rdi
movl %eax, -0x140(%rbp)
leaq -0x140(%rbp), %rsi
callq 0x1bd20
jmp 0x1b0d6
xorl %eax, %eax
movl %eax, %edi
leaq 0x2f81(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0x1b137
movq -0x128(%rbp), %rdi
callq 0x2300
movq -0x160(%rbp), %rdi
movl %eax, -0x144(%rbp)
leaq -0x144(%rbp), %rsi
callq 0x1bd20
jmp 0x1b11e
xorl %eax, %eax
movl %eax, %edi
leaq 0x2f39(%rip), %rsi      # 0x1e062
callq 0x2310
movq %rax, -0x128(%rbp)
jmp 0x1b0ed
jmp 0x1af67
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x1b152
movq -0x160(%rbp), %rdi
callq 0x9900
movq -0x158(%rbp), %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x130(%rbp), %rdi
callq 0x2360
nop