LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::GetNumberOfHitsArray(int*)
void LMF_IO::GetNumberOfHitsArray(__int32 cnt[]) {
/////////////////////////////////////////////////////////////////
	__int32 i;

	if (must_read_first) {
		if (!ReadNextEvent()) return;
	}

	for (i=0;i<num_channels;++i) cnt[i] = (number_of_hits[i] < (unsigned __int32)(num_ions)) ? number_of_hits[i] : num_ions;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x2b4c(%rdi)
jne 0x120bf
movq %r14, %rdi
callq 0x1029e
testb %al, %al
je 0x120f3
cmpl $0x0, 0x2b70(%r14)
jle 0x120f3
movq 0x2b50(%r14), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl 0x2b74(%r14), %esi
cmpl %esi, %edx
cmovbl %edx, %esi
movl %esi, (%rbx,%rcx,4)
incq %rcx
movslq 0x2b70(%r14), %rdx
cmpq %rdx, %rcx
jl 0x120d2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/./LMF_IO.h
// Function: MyFILE::read(char*, int)
void read(__int8* string,__int32 length_bytes) {
		unsigned __int32 read_bytes = (unsigned __int32)(fread(string,1,length_bytes,file));
		if (read_bytes != (unsigned)length_bytes) {
			error = 1;
			if (feof(file)) eof = true;
		}
		position += length_bytes;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movslq %edx, %r14
movq (%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
callq 0x21d0
cmpl %r14d, %eax
je 0x139e8
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x2200
testl %eax, %eax
je 0x139e8
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/./LMF_IO.h
// Function: MyFILE::open(char*)
bool open(__int8* name) {
		if (file) {error = 1; return false;}
		eof = false;
		if (mode_reading) {
			file = fopen(name,"rb");
			if (!file) {error = 1; return false;}
			_fseeki64(file,  (unsigned __int64)0, SEEK_END);
			filesize = _ftelli64(file);
			_fseeki64(file,  (unsigned __int64)0, SEEK_SET);
		} else file = fopen(name,"wb");
		if (file) return true; else {error = 1; return false;}
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x13bcf
movl $0x1, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
retq
movb $0x0, 0xc(%rbx)
cmpb $0x1, 0x18(%rbx)
jne 0x13c1c
leaq 0x1867(%rip), %rax      # 0x15447
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, (%rbx)
testq %rax, %rax
je 0x13bc4
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x20c0
movq (%rbx), %rdi
callq 0x2180
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20c0
jmp 0x13c31
leaq 0x1827(%rip), %rax      # 0x1544a
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, (%rbx)
movb $0x1, %al
cmpq $0x0, (%rbx)
jne 0x13bcd
jmp 0x13bc4
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/./LMF_IO.h
// Function: MyFILE::read(unsigned int*, int)
void read(unsigned __int32 * dest,__int32 length_bytes) {
		unsigned __int32 read_bytes = (unsigned __int32)(fread(dest,1,length_bytes,file));
		if (read_bytes != (unsigned)length_bytes) {
			error = 1;
			if (feof(file)) eof = true;
		}
		position += length_bytes;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movslq %edx, %r14
movq (%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
callq 0x21d0
cmpl %r14d, %eax
je 0x13d46
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x2200
testl %eax, %eax
je 0x13d46
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./NN.cpp
// Function: Neuron::Neuron(unsigned int, unsigned int)
Neuron::Neuron(unsigned numOutputs, unsigned myIndex)
{
	for (unsigned c = 0; c < numOutputs; ++c) {

		m_outputWeights.push_back(connection());
		m_outputWeights[c].weight = ((rand() / double(RAND_MAX))*2.0f-1.0f);
		m_outputWeights[c].deltaweight = 0.0f;


	}

	m_myIndex = myIndex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movq %rdi, %r14
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
testl %esi, %esi
je 0x259c
leaq 0x10(%r14), %r15
movl %esi, %r13d
shlq $0x4, %r13
xorl %ebx, %ebx
leaq -0x40(%rbp), %r12
xorpd %xmm0, %xmm0
movapd %xmm0, -0x40(%rbp)
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0x2557
movupd %xmm0, (%rsi)
addq $0x10, 0x18(%r14)
jmp 0x2562
movq %r15, %rdi
movq %r12, %rdx
callq 0x60b6
callq 0x2050
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x4a92(%rip), %xmm0     # 0x7008
addsd %xmm0, %xmm0
addsd 0x4a8e(%rip), %xmm0     # 0x7010
movq (%r15), %rax
movsd %xmm0, (%rax,%rbx)
movq $0x0, 0x8(%rax,%rbx)
addq $0x10, %rbx
cmpq %rbx, %r13
jne 0x2539
movl -0x2c(%rbp), %eax
movl %eax, 0x38(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r15), %rdi
testq %rdi, %rdi
je 0x25c2
callq 0x21a0
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./NN.cpp
// Function: Neuron::feedForward(std::vector<Neuron, std::allocator<Neuron>>&)
void Neuron::feedForward(Layer &prevLayer)
{
	double sum = 0.0;
	for (unsigned n = 0; n < prevLayer.size(); ++n) {
		sum += prevLayer[n].getOutputVal() *
			prevLayer[n].m_outputWeights[m_myIndex].weight;
	}
	m_outputVal = sum;
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x2615
pushq %rbp
movq %rsp, %rbp
sarq $0x6, %rcx
movl 0x38(%rdi), %edx
addq $0x30, %rax
xorpd %xmm0, %xmm0
movl $0x1, %esi
shlq $0x4, %rdx
movsd (%rax), %xmm1
movq -0x20(%rax), %r8
mulsd (%r8,%rdx), %xmm1
addsd %xmm1, %xmm0
movl %esi, %r8d
addq $0x40, %rax
incl %esi
cmpq %r8, %rcx
ja 0x25f2
popq %rbp
jmp 0x2619
xorpd %xmm0, %xmm0
movsd %xmm0, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./Network.cpp
// Function: Network::Network(std::vector<unsigned int, std::allocator<unsigned int>> const&)
Network::Network(const vector <unsigned> &topology)
{
	srand((unsigned int)time(NULL));

	unsigned numLayers = topology.size();
	for (unsigned layerNum = 0; layerNum < numLayers; layerNum++) {
		m_layers.push_back(Layer());
		unsigned numOutputs = layerNum == topology.size() - 1 ? 0 : topology[layerNum + 1];



		// We have a new layer, now fill it with neurons, and a bias neuron in each layer.
		for (unsigned neuronNum = 0; neuronNum < topology[layerNum]; neuronNum++) {
			m_layers.back().push_back(Neuron(numOutputs, neuronNum)); 
		}
	}


	//for stone and bray sfa
	for(int i=0;i<topology.back();i++)
	{
		NormalizeWeights(i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
movq $0x0, 0x10(%rdi)
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
movq 0x8(%rbx), %rax
movq %rbx, -0x30(%rbp)
subq (%rbx), %rax
shrq $0x2, %rax
testl %eax, %eax
je 0x2776
movl %eax, %eax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
leaq -0x80(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x6204
movq %r15, %rdi
callq 0x37a0
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
xorl %r12d, %r12d
cmpq %r14, %rcx
je 0x2715
movl 0x4(%rax,%r14,4), %r12d
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x2769
xorl %r13d, %r13d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rbx
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x24fc
addq $-0x18, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x642e
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2759
callq 0x21a0
incl %r13d
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl (%rax,%r14,4), %r13d
jb 0x2726
incq %r14
cmpq -0x40(%rbp), %r14
jne 0x26d0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, -0x4(%rax)
je 0x27a4
xorl %r15d, %r15d
movq -0x38(%rbp), %rdi
movl %r15d, %esi
callq 0x27ea
incl %r15d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpl -0x4(%rax), %r15d
jb 0x2787
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x37a0
jmp 0x27d9
jmp 0x27c3
movq %rax, %r14
jmp 0x27d9
movq %rax, %r14
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x27d9
callq 0x21a0
movq -0x38(%rbp), %rdi
callq 0x37ec
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./Network.cpp
// Function: Network::UpdateWeights()
void Network::UpdateWeights()
{
	for (unsigned layerNum = 1; layerNum < m_layers.size(); layerNum++) {
		Layer& layer = m_layers[layerNum];
		Layer& prevLayer = m_layers[layerNum - 1];

		for (unsigned n = 0; n < prevLayer.size(); n++) {
			Neuron* neuron = &(prevLayer[n]);

			neuron->NaivelyUpdateWeights();
		}
	}	
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq $0x2, %rcx
jb 0x2b05
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edx
leal -0x1(%rdx), %esi
leaq (%rsi,%rsi,2), %rdi
movq (%rax,%rdi,8), %rsi
movq 0x8(%rax,%rdi,8), %rdi
subq %rsi, %rdi
je 0x2afd
sarq $0x6, %rdi
xorl %r8d, %r8d
movq %r8, %r10
shlq $0x6, %r10
movq 0x10(%rsi,%r10), %r9
movq 0x18(%rsi,%r10), %r10
subq %r9, %r10
je 0x2af2
sarq $0x4, %r10
cmpq $0x1, %r10
adcq $0x0, %r10
movsd 0x8(%r9), %xmm0
addsd (%r9), %xmm0
movsd %xmm0, (%r9)
addq $0x10, %r9
decq %r10
jne 0x2ad9
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdi
ja 0x2ab7
incl %edx
cmpq %rdx, %rcx
ja 0x2a9b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./Network.cpp
// Function: Network::feedForward(std::vector<double, std::allocator<double>>&)
void Network::feedForward(vector <double> &inputVals)
{
	assert(inputVals.size() == m_layers[0].size());
	// Assign (latch) the input values into the input neurons
	for (unsigned i = 0; i < inputVals.size(); i++) {
		m_layers[0][i].setOutputVal(inputVals[i]);
	}
	// forward propagate
	for (unsigned layerNum = 1; layerNum < m_layers.size(); ++layerNum) {
		Layer &prevLayer = m_layers[layerNum - 1];
		for (unsigned n = 0; n < m_layers[layerNum].size(); n++) {
			m_layers[layerNum][n].feedForward(prevLayer);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rcx
movq 0x8(%rsi), %r8
movq %r8, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movq (%rdi), %rax
movq (%rax), %rsi
movq 0x8(%rax), %r9
subq %rsi, %r9
sarq $0x6, %r9
cmpq %r9, %rdx
jne 0x2c49
cmpq %rcx, %r8
je 0x2b69
movl $0x1, %r8d
xorl %r9d, %r9d
movsd (%rcx,%r9), %xmm0
movsd %xmm0, 0x30(%rsi,%r9,8)
movl %r8d, %r10d
addq $0x8, %r9
incl %r8d
cmpq %r10, %rdx
ja 0x2b4d
movq 0x8(%rdi), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
movq %rcx, -0x30(%rbp)
cmpq $0x2, %rcx
jb 0x2c3a
movl $0x1, %edx
movl $0x1, %esi
leaq (%rsi,%rsi,2), %rdi
movq (%rax,%rdi,8), %rsi
movq 0x8(%rax,%rdi,8), %rdi
subq %rsi, %rdi
je 0x2c2b
sarq $0x6, %rdi
leal -0x1(%rdx), %r8d
leaq (%r8,%r8,2), %r9
movq (%rax,%r9,8), %r8
movq 0x8(%rax,%r9,8), %r9
movq %r9, %r10
subq %r8, %r10
sarq $0x6, %r10
leaq 0x30(%r8), %r11
xorl %ebx, %ebx
movq %rbx, %r14
shlq $0x6, %r14
addq %rsi, %r14
cmpq %r8, %r9
je 0x2c1a
movl 0x38(%r14), %r15d
xorpd %xmm0, %xmm0
movl $0x1, %r12d
shlq $0x4, %r15
movq %r11, %r13
movsd (%r13), %xmm1
movq -0x20(%r13), %rcx
mulsd (%rcx,%r15), %xmm1
addsd %xmm1, %xmm0
movl %r12d, %ecx
addq $0x40, %r13
incl %r12d
cmpq %rcx, %r10
ja 0x2bf5
jmp 0x2c1e
xorpd %xmm0, %xmm0
movsd %xmm0, 0x30(%r14)
incl %ebx
cmpq %rbx, %rdi
ja 0x2bd1
incl %edx
movq %rdx, %rsi
cmpq %rdx, -0x30(%rbp)
ja 0x2b9a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4450(%rip), %rdi      # 0x70a0
leaq 0x4470(%rip), %rsi      # 0x70c7
leaq 0x4477(%rip), %rcx      # 0x70d5
movl $0x7c, %edx
callq 0x20f0
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./Network.cpp
// Function: Network::GetWeights() const
vector<double>  Network::GetWeights() const
{
	//this will hold the weights
	vector<double> weights;
	//for each layer
	for (int i = 0; i<m_layers.size()-1; ++i)
	{
		//for each neuron
		for (int j = 0; j<m_layers[i].size(); ++j)
		{
			//for each weight
			for (int k = 0; k<m_layers[i][j].m_outputWeights.size(); ++k)
			{
				weights.push_back(m_layers[i][j].m_outputWeights[k].weight);
			}
		}
	}
	return weights;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x18, %rax
je 0x2e26
xorl %ecx, %ecx
movq %rsi, -0x30(%rbp)
movq (%rsi), %rax
movq %rcx, -0x38(%rbp)
leaq (%rcx,%rcx,2), %rdx
movq 0x8(%rax,%rdx,8), %rcx
cmpq (%rax,%rdx,8), %rcx
je 0x2dfa
xorl %r12d, %r12d
movq (%rsi), %rax
movq %rdx, %r13
movq (%rax,%rdx,8), %rax
movq %r12, -0x40(%rbp)
shlq $0x6, %r12
movq 0x10(%rax,%r12), %rdx
cmpq %rdx, 0x18(%rax,%r12)
je 0x2dd3
xorl %r15d, %r15d
xorl %r14d, %r14d
addq %r15, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2da3
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2dab
movq %rbx, %rdi
callq 0x67d2
incq %r14
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x10(%rax,%r12), %rdx
movq 0x18(%rax,%r12), %rax
subq %rdx, %rax
sarq $0x4, %rax
addq $0x10, %r15
cmpq %r14, %rax
ja 0x2d84
movq -0x40(%rbp), %r12
incq %r12
movq -0x30(%rbp), %rsi
movq (%rsi), %rax
movq %r13, %rdx
movq 0x8(%rax,%r13,8), %rcx
subq (%rax,%r13,8), %rcx
sarq $0x6, %rcx
cmpq %r12, %rcx
ja 0x2d60
movq -0x38(%rbp), %rcx
incq %rcx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rax
decq %rax
cmpq %rcx, %rax
ja 0x2d43
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2e48
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./Network.cpp
// Function: Network::PutWeights(std::vector<double, std::allocator<double>>&)
void Network::PutWeights(vector<double> &weights)
{
	int cWeight = 0;
	//for each layer
	for (int i = 0; i<m_layers.size()-1; ++i)
	{
		//for each neuron
		for (int j = 0; j<m_layers[i].size(); ++j)
		{
			//for each weight
			for (int k = 0; k<m_layers[i][j].m_outputWeights.size(); ++k)
			{
				m_layers[i][j].m_outputWeights[k].weight = weights[cWeight++];
			}
		}
	}
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
decq %rcx
je 0x2f17
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %edx, %edx
xorl %edi, %edi
leaq (%rdx,%rdx,2), %r9
movq (%rax,%r9,8), %r8
movq 0x8(%rax,%r9,8), %r9
subq %r8, %r9
je 0x2f01
sarq $0x6, %r9
movq (%rsi), %r10
cmpq $0x1, %r9
adcq $0x0, %r9
xorl %r11d, %r11d
movq %r11, %r14
shlq $0x6, %r14
movq 0x10(%r8,%r14), %rbx
movq 0x18(%r8,%r14), %r15
subq %rbx, %r15
je 0x2ef9
sarq $0x4, %r15
cmpq $0x1, %r15
movl $0x0, %r14d
sbbq %r15, %r14
movslq %edi, %r15
leaq (%r10,%r15,8), %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movsd (%r12,%r13), %xmm0
movsd %xmm0, (%rbx,%r13,2)
addq $0x8, %r13
decq %r15
cmpq %r15, %r14
jne 0x2ede
subl %r15d, %edi
incq %r11
cmpq %r9, %r11
jne 0x2eaa
incq %rdx
cmpq %rcx, %rdx
jne 0x2e86
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./stats.h
// Function: sum(std::vector<double, std::allocator<double>>)
double sum(vector<double> a)
{
	double s = 0;
	for (int i = 0; i < a.size(); i++)
	{
		s += a[i];
	}
	return s;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x2f49
pushq %rbp
movq %rsp, %rbp
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
addsd (%rax,%rdx,8), %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x2f3a
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./stats.h
// Function: sqsum(std::vector<double, std::allocator<double>>)
double sqsum(vector<double> a)
{
	double s = 0;
	for (int i = 0; i < a.size(); i++)
	{
		s += pow(a[i], 2);
	}
	return s;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x3024
pushq %rbp
movq %rsp, %rbp
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x300d
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./stats.h
// Function: operator-(std::vector<double, std::allocator<double>>, double)
vector<double> operator-(vector<double> a, double b)
{
	vector<double> retvect;
	for (int i = 0; i < a.size(); i++)
	{
		retvect.push_back(a[i] - b);
	}
	return retvect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x31e8
movq %rsi, %r14
xorl %r12d, %r12d
leaq -0x30(%rbp), %r15
movsd (%rax,%r12,8), %xmm0
subsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x31c7
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x31d2
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6696
incq %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x319f
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3208
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./stats.h
// Function: operator*(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
vector<double> operator*(vector<double> a, vector<double> b)
{
	vector<double> retvect;
	for (int i = 0; i < a.size() ; i++)
	{
		retvect.push_back(a[i] * b[i]);
	}
	return retvect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x3294
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq -0x30(%rbp), %r12
movsd (%rax,%r13,8), %xmm0
movq (%r14), %rax
mulsd (%rax,%r13,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3273
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x327e
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6696
incq %r13
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x3247
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x32b6
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/main.cpp
// Function: main
int main() {

  SFA sfa1((ro_VALS[0]),1);
  sfa1.Train();

  SFA sfa2((ro_VALS[1]),1);
  sfa2.Train();

  SFA sfa3((ro_VALS[2]),1);
  sfa3.Train();

  SFA sfa4((ro_VALS[3]),1);
  sfa4.Train();

  SFA sfa5((ro_VALS[4]),1);
  sfa5.Train();

  SFA sfa6((ro_VALS[5]),1);
  sfa6.Train();

  SFA sfa7((ro_VALS[6]),1);
  sfa7.Train();


//   sfa.TrainTwoInvariances();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x15a8, %rsp           # imm = 0x15A8
movq 0x6c02(%rip), %rax      # 0xa190
cvtsd2ss (%rax), %xmm0
leaq -0x15b0(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3904
movq %rbx, %rdi
callq 0x4196
movq 0x6bdb(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x8(%rax), %xmm0
leaq -0x1298(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0x1298(%rbp), %rdi
callq 0x4196
movq 0x6baf(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rax), %xmm0
leaq -0xf80(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0xf80(%rbp), %rdi
callq 0x4196
movq 0x6b83(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x18(%rax), %xmm0
leaq -0xc68(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0xc68(%rbp), %rdi
callq 0x4196
movq 0x6b57(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x20(%rax), %xmm0
leaq -0x950(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0x950(%rbp), %rdi
callq 0x4196
movq 0x6b2b(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x28(%rax), %xmm0
leaq -0x638(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0x638(%rbp), %rdi
callq 0x4196
movq 0x6aff(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x30(%rax), %xmm0
leaq -0x320(%rbp), %rdi
movl $0x1, %esi
callq 0x3904
leaq -0x320(%rbp), %rdi
callq 0x4196
leaq -0x320(%rbp), %rdi
callq 0x4be4
leaq -0x638(%rbp), %rdi
callq 0x4be4
leaq -0x950(%rbp), %rdi
callq 0x4be4
leaq -0xc68(%rbp), %rdi
callq 0x4be4
leaq -0xf80(%rbp), %rdi
callq 0x4be4
leaq -0x1298(%rbp), %rdi
callq 0x4be4
leaq -0x15b0(%rbp), %rdi
callq 0x4be4
xorl %eax, %eax
addq $0x15a8, %rsp           # imm = 0x15A8
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x320(%rbp), %rdi
callq 0x4be4
jmp 0x372c
jmp 0x3729
movq %rax, %rbx
leaq -0x638(%rbp), %rdi
callq 0x4be4
jmp 0x373f
jmp 0x373c
movq %rax, %rbx
leaq -0x950(%rbp), %rdi
callq 0x4be4
jmp 0x3752
jmp 0x374f
movq %rax, %rbx
leaq -0xc68(%rbp), %rdi
callq 0x4be4
jmp 0x3765
jmp 0x3762
movq %rax, %rbx
leaq -0xf80(%rbp), %rdi
callq 0x4be4
leaq -0x1298(%rbp), %rdi
callq 0x4be4
leaq -0x15b0(%rbp), %rdi
callq 0x4be4
movq %rbx, %rdi
callq 0x2290
jmp 0x3793
movq %rax, %rbx
jmp 0x3771
jmp 0x379a
movq %rax, %rbx
jmp 0x377d
nop
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::GetSignalValue(int)
int GetSignalValue(int time) //gets value of signal at time
    {
        int j = round(51.0f + 50.0f*sin(M_PI/180.0f*double(time)*360.0f / ro));
        input_vector.clear();
        for(int i=1;i<=NUM_INPUT_NEURONS_X;i++)
        {
            if(i != j)
                input_vector.push_back(0.0f);
            else if(i == j)
                input_vector.push_back(1.0f);
        }
        return j;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cvtsi2sd %esi, %xmm0
mulsd 0x1ec0(%rip), %xmm0     # 0x7040
mulsd 0x1ec0(%rip), %xmm0     # 0x7048
divsd 0x1d0(%rdi), %xmm0
callq 0x2040
mulsd 0x1e8b(%rip), %xmm0     # 0x7028
addsd 0x1eab(%rip), %xmm0     # 0x7050
callq 0x20b0
movq 0x108(%rbx), %rax
cmpq %rax, 0x110(%rbx)
je 0x51c1
movq %rax, 0x110(%rbx)
cvttsd2si %xmm0, %eax
movq %rax, -0x38(%rbp)
cmpl $0x0, 0x1c0(%rbx)
je 0x5250
leaq 0x108(%rbx), %r15
movq -0x38(%rbp), %rax
leal -0x1(%rax), %r13d
xorl %r14d, %r14d
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
cmpl %r14d, %r13d
jne 0x520c
movq %r12, -0x30(%rbp)
movq 0x110(%rbx), %rsi
cmpq 0x118(%rbx), %rsi
je 0x5238
movq %r12, (%rsi)
jmp 0x522b
movq $0x0, -0x30(%rbp)
movq 0x110(%rbx), %rsi
cmpq 0x118(%rbx), %rsi
je 0x5238
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x110(%rbx)
jmp 0x5244
movq %r15, %rdi
leaq -0x30(%rbp), %rdx
callq 0x6696
incl %r14d
cmpl 0x1c0(%rbx), %r14d
jb 0x51ee
movq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::OscillateFeedForward(int, int)
void OscillateFeedForward(int signal_value, int time_step)
    {
        int sig_val = GetSignalValue(time_step);
        for(int neuron_index=0;neuron_index<NUM_INPUT_NEURONS_X;neuron_index++)
        {
            UpdateX(neuron_index);
        }
        V = getV(V,y,y_bar);
        U = getU(U,y,y_tilde);
        y = GetY(sig_val);
        y_bar = getYBar(y,y_bar);
        y_tilde = getYTilde(y,y_tilde);

        for(int neuron_index = 0;neuron_index<NUM_INPUT_NEURONS_X;neuron_index++)
        {
            Layer* inputLayer = &(getNetwork()->m_layers[0]);
            Neuron* thisNeuron = &(*inputLayer)[neuron_index];
            double dw = CalculateDelWeights(neuron_index);
            UpdateNeuron(thisNeuron,neuron_index);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl %edx, %esi
callq 0x5160
movl 0x1c0(%rbx), %ecx
testq %rcx, %rcx
je 0x52f2
movq 0x90(%rbx), %rdx
movq 0xa8(%rbx), %rsi
movq 0x108(%rbx), %rdi
xorl %r8d, %r8d
movsd 0x1db4(%rip), %xmm0     # 0x7058
movsd 0x78(%rbx), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
mulsd (%rdi,%r8,8), %xmm2
mulsd (%rdx,%r8,8), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, (%rdx,%r8,8)
movsd 0x70(%rbx), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
mulsd (%rdi,%r8,8), %xmm2
mulsd (%rsi,%r8,8), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, (%rsi,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x52a4
movsd 0x290(%rbx), %xmm0
movsd 0x70(%rbx), %xmm1
movsd 0x1d51(%rip), %xmm2     # 0x7058
subsd %xmm1, %xmm2
movapd %xmm0, %xmm3
subsd 0x158(%rbx), %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm3
movsd 0x168(%rbx), %xmm4
mulsd %xmm1, %xmm4
addsd %xmm3, %xmm4
movsd %xmm4, 0x168(%rbx)
subsd 0x150(%rbx), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm0
mulsd 0x160(%rbx), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x160(%rbx)
movq %rbx, %rdi
movl %eax, %esi
callq 0x5a6a
movsd %xmm0, 0x290(%rbx)
movsd 0x70(%rbx), %xmm1
movsd 0x78(%rbx), %xmm2
movsd 0x1cd9(%rip), %xmm4     # 0x7058
movapd %xmm4, %xmm3
subsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
mulsd 0x158(%rbx), %xmm1
addsd %xmm3, %xmm1
movsd %xmm1, 0x158(%rbx)
movapd %xmm4, %xmm1
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
mulsd 0x150(%rbx), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x150(%rbx)
cmpl $0x0, 0x1c0(%rbx)
je 0x540d
movl $0x10, %r15d
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %r12
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5ac6
movq (%r12,%r15), %rax
movq 0xc0(%rbx), %rcx
movsd (%rcx,%r14,8), %xmm0
movsd %xmm0, 0x8(%rax)
incq %r14
movl 0x1c0(%rbx), %eax
addq $0x40, %r15
cmpq %rax, %r14
jb 0x53d1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::CalculateDelWeights(int)
double CalculateDelWeights(int i)
    {
        double alphaV = alpha/V;
        double alphaU = alpha/U;

  /*      if(isnan(alphaV))
            alphaV = 0.0f;
        if(isnan(alphaU))
            alphaU = 0.0f;
    */
    
            
        double dely = y-y_bar;
        double delyt = y-y_tilde;
        double hebbian = alphaV * dely * (input_vector[i] - x_bar_vector[i]);
        double antihebbian = -1.0f*(alphaU * delyt * (input_vector[i] - x_tilde_vector[i]));
        del_weight_vector[i] = hebbian + antihebbian;

        return del_weight_vector[i];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x68(%rdi), %xmm1
movapd %xmm1, %xmm0
divsd 0x168(%rdi), %xmm0
movsd 0x290(%rdi), %xmm2
movapd %xmm2, %xmm3
subsd 0x158(%rdi), %xmm3
subsd 0x150(%rdi), %xmm2
mulsd %xmm0, %xmm3
movslq %esi, %rax
movq 0x108(%rdi), %rcx
movsd (%rcx,%rax,8), %xmm4
movq 0xa8(%rdi), %rcx
movapd %xmm4, %xmm0
subsd (%rcx,%rax,8), %xmm0
mulsd %xmm3, %xmm0
movq 0x90(%rdi), %rcx
subsd (%rcx,%rax,8), %xmm4
divsd 0x160(%rdi), %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm4, %xmm1
subsd %xmm1, %xmm0
movq 0xc0(%rdi), %rcx
movsd %xmm0, (%rcx,%rax,8)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::GetOutput(int)
double GetOutput(int signal_value)
    {
        resultUni.clear();
        feedforward(GenerateInputs(signal_value)); //feed input vector into sfa model
        getNetwork()->getResults(resultUni);
        return resultUni.back();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %edx
movq %rdi, %rbx
movq 0x258(%rdi), %rax
cmpq %rax, 0x260(%rdi)
je 0x5b75
movq %rax, 0x260(%rbx)
leaq 0x258(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5bc6
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2b06
movq (%r15), %rdi
testq %rdi, %rdi
je 0x5ba3
callq 0x21a0
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x2c68
movq 0x260(%rbx), %rax
movsd -0x8(%rax), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::GenerateInputs(int)
vector<double> GenerateInputs(int number_to_encode)                    
    {
        vector<double> inputVector; //one hot encoding
        inputVector.clear();
        for(int neuron_index=1;neuron_index<=NUM_INPUT_NEURONS_X;neuron_index++)
        {   
            if(number_to_encode == (neuron_index))
            {
                inputVector.push_back(1.0f);
            }
            else
            {
                inputVector.push_back(0.0f);
            }                
        }
        return inputVector;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rdi)
je 0x5bfa
movq $0x0, 0x8(%rbx)
cmpl $0x0, 0x1c0(%r15)
je 0x5c75
decl %r14d
xorl %r13d, %r13d
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
cmpl %r13d, %r14d
jne 0x5c2c
movq %r12, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5c4f
movq %r12, (%rsi)
jmp 0x5c45
movq $0x0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5c5d
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x5c69
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x6696
jmp 0x5c69
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x6696
incl %r13d
cmpl 0x1c0(%r15), %r13d
jb 0x5c14
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c89
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5c99
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::BufferManager(int)
BufferManager::BufferManager(int num_buffers) {
	this->numPages = num_buffers;
	this->pageSize = PAGE_SIZE;
	this->buffers = new Frame[num_buffers];
	for(int i=0;i<num_buffers;i++) {
		buffers[i].data = new char[this->pageSize];
		freeList.push_back(i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x18(%rdi), %r12
movq %r12, 0x20(%rdi)
movq %r12, 0x18(%rdi)
movq %rax, 0x28(%rdi)
leaq 0x70(%rdi), %rax
movq %rax, 0x40(%rdi)
movq $0x1, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movl $0x3f800000, 0x60(%rdi) # imm = 0x3F800000
movups %xmm0, 0x68(%rdi)
movl %esi, 0x38(%rdi)
movl $0x1000, 0x3c(%rdi)     # imm = 0x1000
movslq %esi, %r15
movl $0x18, %ecx
movq %r15, %rax
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
movq %r12, -0x30(%rbp)
callq 0x2030
testl %r14d, %r14d
je 0x250c
shlq $0x3, %r15
leaq (%r15,%r15,2), %rcx
xorl %edx, %edx
movq $-0x1, 0x4(%rax,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x24fa
movq %rax, 0x30(%rbx)
testl %r14d, %r14d
jle 0x2569
movl %r14d, %r14d
movl $0x10, %r15d
xorl %r13d, %r13d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl 0x3c(%rbx), %eax
testl %eax, %eax
cmovsl %r12d, %eax
movslq %eax, %rdi
callq 0x2030
movq 0x30(%rbx), %rcx
movq %rax, (%rcx,%r15)
movl $0x18, %edi
callq 0x21b0
movl %r13d, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
incq %r13
addq $0x18, %r15
cmpq %r13, %r14
jne 0x2527
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x257a
movq %rax, %r14
leaq 0x40(%rbx), %rdi
callq 0x30ea
movq -0x30(%rbp), %r12
movq (%r12), %rdi
cmpq %r12, %rdi
je 0x25a3
movq (%rdi), %r15
callq 0x2180
movq %r15, %rdi
cmpq %r12, %r15
jne 0x2593
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x25bb
movq (%rdi), %r15
callq 0x2180
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x25ab
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::~BufferManager()
BufferManager::~BufferManager() {
	//free up allocated memory
	for(int i=0;i<this->numPages;i++) 
		delete buffers[i].data;
	delete this->buffers;
	freeList.clear();
	usedList.clear();
	hashTable.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x38(%rdi)
jle 0x2602
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0x25f2
callq 0x2180
incq %r15
movslq 0x38(%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0x25e0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2610
callq 0x2180
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x2628
movq (%rdi), %r14
callq 0x2180
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2618
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %rdi
cmpq %r15, %rdi
je 0x2654
movq (%rdi), %r14
callq 0x2180
movq %r14, %rdi
cmpq %r15, %r14
jne 0x2644
movq %r15, 0x20(%rbx)
movq %r15, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
leaq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x3112
movq %r14, %rdi
callq 0x30ea
movq 0x18(%rbx), %rdi
cmpq %r15, %rdi
je 0x2691
movq (%rdi), %r14
callq 0x2180
movq %r14, %rdi
cmpq %r15, %r14
jne 0x2681
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x26a9
movq (%rdi), %r14
callq 0x2180
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2699
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::GetPage(PageDescriptor)
char* BufferManager::GetPage(PageDescriptor pd) {
	auto slot = hashTable.find(pd);
	if(slot!=hashTable.end()) {
		//already in buffer 
		int slotNo = slot->second;
		// no need to read the page
		// to establish replacement policy, make page MRU 
		usedList.remove(slotNo); 
		usedList.push_front(slotNo); // put at front
		return buffers[slotNo].data;
	}
	else {
		// page not in buffers
		// find a suitable slot to load it
		int slotNo = FindSlot();
		if(slotNo==-1) throw NoBufferSpaceException (); //error no free slot could be obtained 
		// read data to the slot 
		bool _read_res = ReadPage(pd,buffers[slotNo].data);
		if(!_read_res) // read failed 
			throw BufferManagerException("BufferManagerException : Read request failed");
		// insert into hashTable the corresponding slot
		hashTable.insert(make_pair(pd,slotNo));
		// initialize the rest of Frame elements
		InitializeBuffer(pd,slotNo);
		return buffers[slotNo].data;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %rax
movq %rsi, (%rax)
leaq 0x40(%rdi), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x31be
testq %rax, %rax
je 0x272c
movl 0x10(%rax), %eax
leaq -0x38(%rbp), %r14
movl %eax, (%r14)
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x305a
movq 0x18(%rbx), %r15
movl $0x18, %edi
callq 0x21b0
movl (%r14), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2050
incq 0x28(%rbx)
movq 0x30(%rbx), %rax
movslq (%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
jmp 0x278c
movq %rbx, %rdi
callq 0x27ec
cmpl $-0x1, %eax
je 0x2799
movl %eax, %r15d
movq -0x28(%rbp), %rsi
movq 0x30(%rbx), %rax
movslq %r15d, %rcx
leaq (%rcx,%rcx,2), %r12
movq 0x10(%rax,%r12,8), %rdx
movq %rbx, %rdi
callq 0x2910
testb %al, %al
je 0x27b6
movq -0x28(%rbp), %rax
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
movl %r15d, 0x8(%rsi)
movq %r14, %rdi
callq 0x3256
movq -0x28(%rbp), %rax
movq 0x30(%rbx), %rcx
movq %rax, 0x4(%rcx,%r12,8)
movw $0x100, (%rcx,%r12,8)   # imm = 0x100
movq 0x10(%rcx,%r12,8), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20f0
leaq 0x5506(%rip), %rcx      # 0x7cb0
movq %rcx, (%rax)
leaq 0x54bc(%rip), %rsi      # 0x7c70
jmp 0x27dc
movl $0x10, %edi
callq 0x20f0
leaq 0x5511(%rip), %rcx      # 0x7cd8
movq %rcx, (%rax)
leaq 0x284c(%rip), %rcx      # 0x501d
movq %rcx, 0x8(%rax)
leaq 0x54ac(%rip), %rsi      # 0x7c88
movq 0x57fd(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::FindSlot()
int BufferManager::FindSlot() {
	// if free slot available
	if(!freeList.empty()) {
		int slot = freeList.front();
		freeList.pop_front();
		usedList.push_front(slot);
		return slot;
	}
	else {
		// since used list has MRU in front 
		// start search for a unpinned page from last 
		for(auto slot = usedList.rbegin();slot!=usedList.rend();slot++) {
			if(!buffers[*slot].pinned) {
				// page will be replaced
				// if dirty write to the file
				if(buffers[*slot].dirty) {
					int _res = WritePage(buffers[*slot].pageDescriptor,buffers[*slot].data);
					if(_res<0) continue;
					buffers[*slot].dirty=false;
				}
				//remove from hash table , and usedList
				hashTable.erase(buffers[*slot].pageDescriptor);
				// move the slot to MRU (front of used list)
				int slot_val = *slot;
				usedList.remove(slot_val);
				usedList.push_front(slot_val);
				return slot_val;
			}
		}
	}
	return -1; // no slot available
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
cmpq %rdi, %r15
je 0x283f
movl 0x10(%r15), %r14d
decq 0x10(%rbx)
movq %r15, %rdi
callq 0x2230
movq %r15, %rdi
callq 0x2180
movq 0x18(%rbx), %r15
movl $0x18, %edi
callq 0x21b0
movl %r14d, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2050
incq 0x28(%rbx)
jmp 0x2901
leaq 0x18(%rbx), %r14
movq 0x18(%rbx), %rcx
movq 0x30(%rbx), %rax
movq %r14, %rsi
cmpq %rcx, %rsi
je 0x28fb
movq %rsi, %r15
movq 0x8(%rsi), %rsi
movslq 0x10(%rsi), %rdx
leaq (%rdx,%rdx,2), %rdx
cmpb $0x0, 0x1(%rax,%rdx,8)
jne 0x284e
cmpb $0x1, (%rax,%rdx,8)
jne 0x2899
movq 0x4(%rax,%rdx,8), %rsi
movq 0x10(%rax,%rdx,8), %rdx
movq %rbx, %rdi
callq 0x2c92
movq 0x30(%rbx), %rax
movq 0x8(%r15), %rcx
movslq 0x10(%rcx), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x0, (%rax,%rcx,8)
leaq 0x40(%rbx), %rdi
movq 0x30(%rbx), %rax
movq 0x8(%r15), %rcx
movslq 0x10(%rcx), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rsi
addq $0x4, %rsi
callq 0x3524
movq 0x8(%r15), %rax
movl 0x10(%rax), %eax
leaq -0x1c(%rbp), %r15
movl %eax, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x305a
movq 0x18(%rbx), %r14
movl $0x18, %edi
callq 0x21b0
movl (%r15), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2050
incq 0x28(%rbx)
movl (%r15), %r14d
jmp 0x2901
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::ReadPage(PageDescriptor, char*)
bool BufferManager::ReadPage(PageDescriptor pd,char *dest) {
	// calculate file offset
	long offset = pd.pagenum*(long)pageSize + FILE_HDR_SIZE;
	lseek(pd.fd,offset,0); // seek to location
	int count = -1;
	count = read(pd.fd, dest, pageSize);
	if(count != pageSize) //read failed
		return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
sarq $0x20, %rsi
movslq 0x3c(%rdi), %rax
imulq %rax, %rsi
addq $0x1000, %rsi           # imm = 0x1000
movl %r14d, %edi
xorl %edx, %edx
callq 0x22a0
movslq 0x3c(%r15), %rdx
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2200
cmpl %eax, 0x3c(%r15)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::AllocatePage(PageDescriptor)
char* BufferManager::AllocatePage(PageDescriptor pd) {
	auto slot = hashTable.find(pd);
	if(slot!=hashTable.end()) {
		// error page already in buffers
		throw BufferManagerException("BufferManagerException : Page to be allocated already in buffer");
	}
	else {
		// page not in buffers
		// find a suitable slot to load it
		int slotNo = FindSlot();
		if (slotNo==-1) throw NoBufferSpaceException(); //error no free slot could be obtained 
		// insert into hashTable the corresponding slot
		hashTable.insert(make_pair(pd,slotNo));
		// initialize the rest of Frame elements
		InitializeBuffer(pd,slotNo);
		return buffers[slotNo].data;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %rax
movq %rsi, (%rax)
leaq 0x40(%rdi), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x31be
testq %rax, %rax
jne 0x29fa
movq %rbx, %rdi
callq 0x27ec
cmpl $-0x1, %eax
je 0x2a22
movl %eax, %r15d
movq -0x20(%rbp), %rax
leaq -0x30(%rbp), %rsi
movq %rax, (%rsi)
movl %r15d, 0x8(%rsi)
movq %r14, %rdi
callq 0x3256
movq -0x20(%rbp), %rax
movq 0x30(%rbx), %rcx
movslq %r15d, %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rax, 0x4(%rcx,%rdx,8)
movw $0x100, (%rcx,%rdx,8)   # imm = 0x100
movq 0x10(%rcx,%rdx,8), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20f0
leaq 0x52cd(%rip), %rcx      # 0x7cd8
movq %rcx, (%rax)
leaq 0x2635(%rip), %rcx      # 0x504a
movq %rcx, 0x8(%rax)
leaq 0x5268(%rip), %rsi      # 0x7c88
jmp 0x2a3d
movl $0x8, %edi
callq 0x20f0
leaq 0x527d(%rip), %rcx      # 0x7cb0
movq %rcx, (%rax)
leaq 0x5233(%rip), %rsi      # 0x7c70
movq 0x559c(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::MarkDirty(PageDescriptor)
bool BufferManager::MarkDirty(PageDescriptor pd) {
	auto slot = hashTable.find(pd);
	if(slot==hashTable.end()) {
		//error page not in buffers
		return false;
	}
	int slotNo = slot->second;
	if(!buffers[slotNo].pinned) {
		//error page unpinned
		return false;
	}
	// set page dirty
	buffers[slotNo].dirty=true;
	//make this page MRU in buffers
	usedList.remove(slotNo); 
	usedList.push_front(slotNo); // put at front	
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %rax
movq %rsi, (%rax)
addq $0x40, %rdi
movq %rax, %rsi
callq 0x31be
testq %rax, %rax
je 0x2acc
movslq 0x10(%rax), %rcx
movl %ecx, -0x24(%rbp)
movq 0x30(%rbx), %rax
leaq (%rcx,%rcx,2), %rcx
movb 0x1(%rax,%rcx,8), %r14b
cmpb $0x1, %r14b
jne 0x2acf
leaq (%rax,%rcx,8), %rax
movb $0x1, (%rax)
leaq 0x18(%rbx), %rdi
leaq -0x24(%rbp), %r15
movq %r15, %rsi
callq 0x305a
movq 0x18(%rbx), %r12
movl $0x18, %edi
callq 0x21b0
movl (%r15), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x2050
incq 0x28(%rbx)
jmp 0x2acf
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::UnpinPage(PageDescriptor)
bool BufferManager::UnpinPage(PageDescriptor pd) {
	auto slot = hashTable.find(pd); //find slot 
	if(slot==hashTable.end()) {
		//error page not in buffers
		return false;
	}
	int slotNo = slot->second;
	if(!buffers[slotNo].pinned) {
		//error page unpinned
		return false;
	}
	buffers[slotNo].pinned = false; //set unpinned
	// set page as MRU
	usedList.remove(slotNo); 
	usedList.push_front(slotNo); // put at front
	return true;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %rax
movq %rsi, (%rax)
addq $0x40, %rdi
movq %rax, %rsi
callq 0x31be
testq %rax, %rax
je 0x2b63
movslq 0x10(%rax), %rcx
movl %ecx, -0x24(%rbp)
movq 0x30(%rbx), %rax
leaq (%rcx,%rcx,2), %rcx
movb 0x1(%rax,%rcx,8), %r14b
cmpb $0x1, %r14b
jne 0x2b66
leaq (%rax,%rcx,8), %rax
incq %rax
movb $0x0, (%rax)
leaq 0x18(%rbx), %rdi
leaq -0x24(%rbp), %r15
movq %r15, %rsi
callq 0x305a
movq 0x18(%rbx), %r12
movl $0x18, %edi
callq 0x21b0
movl (%r15), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x2050
incq 0x28(%rbx)
jmp 0x2b66
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::FlushPages(int)
bool BufferManager::FlushPages(int fd) {
	// do a linear scan for all pages belonging to this file
	for(int i=0;i<numPages;i++) {
		if(find(usedList.begin(),usedList.end(),i)==usedList.end()) continue; // skip free slots
		if(buffers[i].pageDescriptor.fd != fd) continue;
		//write back page if dirty
		if(buffers[i].dirty) {
			bool _res = WritePage(PageDescriptor(fd,buffers[i].pageDescriptor.pagenum),buffers[i].data);
			if(!_res) return false;
			buffers[i].dirty = false;
		}
		//remove slot from hashTable and usedList and add to free list
		hashTable.erase(PageDescriptor(fd,buffers[i].pageDescriptor.pagenum));
		usedList.remove(i);
		freeList.push_front(i);
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x0, -0x2c(%rbp)
cmpl $0x0, 0x38(%rdi)
setle %r13b
jle 0x2c7b
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rdi), %r15
movl %esi, %eax
movq %rax, -0x40(%rbp)
leaq 0x40(%rdi), %r12
xorl %eax, %eax
movq (%r15), %rcx
cmpq %r15, %rcx
je 0x2bc3
cmpl %eax, 0x10(%rcx)
je 0x2bc3
movq (%rcx), %rcx
jmp 0x2bb4
cmpq %r15, %rcx
je 0x2c65
movq 0x30(%r14), %rcx
cltq
leaq (%rax,%rax,2), %rax
cmpl %ebx, 0x4(%rcx,%rax,8)
jne 0x2c65
leaq (%rcx,%rax,8), %rsi
cmpb $0x1, (%rsi)
jne 0x2c15
movq 0x10(%rcx,%rax,8), %rdx
movl 0x8(%rsi), %esi
shlq $0x20, %rsi
addq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x2c92
testb %al, %al
je 0x2c7b
movq 0x30(%r14), %rax
movslq -0x2c(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x0, (%rax,%rcx,8)
movq 0x30(%r14), %rax
movslq -0x2c(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl 0x8(%rax,%rcx,8), %eax
movl %ebx, -0x34(%rbp)
movl %eax, -0x30(%rbp)
movq %r12, %rdi
leaq -0x34(%rbp), %rsi
callq 0x3524
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x305a
movq (%r14), %r13
movl $0x18, %edi
callq 0x21b0
movl -0x2c(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r13, %rsi
callq 0x2050
incq 0x10(%r14)
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl 0x38(%r14), %eax
setge %r13b
jl 0x2bb1
andb $0x1, %r13b
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/akgupta007[P]DBMS-query-processing-Algotihms/buffer_manager.cpp
// Function: BufferManager::WritePage(PageDescriptor, char*)
bool BufferManager::WritePage(PageDescriptor pd,char *src) {
	// calculate file offset
	long offset = pd.pagenum*(long)pageSize + FILE_HDR_SIZE;
	lseek(pd.fd,offset,0); // seek to location
	if(write(pd.fd,src,pageSize)!=pageSize) //write failed
		return false;
	return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
sarq $0x20, %rsi
movslq 0x3c(%rdi), %rax
imulq %rax, %rsi
addq $0x1000, %rsi           # imm = 0x1000
movl %r14d, %edi
xorl %edx, %edx
callq 0x22a0
movslq 0x3c(%r15), %rdx
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2090
movslq 0x3c(%r15), %rcx
cmpq %rcx, %rax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq