LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/dataset.cpp
// Function: DataSet::print_label(int)
void DataSet::print_label(int n) {
	using namespace std;
	
	double *label = this->label_vector(n);
	cout << "[" << label[0];
	for(int i=1; i < this->label_vector_length(); i++) {
		cout << ", " << label[i];
	}
	cout << "]" << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movslq %esi, %rcx
movq (%rax,%rcx,8), %r12
movq 0x33a4(%rip), %r14      # 0x5fd0
leaq 0x14b7(%rip), %rsi      # 0x40ea
movq %r14, %rdi
callq 0x2100
movsd (%r12), %xmm0
movq %rax, %rdi
callq 0x2180
pushq $0x1
popq %r13
leaq 0x1498(%rip), %r15      # 0x40ec
movslq 0x8(%rbx), %rax
cmpq %rax, %r13
jge 0x2c7b
movq %r14, %rdi
movq %r15, %rsi
callq 0x2100
movsd (%r12,%r13,8), %xmm0
movq %rax, %rdi
callq 0x2180
incq %r13
jmp 0x2c54
movq 0x334e(%rip), %rdi      # 0x5fd0
leaq 0x1466(%rip), %rsi      # 0x40ef
callq 0x2100
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2090
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/idx.cpp
// Function: IdxData::IdxData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
IdxData::IdxData(std::string file) {
	using namespace std;
	
	cout << "Reading IDX file: " << file << endl;
	
	ifstream ifs(file.c_str(), ios::in | ios::binary);
	if(ifs.is_open()) {
		int magic = read_int(ifs);
		int num_dims = (magic - 0x800) - 1;
		n_records = read_int(ifs);
		record_len = 1;
		for(int i=0; i < num_dims; i++) {
			record_len *= read_int(ifs);
		}
		//cout << "  found " << n_records << " records of size " << record_len << endl;
		data = new unsigned char[n_records * record_len];
		for(int i=0; i < n_records; i++) {
			ifs.read((char *)&data[i * record_len], record_len);
			if(ifs.bad()) {
				cerr << "Error reading data" << endl;
			}
		}
		ifs.close();
	}
	else cerr << "Could not open file " << file << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
movq 0x3312(%rip), %rdi      # 0x5fd0
leaq 0x143b(%rip), %rsi      # 0x4100
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq %rax, %rdi
callq 0x2090
movq (%r14), %rsi
movq %rsp, %rdi
pushq $0xc
popq %rdx
callq 0x21d0
leaq 0x78(%rsp), %rdi
callq 0x2050
testb %al, %al
je 0x2d41
movq %rsp, %rdi
callq 0x2e37
movl %eax, %ebp
movq %rsp, %rdi
callq 0x2e37
addl $0xfffff7ff, %ebp       # imm = 0xFFFFF7FF
movl %eax, 0x8(%rbx)
movl $0x1, 0xc(%rbx)
xorl %r15d, %r15d
testl %ebp, %ebp
cmovgl %ebp, %r15d
pushq $0x1
popq %rax
movq %rsp, %r14
subl $0x1, %r15d
jb 0x2d69
movq %r14, %rdi
callq 0x2e37
imull 0xc(%rbx), %eax
movl %eax, 0xc(%rbx)
jmp 0x2d2a
movq 0x32a8(%rip), %rdi      # 0x5ff0
leaq 0x13d7(%rip), %rsi      # 0x4126
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq %rax, %rdi
callq 0x2090
jmp 0x2ddc
movl 0x8(%rbx), %r13d
imull %r13d, %eax
movslq %eax, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %ebp, %ebp
movq %rsp, %r14
movq 0x3268(%rip), %r15      # 0x5ff0
leaq 0x1384(%rip), %r12      # 0x4113
cmpl %r13d, %ebp
jge 0x2dd4
movslq 0xc(%rbx), %rdx
movslq %ebp, %rsi
imulq %rdx, %rsi
addq (%rbx), %rsi
movq %r14, %rdi
callq 0x2140
movq (%rsp), %rax
movq -0x18(%rax), %rax
testb $0x1, 0x20(%rsp,%rax)
je 0x2dcc
movq %r15, %rdi
movq %r12, %rsi
callq 0x2100
movq %rax, %rdi
callq 0x2090
incl %ebp
movl 0x8(%rbx), %r13d
jmp 0x2d8f
movq %rsp, %rdi
callq 0x2040
movq %rsp, %rdi
callq 0x2060
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2dfe
jmp 0x2dfe
jmp 0x2dfe
jmp 0x2dfe
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x21a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/neuralnet.cpp
// Function: NeuralNet::NeuralNet(int, int, int)
NeuralNet::NeuralNet(int n_inputs, int n_hidden, int n_outputs) {
  num_inputs = n_inputs;
  num_hidden = n_hidden;
  num_outputs = n_outputs;
  
  hidden_values = new double[num_hidden];
  hidden_weight_deltas = new double[num_hidden];
  hidden_weights_buffer = new double[num_hidden * num_inputs];
  hidden_weights = new double*[num_hidden];
  
  #pragma omp parallel for
  for(int i=0; i < num_hidden; i++) {
    hidden_weights[i] = hidden_weights_buffer + (i * num_inputs);
    for(int j=0; j < num_inputs; j++) {
      hidden_weights[i][j] = rand_weight();
    }
  }
  
  output_values = new double[num_outputs];
  output_weight_deltas = new double[num_outputs];
  output_weights_buffer = new double[num_outputs * num_hidden];
  output_weights = new double*[num_outputs];
  
  #pragma omp parallel for
  for(int i=0; i < num_outputs; i++) {
    output_weights[i] = output_weights_buffer + (i * num_hidden);
    for(int j=0; j < num_hidden; j++) {
      output_weights[i][j] = rand_weight();
    }
  }
  
#ifdef _OPENMP
#pragma omp parallel 
    {
#pragma omp single
    std::cout << "Using OpenMP with " << omp_get_num_threads() 
              << " threads" << std::endl;
    }
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl %edx, %r15d
shlq $0x3, %r15
testl %edx, %edx
pushq $-0x1
popq %r12
cmovsq %r12, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x28(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
movl %ebp, %eax
imull %r14d, %eax
leaq (,%rax,8), %rdi
testl %eax, %eax
cmovsq %r12, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
movslq %ebp, %rax
cmpq %rax, %r15
jge 0x34c3
movl %r14d, %eax
imull %r15d, %eax
cltq
shlq $0x3, %rax
addq 0x18(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
xorl %r13d, %r13d
movslq %r14d, %rax
cmpq %rax, %r13
jge 0x34bb
callq 0x384d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movl (%rbx), %r14d
jmp 0x3498
incq %r15
movl 0x4(%rbx), %ebp
jmp 0x3474
movslq 0x8(%rbx), %r15
leaq (,%r15,8), %r14
testq %r15, %r15
cmovsq %r12, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x48(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x40(%rbx)
movl %r15d, %eax
imull %ebp, %eax
cltq
leaq (,%rax,8), %rdi
testl %eax, %eax
cmovsq %r12, %rdi
callq 0x2030
movq %rax, 0x38(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
xorl %r14d, %r14d
movslq %r15d, %rax
cmpq %rax, %r14
jge 0x356b
movl %ebp, %eax
imull %r14d, %eax
cltq
shlq $0x3, %rax
addq 0x38(%rbx), %rax
movq 0x30(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
xorl %r15d, %r15d
movslq %ebp, %rax
cmpq %rax, %r15
jge 0x3562
callq 0x384d
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movl 0x4(%rbx), %ebp
jmp 0x353f
incq %r14
movl 0x8(%rbx), %r15d
jmp 0x351c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/neuralnet.cpp
// Function: NeuralNet::~NeuralNet()
NeuralNet::~NeuralNet() {
  delete[] hidden_weights;
  delete[] hidden_weights_buffer;
  delete[] hidden_weight_deltas;
  delete[] hidden_values;

  delete[] output_weights;
  delete[] output_weights_buffer;
  delete[] output_weight_deltas;
  delete[] output_values;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x358c
callq 0x2150
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x359a
callq 0x2150
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x35a8
callq 0x2150
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x35b6
callq 0x2150
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x35c4
callq 0x2150
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x35d2
callq 0x2150
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x35e0
callq 0x2150
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x35ef
popq %rbx
jmp 0x2150
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/neuralnet.cpp
// Function: NeuralNet::run(double*)
double *NeuralNet::run(double *input) {
  double *iv = input;
  double *hv = hidden_values;
  double *ov = output_values;
  
  // Propagate from input to hidden layer
  #pragma omp parallel for
  for(int i=0; i < num_hidden; i++) {
    double sum = 0.0;
    for(int j=0; j < num_inputs; j++) {
      sum += iv[j] * hidden_weights[i][j];
    }
    hv[i] = sigmoid(sum);
  }
  
  // Propagate from hidden to output layer
  #pragma omp parallel for
  for(int i=0; i < num_outputs; i++) {
    double sum = 0.0;
    for(int j=0; j < num_hidden; j++) {
      sum += hv[j] * output_weights[i][j];
    }
    ov[i] = sigmoid(sum);
  }
  
  return ov;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x28(%rdi), %r12
movq 0x48(%rdi), %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq 0x4(%rbx), %rax
cmpq %rax, %rbp
jge 0x3658
movl (%rbx), %eax
movq 0x10(%rbx), %rcx
testl %eax, %eax
cmovlel %r13d, %eax
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rax
je 0x3648
movsd (%r15,%rdx,8), %xmm1
movq (%rcx,%rbp,8), %rsi
mulsd (%rsi,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x362b
callq 0x3869
movsd %xmm0, (%r12,%rbp,8)
incq %rbp
jmp 0x3610
xorl %r15d, %r15d
xorl %r13d, %r13d
movslq 0x8(%rbx), %rax
cmpq %rax, %r13
jge 0x36a7
movl 0x4(%rbx), %eax
movq 0x30(%rbx), %rcx
testl %eax, %eax
cmovlel %r15d, %eax
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rax
je 0x3697
movsd (%r12,%rdx,8), %xmm1
movq (%rcx,%r13,8), %rsi
mulsd (%rsi,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x367a
callq 0x3869
movsd %xmm0, (%r14,%r13,8)
incq %r13
jmp 0x365e
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/neuralnet.cpp
// Function: NeuralNet::train(double*, double*, double)
void NeuralNet::train(double *input, double *desired_output, double eta) {
  run(input);
  double *iv = input;
  double *hv = hidden_values;
  double *ov = output_values;
  double *dv = desired_output;
  
  // Calculate weight deltas for the output layer
  #pragma omp parallel for
  for(int i=0; i < num_outputs; i++) {
    output_weight_deltas[i] = (dv[i] - ov[i]) * ov[i] * (1.0 - ov[i]);
  }
    
  // Calculate weight deltas for the hidden layer
  #pragma omp parallel for
  for(int i=0; i < num_hidden; i++) {
    double sum = 0.0;
    for(int j=0; j < num_outputs; j++) {
      sum += output_weight_deltas[j] * output_weights[j][i];
    }
    hidden_weight_deltas[i] = sum * hv[i] * (1.0 - hv[i]);
  }
        
  // Update output layer weights
  #pragma omp parallel for
  for(int i=0; i < num_outputs; i++) {
    for(int j=0; j < num_hidden; j++) {
      output_weights[i][j] += eta * output_weight_deltas[i] * hv[j];
    }
  }
            
  // Update hidden layer weights
  #pragma omp parallel for
  for(int i=0; i < num_hidden; i++) {
    for(int j=0; j < num_inputs; j++) {
      hidden_weights[i][j] += eta * hidden_weight_deltas[i] * iv[j];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x35f2
movq 0x28(%r14), %rcx
movq 0x48(%r14), %rax
movl 0x8(%r14), %edx
movq 0x40(%r14), %rsi
xorl %edi, %edi
testl %edx, %edx
cmovlel %edi, %edx
movsd 0x91a(%rip), %xmm0      # 0x4010
cmpq %rdi, %rdx
je 0x3724
movsd (%r15,%rdi,8), %xmm1
movsd (%rax,%rdi,8), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
movsd %xmm3, (%rsi,%rdi,8)
incq %rdi
jmp 0x36f6
movl 0x4(%r14), %eax
movq 0x20(%r14), %rsi
xorl %edi, %edi
testl %eax, %eax
cmovlel %edi, %eax
cmpq %rax, %rdi
je 0x3784
movq 0x30(%r14), %r8
movq 0x40(%r14), %r9
xorpd %xmm1, %xmm1
xorl %r10d, %r10d
cmpq %r10, %rdx
je 0x3765
movsd (%r9,%r10,8), %xmm2
movq (%r8,%r10,8), %r11
mulsd (%r11,%rdi,8), %xmm2
addsd %xmm2, %xmm1
incq %r10
jmp 0x3747
movsd (%rcx,%rdi,8), %xmm2
mulsd %xmm2, %xmm1
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
movsd %xmm3, (%rsi,%rdi,8)
incq %rdi
jmp 0x3733
xorl %esi, %esi
movsd 0x8(%rsp), %xmm1
cmpq %rdx, %rsi
je 0x37cb
movq 0x30(%r14), %rdi
movq 0x40(%r14), %r8
xorl %r9d, %r9d
cmpq %r9, %rax
je 0x37c6
movsd (%r8,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
movq (%rdi,%rsi,8), %r10
mulsd (%rcx,%r9,8), %xmm0
addsd (%r10,%r9,8), %xmm0
movsd %xmm0, (%r10,%r9,8)
incq %r9
jmp 0x379c
incq %rsi
jmp 0x378c
movl (%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rax, %rdx
je 0x3813
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rdi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x380e
movsd (%rdi,%rdx,8), %xmm0
mulsd %xmm1, %xmm0
movq (%rsi,%rdx,8), %r9
mulsd (%rbx,%r8,8), %xmm0
addsd (%r9,%r8,8), %xmm0
movsd %xmm0, (%r9,%r8,8)
incq %r8
jmp 0x37e5
incq %rdx
jmp 0x37d5
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghulette[P]neural-net-openmp/neuralnet.cpp
// Function: NeuralNet::mse(double*)
double NeuralNet::mse(double *desired_values) {
  double sum = 0.0;
  for(int i=0; i < num_outputs; i++) {
    double diff = desired_values[i] - output_values[i];
    sum += diff * diff;
  }
  return sum;
}

// Assembly:
movl 0x8(%rdi), %eax
movq 0x48(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorpd %xmm0, %xmm0
cmpq %rdx, %rax
je 0x384c
movsd (%rsi,%rdx,8), %xmm1
subsd (%rcx,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x3830
retq
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/main.cpp
// Function: query_test(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void query_test(string s)
{
	if(s == "halt.")
	{
		exit(1);
	}
	PredicateRef p(s,predicates);
	bool unified = false;

	cout << "test" << endl;
	// Basically what happens here is that we try to unify the ref with all
	// the existing predicates, if one works set the unified flag to true
	for(int i = 0; i < predicates.size(); ++i)
	{
		if(predicates[i]->unifyWith(&p))
		{
			unified = true;
		}
	}
	// If unified, print out the variables that worked, these are stored inside the atoms
	// in a list of possibilites, this is potentially a really bad way to do this
	// I think this is going to need some kind of virtual/temporary variables to make this work
	if(unified)
	{
		for(int i = 0; i < p.args.size(); ++i)
		{
			char c;
			for(int j = 0; j < p.args[i]->possibilties.size(); ++j)
			{
				cout << *p.args[i] << "=" << *p.args[i]->possibilties[j] << endl;
			}
			cin >> c;
		}
		cout << endl << "yes" << endl;
	}
	else
	{
		cout << endl << "no" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x2b26(%rip), %rsi      # 0x5004
callq 0x27c1
testb %al, %al
jne 0x2607
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21d0
leaq 0x5c3f(%rip), %rdx      # 0x8140
leaq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x2f80
leaq -0x40(%rbp), %rdi
callq 0x20a0
movq 0x5ab3(%rip), %rdi      # 0x7fd0
leaq 0x2ae6(%rip), %rsi      # 0x500a
callq 0x2140
movq %rax, %rdi
callq 0x20b0
xorl %r14d, %r14d
leaq -0x80(%rbp), %rbx
xorl %r15d, %r15d
movq 0x5c06(%rip), %rcx      # 0x8148
movq 0x5bf7(%rip), %rax      # 0x8140
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x2569
movq (%rax,%r14,8), %rdi
movq %rbx, %rsi
callq 0x38a4
orb %al, %r15b
incq %r14
jmp 0x253b
testb $0x1, %r15b
je 0x25af
xorl %r15d, %r15d
movq 0x5a67(%rip), %rbx      # 0x7fe0
leaq -0x19(%rbp), %r14
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x25c4
movq (%rax,%r15,8), %rsi
movq 0x30(%rsi), %rax
cmpq 0x28(%rsi), %rax
jne 0x25fb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21c0
incq %r15
jmp 0x257d
movq 0x5a1a(%rip), %rdi      # 0x7fd0
callq 0x20b0
leaq 0x2a51(%rip), %rsi      # 0x5013
jmp 0x25d7
movq 0x5a05(%rip), %rdi      # 0x7fd0
callq 0x20b0
leaq 0x2a38(%rip), %rsi      # 0x500f
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
leaq -0x80(%rbp), %rdi
callq 0x27d2
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x59ce(%rip), %rdi      # 0x7fd0
callq 0x2130
pushq $0x1
popq %rdi
callq 0x2180
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20a0
jmp 0x262f
jmp 0x2623
jmp 0x2623
jmp 0x2623
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x27d2
movq %rbx, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/main.cpp
// Function: main
int main()
{
	cout << "Prolog++" << endl;
	cout << "~~~~~~~~~~~~~~~~~~~~~" << endl;
	cout << "Preloaded facts: " << endl << endl;
	consult_test("equal(X,X).");
	consult_test("basic(a,b,c).");
	consult_test("person(alice).");
	consult_test("person(bob).");
	cout << endl;

	while(not cin.eof())
	{
		string input;
		cout << "| ?- ";
		cin >> input;
		query_test(input);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x5981(%rip), %rbx      # 0x7fd0
leaq 0x29c0(%rip), %rsi      # 0x5016
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
leaq 0x29b2(%rip), %rsi      # 0x501f
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
leaq 0x29b1(%rip), %rsi      # 0x5035
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
movq %rax, %rdi
callq 0x20b0
leaq 0x29a4(%rip), %rdi      # 0x5047
callq 0x241c
leaq 0x29a4(%rip), %rdi      # 0x5053
callq 0x241c
leaq 0x29a6(%rip), %rdi      # 0x5061
callq 0x241c
leaq 0x29a9(%rip), %rdi      # 0x5070
callq 0x241c
movq %rbx, %rdi
callq 0x20b0
leaq -0x38(%rbp), %rbx
movq 0x5901(%rip), %r14      # 0x7fe0
leaq 0x2997(%rip), %r15      # 0x507d
leaq -0x48(%rbp), %r12
leaq -0x68(%rbp), %r13
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r14,%rax)
jne 0x2749
movq %rbx, -0x48(%rbp)
andq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq 0x58bf(%rip), %rdi      # 0x7fd0
movq %r15, %rsi
callq 0x2140
movq %r14, %rdi
movq %r12, %rsi
callq 0x21a0
movq %r13, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r13, %rdi
callq 0x24c7
movq %r13, %rdi
callq 0x20a0
movq %r12, %rdi
callq 0x20a0
jmp 0x26ee
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x20a0
jmp 0x276b
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/atom.cpp
// Function: Atom::Atom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Atom::Atom(string n)
{
	name = n;
	if('A' <= n[0] and n[0] <= 'Z')
	{
		free_variable = true;
	}
	else
	{
		free_variable = false;
	}
	if(n.size() == 1 and n[0] == '_')
	{
		cout << "UNDERSCORE DETECTED" << endl;
		is_under_score = true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r15
movb $0x0, 0x10(%rdi)
leaq 0x28(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
andq $0x0, 0x38(%rdi)
callq 0x20d0
movq (%r15), %rax
movb (%rax), %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
setb 0x20(%rbx)
cmpq $0x1, 0x8(%r15)
jne 0x2b27
cmpb $0x5f, (%rax)
jne 0x2b27
movq 0x54c1(%rip), %rdi      # 0x7fd0
leaq 0x25b1(%rip), %rsi      # 0x50c7
callq 0x2140
movq %rax, %rdi
callq 0x20b0
movb $0x1, 0x21(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x2800
movq %rbx, %rdi
callq 0x20a0
movq %r15, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/atom.cpp
// Function: Atom::unifyWith(Atom*)
bool Atom::unifyWith(Atom * a)
{
  if(a->free_variable)
  {
    if(not free_variable)
    {
      a->possibilties.push_back(this);
    }
    else
    {
      cout << "not sure what to do here" << endl;
    }
    return true;
  }
  else if(*a == *this)
  {
    return true;
  }
  else
  {
    return false;
  }
}

// Assembly:
movq %rdi, %rax
cmpb $0x1, 0x20(%rsi)
jne 0x2b82
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpb $0x0, 0x20(%rax)
je 0x2b8d
movq 0x5464(%rip), %rdi      # 0x7fd0
leaq 0x2568(%rip), %rsi      # 0x50db
callq 0x2140
movq %rax, %rdi
callq 0x20b0
jmp 0x2ba3
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x2bac
addq $0x28, %rsi
leaq -0x8(%rbp), %rcx
movq %rax, (%rcx)
movq %rsi, %rdi
movq %rcx, %rsi
callq 0x2c1a
movb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/parser.cpp
// Function: cropString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
string cropString(string &input_string, int n)
{
	string crop;
	int i = 0;
	for(i = 0; i < input_string.size(); ++i)
	{
		if(i == n)
		{
			break;
		}
		else
		{
			crop.push_back(input_string[i]);
		}
	}
	input_string.erase(0,i+1);
	return crop;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movl %edx, %r12d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x2e13
cmpq %r15, 0x8(%r14)
jbe 0x2e13
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2110
incq %r15
jmp 0x2df3
incl %r15d
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2030
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e31
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/parser.cpp
// Function: cropString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char)
string cropString(string &input_string, char delimiter)
{
	string crop;
	int i = 0;
	for(i = 0;i < input_string.size(); ++i)
	{
		if(input_string[i] == delimiter)
		{
			break;
		}
		else
		{
			crop.push_back(input_string[i]);
		}
	}
	input_string.erase(0,i+1);
	return crop;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movl %edx, %r12d
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x2e8d
movq (%r14), %rax
movb (%rax,%r15), %al
cmpb %r12b, %al
je 0x2e8d
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2110
incq %r15
jmp 0x2e6b
incl %r15d
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2030
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eab
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/parser.cpp
// Function: countChar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
int countChar(string s, char c)
{
	int count = 0;
	for(int i = 0; i < s.size(); ++i)
	{
		if(s[i]==c)
		{
			++count;
		}
	}
	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x2ee5
movq (%rdi), %r8
xorl %r9d, %r9d
cmpb %sil, (%r8,%rdx)
sete %r9b
addl %r9d, %eax
incq %rdx
jmp 0x2eca
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/parser.cpp
// Function: strip_ws(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string strip_ws(string s)
{
	string new_s;
	for(int i = 0; i < s.size(); ++i)
	{
		if(s[i]!=' ')
		{
			new_s.push_back(s[i]);
		}
	}
	return new_s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x2f5d
movq (%r14), %rax
movb (%rax,%r15), %al
cmpb $0x20, %al
je 0x2f58
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2110
incq %r15
jmp 0x2f3c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O2/lotka[P]prologplusplus/predicate.cpp
// Function: Predicate::unifyWith(PredicateRef*)
bool Predicate::unifyWith(PredicateRef * ref)
{
	if(ref->name == name and ref->airty == airty)
	{
		for(int i = 0; i < airty; ++i)
		{
			if(not args[i]->unifyWith(ref->args[i]))
			{
				return false;
			}
		}
	}
	else
	{
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2be0
testb %al, %al
je 0x38fb
movl 0x38(%rbx), %eax
cmpl 0x20(%r14), %eax
jne 0x38fb
xorl %r12d, %r12d
movslq 0x20(%r14), %rax
cmpq %rax, %r12
setge %r15b
jge 0x38fe
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %rsi
callq 0x2b4e
incq %r12
testb %al, %al
jne 0x38d0
jmp 0x38fe
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/exprtk_compilation_timeout.cpp
// Function: compilation_timeout_check::continue_compilation(exprtk::compilation_check::compilation_context&)
bool continue_compilation(compilation_context& context) override
   {
      if (++iterations_ >= max_iters_per_check)
      {
         if (std::chrono::steady_clock::now() >= timeout_tp_)
         {
            context.error_message = "Compilation has timed-out";
            return false;
         }

         iterations_ = 0;
      }

      return true;
   }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
incq %rax
movq %rax, 0x8(%rdi)
movb $0x1, %bl
cmpq $0x2710, %rax           # imm = 0x2710
jb 0x113ded
movq %rsi, %r14
movq %rdi, %r15
callq 0x10e4b0
cmpq 0x10(%r15), %rax
jge 0x113ddc
andq $0x0, 0x8(%r15)
jmp 0x113ded
leaq 0x12757b(%rip), %rsi    # 0x23b35e
movq %r14, %rdi
callq 0x10e580
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/test_sum.cpp
// Function: range_test(std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>>> const&, std::vector<int, std::allocator<int>> const&, unsigned int)
static void range_test(std::mt19937& rnd, test_map& m,
		       const test_vector& vec,
		       const std::vector<int>& series,
		       unsigned int limit)
{
    int a = rnd() % (limit + 1);
    int b = rnd() % (limit + 1);

    if (a > b)
	std::swap(a, b);

    test_map::const_iterator ia = m.find(vec[a].first);
    test_map::const_iterator ib = m.find(vec[b].first);

    const int sa = a ? series[a - 1] : 0;
    const int sb = b ? series[b - 1] : 0;

    const int vsum = sb - sa;
    const int msum = m.sum(ia, ib).sum;

    assert(vsum == msum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r12d
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r13
callq 0x28c8
incl %r12d
xorl %r14d, %r14d
xorl %edx, %edx
divq %r12
movq %rdx, %rbp
movq %r13, %rdi
callq 0x28c8
xorl %edx, %edx
divq %r12
cmpl %edx, %ebp
movl %edx, %r13d
cmovgl %ebp, %r13d
cmovll %ebp, %edx
movslq %edx, %r12
imulq $0x28, %r12, %rsi
addq (%r15), %rsi
movq %rbx, %rdi
callq 0x292c
movq %rax, 0x8(%rsp)
movslq %r13d, %rbp
imulq $0x28, %rbp, %rsi
addq (%r15), %rsi
movq %rbx, %rdi
callq 0x292c
movq 0x10(%rsp), %rdx
movl $0x0, %ecx
testl %r12d, %r12d
je 0x2751
movq (%rdx), %rcx
movl -0x4(%rcx,%r12,4), %ecx
testl %r13d, %r13d
je 0x275e
movq (%rdx), %rdx
movl -0x4(%rdx,%rbp,4), %r14d
subl %ecx, %r14d
incq %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x2a92
cmpl %eax, %r14d
jne 0x2788
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1937(%rip), %rdi      # 0x40c6
leaq 0x18ab(%rip), %rsi      # 0x4041
leaq 0x1936(%rip), %rcx      # 0x40d3
pushq $0x2c
popq %rdx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::sum_between(aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary> const&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static summary_type sum_between(const aggregator_type& ag,
				    node *first, node *last)
    {
	if (is_header(first))
	    return ag.nothing();

	// This special case works, because last is the parent of the
	// root. The sum will include the root's right subtree iff the
	// path to first is left of the root
	if (is_header(last))
	    return ag.combine(ag.summarize(first->value),
			      sum_from(ag, first, last));

	if (first == last)
	    return ag.nothing();

	node *c = concestor(first, last);

	summary_type sum = ag.summarize(first->value);

	sum = ag.combine(sum, sum_from(ag, first, c));

	if ((c != last) && (c != first))
	    sum = ag.combine(sum, c->value);

	sum = ag.combine(sum, sum_to(ag, last, c));

	return sum;
    }

// Assembly:
xorl %eax, %eax
cmpq $0x0, 0x40(%rsi)
je 0x2b2b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x40(%rdx)
je 0x2b09
cmpq %rbx, %r15
je 0x2b1d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b84
movq %rax, %r12
movl 0x20(%r15), %r13d
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2b2c
movl %eax, %ebp
addl %r13d, %ebp
cmpq %rbx, %r12
sete %al
cmpq %r15, %r12
sete %cl
orb %al, %cl
jne 0x2af9
addl 0x20(%r12), %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2bd4
jmp 0x2b1b
movl 0x20(%r15), %ebp
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2b2c
addl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::sum_from(aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary> const&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static summary_type sum_from(const aggregator_type& ag,
				 node *start, node *root)
    {
	summary_type sum = ag.nothing();
	node *n = start;

	while (n != root) {
	    if (n != start)
		sum = ag.combine(sum, n->value);

	    sum = ag.combine(sum, sum_tree(ag, n->right));

	    // Ascend to an ancestor which is lexicographically after n.
	    while (is_right_child(n) && n->parent != root)
		n = n->parent;

	    n = n->parent;
	}

	return sum;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movq %rsi, %r12
cmpq %rbx, %r12
je 0x2b78
cmpq %r14, %r12
je 0x2b51
addl 0x20(%r12), %ebp
movq 0x38(%r12), %rsi
movq %r15, %rdi
callq 0x2c2c
movq 0x40(%r12), %rcx
cmpq %rbx, %rcx
je 0x2b71
cmpq %r12, 0x38(%rcx)
movq %rcx, %r12
je 0x2b5e
addl %eax, %ebp
movq %rcx, %r12
jmp 0x2b42
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::concestor(summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static node *concestor(node *a, node *b)
    {
	int da = depth_of(a);
	int db = depth_of(b);

	// Make sure b is the deeper of the two
	if (da > db) {
	    std::swap(da, db);
	    std::swap(a, b);
	}

	// Climb up b until we find an ancestor of the same depth as a
	while (da < db) {
	    b = b->parent;
	    db--;
	}

	// Climb both simultaneously until we meet
	while (a != b) {
	    a = a->parent;
	    b = b->parent;
	}

	return a;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2c72
movl %eax, %ebp
movq %r14, %rdi
callq 0x2c72
movl %eax, %ecx
cmpl %eax, %ebp
jle 0x2baa
movq %r14, %rax
movl %ecx, %edx
jmp 0x2bbc
movq %rbx, %rax
movq %r14, %rbx
movl %ebp, %edx
movl %ecx, %ebp
jmp 0x2bbc
movq 0x40(%rbx), %rbx
decl %ebp
cmpl %ebp, %edx
jl 0x2bb6
jmp 0x2bca
movq 0x40(%rax), %rax
movq 0x40(%rbx), %rbx
cmpq %rbx, %rax
jne 0x2bc2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::sum_to(aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary> const&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static summary_type sum_to(const aggregator_type& ag,
			       node *end, node *root)
    {
	summary_type sum = ag.nothing();
	node *n = end;

	while (n != root) {
	    if (n != end)
		sum = ag.combine(n->value, sum);

	    sum = ag.combine(sum_tree(ag, n->left), sum);

	    // Ascend to an ancestor which is lexicographically before
	    // n.
	    while (is_left_child(n) && n->parent != root)
		n = n->parent;

	    n = n->parent;
	}

	return sum;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movq %rsi, %r12
cmpq %rbx, %r12
je 0x2c20
cmpq %r14, %r12
je 0x2bf9
addl 0x20(%r12), %ebp
movq 0x30(%r12), %rsi
movq %r15, %rdi
callq 0x2c2c
movq 0x40(%r12), %rcx
cmpq %rbx, %rcx
je 0x2c19
cmpq %r12, 0x30(%rcx)
movq %rcx, %r12
je 0x2c06
addl %eax, %ebp
movq %rcx, %r12
jmp 0x2bea
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::sum_tree(aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary> const&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static summary_type sum_tree(const aggregator_type& ag, node *n)
    {
	if (!n)
	    return ag.nothing();

	if (!(n->flags & node::SUM_VALID)) {
	    n->sum =
		ag.combine(
		    ag.combine(sum_tree(ag, n->left), ag.summarize(n->value)),
		    sum_tree(ag, n->right));
	    n->flags |= node::SUM_VALID;
	}

	return n->sum;
    }

// Assembly:
testq %rsi, %rsi
je 0x2c66
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
testb $0x2, 0x2c(%rsi)
jne 0x2c69
movq %rdi, %r14
movq 0x30(%rbx), %rsi
callq 0x2c2c
movl %eax, %ebp
addl 0x20(%rbx), %ebp
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x2c2c
addl %ebp, %eax
movl %eax, 0x28(%rbx)
orb $0x2, 0x2c(%rbx)
jmp 0x2c6c
xorl %eax, %eax
retq
movl 0x28(%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/test.cpp
// Function: test_int(unsigned int, unsigned int)
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	cuckoohash_map<uint32_t, uint32_t, Hash32> h;
	for (i = 0, x = x0; i < n; ++i) {
		x = hash32(x);
		h.upsert(get_key(n, x), [&z](uint32_t &v) { z += ++v; }); // FIXME: not sure if this is correct...
		++z;
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u\n", h.size(), z);
	return h.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, %r15d
movl %edi, %r13d
leaq 0x50(%rsp), %r14
leaq 0x30(%rsp), %r12
leaq 0x18(%rsp), %rcx
leaq 0x8(%rsp), %r8
movl $0x40000, %esi          # imm = 0x40000
movq %r14, %rdi
movq %r12, %rdx
callq 0x27ac
xorl %ebx, %ebx
movl %r13d, %ebp
subl $0x1, %ebp
jb 0x271d
movl %r15d, %edi
callq 0x239c
movl %eax, %r15d
movl %r13d, %edi
movl %eax, %esi
callq 0x23c7
movl %eax, 0x4(%rsp)
movl %eax, %ecx
movl %eax, %edx
shrl $0x10, %edx
xorl %eax, %edx
movl %edx, %eax
shrl $0x8, %eax
xorl %edx, %eax
movq %rcx, 0x8(%rsp)
movb %al, 0x10(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0x8(%rsp), %rdx
callq 0x2cf0
movq 0x8(%rsp), %rdx
movl 0x10(%rsp), %ecx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r12, %r8
leaq 0x4(%rsp), %r9
callq 0x2d6e
cmpl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rsi
je 0x26df
imulq $0x28, %rsi, %rax
addq 0x68(%rsp), %rax
movq 0x20(%rsp), %rcx
movl 0x4(%rax,%rcx,8), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rcx,8)
addl %edx, %ebx
incl %ebx
jmp 0x26f6
movq 0x20(%rsp), %rdx
movzbl 0x10(%rsp), %ecx
movq %r14, %rdi
leaq 0x4(%rsp), %r8
callq 0x2e4a
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x2703
movb $0x0, (%rax)
andq $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x2716
movb $0x0, (%rax)
incl %ebx
jmp 0x264b
movq 0x78ac(%rip), %rax      # 0x9fd0
movq (%rax), %r14
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x286c
leaq 0x298a(%rip), %rsi      # 0x50c5
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x21a0
movq %r15, %rdi
callq 0x286c
movq %rax, %rbx
movq %r15, %rdi
callq 0x28ba
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2799
movq %rax, %rbx
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x2786
movb $0x0, (%rax)
andq $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x2799
movb $0x0, (%rax)
leaq 0x50(%rsp), %rdi
callq 0x28ba
movq %rbx, %rdi
callq 0x2210
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/./cuckoohash_map.hh
// Function: cuckoohash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 4ul>::size() const
size_type size() const {
    if (all_locks_.size() == 0) {
      return 0;
    }
    counter_type s = 0;
    for (spinlock &lock : get_current_locks()) {
      s += lock.elem_counter();
    }
    assert(s >= 0);
    return static_cast<size_type>(s);
  }

// Assembly:
pushq %rax
cmpq $0x0, 0x30(%rdi)
je 0x28b5
movq 0x28(%rdi), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x2891
addq 0x8(%rcx), %rax
addq $0x40, %rcx
jmp 0x2882
testq %rax, %rax
jns 0x28b7
leaq 0x41b5(%rip), %rdi      # 0x6a52
leaq 0x29ea(%rip), %rsi      # 0x528e
leaq 0x41ae(%rip), %rcx      # 0x6a59
movl $0x157, %edx            # imm = 0x157
callq 0x20f0
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/./libcuckoo_bucket_container.hh
// Function: libcuckoo_bucket_container<unsigned int, unsigned int, std::allocator<std::pair<unsigned int const, unsigned int>>, unsigned char, 4ul>::destroy_buckets()
void destroy_buckets() noexcept {
    if (buckets_ == nullptr) {
      return;
    }
    // The bucket default constructor is nothrow, so we don't have to
    // worry about dealing with exceptions when constructing all the
    // elements.
    static_assert(std::is_nothrow_destructible<bucket>::value,
                  "libcuckoo_bucket_container requires bucket to be nothrow "
                  "destructible");
    clear();
    for (size_type i = 0; i < size(); ++i) {
      traits_::destroy(allocator_, &buckets_[i]);
    }
    bucket_allocator_.deallocate(buckets_, size());
    buckets_ = nullptr;
  }

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x2953
pushq %rbx
movq %rdi, %rbx
callq 0x2954
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq %rax, %rdx
shrq %cl, %rdx
incq %rax
testq %rdx, %rdx
je 0x292e
movq 0x10(%rbx), %rdi
movq 0x8(%rbx), %rax
callq 0x2140
andq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/./libcuckoo_bucket_container.hh
// Function: libcuckoo_bucket_container<unsigned int, unsigned int, std::allocator<std::pair<unsigned int const, unsigned int>>, unsigned char, 4ul>::clear()
void clear() noexcept {
    static_assert(
        std::is_nothrow_destructible<key_type>::value &&
            std::is_nothrow_destructible<mapped_type>::value,
        "libcuckoo_bucket_container requires key and value to be nothrow "
        "destructible");
    for (size_type i = 0; i < size(); ++i) {
      bucket &b = buckets_[i];
      for (size_type j = 0; j < SLOT_PER_BUCKET; ++j) {
        if (b.occupied(j)) {
          eraseKV(i, j);
        }
      }
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x24
popq %r12
xorl %r14d, %r14d
movq 0x8(%rbx), %rcx
movq %r14, %rax
shrq %cl, %rax
testq %rax, %rax
jne 0x29aa
movq 0x10(%rbx), %r13
addq %r12, %r13
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x29a1
cmpb $0x1, (%r13,%r15)
jne 0x299c
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x29bc
incq %r15
jmp 0x2980
incq %r14
addq $0x28, %r12
jmp 0x2967
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x2903
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/./libcuckoo_bucket_container.hh
// Function: libcuckoo_bucket_container<unsigned int, unsigned int, std::allocator<std::pair<unsigned int const, unsigned int>>, unsigned char, 4ul>::eraseKV(unsigned long, unsigned long)
void eraseKV(size_type ind, size_type slot) {
    bucket &b = buckets_[ind];
    assert(b.occupied(slot));
    b.occupied(slot) = false;
    traits_::destroy(allocator_, std::addressof(b.storage_kvpair(slot)));
  }

// Assembly:
movq 0x10(%rdi), %rax
imulq $0x28, %rsi, %rcx
leaq (%rax,%rcx), %rsi
cmpb $0x0, 0x24(%rdx,%rsi)
je 0x29db
addq %rcx, %rax
addq $0x24, %rax
movb $0x0, (%rax,%rdx)
retq
pushq %rax
leaq 0x389a(%rip), %rdi      # 0x627d
leaq 0x26fd(%rip), %rsi      # 0x50e7
leaq 0x2716(%rip), %rcx      # 0x5107
movl $0xd6, %edx
callq 0x20f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/libcuckoo/./cuckoohash_map.hh
// Function: cuckoohash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 4ul>::reserve_calc(unsigned long)
static size_type reserve_calc(const size_type n) {
    const size_type buckets = (n + slot_per_bucket() - 1) / slot_per_bucket();
    size_type blog2;
    for (blog2 = 0; (size_type(1) << blog2) < buckets; ++blog2)
      ;
    assert(n <= buckets * slot_per_bucket() && buckets <= hashsize(blog2));
    return blog2;
  }

// Assembly:
leaq 0x3(%rdi), %rax
movq %rax, %rdx
shrq $0x2, %rdx
pushq $-0x1
popq %rcx
pushq $0x1
popq %rsi
incq %rcx
movq %rsi, %r8
shlq %cl, %r8
cmpq %rdx, %r8
jb 0x2a0d
andq $-0x4, %rax
cmpq %rdi, %rax
jb 0x2a28
movq %rcx, %rax
retq
pushq %rax
leaq 0x281f(%rip), %rdi      # 0x524f
leaq 0x2857(%rip), %rsi      # 0x528e
leaq 0x2864(%rip), %rcx      # 0x52a2
movl $0x71f, %edx            # imm = 0x71F
callq 0x20f0