LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/agorenst[P]trie/radixtree.cpp
// Function: main
int main(int argc, char* argv[]) {
    string line;
    radixtree<int> t;
    while (cin) {
        getline(cin, line);
        istringstream int_parser(line);
        int x;
        vector<int> int_stream;
        while (!int_parser.eof()) {
            int_parser >> x;
            int_stream.push_back(x);
        }
        if (!cin.eof()) {
            t.insert(int_stream.rbegin(), int_stream.rend());
        }
    }
    cout <<
"\\documentclass{standalone}\
\\usepackage{tikz}\
\\usetikzlibrary{graphdrawing,graphdrawing.trees}\
\\begin{document}\
\\begin{tikzpicture}\\begin{scope}[tree layout]";
    t.tikz_print(cout);
cout << "\\end{scope}\
\\end{tikzpicture}\
\\end{document}";
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x38(%rbp), %rdi
callq 0x248e
movq 0x4cc0(%rip), %rbx      # 0x6fe0
leaq -0x88(%rbp), %r14
leaq -0x208(%rbp), %r15
leaq -0x64(%rbp), %r13
leaq -0x50(%rbp), %r12
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x23de
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2040
movq %r15, %rdi
movq %r14, %rsi
pushq $0x8
popq %rdx
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x1e8(%rbp,%rax)
jne 0x239a
movq %r15, %rdi
movq %r13, %rsi
callq 0x20c0
movq %r12, %rdi
movq %r13, %rsi
callq 0x24bc
jmp 0x236d
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
jne 0x23c9
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x24e2
movq %r12, %rdi
callq 0x2734
movq %r15, %rdi
callq 0x2090
jmp 0x2336
movq 0x4beb(%rip), %rdi      # 0x6fd0
leaq 0x1c34(%rip), %rsi      # 0x4020
callq 0x2110
movq 0x4bd8(%rip), %rsi      # 0x6fd0
leaq -0x38(%rbp), %rdi
callq 0x250c
movq 0x4bc8(%rip), %rdi      # 0x6fd0
leaq 0x1caa(%rip), %rsi      # 0x40b9
callq 0x2110
movq 0x4bb5(%rip), %rdi      # 0x6fd0
callq 0x20a0
leaq -0x30(%rbp), %rdi
callq 0x2546
leaq -0x88(%rbp), %rdi
callq 0x2080
xorl %eax, %eax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x247a
jmp 0x2454
jmp 0x2459
jmp 0x2454
movq %rax, %rbx
jmp 0x2471
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2734
leaq -0x208(%rbp), %rdi
callq 0x2090
leaq -0x30(%rbp), %rdi
callq 0x2546
leaq -0x88(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/agorenst[P]trie/./radixtree.h
// Function: node<int>::edge_to_follow(int)
typename std::list<edge>::iterator edge_to_follow(T t) {
            for (auto it = edge_list.begin(); it != edge_list.end(); ++it) {
                if (*(it->first.begin()) == t) {
                    return it;
                }
            }
            return edge_list.end();
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq (%rax), %rax
cmpq %rdi, %rax
je 0x2c7c
movq 0x10(%rax), %rcx
cmpl %esi, 0x10(%rcx)
jne 0x2c69
jmp 0x2c7f
movq %rdi, %rax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/agorenst[P]trie/./radixtree.h
// Function: node<int>::tikz_print(std::ostream&)
void tikz_print(std::ostream& o) {
                o << "node[circle,draw]{}\n";
                for(auto& e : edge_list) {
                    o << "child {\n";
                    e.second->tikz_print(o);
                    o << "    edge from parent node[left]{\n";
                    for (auto& s : e.first) {
                        o << s << " ";
                    }
                    o << "    }\n";
                    o << "}\n";
                }
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf70(%rip), %rsi       # 0x41a5
leaq 0xfa9(%rip), %r15       # 0x41e5
movq %rdi, -0x30(%rbp)
movq %rbx, %rdi
callq 0x2110
movq (%r14), %r14
cmpq -0x30(%rbp), %r14
je 0x32bd
leaq 0x10(%r14), %r13
movq %rbx, %rdi
leaq 0xf5b(%rip), %rsi       # 0x41ba
callq 0x2110
movq 0x28(%r14), %rdi
movq %rbx, %rsi
callq 0x321a
movq %rbx, %rdi
leaq 0xf49(%rip), %rsi       # 0x41c3
callq 0x2110
movq %r13, %r12
movq (%r12), %r12
cmpq %r13, %r12
je 0x32a5
movl 0x10(%r12), %esi
movq %rbx, %rdi
callq 0x2190
movq %rax, %rdi
movq %r15, %rsi
callq 0x2110
jmp 0x3282
movq %rbx, %rdi
leaq 0xf38(%rip), %rsi       # 0x41e7
callq 0x2110
leaq 0xf30(%rip), %rsi       # 0x41eb
jmp 0x3240
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH18_ToolsForLargePrograms/examples/over.cc
// Function: main
int main()
{
	int ival = 42;
    print("Value: "); // calls global print(const string &)
    print(ival);      // calls libs_R_us::print(int)

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0xe02(%rip), %rsi       # 0x204e
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x1030
callq 0x121c
leaq -0x30(%rbp), %rdi
callq 0x1040
callq 0x11dc
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Token.cpp
// Function: Token::setType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Token::setType(string t){
    if (tokenType[t] >= tokenType["Diamond"] && tokenType[t] <= tokenType["5Bonus"]){
        type = t;
        return true;
    }
    else{
        cout << "Invalid token type!" << endl; 
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x116cf(%rip), %r15     # 0x15190
movq %r15, %rdi
callq 0x3da2
movl (%rax), %ebp
leaq 0x96cc(%rip), %rsi      # 0xd19e
leaq 0x30(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
callq 0x3950
movq %r15, %rdi
movq %r12, %rsi
callq 0x3e08
cmpl (%rax), %ebp
jge 0x3af7
xorl %ebp, %ebp
jmp 0x3b3f
leaq 0x11692(%rip), %rdi     # 0x15190
movq %rbx, %rsi
callq 0x3da2
movl (%rax), %ebp
leaq 0x9688(%rip), %rsi      # 0xd197
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x3950
leaq 0x1166b(%rip), %rdi     # 0x15190
leaq 0x10(%rsp), %rsi
callq 0x3e08
cmpl (%rax), %ebp
setle %bpl
leaq 0x10(%rsp), %rdi
callq 0x20e0
leaq 0x30(%rsp), %rdi
callq 0x20e0
testb %bpl, %bpl
je 0x3b5b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2110
jmp 0x3b76
movq 0x1146e(%rip), %rdi     # 0x14fd0
leaq 0x963d(%rip), %rsi      # 0xd1a6
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20e0
jmp 0x3b99
jmp 0x3b96
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Token.cpp
// Function: Token::setVal(int)
bool Token::setVal(int v){
    string thisToken = getType();
    pair<multimap<string,int>::iterator, multimap<string,int>::iterator> ii;
    multimap<string,int>::iterator it;
    ii = tokenValue.equal_range(thisToken);
    for (it = ii.first; it != ii.second; ++it){
        if (v == it->second){ 
            val = v;
            return true;
        }
    }

    cout << "Invalid token value of " << thisToken << "!" << endl;
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r15
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2200
leaq 0x115ee(%rip), %rdi     # 0x151c0
movq %rbx, %rsi
callq 0x47e4
movq %rax, %r14
movq %rdx, %rbx
cmpq %rbx, %r14
je 0x3bf8
cmpl %ebp, 0x40(%r14)
je 0x3c31
movq %r14, %rdi
callq 0x2120
movq %rax, %r14
jmp 0x3be0
movq 0x113d1(%rip), %rdi     # 0x14fd0
leaq 0x95b4(%rip), %rsi      # 0xd1ba
callq 0x21b0
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x2180
leaq 0x9b4a(%rip), %rsi      # 0xd769
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
jmp 0x3c35
movl %ebp, 0x20(%r15)
cmpq %rbx, %r14
setne %bl
leaq 0x8(%rsp), %rdi
callq 0x20e0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c54
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllTokens.cpp
// Function: All_Tokens::newAToken()
void All_Tokens::newAToken(){
    for (int i = 0; i < 7; ++i)
        allTokens.at(i).clear();
    allTokens.clear();

    for (int i = 0; i < 7; ++i)
        number[i] = 0;

    number[0] = 5;
    number[1] = 5;
    number[2] = 5;
    number[3] = 9;
    number[4] = 7;
    number[5] = 7;
    number[6] = 1;

    int i;
    size_t j;
    Token tmpT; // temporary token
    vector<Token> tmpTs; // temporary vector of tokens 

    for (i = 0; i < 7; ++i){
        tmpT.setType(tokenName[i+1]); 
        for (j = 0; j < tokens.at(i).size(); ++j){
            tmpT.setVal(tokens.at(i).at(j));
            tmpTs.push_back(tmpT);
        } 
        allTokens.push_back(tmpTs);
        tmpTs.clear();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
cmpq $0x7, %r14
je 0x4a7c
movq %r14, %rsi
callq 0x541e
movq %rax, %rdi
callq 0x53d2
incq %r14
jmp 0x4a5e
callq 0x543c
pushq $0x6
popq %rax
cmpq $0xd, %rax
je 0x4a93
andl $0x0, (%rbx,%rax,4)
incq %rax
jmp 0x4a84
movaps 0x8756(%rip), %xmm0     # 0xd1f0
movups %xmm0, 0x18(%rbx)
movabsq $0x700000007, %rax      # imm = 0x700000007
movq %rax, 0x28(%rbx)
movq %rbx, 0x8(%rsp)
movl $0x1, 0x30(%rbx)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x3a5c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %r13d, %r13d
leaq 0x30(%rsp), %rbp
leaq 0x10743(%rip), %r12     # 0x15228
cmpq $0x7, %r13
je 0x4b95
leaq 0x1(%r13), %rbx
movl %ebx, 0x4(%rsp)
leaq 0x106fa(%rip), %rdi     # 0x151f8
leaq 0x4(%rsp), %rsi
callq 0x52ec
movq %rbp, %rdi
movq %rax, %rsi
callq 0x2200
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3aa8
movq %rbp, %rdi
callq 0x20e0
xorl %ebp, %ebp
movq %r12, %rdi
movq %r13, %rsi
callq 0x533a
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %rcx, %rbp
jae 0x4b73
movq %r12, %rdi
movq %r13, %rsi
callq 0x533a
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5358
movl (%rax), %esi
movq %r14, %rdi
callq 0x3bac
movq %r15, %rdi
movq %r14, %rsi
callq 0x537a
incq %rbp
jmp 0x4b28
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x53a6
movq %r15, %rdi
callq 0x53d2
movq %rbx, %r13
leaq 0x30(%rsp), %rbp
jmp 0x4ae5
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x50(%rsp), %rdi
callq 0x3aa2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4bcb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20e0
jmp 0x4bce
jmp 0x4bcb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x50(%rsp), %rdi
callq 0x3aa2
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllTokens.cpp
// Function: All_Tokens::getSize(int)
int All_Tokens::getSize(int id){
    if (id >= 1 && id <= 7){
        return number[id-1];
    }
    
    cout << "getSize:Invalid type of token!" << endl;
    return -1;
}

// Assembly:
decl %esi
cmpl $0x6, %esi
ja 0x4c36
movl %esi, %eax
movl 0x18(%rdi,%rax,4), %eax
retq
pushq %rax
movq 0x10392(%rip), %rdi     # 0x14fd0
leaq 0x85bb(%rip), %rsi      # 0xd200
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $-0x1
popq %rax
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllTokens.cpp
// Function: All_Tokens::getToken(int)
Token All_Tokens::getToken(int id){
    if (id >= 1 && id <= 7)
        return allTokens.at(id-1).at(getSize(id)-1); 
    else // if the id is invalid, then always return last token
        cout << "getToken: Invalid type of token!" << endl;
    return allTokens.at(6).at(getSize(6)-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leal -0x1(%r12), %eax
cmpl $0x6, %eax
ja 0x4c8f
movl %eax, %esi
movq %r14, %rdi
callq 0x541e
movq %rax, %r15
movq %r14, %rdi
movl %r12d, %esi
callq 0x4c28
jmp 0x4cbc
movq 0x1033a(%rip), %rdi     # 0x14fd0
leaq 0x8582(%rip), %rsi      # 0xd21f
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x6
popq %rsi
movq %r14, %rdi
callq 0x541e
movq %rax, %r15
movl 0x2c(%r14), %eax
decl %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x5444
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5462
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllBonus.cpp
// Function: All_Bonus::All_Bonus()
int All_Bonus::getSize(int id)
{
  if(id >=3 && id <=5){
    return size[id-3];
  }
  cout<<"getSize: Invalid type of Bonus!"<<endl;
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
movabsq $0x600000006, %rax      # imm = 0x600000006
movq %rax, 0x18(%rdi)
movq %rdi, 0x8(%rsp)
movl $0x6, 0x20(%rdi)
leaq 0x30(%rsp), %rdi
callq 0x3a5c
leaq 0x10(%rsp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
xorl %r12d, %r12d
leaq 0x58(%rsp), %rbx
leaq 0x30(%rsp), %rbp
leaq 0xeece(%rip), %r15      # 0x15278
cmpq $0x3, %r12
je 0x645c
leaq 0x1(%r12), %r13
movl %r13d, 0x4(%rsp)
leaq 0xee83(%rip), %rdi      # 0x15248
leaq 0x4(%rsp), %rsi
callq 0x52ec
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2200
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x3aa8
movq %rbx, %rdi
callq 0x20e0
xorl %ebx, %ebx
movq %r15, %rdi
movq %r12, %rsi
callq 0x533a
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %rcx, %rbx
jae 0x643a
movq %r15, %rdi
movq %r12, %rsi
callq 0x533a
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5358
movl (%rax), %esi
movq %rbp, %rdi
callq 0x3bac
movq %r14, %rdi
movq %rbp, %rsi
callq 0x537a
incq %rbx
jmp 0x63ef
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x53a6
movq %r14, %rdi
callq 0x53d2
movq %r13, %r12
leaq 0x58(%rsp), %rbx
jmp 0x63aa
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x30(%rsp), %rdi
callq 0x3aa2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x64ae
jmp 0x6497
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20e0
jmp 0x649a
jmp 0x6497
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x30(%rsp), %rdi
callq 0x3aa2
movq 0x8(%rsp), %rdi
callq 0x53fc
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllBonus.cpp
// Function: All_Bonus::newABonus()
void All_Bonus::newABonus(){
    for (int i = 0; i < 3; ++i)
        allBonus.at(i).clear();
    allBonus.clear();

    for (int i = 0; i < 3; ++i)
        size[i] = 0;

    size[0] = 6;
    size[1] = 6;
    size[2] = 6;
    int i;
    size_t j;
    Token temp;
    vector<Token> tempvec;

    for(i = 0; i < 3 ; ++i){
        temp.setType(BonusName[i+1]);
        for( j = 0; j < Bonus.at(i).size(); ++j){
            temp.setVal(Bonus.at(i).at(j));
            tempvec.push_back(temp);
        }
        allBonus.push_back(tempvec);
        tempvec.clear();
    }

    shuffle();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
cmpq $0x3, %r14
je 0x64f2
movq %r14, %rsi
callq 0x541e
movq %rax, %rdi
callq 0x53d2
incq %r14
jmp 0x64d4
callq 0x543c
pushq $0x6
popq %rax
cmpq $0x9, %rax
je 0x6509
andl $0x0, (%rbx,%rax,4)
incq %rax
jmp 0x64fa
movabsq $0x600000006, %rax      # imm = 0x600000006
movq %rax, 0x18(%rbx)
movq %rbx, 0x8(%rsp)
movl $0x6, 0x20(%rbx)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x3a5c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %r13d, %r13d
leaq 0x30(%rsp), %rbp
leaq 0xed28(%rip), %r12      # 0x15278
cmpq $0x3, %r13
je 0x6600
leaq 0x1(%r13), %rbx
movl %ebx, 0x4(%rsp)
leaq 0xecdf(%rip), %rdi      # 0x15248
leaq 0x4(%rsp), %rsi
callq 0x52ec
movq %rbp, %rdi
movq %rax, %rsi
callq 0x2200
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3aa8
movq %rbp, %rdi
callq 0x20e0
xorl %ebp, %ebp
movq %r12, %rdi
movq %r13, %rsi
callq 0x533a
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %rcx, %rbp
jae 0x65de
movq %r12, %rdi
movq %r13, %rsi
callq 0x533a
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5358
movl (%rax), %esi
movq %r14, %rdi
callq 0x3bac
movq %r15, %rdi
movq %r14, %rsi
callq 0x537a
incq %rbp
jmp 0x6593
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x53a6
movq %r15, %rdi
callq 0x53d2
movq %rbx, %r13
leaq 0x30(%rsp), %rbp
jmp 0x6550
movq 0x8(%rsp), %rdi
callq 0x6662
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x50(%rsp), %rdi
callq 0x3aa2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6642
jmp 0x6642
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20e0
jmp 0x6645
jmp 0x6642
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x53da
leaq 0x50(%rsp), %rdi
callq 0x3aa2
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllBonus.cpp
// Function: All_Bonus::shuffle()
void All_Bonus::shuffle()
{
  unsigned seed;
  if (TEST == 0)
      seed = std::chrono::system_clock::now().time_since_epoch().count();
  else 
      seed = 839223;

  for(int i = 0; i < 3; i++){
    std::shuffle(allBonus.at(i).begin(), allBonus.at(i).end(), std::default_random_engine(seed));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rsp, %r15
cmpq $0x3, %r14
je 0x66ae
movq %rbx, %rdi
movq %r14, %rsi
callq 0x541e
movq (%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x541e
movq 0x8(%rax), %rsi
movq $0xcce37, (%rsp)        # imm = 0xCCE37
movq %r12, %rdi
movq %r15, %rdx
callq 0x6bef
incq %r14
jmp 0x6673
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/AllBonus.cpp
// Function: All_Bonus::getBonus(int)
Token All_Bonus::getBonus(int id)
{
  if( id >= 3 && id <=5)
    return allBonus.at(id-3).at(getSize(id)-1);
  else{ 
    cout<<" getBonus: Invalid type of bonus! Get the 3Bonus instead!" << endl;
  }
  return allBonus.at(0).at(getSize(3)-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leal -0x3(%r12), %eax
cmpl $0x2, %eax
ja 0x6761
movl %eax, %esi
movq %r14, %rdi
callq 0x541e
movq %rax, %r15
movq %r14, %rdi
movl %r12d, %esi
callq 0x66f8
jmp 0x678d
movq 0xe868(%rip), %rdi      # 0x14fd0
leaq 0x6d15(%rip), %rsi      # 0xd484
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r14, %rdi
xorl %esi, %esi
callq 0x541e
movq %rax, %r15
movl 0x18(%r14), %eax
decl %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x5444
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5462
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Deck.cpp
// Function: Deck::pDeck()
void Deck::pDeck()
{
  vector<Card>::iterator dit = deck.begin();
  while( dit != deck.end()){
      cout << (*dit).getCard()<<endl;
      dit++;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0x8(%rsp), %r15
movq 0xd8f5(%rip), %r12      # 0x14fd0
cmpq 0x8(%rbx), %r14
je 0x770d
movq %r15, %rdi
movq %r14, %rsi
callq 0x7d18
movq %r12, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20e0
addq $0x20, %r14
jmp 0x76db
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Deck.cpp
// Function: Deck::drawCard()
Card Deck::drawCard(){
  Card temp;
  vector<Card>::iterator dit = deck.end()-1;
  temp = *dit;
  deck.erase(dit);
  return temp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7c9c
movq 0x8(%r14), %r15
addq $-0x20, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2110
movq %r14, %rdi
movq %r15, %rsi
callq 0x7924
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7d12
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Market.cpp
// Function: Market::Market()
Market::Market(){
    Card tmpC;
    tmpC.setCard("CAMEL");
    for (int i = 0; i < 5; ++i)
        goods.push_back(tmpC); 
    size = 5;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x10(%rsp), %rdi
callq 0x7c9c
leaq 0x5428(%rip), %rsi      # 0xd183
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3950
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7d26
leaq 0x30(%rsp), %rdi
callq 0x20e0
pushq $0x5
popq %rbp
leaq 0x10(%rsp), %r14
subl $0x1, %ebp
jb 0x7d9d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7794
jmp 0x7d8b
movl $0x5, 0x18(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x7d12
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x20e0
jmp 0x7dd0
jmp 0x7dcd
movq %rax, %r14
jmp 0x7dda
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x77c0
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Market.cpp
// Function: Market::Market(Deck&)
Market::Market(Deck &deck){
    Card tmpC;
    tmpC.setCard("CAMEL");
    for (int i = 0; i < 3; ++i)
        goods.push_back(tmpC); 
    for (int i = 0; i < 2; ++i){
        tmpC = deck.drawCard();
        goods.push_back(tmpC); 
    }
    size = 5;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsp, %rdi
callq 0x7c9c
leaq 0x536d(%rip), %rsi      # 0xd183
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x3950
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7d26
leaq 0x20(%rsp), %rdi
callq 0x20e0
pushq $0x3
popq %rbp
movq %rsp, %r15
subl $0x1, %ebp
jb 0x7e54
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7794
jmp 0x7e42
pushq $0x2
popq %rbp
leaq 0x40(%rsp), %r15
movq %rsp, %r12
subl $0x1, %ebp
jb 0x7e8f
movq %r15, %rdi
movq %r14, %rsi
callq 0x774a
movq %r12, %rdi
movq %r15, %rsi
callq 0x2110
movq %r15, %rdi
callq 0x7d12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7794
jmp 0x7e5f
movl $0x5, 0x18(%rbx)
movq %rsp, %rdi
callq 0x7d12
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20e0
jmp 0x7ed7
jmp 0x7ed4
movq %rax, %r14
jmp 0x7edf
jmp 0x7ed4
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x7d12
jmp 0x7ed7
jmp 0x7ed4
movq %rax, %r14
movq %rsp, %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x77c0
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Market.cpp
// Function: Market::newMarket(Deck&)
void Market::newMarket(Deck &deck){
    goods.clear();
    size = 0;
    Card tmpC;
    tmpC.setCard("CAMEL");
    for (int i = 0; i < 3; ++i)
        goods.push_back(tmpC); 
    for (int i = 0; i < 2; ++i){
        tmpC = deck.drawCard();
        goods.push_back(tmpC); 
    }
    size = 5;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x77e2
andl $0x0, 0x18(%rbx)
movq %rsp, %rdi
callq 0x7c9c
leaq 0x5269(%rip), %rsi      # 0xd183
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x3950
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7d26
leaq 0x20(%rsp), %rdi
callq 0x20e0
pushq $0x3
popq %rbp
movq %rsp, %r15
subl $0x1, %ebp
jb 0x7f58
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7794
jmp 0x7f46
pushq $0x2
popq %rbp
leaq 0x40(%rsp), %r15
movq %rsp, %r12
subl $0x1, %ebp
jb 0x7f93
movq %r15, %rdi
movq %r14, %rsi
callq 0x774a
movq %r12, %rdi
movq %r15, %rsi
callq 0x2110
movq %r15, %rdi
callq 0x7d12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7794
jmp 0x7f63
movl $0x5, 0x18(%rbx)
movq %rsp, %rdi
callq 0x7d12
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20e0
jmp 0x7fd6
jmp 0x7fd3
jmp 0x7fd3
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x7d12
jmp 0x7fd6
jmp 0x7fd3
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Market.cpp
// Function: Market::getGoods(int)
Card Market::getGoods(int id){
    Card tmpC;
    if (id > 0 && id < size+1){
        tmpC = goods.at(id-1);
        return tmpC;
    }
    // if the card id is outside the market, always return the first card
    else{ 
        cout << "Invalid choice! You get the first Card instead!" << endl; 
        tmpC = goods.at(0);
    }
    return tmpC; 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7c9c
testl %r15d, %r15d
jle 0x8019
cmpl %r15d, 0x18(%r14)
jl 0x8019
decl %r15d
jmp 0x8037
movq 0xcfb0(%rip), %rdi      # 0x14fd0
leaq 0x55a9(%rip), %rsi      # 0xd5d0
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x8396
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2110
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7d12
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Market.cpp
// Function: Market::setGoods(Deck&)
void Market::setGoods(Deck &deck){
    int n = 5 - size;
    if (deck.getsize() != 0){
        for (int i = 0; i < n; ++i){
            if(deck.getsize() == 0)
                break;
            goods.push_back(deck.drawCard()); 
            size++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movabsq $0x1fffffffe0, %r12     # imm = 0x1FFFFFFFE0
movq 0x8(%rsi), %rax
subq (%rsi), %rax
testq %r12, %rax
je 0x80f7
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x5
popq %rax
subl 0x18(%rdi), %eax
xorl %ebp, %ebp
testl %eax, %eax
cmovgl %eax, %ebp
movq %rsp, %r15
subl $0x1, %ebp
jb 0x80f7
movq 0x8(%rbx), %rax
subq (%rbx), %rax
testq %r12, %rax
je 0x80f7
movq %r15, %rdi
movq %rbx, %rsi
callq 0x774a
movq %r14, %rdi
movq %r15, %rsi
callq 0x83e4
movq %r15, %rdi
callq 0x7d12
incl 0x18(%r14)
jmp 0x80c2
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::Player()
Player::Player(){
    Card tmpC;
    tmpC.setCard("DIAMD");
    vector<Card> cards;
    vector<Card> herds;

    for (int i = 0; i < 3; ++i)
        cards.push_back(tmpC);
    size[0] = 3;

    tmpC.setCard("CAMEL");
    for (int i = 0; i < 2; ++i)
        herds.push_back(tmpC);
    size[1] = 2;

    hand.push_back(cards);
    hand.push_back(herds);

    name = "LLL";

    for (int i = 0; i < 4; ++i)
        point[i] = 0;

    GTokenNum = BTokenNum = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r15
leaq 0xc7ed(%rip), %rax      # 0x14d48
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
leaq 0x30(%rsp), %rdi
callq 0x7c9c
leaq 0x4bcc(%rip), %rsi      # 0xd160
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x3950
leaq 0x30(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x7d26
leaq 0x88(%rsp), %rdi
callq 0x20e0
leaq 0x50(%rsp), %r12
andq $0x0, 0x10(%r12)
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rsp)
movaps %xmm0, (%r12)
movaps %xmm0, 0x10(%rsp)
pushq $0x3
popq %rbp
leaq 0x30(%rsp), %r13
subl $0x1, %ebp
jb 0x85fd
movq %r12, %rdi
movq %r13, %rsi
callq 0x7794
jmp 0x85eb
movl $0x3, 0x40(%r15)
leaq 0x4b77(%rip), %rsi      # 0xd183
leaq 0x68(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3950
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x7d26
leaq 0x68(%rsp), %rdi
callq 0x20e0
pushq $0x2
popq %rbp
leaq 0x10(%rsp), %r12
leaq 0x30(%rsp), %r13
subl $0x1, %ebp
jb 0x8653
movq %r12, %rdi
movq %r13, %rsi
callq 0x7794
jmp 0x8641
movl $0x2, 0x44(%r15)
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x98f2
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x98f2
leaq 0x5067(%rip), %rsi      # 0xd6e3
movq %r14, %rdi
callq 0x22c0
xorl %eax, %eax
cmpq $0x4, %rax
je 0x8697
andl $0x0, 0x48(%r15,%rax,4)
incq %rax
jmp 0x8686
andq $0x0, 0x58(%r15)
leaq 0x10(%rsp), %rdi
callq 0x77c0
leaq 0x50(%rsp), %rdi
callq 0x77c0
leaq 0x30(%rsp), %rdi
callq 0x7d12
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x68(%rsp), %rdi
callq 0x20e0
jmp 0x8700
jmp 0x86fd
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x20e0
jmp 0x8714
movq %rax, %r15
jmp 0x8714
movq %rax, %r15
jmp 0x871e
jmp 0x86fd
jmp 0x86fd
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x77c0
leaq 0x50(%rsp), %rdi
callq 0x77c0
leaq 0x30(%rsp), %rdi
callq 0x7d12
movq %r14, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x991e
movq %r15, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::Player(Deck&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Player::Player(Deck &deck, string playerName){
    Card tmpC;
    int i;
    size[0] = size[1] = 0;

    vector<Card> cards;
    vector<Card> herds;

    // draw five cards from deck, if card == CAMEL put it in herds 
    for (i = 0; i < 5; ++i){
        tmpC = deck.drawCard();
        if (tmpC.getCard() == "CAMEL"){
            herds.push_back(tmpC);
            size[1]++;
        }
        else{
            cards.push_back(tmpC);
            size[0]++;
        }
    }

    hand.push_back(cards);
    hand.push_back(herds);

    name = playerName;

    // initialize all points to zero
    for (i = 0; i < 4; ++i)
        point[i] = 0;

    GTokenNum = BTokenNum = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %r15
leaq 0xc5ef(%rip), %rax      # 0x14d48
movq %rax, (%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
leaq 0x58(%rsp), %rdi
callq 0x7c9c
andq $0x0, 0x40(%r15)
leaq 0x40(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
pushq $0x5
popq %rbp
leaq 0x78(%rsp), %r12
leaq 0x58(%rsp), %rbx
subl $0x1, %ebp
jb 0x8837
movq %r12, %rdi
movq %r13, %rsi
callq 0x774a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2110
movq %r12, %rdi
callq 0x7d12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7d18
movq %r12, %rdi
leaq 0x4987(%rip), %rsi      # 0xd183
callq 0x83b7
movl %eax, %r14d
movq %r12, %rdi
callq 0x20e0
testb %r14b, %r14b
je 0x8824
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x7794
incl 0x44(%r15)
jmp 0x87c4
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x7794
incl 0x40(%r15)
jmp 0x87c4
leaq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x98f2
leaq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x98f2
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2110
xorl %eax, %eax
cmpq $0x4, %rax
je 0x8877
andl $0x0, 0x48(%r15,%rax,4)
incq %rax
jmp 0x8866
andq $0x0, 0x58(%r15)
leaq 0x20(%rsp), %rdi
callq 0x77c0
leaq 0x40(%rsp), %rdi
callq 0x77c0
leaq 0x58(%rsp), %rdi
callq 0x7d12
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x88e7
jmp 0x88c6
jmp 0x88c6
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x7d12
jmp 0x88c9
jmp 0x88c6
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x77c0
leaq 0x40(%rsp), %rdi
callq 0x77c0
leaq 0x58(%rsp), %rdi
callq 0x7d12
movq 0x10(%rsp), %rdi
callq 0x20e0
movq 0x8(%rsp), %rdi
callq 0x991e
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::newPlayer(Deck&)
void Player::newPlayer(Deck &deck){
    for(int i = 0; i < 2; ++i){
        hand.at(i).clear(); 
        size[i] = 0;
    }
    hand.clear();

    GTokenNum = BTokenNum = 0;

    // initialize all points to zero
    for (int i = 0; i < 3; ++i)
        point[i] = 0;

    Card tmpC;
    size[0] = size[1] = 0;

    vector<Card> cards;
    vector<Card> herds;

    // draw five cards from deck, if card == CAMEL put it in herds 
    for (int i = 0; i < 5; ++i){
        tmpC = deck.drawCard();
        if (tmpC.getCard() == "CAMEL"){
            herds.push_back(tmpC);
            size[1]++;
        }
        else{
            cards.push_back(tmpC);
            size[0]++;
        }
    }

    hand.push_back(cards);
    hand.push_back(herds);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
xorl %r12d, %r12d
movq %rbx, %rdi
cmpq $0x2, %r12
je 0x89aa
movq %r12, %rsi
callq 0x9940
movq %rax, %rdi
callq 0x77e2
andl $0x0, 0x40(%r15,%r12,4)
incq %r12
jmp 0x8986
callq 0x995e
andq $0x0, 0x58(%r15)
xorl %eax, %eax
cmpq $0x3, %rax
je 0x89c7
andl $0x0, 0x48(%r15,%rax,4)
incq %rax
jmp 0x89b6
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x7c9c
andq $0x0, 0x40(%r15)
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
pushq $0x5
popq %r14
leaq 0x68(%rsp), %r13
subl $0x1, %r14d
jb 0x8a74
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x774a
movq %r12, %rdi
movq %r13, %rsi
callq 0x2110
movq %r13, %rdi
callq 0x7d12
movq %r13, %rdi
movq %r12, %rsi
callq 0x7d18
movq %r13, %rdi
leaq 0x4749(%rip), %rsi      # 0xd183
callq 0x83b7
movl %eax, %ebp
movq %r13, %rdi
callq 0x20e0
testb %bpl, %bpl
je 0x8a61
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7794
incl 0x44(%r15)
jmp 0x89ff
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x7794
incl 0x40(%r15)
jmp 0x89ff
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x98f2
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x98f2
leaq 0x10(%rsp), %rdi
callq 0x77c0
leaq 0x30(%rsp), %rdi
callq 0x77c0
leaq 0x48(%rsp), %rdi
callq 0x7d12
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8ad3
jmp 0x8ad3
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7d12
jmp 0x8ad6
jmp 0x8ad3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x77c0
leaq 0x30(%rsp), %rdi
callq 0x77c0
leaq 0x48(%rsp), %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::setHand(Card)
void Player::setHand(Card c){
    if (c.getCard() == "CAMEL"){
        hand.at(1).push_back(c);
        size[1]++;
    }
    else{
        hand.at(0).push_back(c);
        size[0]++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7d18
leaq 0x4637(%rip), %rsi      # 0xd183
movq %r15, %rdi
callq 0x83b7
movl %eax, %ebp
movq %r15, %rdi
callq 0x20e0
leaq 0x8(%rbx), %rdi
testb %bpl, %bpl
je 0x8b7f
pushq $0x1
popq %rsi
callq 0x9940
movq %rax, %rdi
movq %r14, %rsi
callq 0x7794
incl 0x44(%rbx)
jmp 0x8b94
xorl %esi, %esi
callq 0x9940
movq %rax, %rdi
movq %r14, %rsi
callq 0x7794
incl 0x40(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::getHand(int, int) const
Card Player::getHand(int type, int location) const{ // location from 0
    if (type >= 0 && type <= 1){
        if (location >= 0 && location < size[type])
            return hand.at(type).at(location); 
        else{ // if location out of range, return the first card
            cout << "getHand: location is out of range! get the first card instead!" << endl;
            return hand.at(type).at(0);
        }
    }
    else{ // if type not found, return the card
        cout << "getHand: card type not found! will return a card(not camel) instead!" << endl;
    }
    return hand.at(0).at(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x1, %edx
ja 0x8bd8
movl %ecx, %ebp
movl %edx, %r15d
testl %ecx, %ecx
js 0x8bfe
cmpl %ebp, 0x40(%r14,%r15,4)
jle 0x8bfe
addq $0x8, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x9966
movl %ebp, %esi
movq %rax, %rdi
jmp 0x8c2d
movq 0xc3f1(%rip), %rdi      # 0x14fd0
leaq 0x4b40(%rip), %rsi      # 0xd726
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
addq $0x8, %r14
movq %r14, %rdi
xorl %esi, %esi
jmp 0x8c23
movq 0xc3cb(%rip), %rdi      # 0x14fd0
leaq 0x4adb(%rip), %rsi      # 0xd6e7
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
addq $0x8, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x9966
movq %rax, %rdi
xorl %esi, %esi
callq 0x9984
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2200
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::getPoints(int) const
int Player::getPoints(int type) const{
    if (type >= 0 && type <=3)
        return point[type];
    else
        cout << "getPoints: point type not found! Will return total points!" << endl;
    return point[2];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x3, %esi
ja 0x8cb1
movl %esi, %eax
leaq (%rbx,%rax,4), %rbx
addq $0x48, %rbx
jmp 0x8cd0
movq 0xc318(%rip), %rdi      # 0x14fd0
leaq 0x4aac(%rip), %rsi      # 0xd76b
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
addq $0x50, %rbx
movl (%rbx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::Take(int, Market&, Deck&)
void Player::Take(int location, Market &M, Deck &D){
    //check the current size of hand cards: not exceed 7 
    if (size[0] < 7){
        //take the card,update card size
        setHand(M.getGoods(location));
        M.delGoods(location);
        //draw a card from deck to market
        M.setGoods(D);
    }
    else
        cout << "Take: Cannot take card: already 7 cards!" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpl $0x6, 0x40(%rdi)
jg 0x8f5c
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rdx, %rsi
movl %ebp, %edx
callq 0x7ff6
movq %r15, %rdi
movq %r12, %rsi
callq 0x8b28
movq %rsp, %rdi
callq 0x7d12
movq %r14, %rdi
movl %ebp, %esi
callq 0x806a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x808a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xc06d(%rip), %rdi      # 0x14fd0
leaq 0x483c(%rip), %rsi      # 0xd7a6
callq 0x21b0
movq %rax, %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7d12
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Player.cpp
// Function: Player::TakeCamel(Market&, Deck&)
void Player::TakeCamel(Market &M, Deck &D){
    int i;
    int n = M.getSize();
    vector<int> L;
    // take all CAMEL cards in market into herds
    for (i = 0; i < n; ++i){
        Card tmpC = M.getGoods(i+1);
        if (tmpC.getCard() == "CAMEL"){ 
            setHand(tmpC);
            L.push_back(i);
        }
    }

    // delete all the CAMEL cards in market
    int m = L.size();
    M.delGoods(L.at(0)+1);
    for (i = 1; i < m; ++i)
        M.delGoods(L.at(i)-i+1);

    // fill up the market from deck
    M.setGoods(D);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x28(%rsp)
movq %rsi, %r14
movq %rdi, 0x30(%rsp)
movq %rsi, %rdi
callq 0x7ff2
movl %eax, %ebp
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
xorl %edx, %edx
leaq 0x58(%rsp), %r13
leaq 0x78(%rsp), %rbx
leaq 0x38(%rsp), %r15
movl %edx, 0xc(%rsp)
cmpl %ebp, %edx
jge 0x9291
incl %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x7ff6
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7d18
movq %rbx, %rdi
leaq 0x3f46(%rip), %rsi      # 0xd183
callq 0x83b7
movl %eax, %r12d
movq %rbx, %rdi
callq 0x20e0
testb %r12b, %r12b
je 0x9281
movq %r15, %rdi
movq %r13, %rsi
callq 0x2200
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x8b28
movq %r15, %rdi
callq 0x7d12
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x99a6
movq %r13, %rdi
callq 0x7d12
movl 0xc(%rsp), %edx
incl %edx
jmp 0x9213
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %r15
subq (%rdi), %r15
xorl %esi, %esi
callq 0x5358
movl (%rax), %esi
incl %esi
movq %r14, %rdi
callq 0x806a
shrq $0x2, %r15
pushq $0x1
popq %rax
leaq 0x10(%rsp), %rbx
movl %eax, 0xc(%rsp)
cmpl %r15d, %eax
jge 0x92e8
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5358
movl (%rax), %esi
subl 0xc(%rsp), %esi
incl %esi
movq %r14, %rdi
callq 0x806a
movl 0xc(%rsp), %eax
incl %eax
jmp 0x92bc
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq 0x808a
leaq 0x10(%rsp), %rdi
callq 0x57aa
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9335
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7d12
jmp 0x9327
jmp 0x9324
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x7d12
jmp 0x9338
jmp 0x9335
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x57aa
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/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 0xacbd(%rip), %rbx      # 0x14fd0
leaq 0x35ed(%rip), %rsi      # 0xd907
movq %rbx, %rdi
callq 0x21b0
movq 0xacb7(%rip), %r14      # 0x14fe0
leaq 0x10(%rsp), %r15
leaq 0x2d2d(%rip), %rbp      # 0xd062
leaq 0x2d2c(%rip), %r12      # 0xd068
leaq 0x35fb(%rip), %r13      # 0xd93e
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r15, %rsi
callq 0x2080
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2250
testq %rax, %rax
jne 0xa383
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21b0
jmp 0xa343
movq 0xac46(%rip), %rbp      # 0x14fd0
movq 0xac4f(%rip), %r14      # 0x14fe0
leaq 0x10(%rsp), %rbx
leaq 0x2cc5(%rip), %r12      # 0xd062
movq %rax, %rdi
callq 0x2240
movl %eax, %r13d
movq (%rsp), %rdi
movl %eax, %esi
movq 0x8(%rsp), %rdx
callq 0xa42e
testb %al, %al
jne 0xa418
leaq 0x35a8(%rip), %rsi      # 0xd96b
leaq 0x353d(%rip), %r13      # 0xd907
leaq 0x356d(%rip), %r15      # 0xd93e
movq %rbp, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x21b0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2080
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2250
leaq 0x2c5a(%rip), %rsi      # 0xd068
movq %r15, %r13
testq %rax, %rax
je 0xa3d1
jmp 0xa39d
movl %r13d, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::Game(Deck&, Market&, Human&, Human&)
Game::Game(Deck &dd, Market &mm, Human &pp1, Human &pp2) : deck(dd), market(mm), p1(pp1), p2(pp2) { //construct a game for Human vs. Human
    bonus.shuffle();//initialize all bonus
    setRound(1);//initialize round to 1
    setTurn(1);//initialize turn to 1
    srand(time(NULL));
    /*for demo*/

    currplayer = 1;

    /* comment out this for demonstration
    if (rand() % 100 > 50)
        currplayer = 1;
    else 
        currplayer = 2;
    */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x48d0
leaq 0x58(%rbx), %r15
movq %r15, %rdi
callq 0x6348
movq %r15, %rdi
callq 0x6662
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x80(%rbx)
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21a0
movl $0x1, 0x88(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x66ba
jmp 0xa6ca
movq %rax, %rbx
movq %r14, %rdi
callq 0x4bea
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::RoundTermination()
Game::~Game(){
    deck.clear(); 
    market.clear();
    p1.clear();
    p2.clear();
    tokens.clear();
    bonus.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq (%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
je 0xae1e
movq %rdi, %rbx
addq $0x20, %rbx
xorl %r12d, %r12d
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r14
cmpl $0x7, %ebp
je 0xae15
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbf86
movq %r14, %rdi
movl %ebp, %esi
callq 0x4c28
movl %eax, %r15d
movq %r14, %rdi
callq 0x4bea
cmpl $0x1, %r15d
adcl $0x0, %r12d
incl %ebp
jmp 0xade4
cmpl $0x3, %r12d
setae %al
jmp 0xae20
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4bea
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::newRound(int)
void Game::newRound(int winner){ 
    //clear player's basic points, bonus points, total points
    for (int i = 0; i < 3; i++){
        p1.addPoint(i,-1*p1.getPoints(i));
        p2.addPoint(i,-1*p1.getPoints(i));
    }

    setTurn(1);
    setCurrPlayer(winner);
    deck.newDeck();
    deck.shuffle();
    market.newMarket(deck);
    tokens.newAToken();
    bonus.newABonus();
    p1.newPlayer(deck);
    p2.newPlayer(deck);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x3, %r14d
je 0xa7a3
movq 0x10(%rbx), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x8c9c
negl %eax
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x8afc
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
movl %r14d, %esi
callq 0x8c9c
negl %eax
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x8afc
incl %r14d
jmp 0xa75b
movl $0x1, 0x84(%rbx)
movl %ebp, 0x88(%rbx)
movq (%rbx), %rdi
callq 0x72d2
movq (%rbx), %rdi
callq 0x772e
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
callq 0x7ef0
leaq 0x20(%rbx), %rdi
callq 0x4a4a
leaq 0x58(%rbx), %rdi
callq 0x64c0
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
callq 0x8966
movq (%rbx), %rsi
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8966
nop