LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/yogesh1q2w[P]Dynamic-Graph-Algorithms/MST.cpp
// Function: MST::find_MST()
set <pair<pair<int,int>,int>> MST::find_MST()  {
	set <pair<pair<int,int>,int>> res;
	treeadj[0].erase(-1);
	for(auto &i:treeadj[0]) {
		for(auto &k:i.second) {
			res.insert(make_pair(make_pair(i.first,k.second),k.first));
		}
	}
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq 0xd0(%rsi), %rdi
leaq -0x38(%rbp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
callq 0x87b2
movq 0xd0(%r14), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x731a
leaq -0x38(%rbp), %r14
movq 0x28(%r12), %r15
leaq 0x18(%r12), %r13
cmpq %r13, %r15
je 0x7311
movl 0x8(%r12), %eax
movl 0x20(%r15), %ecx
movl 0x24(%r15), %edx
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, -0x38(%rbp)
movl %ecx, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88b2
movq %r15, %rdi
callq 0x21e0
movq %rax, %r15
cmpq %r13, %rax
jne 0x72db
movq (%r12), %r12
testq %r12, %r12
jne 0x72cc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x732e
movq %rax, %r14
movq %rbx, %rdi
callq 0x7950
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/yogesh1q2w[P]Dynamic-Graph-Algorithms/SPT.cpp
// Function: SPT::add_edge(int, int, int)
bool SPT::add_edge(int u, int v, int wt) {
    if(!vertices.count(u) || !vertices.count(v)) {
        return false;
    }

    adj[u].push_back(v);
    revadj[v].push_back(u);
    weight[make_pair(u,v)] = wt;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdi, %r14
movl %esi, -0x18(%rbp)
movl %edx, -0x14(%rbp)
movq 0x50(%rdi), %rcx
leaq 0x48(%rdi), %rax
movq %rax, %rdi
testq %rcx, %rcx
je 0x8d01
movq %rcx, %r8
movq %rax, %rdi
xorl %r9d, %r9d
cmpl %esi, 0x20(%r8)
setl %r9b
cmovgeq %r8, %rdi
movq 0x10(%r8,%r9,8), %r8
testq %r8, %r8
jne 0x8ce8
movq %rax, %r8
cmpq %rax, %rdi
je 0x8d13
cmpl %esi, 0x20(%rdi)
cmovgq %rax, %rdi
movq %rdi, %r8
cmpq %rax, %r8
je 0x8d77
movq %rax, %rsi
testq %rcx, %rcx
je 0x8d3a
movq %rax, %rsi
xorl %edi, %edi
cmpl %edx, 0x20(%rcx)
setl %dil
cmovgeq %rcx, %rsi
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x8d23
movq %rax, %rcx
cmpq %rax, %rsi
je 0x8d4c
cmpl %edx, 0x20(%rsi)
cmovgq %rax, %rsi
movq %rsi, %rcx
cmpq %rax, %rcx
je 0x8d77
leaq 0x70(%r14), %rdi
leaq -0x18(%rbp), %rsi
callq 0xa19e
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x8d7b
movl -0x14(%rbp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x8d87
xorl %eax, %eax
jmp 0x8de0
leaq -0x14(%rbp), %rdx
movq %rax, %rdi
callq 0xa4c6
leaq 0xa8(%r14), %rdi
leaq -0x14(%rbp), %rsi
callq 0xa19e
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x8db0
movl -0x18(%rbp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x8dbc
leaq -0x18(%rbp), %rdx
movq %rax, %rdi
callq 0xa4c6
addq $0x8, %r14
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
leaq -0x20(%rbp), %rsi
movq %rcx, (%rsi)
movq %r14, %rdi
callq 0x7f1c
movl %ebx, (%rax)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yogesh1q2w[P]Dynamic-Graph-Algorithms/SPT.cpp
// Function: SPT::build_static_SPT()
void SPT::build_static_SPT() {

    dist.resize(vertices.size());
    fill(dist.begin(),dist.end(),INF);
    spt.resize(vertices.size());
    fill(spt.begin(),spt.end(),make_pair(-1,-1));
    priority_queue<pair<int,int>, vector <pair<int,int>> , greater<pair<int,int>> > pq; 
    pq.push(make_pair(0, source)); 
    dist[source] = 0; 
    spt[source] = make_pair(-1,-1);
  
    while (!pq.empty()) 
    {
        int u = pq.top().second; 
        pq.pop(); 
  
        for (auto &v : adj[u]) 
        {
            int wt = weight[make_pair(u,v)]; 
  
            if (dist[v] > dist[u] + wt) 
            {
                dist[v] = dist[u] + wt;
                spt[v] = make_pair(u,wt);
                pq.push(make_pair(dist[v], v));
            }
        } 
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0xf8(%rdi), %r14
movq 0x68(%rdi), %rsi
movq %r14, %rdi
callq 0xa056
movq 0xf8(%rbx), %rdi
movq 0x100(%rbx), %rdx
cmpq %rdx, %rdi
je 0x8e3d
subq %rdi, %rdx
addq $-0x4, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movl $0x3f, %esi
callq 0x20d0
leaq 0xe0(%rbx), %rdi
movq 0x68(%rbx), %rsi
movq %rdi, -0x70(%rbp)
callq 0xa08e
movq 0xe0(%rbx), %rdi
movq 0xe8(%rbx), %rdx
cmpq %rdx, %rdi
je 0x8e7d
subq %rdi, %rdx
addq $-0x8, %rdx
andq $-0x8, %rdx
addq $0x8, %rdx
movl $0xff, %esi
callq 0x20d0
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl (%rbx), %eax
shlq $0x20, %rax
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
callq 0x777e
movslq (%rbx), %rax
movq 0xf8(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movslq (%rbx), %rax
movq 0xe0(%rbx), %rcx
movq $-0x1, (%rcx,%rax,8)
movq -0x60(%rbp), %rdi
cmpq -0x58(%rbp), %rdi
je 0x8f88
leaq 0x70(%rbx), %rax
movq %rax, -0x68(%rbp)
addq $0x8, %rbx
leaq -0x38(%rbp), %r12
movl 0x4(%rdi), %eax
movl %eax, -0x2c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7818
movq -0x68(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xa19e
movq (%rax), %r13
movq 0x8(%rax), %r15
cmpq %r15, %r13
je 0x8f7a
movl -0x2c(%rbp), %eax
movl (%r13), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7f1c
movl (%rax), %eax
movslq (%r13), %rdx
movq (%r14), %rcx
movslq -0x2c(%rbp), %rsi
movl (%rcx,%rsi,4), %esi
addl %eax, %esi
cmpl %esi, (%rcx,%rdx,4)
jle 0x8f74
movl %esi, (%rcx,%rdx,4)
movl -0x2c(%rbp), %edx
movslq (%r13), %rsi
movq -0x70(%rbp), %rdi
movq (%rdi), %rdi
movl %edx, (%rdi,%rsi,8)
movl %eax, 0x4(%rdi,%rsi,8)
movslq (%r13), %rax
movl (%rcx,%rax,4), %ecx
shlq $0x20, %rax
orq %rcx, %rax
movq %rax, -0x38(%rbp)
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x777e
addq $0x4, %r13
jmp 0x8f05
movq -0x60(%rbp), %rdi
cmpq -0x58(%rbp), %rdi
jne 0x8ee2
testq %rdi, %rdi
je 0x8f92
callq 0x2170
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8fa9
jmp 0x8fa9
jmp 0x8fa9
jmp 0x8fa9
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x8fba
callq 0x2170
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/yogesh1q2w[P]Dynamic-Graph-Algorithms/SPT.cpp
// Function: SPT::change_weight(int, int, int)
bool SPT::change_weight(int u,int v, int newwt) {
    if(!vertices.count(u) || !vertices.count(v) || weight.find(make_pair(u,v)) == weight.end()) {
        return false;
    }
    
    int oldwt = weight[make_pair(u,v)];
    weight[make_pair(u,v)] = newwt;
    
    if(newwt > oldwt && spt[v].first == u) {
        int diff = newwt - oldwt;
        modify_inc(u,v,oldwt,diff);
        return true;
    }

    else if(newwt < oldwt && dist[u] + newwt < dist[v]) {
        int diff = dist[u] + newwt - dist[v];
        modify_dec(u,v,oldwt,diff);
        return true;
    }
    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %r12d
movq %rdi, %r15
movq 0x50(%rdi), %r8
leaq 0x48(%rdi), %rax
movq %rax, %rdx
testq %r8, %r8
je 0x9009
movq %r8, %rsi
movq %rax, %rdx
xorl %edi, %edi
cmpl %r12d, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x8ff1
movq %rax, %rsi
cmpq %rax, %rdx
je 0x901c
cmpl %r12d, 0x20(%rdx)
cmovgq %rax, %rdx
movq %rdx, %rsi
cmpq %rax, %rsi
je 0x90e4
movq %rax, %rdx
testq %r8, %r8
je 0x9048
movq %rax, %rdx
xorl %esi, %esi
cmpl %ebx, 0x20(%r8)
setl %sil
cmovgeq %r8, %rdx
movq 0x10(%r8,%rsi,8), %r8
testq %r8, %r8
jne 0x9030
movq %rax, %rsi
cmpq %rax, %rdx
je 0x905a
cmpl %ebx, 0x20(%rdx)
cmovgq %rax, %rdx
movq %rdx, %rsi
cmpq %rax, %rsi
je 0x90e4
movl %ecx, -0x38(%rbp)
leaq 0x8(%r15), %r13
movq %rbx, %rax
shlq $0x20, %rax
movl %r12d, %r14d
orq %rax, %r14
leaq -0x30(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, %rdi
callq 0xa7e4
testq %rax, %rax
je 0x90e4
leaq -0x30(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, %rdi
callq 0x7f1c
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rax
movq %r14, (%rax)
leaq -0x30(%rbp), %rsi
movq %r13, %rdi
callq 0x7f1c
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %esi
movl %esi, (%rax)
movl %esi, %r8d
subl %edx, %r8d
jle 0x90f9
movslq %ebx, %rax
movq 0xe0(%r15), %rcx
cmpl %r12d, (%rcx,%rax,8)
jne 0x90f9
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x9124
movb $0x1, %r13b
jmp 0x90e7
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r13b
cmpl %edx, %esi
jge 0x90e7
movslq %r12d, %rax
movq 0xf8(%r15), %rcx
addl (%rcx,%rax,4), %esi
movslq %ebx, %rax
subl (%rcx,%rax,4), %esi
jge 0x90e7
movq %r15, %rdi
movl %ebx, %edx
movl %esi, %r8d
callq 0x99b4
jmp 0x90e7
// File: /workspace/github_cpp_makefile_star2_O1/yogesh1q2w[P]Dynamic-Graph-Algorithms/main.cpp
// Function: main
int main() {
	srand(0);
	int ch = 1;
	string st;
	while(ch != 0) {
		cout << "Enter choice -\n1- Fully dynamic connectivity\n2- Decremental MST\n3- Fully dynamic SPT\nand file name to run on:" << endl;
		cin >> ch >> st;
		test(ch,st);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2180
movl $0x1, -0x2c(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
testb %bl, %bl
jne 0xb9fd
leaq -0x60(%rbp), %r12
movq 0x566f(%rip), %rbx      # 0x10fd0
leaq -0x50(%rbp), %r13
leaq -0x70(%rbp), %r14
movl $0x6d, %edx
movq %rbx, %rdi
leaq 0x72f(%rip), %rsi       # 0xc0a7
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5635(%rip), %rdi      # 0x10fe0
leaq -0x2c(%rbp), %rsi
callq 0x2100
movq %rax, %rdi
movq %r13, %rsi
callq 0x21f0
movl -0x2c(%rbp), %r15d
movq %r12, -0x70(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xbea6
movl %r15d, %edi
movq %r14, %rsi
callq 0xae28
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0xb9f3
callq 0x2170
cmpl $0x0, -0x2c(%rbp)
jne 0xb969
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xba0f
callq 0x2170
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0xba36
callq 0x2170
jmp 0xba36
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xba48
callq 0x2170
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/main.cpp
// Function: currentDate[abi:cxx11]()
inline string currentDate() {
	time_t now = time(0);
    struct tm tstruct;
    char buf[80];
    tstruct = *localtime(&now);
    strftime(buf, sizeof(buf), "%Y-%m-%d", &tstruct);
    return buf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3240
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x31a0
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm1, 0x10(%rcx)
movaps %xmm2, 0x20(%rcx)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rcx)
leaq 0x4a87(%rip), %rdx      # 0x1057f
leaq 0x10(%rsp), %r14
movl $0x50, %esi
movq %r14, %rdi
callq 0x31c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x3100
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd216
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/opts.cpp
// Function: Options::get_input[abi:cxx11]()
string Options::get_input(){
	string inputflag = "-i";
	string inputfile = "";
	for (auto iter = optionvec.begin(); iter < optionvec.end(); ++iter){
		if (*iter == inputflag){
			inputfile = *(iter + 1);
			return inputfile;
		}
	}
	return inputfile;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2289(%rip), %rsi      # 0xf951
leaq 0x2284(%rip), %rdx      # 0xf953
leaq 0x8(%rsp), %rdi
callq 0xd216
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
leaq 0x2790(%rip), %rdx      # 0xfe77
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xd216
movq 0x8(%r14), %rax
movq (%rax), %r14
movq 0x8(%rax), %rbp
cmpq %rbp, %r14
jae 0xd743
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x8(%r14), %rdx
cmpq %r12, %rdx
jne 0xd729
testq %rdx, %rdx
je 0xd734
movq (%r14), %rdi
movq %r15, %rsi
callq 0x3280
testl %eax, %eax
je 0xd734
addq $0x20, %r14
cmpq %rbp, %r14
jb 0xd70c
jmp 0xd743
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3160
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd75f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xd78d
movq (%r13), %rsi
incq %rsi
callq 0x3270
jmp 0xd78d
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd7a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %r14, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/opts.cpp
// Function: Options::get_output[abi:cxx11]()
string Options::get_output(){
	string outputflag = "-o";
	string outputfile = "";
	for (auto iter = optionvec.begin(); iter < optionvec.end(); ++iter){
		if (*iter == outputflag){
			outputfile = *(iter + 1);
			return outputfile;
		}
	}
	return outputfile;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2f32(%rip), %rsi      # 0x10708
leaq 0x2f2d(%rip), %rdx      # 0x1070a
leaq 0x8(%rsp), %rdi
callq 0xd216
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
leaq 0x2682(%rip), %rdx      # 0xfe77
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xd216
movq 0x8(%r14), %rax
movq (%rax), %r14
movq 0x8(%rax), %rbp
cmpq %rbp, %r14
jae 0xd851
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x8(%r14), %rdx
cmpq %r12, %rdx
jne 0xd837
testq %rdx, %rdx
je 0xd842
movq (%r14), %rdi
movq %r15, %rsi
callq 0x3280
testl %eax, %eax
je 0xd842
addq $0x20, %r14
cmpq %rbp, %r14
jb 0xd81a
jmp 0xd851
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3160
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd86d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xd89b
movq (%r13), %rsi
incq %rsi
callq 0x3270
jmp 0xd89b
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd8b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %r14, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/opts.cpp
// Function: Options::get_last_positional[abi:cxx11]()
string Options::get_last_positional(){
	auto iter_end = optionvec.end();
	//return the last argument on the command line
	string laststring = *(iter_end - 1);
	return laststring;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rax
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xd186
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/opts.cpp
// Function: Options::fill_arg_vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int Options::fill_arg_vector(vector<string>& fill_vector){
	for (auto iter = optionvec.begin() + 2; iter < optionvec.end(); ++iter){
		char c = (*iter)[0];
		switch(c) {
			// if it is a short option (starts with '-') or long option (starts with '-')
			case '-':
				return 1;  //then break out of the vector fill loop and return because done filling the vector
			default:
				fill_vector.push_back(*iter);  //fill the vector with the string arguments up until the first option
				break;
		}
	}
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movq (%rax), %r15
addq $0x40, %r15
cmpq 0x8(%rax), %r15
jae 0xd925
movq %rsi, %rbx
movq %rdi, %r14
movq (%r15), %rax
cmpb $0x2d, (%rax)
je 0xd925
movq %rbx, %rdi
movq %r15, %rsi
callq 0xda00
addq $0x20, %r15
movq 0x8(%r14), %rax
cmpq 0x8(%rax), %r15
jb 0xd904
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/opts.cpp
// Function: Options::contains(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Options::contains(string optionflag){
	vector<string> optv = get_options();
	int i = 0;
	//check the options vector and determine whether it contains the requested optionflag
	for (auto s : optv){
		if (s == optionflag){
			i = 1;
		}
	}
	if (i){
		return true;
	}
	else{
		return false;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0xd2a8
movq (%rbx), %r12
movq 0x8(%rbx), %r13
xorl %ebx, %ebx
cmpq %r13, %r12
je 0xd9d0
leaq 0x10(%rsp), %rbp
movq %rsp, %r15
movq %rbp, (%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd186
movq 0x8(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0xd9ac
testq %rdx, %rdx
je 0xd9a7
movq (%r14), %rsi
movq (%rsp), %rdi
callq 0x3280
testl %eax, %eax
movl $0x1, %eax
cmovel %eax, %ebx
jmp 0xd9ac
movl $0x1, %ebx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xd9c2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
addq $0x20, %r12
cmpq %r13, %r12
jne 0xd967
testl %ebx, %ebx
setne %bl
leaq 0x20(%rsp), %rdi
callq 0xcec2
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xcec2
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_string(std::basic_ifstream<char, std::char_traits<char>>&)
void IO::get_string(ifstream& inputstream){
	while (inputstream.good()) {
		//load the input stream from the file into a string stream
		int next = inputstream.get();
		if (next == EOF){
			break;
		}
		//implicit conversion of the int char to a string
		inputstring += next;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rsi,%rax)
jne 0xe31a
movq %rsi, %rbx
movq %rdi, %r14
addq $0x60, %r14
movq %rbx, %rdi
callq 0x32d0
cmpl $-0x1, %eax
je 0xe31a
movsbl %al, %esi
movq %r14, %rdi
callq 0x3200
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
je 0xe2f4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_first_line[abi:cxx11]()
string& IO::get_first_line(){
	ifstream in;
	ifstream& inr = in;
	ifstream& rinr = (get_input_stream(inr));
	get_lines(THE_BEGINNING , 1 , rinr);
	string& isr = inputstring;
	return isr;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x32b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe384
movq %rsp, %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe532
addq $0x60, %rbx
movq %rsp, %rdi
callq 0x3070
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_input_stream(std::basic_ifstream<char, std::char_traits<char>>&)
ifstream& IO::get_input_stream(ifstream& infilestream){
	if (!path.empty()){
		try{
			infilestream.open(path);
			if (infilestream.good()) {
				ifstream& inr = infilestream;
				return inr;
			}
			else{
				throw runtime_error("Input File Error");
			}
		}
		catch (...) {
			print("Unable to open the input file " + path);
			exit(EXIT_FAILURE);
		}
	}
	else if (!ipath.empty()){
		try{
			infilestream.open(ipath);
			if (infilestream.good()){
				ifstream& inr = infilestream;
				return inr;
			}
			else{
				throw runtime_error("Input File Error");
			}
		}
		catch (...){
			print("Unable to open the input file " + ipath);
			exit(EXIT_FAILURE);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xe3ed
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0xe410
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2476(%rip), %rsi      # 0x10843
movq %rax, %rdi
callq 0x30e0
movq 0x5c14(%rip), %rsi      # 0x13ff0
movq 0x5bdd(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xe44f
addq $0x20, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
jne 0xe41d
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x2412(%rip), %rsi      # 0x10843
movq %rax, %rdi
callq 0x30e0
movq 0x5bb0(%rip), %rsi      # 0x13ff0
movq 0x5b79(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
jmp 0xe46c
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
jmp 0xe4c0
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x2307(%rip), %rsi      # 0x10782
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movq %rsp, %rdi
callq 0xa40c
movq %rsp, %rdi
jmp 0xe4eb
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe4b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe4b6
movq %rax, %rbx
callq 0x33c0
jmp 0xe522
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x22b3(%rip), %rsi      # 0x10782
leaq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
leaq 0x20(%rsp), %rdi
callq 0xa40c
leaq 0x20(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32e0
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe51d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe51d
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0xda3d
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_lines[abi:cxx11](int, int, std::basic_ifstream<char, std::char_traits<char>>&)
string& IO::get_lines(int startposition, int number_of_lines, ifstream& infile){
	if (startposition == THE_BEGINNING) {
		if (number_of_lines == 1){
			//return a single line from the file
			try{
				// if first line requested, get it and define inputstring class string with the line of text
				std::getline(infile, inputstring);
			}
			catch (...){
				print("Unable to read the first line from the input file");
				exit(EXIT_FAILURE);
			}
		}
		else {
			// return n requested lines from the file
			int linenumber = 0;
			//confirm that there are at least as many lines as the user requested
			while(! infile.eof()) {
				std::getline(infile, tempstring);
				++linenumber;
				inputstring += tempstring + "\n";
				if (linenumber == number_of_lines){
					string& isr = inputstring;
					return isr;
				}
			}
			//if did not return with above code, there were not as many lines in the file as the user requested
			//so return the entire file string
			inputstring = tempstring;
			string& isr = inputstring;
			return isr;
		}
	}
	else if (startposition == THE_END) {

	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdi, %rbx
cmpl $0x1, %edx
je 0xe61d
movl %edx, %ebp
leaq 0x80(%rbx), %r15
leaq 0x60(%rbx), %r12
leaq 0x8(%rsp), %r13
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%r14,%rdi)
jne 0xe5f9
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3400
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xd186
movq %r13, %rdi
leaq 0x18ba(%rip), %rsi      # 0xfe76
callq 0x3420
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x30b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe5ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
decl %ebp
jne 0xe561
jmp 0xe60b
addq $0x60, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3160
movq %rbx, %r12
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x60, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3050
movq %rax, %rdi
callq 0x30f0
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2185(%rip), %rsi      # 0x107c9
leaq 0x21af(%rip), %rdx      # 0x107fa
leaq 0x28(%rsp), %rdi
callq 0xd216
leaq 0x28(%rsp), %rdi
callq 0xa40c
leaq 0x28(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32e0
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0xe692
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe692
movq %rax, %rbx
callq 0x33c0
jmp 0xe6c2
movq %rax, %rdi
callq 0xda3d
jmp 0xe6a3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe6c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_first_n_lines[abi:cxx11](int&)
string& IO::get_first_n_lines(int& n) {
	ifstream in;
	ifstream& inr = in;
	ifstream& rinr = (get_input_stream(inr));
	get_lines(THE_BEGINNING, n , rinr);
	string& isr = inputstring;
	return isr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe384
movl (%r14), %edx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe532
addq $0x60, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3070
movq %rbx, %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::write_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void IO::write_file(string& outstring) {
	if (!path.empty()) {
		ofstream outfile(path);
		if (outfile.good()) {
			ofstream& outr = outfile;
			write_filestring(outr, outstring);
			outfile.close();
		}
		else{
			throw runtime_error("Unable to open the output file " + path);
		}
	}
	else if (!opath.empty()) {
		ofstream outfile(opath);
		if (outfile.good()) {
			ofstream& outr = outfile;
			write_filestring(outr, outstring);
			outfile.close();
		}
		else{
			throw runtime_error("Unable to open the output file " + opath);
		}
	}
	else{
		throw runtime_error("Missing a filepath for the output file.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xe794
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x3430
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x48(%rsp,%rax)
jne 0xe821
leaq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0xe944
leaq 0x28(%rsp), %rdi
callq 0x3320
jmp 0xe7e1
cmpq $0x0, 0x48(%rbx)
je 0xe86c
addq $0x40, %rbx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x3430
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x48(%rsp,%rax)
jne 0xe89e
leaq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0xe944
leaq 0x28(%rsp), %rdi
callq 0x3320
movq 0x57d0(%rip), %rax      # 0x13fb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x31e0
leaq 0x120(%rsp), %rdi
callq 0x30c0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x1fc6(%rip), %rsi      # 0x107fb
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x5795(%rip), %rsi      # 0x13ff0
movq 0x575e(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xe8e7
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x1f9b(%rip), %rsi      # 0x1081b
movq %rax, %rdi
callq 0x30e0
movq 0x5761(%rip), %rsi      # 0x13ff0
movq 0x572a(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x1f49(%rip), %rsi      # 0x107fb
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x33b0
xorl %ebp, %ebp
movq 0x5718(%rip), %rsi      # 0x13ff0
movq 0x56e1(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xe8f8
jmp 0xe918
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
jmp 0xe93c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe91e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xe91e
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0xe932
movq %r14, %rdi
callq 0x3190
jmp 0xe932
jmp 0xe92f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3350
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/chrissimpkins[P]octopus/src/io.cpp
// Function: IO::get_output_stream(std::basic_ofstream<char, std::char_traits<char>>&)
ofstream& IO::get_output_stream(ofstream& outfilestream){
	if (!path.empty()){
		try{
			outfilestream.open(path);
			if (outfilestream.good()) {
				ofstream& outr = outfilestream;
				return outr;
			}
			else{
				throw runtime_error("File Write Error");
			}
		}
		catch (...) {
			print("Unable to write to the output file " + path);
			exit(EXIT_FAILURE);
		}
	}
	else if (!opath.empty()){
		try{
			outfilestream.open(opath);
			if (outfilestream.good()) {
				ofstream& outr = outfilestream;
				return outr;
			}
			else{
				throw runtime_error("File Write Error");
			}
		}
		catch (...) {
			print("Unable to write to the output file " + opath);
			exit(EXIT_FAILURE);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xe9fb
movq %r14, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x3120
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0xea1e
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x1e79(%rip), %rsi      # 0x10854
movq %rax, %rdi
callq 0x30e0
movq 0x5606(%rip), %rsi      # 0x13ff0
movq 0x55cf(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
jmp 0xea5d
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x3120
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
jne 0xea2b
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0x1e15(%rip), %rsi      # 0x10854
movq %rax, %rdi
callq 0x30e0
movq 0x55a2(%rip), %rsi      # 0x13ff0
movq 0x556b(%rip), %rdx      # 0x13fc0
movq %r14, %rdi
callq 0x33d0
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
jmp 0xea7a
movq %rax, %r15
movq %r14, %rdi
callq 0x3190
jmp 0xeace
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x1ddc(%rip), %rsi      # 0x10865
movq %rsp, %rdi
movq %rbx, %rdx
callq 0xba25
movq %rsp, %rdi
callq 0xa40c
movq %rsp, %rdi
jmp 0xeaf9
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeac4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xeac4
movq %rax, %rbx
callq 0x33c0
jmp 0xeb30
movq %rax, %r15
movq %r15, %rdi
callq 0x30f0
leaq 0x1d88(%rip), %rsi      # 0x10865
leaq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xba25
leaq 0x20(%rsp), %rdi
callq 0xa40c
leaq 0x20(%rsp), %rdi
callq 0x3110
movl $0x1, %edi
callq 0x32e0
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeb2b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0xeb2b
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0xda3d
// File: /workspace/github_cpp_makefile_star2_O1/vygr[P]C-Chess/chess.cpp
// Function: display_board(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto display_board(const board &brd)
{
	cls();
	std::cout << "\n  a   b   c   d   e   f   g   h\n";
	std::cout << "┏━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┓\n";
	for (auto row = 0; row < 8; ++row)
 	{
		for (auto col = 0; col < 8; ++col)
		{
			std::cout << "┃" << " " << unicode_pieces[brd[row*8+col]] << " ";
		}
		std::cout << "┃" << 8-row << "\n";
		if (row != 7)
		{
			std::cout << "┣━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━╋━━━┫\n";
		}
	}
	std::cout << "┗━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┛\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0xaf4a(%rip), %r14      # 0xdfd8
leaq 0x6a2c(%rip), %rsi      # 0x9ac1
movl $0x7, %edx
movq %r14, %rdi
callq 0x21d0
leaq 0x6a20(%rip), %rsi      # 0x9ac9
movl $0x21, %edx
movq %r14, %rdi
callq 0x21d0
leaq 0x6a2e(%rip), %rsi      # 0x9aeb
movl $0x64, %edx
movq %r14, %rdi
callq 0x21d0
xorl %ebp, %ebp
leaq 0x6a7d(%rip), %rsi      # 0x9b50
leaq 0x6bab(%rip), %r12      # 0x9c85
xorl %r15d, %r15d
movq %r15, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %r15
movl $0x3, %edx
movq %r14, %rdi
movq %rsi, %rbx
callq 0x21d0
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x21d0
movq (%r15), %rsi
addq %rbp, %rsi
addq %r13, %rsi
leaq 0xb0be(%rip), %rdi      # 0xe1d8
callq 0x6006
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x21d0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rbx, %rsi
incq %r13
cmpq $0x8, %r13
jne 0x30ea
movl $0x3, %edx
movq %r14, %rdi
callq 0x21d0
movl $0x8, %esi
movq 0x10(%rsp), %r15
subl %r15d, %esi
movq %r14, %rdi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x6b4e(%rip), %rsi      # 0x9cc9
callq 0x21d0
cmpq $0x7, %r15
je 0x319a
movl $0x64, %edx
movq %r14, %rdi
leaq 0x69bf(%rip), %rsi      # 0x9b54
callq 0x21d0
incq %r15
addq $0x8, %rbp
cmpq $0x8, %r15
movq %rbx, %rsi
jne 0x30dd
movq 0xae23(%rip), %rdi      # 0xdfd8
leaq 0x69fd(%rip), %rsi      # 0x9bb9
movl $0x64, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/vygr[P]C-Chess/chess.cpp
// Function: piece_scans(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, std::vector<vector, std::allocator<vector>> const&)
auto piece_scans(const board &brd, unsigned int index, const vectors &vectors)
{
	auto yield = std::string{}; yield.reserve(8);
	auto cx = int(index % 8);
	auto cy = int(index / 8);
	for (auto &vector : vectors)
 	{
		auto dx = vector.dx;
		auto dy = vector.dy;
		auto length = vector.length;
		auto x = cx;
		auto y = cy;
		for (;length > 0; --length)
		{
			x += dx;
			y += dy;
			if ((0 <= x) && (x < 8) && (0 <= y) && (y < 8))
			{
				//still on the board
				auto piece = brd[y*8+x];
				if (piece != ' ')
				{
					//not empty square so yield piece
					yield.push_back(piece);
					break;
				}
			}
		}
	}
	return yield;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movl %edx, %ebx
movq %rsi, 0x30(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x8, %esi
movq %rdi, (%rsp)
callq 0x2260
movq (%r12), %rax
movq 0x8(%r12), %rcx
movq %rcx, 0x28(%rsp)
cmpq %rcx, %rax
je 0x32e8
movl %ebx, %ecx
andl $0x7, %ecx
movq %rcx, 0x18(%rsp)
shrl $0x3, %ebx
movq %rbx, 0x20(%rsp)
movq %rax, 0x8(%rsp)
movl 0x8(%rax), %r13d
testl %r13d, %r13d
jle 0x32d4
movq 0x8(%rsp), %rax
movl (%rax), %ecx
movl 0x4(%rax), %edx
movq 0x18(%rsp), %rax
leal (%rax,%rcx), %ebx
movq 0x20(%rsp), %rax
leal (%rax,%rdx), %r15d
leal (%rbx,%r15,8), %ebp
movq %rcx, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
leal (%rcx,%rdx,8), %r14d
cmpl $0x8, %ebx
setb %al
cmpl $0x8, %r15d
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x32a2
movl %ebp, %eax
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movb (%rcx,%rax), %r12b
cmpb $0x20, %r12b
jne 0x32aa
cmpl $0x2, %r13d
jge 0x32c3
jmp 0x32d4
movsbl %r12b, %esi
movq (%rsp), %rdi
callq 0x2170
cmpb $0x20, %r12b
jne 0x32d4
cmpl $0x1, %r13d
jle 0x32d4
decl %r13d
addl %r14d, %ebp
addl 0x38(%rsp), %r15d
addl 0x40(%rsp), %ebx
jmp 0x327a
movq 0x8(%rsp), %rax
addq $0xc, %rax
cmpq 0x28(%rsp), %rax
jne 0x323b
movq (%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32fd
movq %rax, %r14
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x331c
movq (%rax), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/vygr[P]C-Chess/chess.cpp
// Function: in_check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, unsigned long&)
auto in_check(const board &brd, int colour, std::size_t &king_index)
{
	auto king_piece = 'K';
	auto tests = white_tests;
	if (colour == black)
 	{
		//testing black king in check rather than white
		king_piece = 'k';
		tests = black_tests;
	}
	//find king index on board
	if (brd[king_index] != king_piece)
 	{
		king_index = brd.find(king_piece);
	}
	for (auto &test : tests)
 	{
		if (test.pieces.find_first_of(piece_scans(brd, static_cast<unsigned int>(king_index), *test.vectors))
			!= std::string::npos) return true;
	}
	//not in check
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xb047(%rip), %rsi      # 0xe388
movq %rsp, %rdi
callq 0x606a
movb $0x4b, %r15b
cmpl $-0x1, %ebp
jne 0x3363
movb $0x6b, %r15b
leaq 0xb045(%rip), %rsi      # 0xe3a0
movq %rsp, %rdi
callq 0x6104
movq (%rbx), %rax
movq (%r14), %rcx
cmpb %r15b, (%rcx,%rax)
je 0x3380
movzbl %r15b, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2200
movq %rax, (%rbx)
movq (%rsp), %r15
movq 0x8(%rsp), %r12
cmpq %r12, %r15
setne %bpl
je 0x33e4
movl (%rbx), %edx
movq 0x20(%r15), %rcx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x31d4
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x2230
movq %rax, %r13
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x33d8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21a0
cmpq $-0x1, %r13
jne 0x33e4
addq $0x28, %r15
jmp 0x3389
movq %rsp, %rdi
callq 0x5e98
andb $0x1, %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3403
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5e98
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/vygr[P]C-Chess/chess.cpp
// Function: all_moves(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
auto all_moves(const board &brd, int colour)
{
	//enumarate the board square by square
	auto yield = score_boards{}; yield.reserve(max_chess_moves);
	std::size_t king_index = 0;
	auto is_black = (colour == black);
	auto len = int(brd.length());
	for (auto index = 0; index < len; ++index)
	{
		auto piece = brd[index];
		if (piece == ' ') continue;
		if (piece > 'Z' != is_black) continue;
		//one of our pieces ! so gather all boards from possible moves of this piece
		piece_moves(yield, brd, index, colour, (*moves_map[piece]), king_index);
	}
	return yield;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x6d, %esi
callq 0x63d6
movq $0x0, 0x30(%rsp)
movq 0x8(%r14), %r13
testl %r13d, %r13d
jle 0x398a
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
cmpl $-0x1, %ebp
setne %al
movq (%r14), %rsi
movb (%rsi,%r15), %dl
movb %dl, 0xf(%rsp)
cmpb $0x5b, %dl
setge %cl
cmpb $0x20, %dl
je 0x397e
xorb %cl, %al
je 0x397e
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6a42
leaq 0xa970(%rip), %rdi      # 0xe2b0
leaq 0xf(%rsp), %rsi
callq 0x64da
movq (%rax), %r8
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %ebp, %ecx
leaq 0x30(%rsp), %r9
callq 0x34cd
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x397e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
incq %r15
cmpq %r15, %r13
jne 0x3900
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x399e
movq %rax, %r14
jmp 0x39c2
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x39c2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x653e
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/sagarvare[P]reinforcement-learning-rock-paper-scissor/helper.cpp
// Function: parse_CSV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> parse_CSV(string str1) {
	stringstream ss(str1);
	vector<string> result;

    string i;
	while( ss.good() )
	{
		string substr;
		getline( ss, substr, ',' );
		result.push_back( substr );
	}
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
leaq -0x1f0(%rbp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x2270
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb $0x0, (%r12)
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x1d0(%rbp,%rax)
jne 0x4bec
leaq -0x38(%rbp), %r13
leaq -0x48(%rbp), %r15
movq %r13, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x2330
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5350
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4bd7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x1f0(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x1d0(%rbp,%rax)
je 0x4b97
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c01
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq 0x43a8(%rip), %rsi      # 0x8fb0
leaq -0x1f0(%rbp), %rdi
callq 0x2140
leaq -0x170(%rbp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4c4d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c62
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x3a70
movq 0x433f(%rip), %rsi      # 0x8fb0
leaq -0x1f0(%rbp), %rdi
callq 0x2140
leaq -0x170(%rbp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/sagarvare[P]reinforcement-learning-rock-paper-scissor/helper.cpp
// Function: decimal_to_ternary(int)
vector<int> decimal_to_ternary(int decimal){
	vector<int> ternary;
	while (decimal>2){
		div_t val;
		val = div(decimal,3);
		ternary.push_back(val.rem);
		decimal = val.quot;
	}
	ternary.push_back(decimal);
	return ternary;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %eax
movq %rdi, %rbx
movl %esi, -0x14(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpl $0x3, %esi
jl 0x4d92
leaq -0x1c(%rbp), %r14
movl %eax, %edi
movl $0x3, %esi
callq 0x21a0
movq %rax, -0x20(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4d7c
movl -0x1c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4d87
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5642
movl -0x20(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x2, %eax
jg 0x4d53
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4da8
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4db4
leaq -0x14(%rbp), %rdx
movq %rbx, %rdi
callq 0x5642
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4dc2
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4dd9
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/sagarvare[P]reinforcement-learning-rock-paper-scissor/helper.cpp
// Function: check_result(char, char)
int check_result(char user_move, char comp_move){
	//Basic computer game 
	if ((user_move == 'R' && comp_move == 'S') || (user_move == 'S' && comp_move == 'P') || (user_move == 'P' && comp_move == 'R')){
		return -1;
	}
	if ((user_move == 'S' && comp_move == 'R') || (user_move == 'P' && comp_move == 'S') || (user_move == 'R' && comp_move == 'P')){
		return 1;
	}
	return 0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %ecx
xorb $0x52, %cl
movl %esi, %edx
xorb $0x53, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ecx, %r8d
orb %dl, %r8b
je 0x4e3b
movl %edi, %r9d
xorb $0x53, %r9b
movl %esi, %r8d
xorb $0x50, %r8b
movl %r9d, %r10d
orb %r8b, %r10b
je 0x4e3b
xorb $0x50, %dil
xorb $0x52, %sil
movl %edi, %r10d
orb %sil, %r10b
je 0x4e3b
orb %sil, %r9b
sete %al
orb %dl, %dil
sete %dl
orb %al, %dl
orb %r8b, %cl
sete %al
orb %dl, %al
movzbl %al, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sagarvare[P]reinforcement-learning-rock-paper-scissor/helper.cpp
// Function: convert_queue_to_state(std::deque<int, std::allocator<int>>, int)
int convert_queue_to_state(deque<int> my_state, int R){
	//Go through all the queues elements - should be exactly R
	int out = 0;
	int temp;
	for (int i =0;i< R; i++){
		//Check the top element and pop it
		temp = my_state.front() ; //Check this syntax
		my_state.pop_front();
		out = out + temp * pow(3,i);
	}
	return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
jle 0x4ebd
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq 0x10(%r14), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r14, %rdi
callq 0x539c
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x1454(%rip), %xmm0     # 0x62e0
movsd -0x20(%rbp), %xmm1
callq 0x2300
mulsd -0x30(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
cvttsd2si %xmm0, %r15d
movsd -0x20(%rbp), %xmm0
addsd 0x1436(%rip), %xmm0     # 0x62e8
movsd %xmm0, -0x20(%rbp)
decl %ebx
jne 0x4e5f
jmp 0x4ec0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sagarvare[P]reinforcement-learning-rock-paper-scissor/helper.cpp
// Function: print_queue(std::deque<int, std::allocator<int>>)
void print_queue(deque<int> q)
{
  while (!q.empty())
  {
    cout << q.front() << " ";
    q.pop_front();
  }
  cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rax
cmpq %rax, 0x30(%rdi)
je 0x4fe6
movq %rdi, %rbx
movq 0x401d(%rip), %r14      # 0x8fd0
leaq 0x1342(%rip), %r15      # 0x62fc
movl (%rax), %esi
movq %r14, %rdi
callq 0x22e0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x539c
movq 0x10(%rbx), %rax
cmpq %rax, 0x30(%rbx)
jne 0x4fba
movq 0x3fe3(%rip), %rbx      # 0x8fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2100