// File: /workspace/github_cpp_makefile_star2_O3/whitefusion[P]Jaipur_cardgame-/Human.cpp
// Function: Human::setAction(Market&)
int Human::setAction(Market &m){
    int act;
    char tmp[256];
    char *token;

    cout << "Options(Take--1,  Trade--2,  Sell--3,  TakeCamel--4): ";
    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");
    }
    act = atoi(token);

    while (!actionVerify(act,m)){
        cout << "Invalid action! Try again." << endl;
        cout << "Options(Take--1,  Trade--2,  Sell--3,  TakeCamel--4): ";
        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");
        }

        act = atoi(token);
    }

    return act;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movq 0x9bc1(%rip), %r15      # 0x15fd0
leaq 0x44e9(%rip), %rsi      # 0x108ff
movl $0x36, %edx
movq %r15, %rdi
callq 0x21d0
movq 0x9bb6(%rip), %r12      # 0x15fe0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %ecx
leaq 0x10(%rsp), %rbx
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %rbx, %rsi
callq 0x22a0
leaq 0x3c04(%rip), %rsi      # 0x10062
movq %rbx, %rdi
callq 0x2230
testq %rax, %rax
jne 0xc508
leaq 0x3bf2(%rip), %rbx      # 0x10068
leaq 0x44b9(%rip), %r14      # 0x10936
leaq 0x10(%rsp), %r13
leaq 0x3bd9(%rip), %rbp      # 0x10062
movl $0x1a, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movl $0x2c, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %ecx
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %r13, %rsi
callq 0x22a0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2230
testq %rax, %rax
je 0xc489
movq %rax, %rdi
callq 0x2220
movl %eax, %ebx
movq (%rsp), %rdi
movl %eax, %esi
movq 0x8(%rsp), %rdx
callq 0xc684
testb %al, %al
jne 0xc670
leaq 0x10(%rsp), %r13
leaq 0x3b2c(%rip), %rbp      # 0x10062
leaq 0x43f9(%rip), %r14      # 0x10936
movl $0x1a, %edx
movq %r15, %rdi
leaq 0x4417(%rip), %rsi      # 0x10963
callq 0x21d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movl $0x36, %edx
movq %r15, %rdi
leaq 0x4378(%rip), %rsi      # 0x108ff
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %ecx
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %r13, %rsi
callq 0x22a0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2230
testq %rax, %rax
jne 0xc64e
leaq 0x3a99(%rip), %rbx      # 0x10068
movl $0x1a, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movl $0x2c, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %ecx
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %r13, %rsi
callq 0x22a0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2230
testq %rax, %rax
je 0xc5cf
movq %rax, %rdi
callq 0x2220
movl %eax, %ebx
movq (%rsp), %rdi
movl %eax, %esi
movq 0x8(%rsp), %rdx
callq 0xc684
testb %al, %al
je 0xc53d
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq