LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-monitor.cc
// Function: get_allenv(int, cpbuffer<1024u>&)
static size_t get_allenv(int socknum, cpbuffer_t &rbuffer)
{
    char buf[2] = { (char)cp_cmd::GETALLENV, 0 };
    write_all_x(socknum, buf, 2);

    wait_for_reply(rbuffer, socknum);

    cp_rply reply_pkt_h = (cp_rply)rbuffer[0];
    if (reply_pkt_h != cp_rply::ALLENV) {
        throw dinit_protocol_error();
    }

    // 1-byte packet header, then size_t
    constexpr size_t allenv_hdr_size = 1 + sizeof(size_t);
    rbuffer.fill_to(socknum, allenv_hdr_size);

    size_t dsize;
    rbuffer.extract(&dsize, 1, sizeof(dsize));
    rbuffer.consume(allenv_hdr_size);

    return dsize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xe(%rsp), %r14
movw $0x18, (%r14)
movl $0x2, %r12d
xorl %r15d, %r15d
movl %r12d, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20a0
cmpl $-0x1, %eax
je 0x3b76
addl %eax, %r15d
movslq %eax, %rcx
addq %rcx, %r14
subl %eax, %r12d
jmp 0x3b84
callq 0x2040
cmpl $0x4, (%rax)
jne 0x3c8e
testl %r12d, %r12d
jg 0x3b56
cmpl $-0x1, %r15d
je 0x3c97
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4a5b
movl 0x400(%rbx), %r12d
leal -0x400(%r12), %eax
cmpl $0x400, %r12d           # imm = 0x400
cmovbl %r12d, %eax
cmpb $0x4e, (%rbx,%rax)
jne 0x3cb9
movl 0x404(%rbx), %r13d
cmpl $0x8, %r13d
ja 0x3bf0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5396
movl 0x404(%rbx), %r13d
testl %eax, %eax
jle 0x3be9
cmpl $0x9, %r13d
jb 0x3bce
movl 0x400(%rbx), %r12d
leal 0x1(%r12), %eax
leal -0x3ff(%r12), %r14d
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %r14d
leal -0x3f9(%r14), %eax
cmpl $0xfffffbfe, %eax       # imm = 0xFFFFFBFE
ja 0x3c4e
movl $0x400, %ebp            # imm = 0x400
subl %r14d, %ebp
movl %r14d, %esi
addq %rbx, %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rdx
callq 0x2180
leaq (%rsp,%rbp), %rdi
addq $0x10, %rdi
addl $0xfffffc08, %r14d      # imm = 0xFFFFFC08
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2180
jmp 0x3c54
movl %r14d, %r15d
addq %rbx, %r15
movq (%r15), %rax
leal 0x9(%r12), %ecx
addl $0xfffffc09, %r12d      # imm = 0xFFFFFC09
cmpl $0x400, %ecx            # imm = 0x400
cmovbl %ecx, %r12d
movl %r12d, 0x400(%rbx)
addl $-0x9, %r13d
movl %r13d, 0x404(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
jg 0x3b93
movl $0x4, %edi
callq 0x2100
movq %rax, %rbx
callq 0x2040
movl (%rax), %eax
movl %eax, (%rbx)
leaq 0x50c4(%rip), %rsi      # 0x8d78
movq %rbx, %rdi
jmp 0x3ccd
movl $0x1, %edi
callq 0x2100
leaq 0x505e(%rip), %rsi      # 0x8d28
movq %rax, %rdi
xorl %edx, %edx
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/includes/dinit-client.h
// Function: get_default_socket_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool)
inline const char *get_default_socket_path(std::string &control_socket_str, bool user_dinit)
{
    const char *control_socket_path;
    const char *sockpath = getenv("DINIT_SOCKET_PATH");
    if (sockpath) {
        control_socket_str = sockpath;
        control_socket_path = control_socket_str.c_str();
    }
    else if (user_dinit) {
        const char * rundir = getenv("XDG_RUNTIME_DIR");
        const char * sockname = "dinitctl";
        if (rundir == nullptr) {
            sockname = ".dinitctl";
            rundir = getenv("HOME");
            if (rundir == nullptr) {
                struct passwd * pwuid_p = getpwuid(getuid());
                if (pwuid_p != nullptr) {
                    rundir = pwuid_p->pw_dir;
                }
            }
        }

        if (rundir != nullptr) {
            control_socket_str = rundir;
            control_socket_str.push_back('/');
            control_socket_str += sockname;
            control_socket_path = control_socket_str.c_str();
        }
        else {
            return nullptr;
        }
    }
    else {
        control_socket_path = SYSCONTROLSOCKET; // default to system
    }
    return control_socket_path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x24e3(%rip), %rdi      # 0x68ca
callq 0x2270
testq %rax, %rax
je 0x4415
movq %rax, %r14
movq 0x8(%rbx), %r15
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2340
jmp 0x4492
testb %bpl, %bpl
je 0x4437
leaq 0x24bb(%rip), %rdi      # 0x68dc
callq 0x2270
testq %rax, %rax
je 0x4440
movq %rax, %r15
leaq 0x24b8(%rip), %r14      # 0x68ed
jmp 0x445b
leaq 0x25e4(%rip), %rax      # 0x6a22
jmp 0x4495
leaq 0x24af(%rip), %rdi      # 0x68f6
callq 0x2270
leaq 0x2499(%rip), %r14      # 0x68ec
testq %rax, %rax
je 0x449e
movq %rax, %r15
movq 0x8(%rbx), %r12
movq %r15, %rdi
callq 0x20e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x2340
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x21b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23e0
movq (%rbx), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2110
movl %eax, %edi
callq 0x2240
testq %rax, %rax
je 0x44b8
movq 0x20(%rax), %r15
testq %r15, %r15
jne 0x445b
xorl %eax, %eax
jmp 0x4495
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/main.cpp
// Function: print(TreeNode*)
void print(TreeNode *p)
{
	cout<<"Current Address: "<<p<<endl;
	cout<<"Word: ("<<p->Node_Word.Number<<","<<p->Node_Word.Value<<")"<<endl;
	cout<<"Son_Count: "<<p->Next.size()<<endl;
	for(int i=0;i<p->Next.size();i++)
	{
		cout<<"\tAddress: "<<p->Next[i]<<endl;
	}
	cout<<"Parent: "<<p->Parent<<endl;
	cout<<endl;
	for(int i=0;i<p->Next.size();i++)
	{
		print(p->Next[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x7b0f(%rip), %r14      # 0x9fd0
leaq 0x4b3c(%rip), %rsi      # 0x7004
movl $0x11, %edx
movq %r14, %rdi
callq 0x21c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, %r15
movq (%rax), %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
leaq 0x4b05(%rip), %rsi      # 0x7016
movl $0x7, %edx
movq %r14, %rdi
callq 0x21c0
movl (%rbx), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x4aec(%rip), %rsi      # 0x701e
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movsd 0x8(%rbx), %xmm0
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
leaq 0x4c51(%rip), %rsi      # 0x71a7
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
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
leaq 0x4a8f(%rip), %rsi      # 0x7020
movl $0xb, %edx
movq %r14, %rdi
callq 0x21c0
movq 0x18(%rbx), %rsi
subq 0x10(%rbx), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0x20e0
movq %rax, %r15
movq (%rax), %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
movq 0x18(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0x2654
xorl %ebp, %ebp
movq 0x79e1(%rip), %r15      # 0x9fd0
leaq 0x4a36(%rip), %r12      # 0x702c
movl $0xa, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
incq %rbp
movq 0x18(%rbx), %rax
subq 0x10(%rbx), %rax
sarq $0x3, %rax
cmpq %rbp, %rax
ja 0x25f6
leaq 0x49dc(%rip), %rsi      # 0x7037
movl $0x8, %edx
movq %r14, %rdi
callq 0x21c0
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, %r15
movq (%rax), %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
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x10(%rbx), %rax
cmpq %rax, 0x18(%rbx)
je 0x26f2
xorl %r14d, %r14d
movq (%rax,%r14,8), %rdi
callq 0x24ac
incq %r14
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x26d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Var_Number(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Lexical::Get_Var_Number(std::string s)
{
	if(this->Symbol_Table[s]==0)
	{
		int num=this->Symbol_Table.size();
		this->Symbol_Table[s]=num;
	}
	return this->Symbol_Table[s];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x3b9c
cmpl $0x0, (%rax)
jne 0x35df
movl 0x60(%r15), %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b9c
movl %ebp, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b9c
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Keyword(int&)
Word Lexical::Get_Keyword(int &pos)
{
	if(pos+2<this->Source.length())
	{
		std::string check;
		check+=this->Source[pos];
		check+=this->Source[pos+1];
		check+=this->Source[pos+2];
		if(check=="var")
		{
			pos+=3;
			return Word(1,0);
		}
	}
	
	if(pos+4<this->Source.length())
	{
		std::string check;
		check+=this->Source[pos];
		check+=this->Source[pos+1];
		check+=this->Source[pos+2];
		check+=this->Source[pos+3];
		check+=this->Source[pos+4];
		if(check=="print")
		{
			pos+=5;
			return Word(2,0);
		}
	}
	
	return Word(-1,0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %eax
movslq %eax, %rdx
leaq 0x2(%rdx), %rsi
movq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
jbe 0x36ad
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq (%r14), %rax
movsbl (%rax,%rdx), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x1(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x2(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
leaq 0x3aab(%rip), %rsi      # 0x7120
leaq 0x8(%rsp), %rdi
callq 0x2080
movl %eax, %ebp
testl %eax, %eax
jne 0x3688
addl $0x3, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x369f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
testl %ebp, %ebp
je 0x3780
movl (%rbx), %eax
movq 0x8(%r14), %rcx
leal 0x4(%rax), %edx
movslq %edx, %rdx
cmpq %rdx, %rcx
jbe 0x3779
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
cltq
movq (%r14), %rcx
movsbl (%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x1(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x2(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x3(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x4(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2150
leaq 0x39e5(%rip), %rsi      # 0x7124
leaq 0x8(%rsp), %rdi
callq 0x2080
movl %eax, %r14d
movl $0x1, %ebp
testl %eax, %eax
jne 0x375d
addl $0x5, (%rbx)
movl $0x2, %ebp
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3774
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
testl %r14d, %r14d
je 0x3785
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3785
movl $0x1, %ebp
xorps %xmm0, %xmm0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3797
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x37b1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Var(int&)
Word Lexical::Get_Var(int &pos)
{
	if(!isalpha(this->Source[pos]))return Word(-1,0);
	
	std::string s;

	while((pos<this->Source.length())&&(isalpha(this->Source[pos]))||(isdigit(this->Source[pos])))
	{
		s+=this->Source[pos];
		pos++;
	}
	
	return Word(3,this->Get_Var_Number(s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rsi), %r12
movq (%rdi), %rbp
movsbl (%rbp,%r12), %edi
callq 0x2220
testl %eax, %eax
je 0x38ba
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x8(%rsp), %r15
movslq %r12d, %rax
movsbl (%rbp,%rax), %r12d
cmpq %rax, 0x8(%rbx)
jbe 0x382f
movl %r12d, %edi
callq 0x2220
testl %eax, %eax
setne %al
leal -0x30(%r12), %ecx
cmpl $0xa, %ecx
setb %cl
orb %al, %cl
jne 0x3839
jmp 0x3852
leal -0x30(%r12), %eax
cmpl $0x9, %eax
ja 0x3852
movq %r15, %rdi
movl %r12d, %esi
callq 0x2150
movl (%r14), %r12d
incl %r12d
movl %r12d, (%r14)
movq (%rbx), %rbp
jmp 0x3802
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x351a
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x35b0
movl %eax, %ebx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x3898
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x38af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
cvtsi2sd %ebx, %xmm0
movl $0x3, %eax
jmp 0x38c2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x38f2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x38f2
jmp 0x38ef
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3909
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Number(int&)
Word Lexical::Get_Number(int &pos)
{	
	if(!isdigit(this->Source[pos]))return Word(-1,0);
	
	double ret=0;
	
	while((pos<this->Source.length())&&(isdigit(this->Source[pos])))
	{
		ret=ret*10+(this->Source[pos]-'0');
		pos++;
	}
	
	if(this->Source[pos]=='.')
	{
		double k=0.1;
		pos++;
		while((pos<this->Source.length())&&(isdigit(this->Source[pos])))
		{
			ret=ret+(this->Source[pos]-'0')*k;
			pos++;
			k/=10;
		}
	}
	
	return Word(4,ret);
}

// Assembly:
movl (%rsi), %r8d
movslq %r8d, %rax
movq (%rdi), %rcx
movsbl (%rcx,%rax), %r9d
leal -0x30(%r9), %edx
cmpl $0x9, %edx
ja 0x3973
movq 0x8(%rdi), %rdx
xorpd %xmm0, %xmm0
cmpq %rax, %rdx
jbe 0x397f
movsd 0x37b2(%rip), %xmm1     # 0x70f0
movsbl (%rcx,%rax), %r9d
leal -0x30(%r9), %edi
cmpl $0x9, %edi
ja 0x397c
xorps %xmm2, %xmm2
cvtsi2sd %edi, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
movq %rax, %r8
incq %r8
incl %eax
movl %eax, (%rsi)
movq %r8, %rax
cmpq %r8, %rdx
ja 0x393e
movb (%rcx,%r8), %r9b
jmp 0x397f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
retq
movl %eax, %r8d
movl $0x4, %eax
cmpb $0x2e, %r9b
jne 0x39dd
leal 0x1(%r8), %edi
movl %edi, (%rsi)
movslq %edi, %rdi
cmpq %rdi, %rdx
jbe 0x39dd
addl $0x2, %r8d
movsd 0x3754(%rip), %xmm1     # 0x70f8
movsd 0x3744(%rip), %xmm2     # 0x70f0
movsbl (%rcx,%rdi), %r9d
addl $-0x30, %r9d
cmpl $0x9, %r9d
ja 0x39dd
xorps %xmm3, %xmm3
cvtsi2sd %r9d, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm3, %xmm0
incq %rdi
movl %r8d, (%rsi)
divsd %xmm2, %xmm1
incl %r8d
cmpq %rdi, %rdx
ja 0x39ac
retq
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Symbol(int&)
Word Lexical::Get_Symbol(int &pos)
{
	switch(this->Source[pos])
	{
		case '+':pos++;return Word(5,0);break;
		case '-':pos++;return Word(6,0);break;
		case '*':pos++;return Word(7,0);break;
		case '/':pos++;return Word(8,0);break;
		case '=':pos++;return Word(9,0);break;
		case '(':pos++;return Word(10,0);break;
		case ')':pos++;return Word(11,0);break;
		case ';':pos++;return Word(12,0);break;
		default:return Word(-1,0);
	}
}

// Assembly:
movslq (%rsi), %rcx
movq (%rdi), %rax
movzbl (%rax,%rcx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal -0x28(%rdx), %edi
cmpl $0x7, %edi
ja 0x3a0c
leaq 0x3704(%rip), %rdx      # 0x7100
movslq (%rdx,%rdi,4), %rdi
addq %rdx, %rdi
jmpq *%rdi
movl $0xa, %eax
jmp 0x3a45
cmpl $0x3b, %edx
je 0x3a40
cmpl $0x3d, %edx
jne 0x3a49
movl $0x9, %eax
jmp 0x3a45
movl $0x5, %eax
jmp 0x3a45
movl $0xb, %eax
jmp 0x3a45
movl $0x6, %eax
jmp 0x3a45
movl $0x7, %eax
jmp 0x3a45
movl $0x8, %eax
jmp 0x3a45
movl $0xc, %eax
incl %ecx
movl %ecx, (%rsi)
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Next_Word(int&)
Word Lexical::Get_Next_Word(int &pos)
{
	Word ret;
	
	ret=this->Get_Keyword(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Var(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Number(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Symbol(pos);
	if(ret.Number!=-1)return ret;
	
	return Word(-1,0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x35f8
cmpl $-0x1, %eax
jne 0x3a9a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37ba
cmpl $-0x1, %eax
jne 0x3a9a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3912
cmpl $-0x1, %eax
jne 0x3a9a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x39de
cmpl $-0x1, %eax
jne 0x3a9a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Analysis()
bool Lexical::Analysis()
{
	int pos=0;
	while(pos<this->Source.length())
	{
		if(!isgraph(this->Source[pos]))
		{
			pos++;
			continue;
		}
		Word w=this->Get_Next_Word(pos);
		if(w.Number==-1)
		{
			this->Target.List.clear();
			return false;
		} 
		this->Target.List.push_back(w);
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x0, 0x4(%rsp)
movq 0x8(%rdi), %rbp
movb $0x1, %bl
testq %rbp, %rbp
je 0x3b79
movq %rdi, %r14
leaq 0x20(%rdi), %r15
xorl %eax, %eax
leaq 0x4(%rsp), %r12
xorl %r13d, %r13d
movq (%r14), %rcx
movsbl (%rcx,%rax), %edi
callq 0x2170
testl %eax, %eax
je 0x3b3f
movq %r14, %rdi
movq %r12, %rsi
callq 0x3a4e
movl %eax, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
cmpl $-0x1, %eax
je 0x3b69
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x3b49
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x28(%r14)
jmp 0x3b56
incl %r13d
movl %r13d, 0x4(%rsp)
jmp 0x3b5f
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x3f9c
movl 0x4(%rsp), %r13d
movq 0x8(%r14), %rbp
movslq %r13d, %rax
cmpq %rax, %rbp
ja 0x3afc
jmp 0x3b79
movq 0x20(%r14), %rax
cmpq %rax, 0x28(%r14)
je 0x3b77
movq %rax, 0x28(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Grammar/Grammar.cpp
// Function: Grammar::Input(Word_List)
void Grammar::Input(Word_List WL)
{
	this->Handle_List.clear();
	Word_List PWL;
	
	for(int pos=0;pos<WL.List.size();pos++)
	{
		Word &W=WL.List[pos];
		if(W.Number==12)
		{
			this->Handle_List.push_back(PWL);
			PWL.List.clear();
		}
		else
		{
			PWL.List.push_back(W);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rsi
callq 0x5e44
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rbx), %rdx
cmpq %rdx, 0x8(%rbx)
je 0x4aa1
xorl %r12d, %r12d
movq %rsp, %r15
xorl %r13d, %r13d
cmpl $0xc, (%rdx,%r12)
jne 0x4a44
movq %r14, %rdi
movq %r15, %rsi
callq 0x4cd2
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
jne 0x4a62
jmp 0x4a71
addq %r12, %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x4a69
movups (%rdx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
jmp 0x4a71
movq %r15, %rdi
callq 0x3f9c
incq %r13
movq (%rbx), %rdx
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x4, %rax
addq $0x10, %r12
cmpq %r13, %rax
ja 0x4a25
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4aa1
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4ac8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Grammar/Grammar.cpp
// Function: Grammar::Analysis()
bool Grammar::Analysis()
{
	this->Grammar_Forest.forest.clear();
	for(int i=0;i<this->Handle_List.size();i++)
	{
		if(this->Handle_Analysis(i))continue;
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x4ae6
movq %rax, 0x20(%rbx)
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x4b24
xorl %r14d, %r14d
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
movq %rbx, %rdi
movl %r14d, %esi
callq 0x411e
testb %al, %al
je 0x4b26
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
incq %r14
sarq $0x3, %rcx
imulq %r15, %rcx
cmpq %r14, %rcx
ja 0x4afc
jmp 0x4b26
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::OptimalSolver()
OptimalSolver::OptimalSolver() {
	matrix = NULL;
	defaultCells = NULL;
	readLength = 0;
	seedNum = 0;
	matrixSize = 0;
	L0Loaded = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0xa, %esi
movl $0x1e, %edx
callq 0x679c
movq $0x0, 0x35c(%rbx)
movb $0x0, 0x358(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x368(%rbx)
movups %xmm0, 0x378(%rbx)
movups %xmm0, 0x384(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::~OptimalSolver()
OptimalSolver::~OptimalSolver() {
	if  (matrix != NULL) {
		delete [] matrix;
		matrix = NULL;
	}
	if  (defaultCells != NULL) {
		delete [] defaultCells;
		defaultCells = NULL;
	}

	if (level.size() != 0)
		level.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x368(%rdi), %rdi
testq %rdi, %rdi
je 0x473f
callq 0x3340
movq $0x0, 0x368(%rbx)
movq 0x388(%rbx), %rdi
testq %rdi, %rdi
je 0x475b
callq 0x3340
movq $0x0, 0x388(%rbx)
leaq 0x370(%rbx), %r14
movq 0x370(%rbx), %rsi
cmpq %rsi, 0x378(%rbx)
je 0x477a
movq %r14, %rdi
callq 0x60fa
movq %r14, %rdi
callq 0x6038
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x68e2
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::feedL0()
void OptimalSolver::feedL0() {
	reset();
	tree.setHashLength(10);
	int lvPosCount = readLength + 1 - tree.getHashLength();

	for (int i = 0; i < lvPosCount; i++) {
		for (int j = 0; j < lvPosCount - i; j++) {
			cin >> level[0][i][j].start;
			cin >> level[0][i][j].end;
			cin >> level[0][i][j].frequency;
			cin >> level[0][i][j].isleaf;
#ifdef DEBUG
			cout << "level[0][" << i << "][" << j << "].start=" << level[0][i][j].start << endl;
			cout.flush();
#endif
		}
	}
			L0Loaded = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x368(%rdi), %rdi
movq 0x388(%rbx), %rsi
movslq 0x390(%rbx), %rdx
callq 0x3200
movl $0xa, (%rbx)
movl 0x35c(%rbx), %ebp
movq %rbx, %rdi
callq 0x74d8
subl %eax, %ebp
incl %ebp
testl %ebp, %ebp
jle 0x4d0e
movl %ebp, %r13d
xorl %r12d, %r12d
movq 0xa36b(%rip), %r14      # 0xefd8
movq %r13, (%rsp)
subq %r12, %r13
jle 0x4cfe
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
addq %rbp, %rsi
movq %r14, %rdi
callq 0x3460
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%rbp), %rsi
addq $0x4, %rsi
movq %r14, %rdi
callq 0x3460
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%rbp), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x3460
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%rbp), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x3220
incq %r15
addq $0x28, %rbp
cmpq %r13, %r15
jl 0x4c7f
incq %r12
movq (%rsp), %r13
cmpq %r13, %r12
jne 0x4c71
movb $0x1, 0x358(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: main
int main() {
    GameMaster* gm = new GameMaster();

    setUpGame();
    gm->playGame();
    quitGame(gm);

    delete gm;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x128, %edi            # imm = 0x128
callq 0x2200
movq %rax, %rbx
movq %rax, %rdi
callq 0x29a4
callq 0x270f
callq 0x269b
movq %rbx, %rdi
callq 0x63c8
movq %rbx, %rdi
callq 0x2759
movq %rbx, %rdi
callq 0x32aa
movl $0x128, %esi            # imm = 0x128
movq %rbx, %rdi
callq 0x2210
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x128, %esi            # imm = 0x128
movq %rbx, %rdi
callq 0x2210
movq %r14, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::savePlayerLevel()
void GameMaster::savePlayerLevel() {
    if (currLevel < 0) return; // Let level stay if quit typed on start screen
    string level = to_string(currLevel);

    ofstream out;
    out.open(LEVEL_FILEPATH);
    out << level << endl; // Overwrite with the single integer-as-string
    out.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movl 0x68(%rdi), %ebp
testl %ebp, %ebp
js 0x3500
movq %rdi, %rbx
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x3427
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x341e
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3424
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3427
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x33eb
addl $-0x3, %r14d
jmp 0x3427
addl $-0x2, %r14d
jmp 0x3427
decl %r14d
movl %r14d, %esi
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rsp, %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2270
movq (%r15), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x69ca
leaq 0x20(%rsp), %rdi
callq 0x2370
addq $0x8, %rbx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x2120
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x2260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq 0x20(%rsp), %rdi
callq 0x22c0
movq 0x11b09(%rip), %rax     # 0x14fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x28(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x20(%rsp,%rcx)
callq 0x21c0
leaq 0x118(%rsp), %rdi
callq 0x20e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3500
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3522
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2300
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3538
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::releaseMemory()
void GameMaster::releaseMemory() {
    // Delete characters
    delete player;
    delete opponents[0]; // No need to delete opponent4, as it's a duplicate
    delete opponents[1];
    delete opponents[2];
    delete opponents[3];
    // Skipping opponents[4], which was already released by opponents[0]
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x90(%rdi), %r14
testq %r14, %r14
je 0x3833
leaq 0x90(%r14), %rdi
callq 0x68da
movq 0x68(%r14), %rdi
leaq 0x78(%r14), %rax
cmpq %rax, %rdi
je 0x3821
movq (%rax), %rsi
incq %rsi
callq 0x2210
leaq 0x38(%r14), %rdi
callq 0x6952
leaq 0x8(%r14), %rdi
callq 0x6952
movl $0xc0, %esi
movq %r14, %rdi
callq 0x2210
movq 0x98(%rbx), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x3885
leaq 0x90(%r14), %rdi
callq 0x68da
movq 0x68(%r14), %rdi
leaq 0x78(%r14), %rax
cmpq %rax, %rdi
je 0x3873
movq (%rax), %rsi
incq %rsi
callq 0x2210
leaq 0x38(%r14), %rdi
callq 0x6952
leaq 0x8(%r14), %rdi
callq 0x6952
movl $0xc0, %esi
movq %r14, %rdi
callq 0x2210
movq 0x98(%rbx), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x38d8
leaq 0x90(%r14), %rdi
callq 0x68da
movq 0x68(%r14), %rdi
leaq 0x78(%r14), %rax
cmpq %rax, %rdi
je 0x38c6
movq (%rax), %rsi
incq %rsi
callq 0x2210
leaq 0x38(%r14), %rdi
callq 0x6952
leaq 0x8(%r14), %rdi
callq 0x6952
movl $0xc0, %esi
movq %r14, %rdi
callq 0x2210
movq 0x98(%rbx), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x392b
leaq 0x90(%r14), %rdi
callq 0x68da
movq 0x68(%r14), %rdi
leaq 0x78(%r14), %rax
cmpq %rax, %rdi
je 0x3919
movq (%rax), %rsi
incq %rsi
callq 0x2210
leaq 0x38(%r14), %rdi
callq 0x6952
leaq 0x8(%r14), %rdi
callq 0x6952
movl $0xc0, %esi
movq %r14, %rdi
callq 0x2210
movq 0x98(%rbx), %rax
movq 0x18(%rax), %rbx
testq %rbx, %rbx
je 0x397e
leaq 0x90(%rbx), %rdi
callq 0x68da
movq 0x68(%rbx), %rdi
leaq 0x78(%rbx), %rax
cmpq %rax, %rdi
je 0x396c
movq (%rax), %rsi
incq %rsi
callq 0x2210
leaq 0x38(%rbx), %rdi
callq 0x6952
leaq 0x8(%rbx), %rdi
callq 0x6952
movl $0xc0, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::clearScreen()
void GameMaster::clearScreen() {
    const int BIG_NUMBER = 100;
    string clear = "";
    for (int i = 0; i < BIG_NUMBER; i++) {
        clear += "\n";
    }
    cout << clear;

    printCurrentLevelTitle();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xb76a(%rip), %rdx      # 0xf3fc
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x290e
movl $0x64, %ebp
leaq 0xb74f(%rip), %r15      # 0xf3fb
movq %r14, %rdi
movq %r15, %rsi
callq 0x23d0
decl %ebp
jne 0x3cac
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x11305(%rip), %rdi     # 0x14fd0
callq 0x2260
movq %rbx, %rdi
callq 0x3c02
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3cee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3cfd
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3d16
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::getStartingLevel()
int GameMaster::getStartingLevel() {
    string line = "";

    ifstream in(LEVEL_FILEPATH);               // Open file
    getline(in, line);
    in.close();                                // Close file
    return stoi(line);                         // Convert to int
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xb210(%rip), %rdx      # 0xf3fc
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x290e
addq $0x8, %r14
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2340
movq 0x30(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23b0
leaq 0x30(%rsp), %rdi
callq 0x2090
movq 0x8(%rsp), %r15
callq 0x2050
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x22b0
cmpq %r15, (%r12)
je 0x42c2
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x42ce
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x42ce
testl %eax, %eax
jne 0x428c
movl %ebp, (%rbx)
leaq 0x30(%rsp), %rdi
callq 0x20a0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x42ad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movl %r14d, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb1dd(%rip), %rdi      # 0xf4a6
callq 0x2160
leaq 0xb1d1(%rip), %rdi      # 0xf4a6
callq 0x22d0
movq %rax, %r14
jmp 0x42f8
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x42ee
movl %ebp, (%rbx)
jmp 0x42ee
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x20a0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x430f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::checkpoint()
void GameMaster::checkpoint() {
    string toAdd = "\n\n";
    string anyInputText  = "<RETURN>: next line | \"skip\": next negotiation";

    createTitle('=', WIDTH, anyInputText, toAdd);
    fillCleanUInput();

    if (uInput == "quit") return; // For every new entry, check for quit
    if (uInput == "skip" ) doSkip = true; // Set global flag for future

    clearScreen();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa5fc(%rip), %rsi      # 0xf3fa
leaq 0xa5f7(%rip), %rdx      # 0xf3fc
leaq 0x48(%rsp), %rdi
callq 0x290e
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xa5e7(%rip), %rsi      # 0xf407
leaq 0xa60e(%rip), %rdx      # 0xf435
leaq 0x8(%rsp), %rdi
callq 0x290e
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x6a38
leaq 0x28(%rsp), %rcx
leaq 0x48(%rsp), %r8
movq %rbx, %rdi
movl $0x3d, %esi
movl $0x1, %r9d
callq 0x3992
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x4e85
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x4fc4
leaq 0x70(%rbx), %r14
leaq 0xa53c(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x4ec3
leaq 0xa58b(%rip), %rsi      # 0xf436
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
jne 0x4ebb
movb $0x1, 0x6c(%rbx)
movq %rbx, %rdi
callq 0x3c72
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4eda
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ef1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f21
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4f21
movq %rax, %rbx
jmp 0x4f38
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f4f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::fillCleanUInput()
void GameMaster::fillCleanUInput() {
    cout << ">>>> ";
    getline(cin, uInput);

    lower(uInput);
    removeWS(uInput);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xfff9(%rip), %rdi      # 0x14fd0
leaq 0xa3fb(%rip), %rsi      # 0xf3d9
movl $0x5, %edx
callq 0x2260
leaq 0x70(%rbx), %r14
movq 0xffed(%rip), %r15      # 0x14fe0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x23b0
movq %r14, %rsi
callq 0x4f58
movq 0x70(%rbx), %rdi
movq 0x78(%rbx), %rsi
addq %rdi, %rsi
leaq 0xf(%rsp), %rdx
movb $0x20, (%rdx)
callq 0x757f
movq %rax, %rcx
subq 0x70(%rbx), %rcx
movq %rcx, 0x78(%rbx)
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::runIntro()
void GameMaster::runIntro() {

    player->fillInventory(); // Give player an inventory before the intro
    loadScript("Gen/Intro"); // Early exposition until discovery by Lepha
    if (uInput == "quit") return; // For every new entry, check for quit

    player->initInventory(); // Clear inventory before tutorial level

    bool isPrologue = true;
    runNextLevel(isPrologue);
    if (uInput == "quit") return; // For every new entry, check for quit

    player->fillInventory(); // Refill inventory before Level 1
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
callq 0xe6d6
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9b38(%rip), %rsi      # 0xf444
leaq 0x9b3a(%rip), %rdx      # 0xf44d
movq %rsp, %r14
movq %r14, %rdi
callq 0x290e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53c6
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x593f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x70(%rbx), %r14
leaq 0x9a8a(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x598e
movq 0x90(%rbx), %rdi
callq 0xdeea
movq %rbx, %rdi
movl $0x1, %esi
callq 0x59ba
leaq 0x9a5e(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x598e
movq 0x90(%rbx), %rdi
callq 0xe6d6
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x59b1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::runNextLevel(bool)
void GameMaster::runNextLevel(bool isPrologue) {
    startCurrentLevel(); // Intro text for level

    // Only create level at last possible moment
    levels[currLevel] = new Encounter(player,
                                      opponents[currLevel],
                                      turns[currLevel],
                                      keyPrices[currLevel],
                                      isPrologue);


    bool didNotQuit = levels[currLevel]->runEncounter(wonLevel);
    if (!didNotQuit) { // If quit came from within encounter
        uInput = "quit";
        return; // For every new entry, check for quit
    }

    endCurrentLevel(); // Ending text for level (+ game over ending)

    wonLevel = false; // Reset, even though it will be filled later
    currLevel++; // Advance level after complete

    // Doing this AFTER advancing currLevel
    if (uInput == "quit") return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x5cba
movl $0x68, %edi
callq 0x2200
movq %rax, %r14
movslq 0x68(%rbx), %rax
movq 0x90(%rbx), %rsi
movq 0x98(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movq 0xb0(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movq 0xc8(%rbx), %rdi
movss (%rdi,%rax,4), %xmm0
movq %r14, %rdi
movl %ebp, %r8d
callq 0x7658
movslq 0x68(%rbx), %rax
movq 0xe0(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
movq 0xe0(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
leaq 0x6d(%rbx), %rsi
callq 0x91ec
testb %al, %al
je 0x5a59
movq %rbx, %rdi
callq 0x5ff8
movb $0x0, 0x6d(%rbx)
incl 0x68(%rbx)
addq $0x70, %rbx
leaq 0x9987(%rip), %rsi      # 0xf3d4
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20c0
movq 0x78(%rbx), %rdx
addq $0x70, %rbx
leaq 0x996c(%rip), %rcx      # 0xf3d4
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2320
movq %rax, %rbx
movl $0x68, %esi
movq %r14, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::runEnding()
void GameMaster::runEnding() {
    // Should give score at end of most recent level
    float finalScoreFloat = player->getInvValue();

    // Convert score to string for later use
    string finalScore = player->toPreciseString(finalScoreFloat);

    // Modify to output sentence
    string scoreText = "\n\nYou started with £100 in loot. You finished with £";
           scoreText += finalScore + ".\n";

    doSkip = false; // In order to print the final goodbye

    clearScreen(); // To switch to the THE END screen

    // Printouts
    cout << scoreText;
    loadScript("Gen/Ending"); // Generic text for victory or defeat
    cout << endl << endl;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
callq 0xa6e6
movq 0x90(%rbx), %rsi
leaq 0x68(%rsp), %rdi
xorl %edx, %edx
callq 0xa1ae
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x997a(%rip), %rsi      # 0xf44e
leaq 0x99a9(%rip), %rdx      # 0xf484
leaq 0x28(%rsp), %rdi
callq 0x290e
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x6a38
leaq 0xa4f8(%rip), %rsi      # 0x10004
leaq 0x8(%rsp), %rdi
callq 0x23d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x5b41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movb $0x0, 0x6c(%rbx)
movq %rbx, %rdi
callq 0x3c72
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0xf472(%rip), %r14      # 0x14fd0
movq %r14, %rdi
callq 0x2260
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x990e(%rip), %rsi      # 0xf485
leaq 0x9911(%rip), %rdx      # 0xf48f
leaq 0x48(%rsp), %rdi
callq 0x290e
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x53c6
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x5bac
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2210
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0xf406(%rip), %rdi      # 0x14fd0
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x5c18
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c33
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c80
movq 0x58(%rsp), %rsi
jmp 0x5c6c
jmp 0x5c7d
jmp 0x5c5a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x5c80
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x5c80
jmp 0x5c7d
movq %rax, %rbx
jmp 0x5c97
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x5c97
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cb2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::playGame()
void GameMaster::playGame() {
    // Ugly, but the cost of the GameMaster class are these frequent quit checks

    startScreen(); // Ask to skip intro
    if (uInput == "quit") return; // For every new entry, check for quit

    if (currLevel == 0) runIntro(); // Runs intro
    if (uInput == "quit") return; // For every new entry, check for quit

    while (currLevel < NUM_LEVELS) {
        runNextLevel();
        if (uInput == "quit") return; // For every new entry, check for quit
    }

    if (currLevel > 4) runEnding();
    if (uInput == "quit") return; // For every new entry, check for quit

    gameFinished = true;


}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x45d6
leaq 0x70(%rbx), %r14
leaq 0x8ff4(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x645a
cmpl $0x0, 0x68(%rbx)
jne 0x63fa
movq %rbx, %rdi
callq 0x58e4
leaq 0x8fd3(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x645a
leaq 0x8fc0(%rip), %r15      # 0xf3d4
movl 0x68(%rbx), %eax
cmpl (%rbx), %eax
jge 0x6436
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59ba
movq %r14, %rdi
movq %r15, %rsi
callq 0x20c0
testl %eax, %eax
jne 0x6414
jmp 0x645a
cmpl $0x5, %eax
jl 0x6443
movq %rbx, %rdi
callq 0x5a94
leaq 0x8f8a(%rip), %rsi      # 0xf3d4
movq %r14, %rdi
callq 0x20c0
testl %eax, %eax
je 0x645a
movb $0x1, 0x6e(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/Encounter.cpp
// Function: Encounter::setInventoryForEncounter()
void Encounter::setInventoryForEncounter() {
    mapPlayerInventory(); // Order all the player's inventory for encounter
    opponent->resetGenerosity(); // Ensure no offer at start of encounter

    // Calculate open market value of inventory at start of encounter
    startInvValue = player->getInvValue();
    offerInvValue = 0.0; // init to zero
    endInvValue = 0.0; // init to zero
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x774c
movq 0x18(%rbx), %rdi
callq 0xc7d0
movq 0x10(%rbx), %rdi
callq 0xa6e6
movss %xmm0, 0x28(%rbx)
movq $0x0, 0x2c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sagardoshi[P]NegotiationsEncounter/src/Encounter.cpp
// Function: Encounter::mapPlayerInventory()
void Encounter::mapPlayerInventory() {
    map<string, int>::iterator it;
    string item = "";
    int amount = 0;
    int itemOrder = 1;

    for (it = player->inventory.begin(); it != player->inventory.end(); it++) {
        item = it->first;
        amount = it->second;

        if (amount > 0) {
            invMap[item] = itemOrder;
            itemOrder++;
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7c8f(%rip), %rdx      # 0xf3fc
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x290e
movq 0x10(%rbx), %rax
movq 0x50(%rax), %r14
addq $0x40, %rax
cmpq %rax, %r14
je 0x77d3
leaq 0x38(%rbx), %r15
movl $0x1, %ebp
leaq 0x8(%rsp), %r12
leaq 0x20(%r14), %rsi
movq %r12, %rdi
callq 0x2140
cmpl $0x0, 0x40(%r14)
jle 0x77bb
movq %r15, %rdi
movq %r12, %rsi
callq 0x67d6
movl %ebp, (%rax)
incl %ebp
movq %r14, %rdi
callq 0x2180
movq %rax, %r14
movq 0x10(%rbx), %rax
addq $0x40, %rax
cmpq %rax, %r14
jne 0x7799
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x77ea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7813
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop