LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/AbraaoHonorio[P]Page-Replacement-Algorithms/PageReplacement.cpp
// Function: PageReplacement::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void PageReplacement::readFile(std::string filename)
{

	std::ifstream myfile(filename);
	int element = 0;


	if (myfile.is_open())
	{
		myfile >> element; // get first value
		sizeRam_m = element;

		while (myfile >> element) // read the referenced strings
		{
			myPages.push_back(element);
		}
	}
	else
	{
		std::cout << "Unable to open file" << std::endl;
	}

	myfile.close();


}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x1120
andl $0x0, 0x4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x1040
testb %al, %al
je 0x1917
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x10b0
leaq 0x4(%rsp), %r14
movl (%r14), %eax
movl %eax, 0xc(%rbx)
addq $0x28, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x10b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1932
movq %rbx, %rdi
movq %r14, %rsi
callq 0x196a
jmp 0x18f1
movq 0x26ba(%rip), %rdi      # 0x3fd8
leaq 0x720(%rip), %rsi       # 0x2045
callq 0x10f0
movq %rax, %rdi
callq 0x1090
leaq 0x8(%rsp), %rdi
callq 0x1030
leaq 0x8(%rsp), %rdi
callq 0x1050
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1955
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/AbraaoHonorio[P]Page-Replacement-Algorithms/main.cpp
// Function: main
int main(void)
{
	PageReplacement *pageReplacement = new PageReplacement();

	pageReplacement->readFile("input/input.txt"); 
	pageReplacement->fifo();
	pageReplacement->otm();
	pageReplacement->lru();


	std::cout<<std::endl;
	delete pageReplacement;


	return 0;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
pushq $0x40
popq %rdi
callq 0x1100
movq %rax, %rbx
movq %rax, %rdi
callq 0x12ac
leaq 0x2e1(%rip), %rsi       # 0x20b6
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1070
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x189c
leaq 0x8(%rsp), %rdi
callq 0x1080
movq %rbx, %rdi
callq 0x131e
movq %rbx, %rdi
callq 0x156e
movq %rbx, %rdi
callq 0x1718
movq 0x21be(%rip), %rdi      # 0x3fd8
callq 0x1090
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1080
jmp 0x1e51
movq %rax, %r14
jmp 0x1e51
movq %rax, %r14
movq %rbx, %rdi
callq 0x10e0
movq %r14, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::write_times(MyFILE*, long, long)
void LMF_IO::write_times(MyFILE * out_file,time_t _Starttime,time_t _Stoptime) {
	unsigned __int32 dummy;
	if (CTime_version_output > 2003) {
		dummy = INT_MIN_+10; *out_file << dummy;
		dummy = (unsigned __int32)_Starttime; *out_file << dummy;
		dummy =0;			*out_file << dummy;
		dummy =INT_MIN_+10;	*out_file << dummy;
		dummy = (unsigned __int32)_Stoptime;	*out_file << dummy;
		dummy = 0;			*out_file << dummy;
	} else {
		dummy = (unsigned __int32)_Starttime;	*out_file << dummy;
		dummy = (unsigned __int32)_Stoptime;	*out_file << dummy;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
cmpl $0x7d4, 0x278(%rdi)     # imm = 0x7D4
jl 0x23e4
movq %rbx, %rdi
movl $0x8000000a, %esi       # imm = 0x8000000A
callq 0x10d1e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10d1e
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10d1e
movq %rbx, %rdi
movl $0x8000000a, %esi       # imm = 0x8000000A
callq 0x10d1e
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10d1e
jmp 0x23f2
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10d1e
movl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10d1e
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: ReadCStringLength(MyFILE&)
unsigned __int32 ReadCStringLength(MyFILE &in_file)
{
	unsigned __int64 qwLength;
	unsigned __int32 dwLength;
	unsigned __int16 wLength;
	unsigned __int8  bLength;

//	__int32 nCharSize = sizeof(__int8);

	// First, try to read a one-byte length
	in_file >> bLength;

	if (bLength < 0xff) 
		return bLength;

	// Try a two-byte length
	in_file >> wLength;
	if (wLength == 0xfffe)
	{
//		// Unicode string.  Start over at 1-byte length
//		nCharSize = sizeof(wchar_t);

		in_file >> bLength;
		if (bLength < 0xff)
			return bLength;

		// Two-byte length
		in_file >> wLength;
		// Fall through to continue on same branch as ANSI string
	}
	if (wLength < 0xffff)
		return wLength;

	// 4-byte length
	in_file >> dwLength;
	if (dwLength < 0xffffffff)
		return dwLength;

	// 8-byte length
	in_file >> qwLength;

	return (unsigned __int32)qwLength;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x9(%rsp), %r14
movq %r14, %rsi
callq 0x10d42
movzbl (%r14), %eax
cmpl $0xff, %eax
jne 0x24a7
leaq 0xa(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d54
movzwl (%r14), %eax
cmpw $-0x2, %ax
jne 0x2471
leaq 0x9(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d42
movzbl (%r14), %eax
cmpl $0xff, %eax
jne 0x24a7
leaq 0xa(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d54
movzwl (%r14), %eax
cmpw $-0x1, %ax
je 0x247c
movzwl %ax, %eax
jmp 0x24a7
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d66
movl (%r14), %eax
cmpl $-0x1, %eax
jne 0x24a7
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d78
movl (%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: Read_CString_as_StdString(MyFILE&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Read_CString_as_StdString(MyFILE &in_file,std::string &stdstring)
{
	__int32 length = ReadCStringLength(in_file);
	__int8 * temp_string = new __int8[length+1];
	in_file.read(temp_string,length);
	temp_string[length] = 0;
	stdstring = temp_string;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2406
movl %eax, %r15d
leal 0x1(%r15), %eax
movslq %eax, %rdi
callq 0x2030
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x10d8a
movslq %r15d, %rax
movb $0x0, (%r12,%rax)
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: WriteCStringLength(MyFILE&, unsigned int)
void WriteCStringLength(MyFILE &out_file, unsigned __int32 nLength)
{
	unsigned __int8 dummy_uint8;
	unsigned __int16 dummy_uint16;
	unsigned __int32 dummy_uint32;
	unsigned __int64 dummy_uint64;

	if (nLength < 255)
	{
		dummy_uint8 = nLength; out_file << dummy_uint8;
	}
	else if (nLength < 0xfffe)
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = nLength; out_file << dummy_uint16;
	}
	else if (nLength < 0xffffffff)
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = 0xffff; out_file << dummy_uint16;
		dummy_uint32 = nLength; out_file << dummy_uint32;
	}
	else
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = 0xffff; out_file << dummy_uint16;
		dummy_uint32 = 0xffffffff; out_file << dummy_uint32;
		dummy_uint64 = nLength; out_file << dummy_uint64;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xfe, %esi
ja 0x2522
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10dd0
movq %rbx, %rdi
movl $0xff, %esi
cmpl $0xfffd, %ebp           # imm = 0xFFFD
ja 0x2548
callq 0x10dd0
movzwl %bp, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10df4
callq 0x10dd0
movq %rbx, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x10df4
cmpl $-0x1, %ebp
je 0x256f
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10d1e
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x10d1e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10e18
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::OpenNonCoboldFile()
bool LMF_IO::OpenNonCoboldFile(void)
/////////////////////////////////////////////////////////////////
{
	input_lmf->seek(0);

	if (skip_header) {
		DAQ_ID = DAQ_ID_RAW32BIT;
		data_format_in_userheader = 10;
		return true;
	}

	if (DAQ_ID == DAQ_ID_RAW32BIT) return true;

	DAQ_ID = DAQ_ID_SIMPLE;

	*input_lmf >> SIMPLE_DAQ_ID_Orignial;
	unsigned tempi;
	*input_lmf >> tempi; uint64_Numberofevents = tempi;
	*input_lmf >> data_format_in_userheader;

	User_header_size = 3*sizeof(__int32);
	Headersize = 0;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
xorl %esi, %esi
callq 0x235c
cmpb $0x1, 0x12e4(%rbx)
jne 0x3402
movl $0x64, 0x288(%rbx)
movl $0xa, 0x290(%rbx)
jmp 0x346a
cmpl $0x64, 0x288(%rbx)
je 0x346a
movl $0x65, 0x288(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x27c(%rbx), %rsi
callq 0x10d66
movq 0x2b18(%rbx), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
callq 0x10d66
movl (%r14), %eax
movq %rax, 0x268(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
callq 0x10fca
movabsq $0xc00000000, %rax      # imm = 0xC00000000
movq %rax, 0x298(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadCAMACHeader()
__int32	LMF_IO::ReadCAMACHeader()
/////////////////////////////////////////////////////////////////
{
	__int32 byte_counter;
	byte_counter = 0;

	*input_lmf >> frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*input_lmf >> IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*input_lmf >> timestamp_format;	byte_counter += sizeof(__int32);	// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	*input_lmf >> DAQ_info_Length;	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value
	__int8 * __int8_temp = new __int8[DAQ_info_Length+1];
	input_lmf->read(__int8_temp,DAQ_info_Length);	// DAQInfo always 8th value
	__int8_temp[DAQ_info_Length] = 0;
	DAQ_info = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += DAQ_info_Length;

	*input_lmf >> Camac_CIF_Length;	byte_counter += sizeof(__int32);
	__int8_temp = new __int8[Camac_CIF_Length+1];
	input_lmf->read(__int8_temp,Camac_CIF_Length);
	__int8_temp[Camac_CIF_Length] = 0;
	Camac_CIF = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += Camac_CIF_Length;

	*input_lmf >> system_timeout; byte_counter += sizeof(__int32);		// system time-out
	*input_lmf >> time_reference; byte_counter += sizeof(__int32);
	*input_lmf >> data_format_in_userheader;	byte_counter += sizeof(__int32);		// data format (2=short integer)

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
callq 0x110e4
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
callq 0x10d66
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
callq 0x10fca
movslq 0x129c(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x10d8a
movslq 0x129c(%rbx), %rax
xorl %ebp, %ebp
movb %bpl, (%r15,%rax)
leaq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x2230
movq %r15, %rdi
callq 0x21a0
movl 0x129c(%rbx), %r12d
movq 0x2b18(%rbx), %rdi
leaq 0x12a0(%rbx), %rsi
callq 0x10fca
movslq 0x12a0(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x10d8a
movslq 0x12a0(%rbx), %rax
movb %bpl, (%r15,%rax)
leaq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0x2230
movq %r15, %rdi
callq 0x21a0
movl 0x12a0(%rbx), %r14d
movq 0x2b18(%rbx), %rdi
leaq 0x128c(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x240(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
addq $0x290, %rbx            # imm = 0x290
movq %rbx, %rsi
callq 0x10fca
leal (%r12,%r14), %eax
addl $0x24, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadTCPIPHeader()
__int32	LMF_IO::ReadTCPIPHeader()
/////////////////////////////////////////////////////////////////
{
	__int32	byte_counter = 0;
 

	*input_lmf >> frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*input_lmf >> IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*input_lmf >> timestamp_format;	byte_counter += sizeof(__int32);	// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	*input_lmf >> DAQ_info_Length;	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value
	__int8 * __int8_temp = new __int8[DAQ_info_Length+1];
	input_lmf->read(__int8_temp,DAQ_info_Length);	// DAQInfo always 8th value
	__int8_temp[DAQ_info_Length] = 0;
	DAQ_info = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += DAQ_info_Length;
	*input_lmf >> LMF_Version; byte_counter += sizeof(__int32);
	*input_lmf >> time_reference; byte_counter += sizeof(__int32);

	*input_lmf >> data_format_in_userheader;	byte_counter   += sizeof(__int32);
	*input_lmf >> number_of_channels;			byte_counter   += sizeof(__int32);
	*input_lmf >> max_number_of_hits;			byte_counter   += sizeof(__int32);

	if (int(number_of_channels) > num_channels)	{errorflag = 19;	return -100000;}
	if (int(max_number_of_hits) > num_ions)		{errorflag = 20;	return -100000;}

	tdcresolution = 1.;

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
callq 0x110e4
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
callq 0x10d66
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
callq 0x10fca
movslq 0x129c(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x10d8a
movslq 0x129c(%rbx), %rax
movb $0x0, (%r15,%rax)
leaq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x2230
movq %r15, %rdi
callq 0x21a0
movl 0x129c(%rbx), %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x240(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x2b4(%rbx), %rsi
callq 0x10d66
movq 0x2b18(%rbx), %rdi
leaq 0x2bc(%rbx), %rsi
callq 0x10d66
movl 0x2b4(%rbx), %eax
cmpl 0x2b70(%rbx), %eax
jle 0x6019
movl $0x13, 0x12e0(%rbx)
jmp 0x6031
movl 0x2bc(%rbx), %eax
cmpl 0x2b74(%rbx), %eax
jle 0x6038
movl $0x14, 0x12e0(%rbx)
movl $0xfffe7960, %ebp       # imm = 0xFFFE7960
jmp 0x604c
addl $0x28, %ebp
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x12b8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadfADC8Header()
__int32	LMF_IO::ReadfADC8Header()
/////////////////////////////////////////////////////////////////
{
	__int32	byte_counter = 0;

	*input_lmf >> frequency;	byte_counter += sizeof(double);			// frequency is always 4th value
	*input_lmf >> IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*input_lmf >> timestamp_format;	byte_counter += sizeof(__int32);	// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	*input_lmf >> DAQ_info_Length;	byte_counter += sizeof(__int32);	// Length of DAQInfo always 7th value
	__int8 * __int8_temp = new __int8[DAQ_info_Length+1];
	input_lmf->read(__int8_temp,DAQ_info_Length);	byte_counter += DAQ_info_Length;  // DAQInfo always 8th value
	__int8_temp[DAQ_info_Length] = 0;
	DAQ_info = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;

	*input_lmf >> LMF_Version; byte_counter += sizeof(__int32);
	
	if (LMF_Version == 10) byte_counter += ReadfADC8_header_LMFversion10();
	if (LMF_Version == 9)  byte_counter += ReadfADC8_header_LMFversion9();

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
callq 0x110e4
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
callq 0x10fca
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
callq 0x10d66
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
callq 0x10fca
movslq 0x129c(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x10d8a
movslq 0x129c(%rbx), %r14
movb $0x0, (%r15,%r14)
leaq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x2230
movq %r15, %rdi
callq 0x21a0
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %rsi
callq 0x10fca
leal 0x18(%r14), %ebp
movl 0x12a4(%rbx), %eax
cmpl $0xa, %eax
jne 0x612c
movq %rbx, %rdi
callq 0x7c68
addl %eax, %ebp
movl 0x12a4(%rbx), %eax
cmpl $0x9, %eax
jne 0x613b
movq %rbx, %rdi
callq 0x7720
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteNextfADC8Signal(fADC8_signal_info_struct*, unsigned int*)
bool LMF_IO::WriteNextfADC8Signal(fADC8_signal_info_struct* signal_info, unsigned __int32 * ui32buffer)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return false;
	}
	if (fADC8.at_least_1_signal_was_written) *output_lmf << __int32(0);

	output_lmf->write((char*)(signal_info),sizeof(fADC8_signal_info_struct));

	if (signal_info->signal_type != 8) {
		output_lmf->write((char*)ui32buffer, signal_info->signallength_including_header_in_32bit_words*4);
	}

	fADC8.at_least_1_signal_was_written = true;
	
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
testq %rdi, %rdi
je 0x768f
cmpb $0x0, 0x2b29(%rbx)
je 0x768f
movq %rdx, %r14
movq %rsi, %r15
cmpb $0x1, 0x1a78(%rbx)
jne 0x765c
xorl %esi, %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
pushq $0x38
popq %rdx
movq %r15, %rsi
callq 0x10e3c
cmpb $0x8, 0x18(%r15)
je 0x7684
movq 0x2b20(%rbx), %rdi
movl 0x28(%r15), %edx
shll $0x2, %edx
movq %r14, %rsi
callq 0x10e3c
movb $0x1, 0x1a78(%rbx)
movb $0x1, %al
jmp 0x769b
movl $0xa, 0x12e0(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WritefADC8EndGroupMarker()
bool LMF_IO::WritefADC8EndGroupMarker()
/////////////////////////////////////////////////////////////////
{
	if (fADC8.at_least_1_signal_was_written) *output_lmf << __int32(12345678);

	if (fADC8.bReadCustomData) {
		*output_lmf << number_of_bytes_in_PostEventData;
		for (__int32 i=0;i<number_of_bytes_in_PostEventData;i++) {
			*output_lmf << ui8_PostEventData[i];
		}
	}

	fADC8.at_least_1_signal_was_written = false;
	++uint64_number_of_written_events;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x1a78(%rdi)
jne 0x76c3
movq 0x2b20(%rbx), %rdi
movl $0xbc614e, %esi         # imm = 0xBC614E
callq 0x11094
cmpb $0x1, 0x1854(%rbx)
jne 0x7707
movq 0x2b20(%rbx), %rdi
movl 0x1280(%rbx), %esi
callq 0x11094
xorl %r14d, %r14d
movslq 0x1280(%rbx), %rax
cmpq %rax, %r14
jge 0x7707
movq 0x2b20(%rbx), %rdi
movzbl 0x2e0(%rbx,%r14), %esi
callq 0x10dd0
incq %r14
jmp 0x76e1
movb $0x0, 0x1a78(%rbx)
incq 0x2b10(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTCPIPHeader()
__int32 LMF_IO::WriteTCPIPHeader()
/////////////////////////////////////////////////////////////////
{
	unsigned __int32 byte_counter;
	byte_counter = 0;

	*output_lmf << frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*output_lmf << IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*output_lmf << timestamp_format_output;	byte_counter += sizeof(__int32);		// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	unsigned __int32 dummy = (unsigned __int32)(DAQ_info.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value

	output_lmf->write(DAQ_info.c_str(), __int32(DAQ_info.length()));	// DAQInfo always 8th value
	byte_counter += (unsigned __int32)(DAQ_info.length());

	*output_lmf << LMF_Version_output; byte_counter += sizeof(__int32);
	*output_lmf << time_reference; byte_counter += sizeof(__int32);


	*output_lmf << data_format_in_userheader_output;					byte_counter   += sizeof(__int32);
	*output_lmf << number_of_channels_output;			byte_counter   += sizeof(__int32);
	*output_lmf << max_number_of_hits_output;			byte_counter   += sizeof(__int32);

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
movsd 0x12c8(%rbx), %xmm0
callq 0x11072
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x10d1e
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x10d1e
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x10e3c
movl 0xa8(%rbx), %ebp
movq 0x2b20(%rbx), %rdi
movl 0x12a8(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x240(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x2c4(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x2cc(%rbx), %esi
callq 0x11094
addl $0x28, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteCAMACHeader()
__int32	LMF_IO::WriteCAMACHeader()
/////////////////////////////////////////////////////////////////
{
	unsigned __int32 byte_counter;
	byte_counter = 0;

	*output_lmf << frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*output_lmf << IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*output_lmf << timestamp_format_output;	byte_counter += sizeof(__int32);		// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	unsigned __int32 dummy = __int32(DAQ_info.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value
	output_lmf->write(DAQ_info.c_str(), __int32(DAQ_info.length()));	// DAQInfo always 8th value
	byte_counter += __int32(DAQ_info.length());

	dummy = __int32(Camac_CIF.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);
	output_lmf->write(Camac_CIF.c_str(), __int32(Camac_CIF.length()));
	byte_counter += __int32(Camac_CIF.length());

	*output_lmf << system_timeout_output; byte_counter += sizeof(__int32);		// system time-out
	*output_lmf << time_reference_output; byte_counter += sizeof(__int32);
	*output_lmf << data_format_in_userheader_output;	byte_counter += sizeof(__int32);		// data format (2=short integer)

	return byte_counter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
movsd 0x12c8(%rbx), %xmm0
callq 0x11072
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x10d1e
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x10d1e
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x10e3c
movl 0xa8(%rbx), %r14d
movl 0xc8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x10d1e
movq 0x2b20(%rbx), %rdi
movq 0xc0(%rbx), %rsi
movl 0xc8(%rbx), %edx
callq 0x10e3c
movl 0xc8(%rbx), %r15d
movq 0x2b20(%rbx), %rdi
movl 0x1290(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x244(%rbx), %esi
callq 0x11094
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x11094
leal (%r14,%r15), %eax
addl $0x24, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteEventHeader(unsigned long long, unsigned int*)
void LMF_IO::WriteEventHeader(unsigned __int64 timestamp, unsigned __int32 cnt[])
/////////////////////////////////////////////////////////////////
{
	unsigned __int64 HeaderLength = 0;
	// EventLength information in 64Bit
	if (DAQVersion_output >= 20080000 || data_format_in_userheader_output == LM_USERDEF) {
		HeaderLength = timestamp_format_output + 1 + number_of_channels_output;	// +1 for HeaderLength itself

		HeaderLength = timestamp_format_output*sizeof(__int32) + 2*sizeof(__int64);	// +2 for HeaderLength itself, +2 for EventCounter (size in __int32)
		for(__int32 iCount=0;iCount<number_of_channels_output;++iCount) HeaderLength += cnt[iCount]*sizeof(__int32);
		HeaderLength += number_of_channels_output*sizeof(__int16);
#ifdef __linux__
		HeaderLength = (HeaderLength & 0x00ffffffffffffffLL) | 0xff00000000000000LL;	// set 0xff in bits 63..56 as EventMarker
#else
		HeaderLength = (HeaderLength & 0x00ffffffffffffff) | 0xff00000000000000;	// set 0xff in bits 63..56 as EventMarker
#endif
		*output_lmf << HeaderLength;
		*output_lmf << uint64_number_of_written_events; 
	}

	myLARGE_INTEGER LARGE_Timestamp;
	LARGE_Timestamp.QuadPart = timestamp;

	if (timestamp_format_output > 0) {
		*output_lmf << LARGE_Timestamp.LowPart;
		if (timestamp_format_output == 2) *output_lmf << LARGE_Timestamp.HighPart;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x132657f, 0x284(%rdi) # imm = 0x132657F
ja 0xc384
cmpl $-0x1, 0x294(%r14)
jne 0xc3e8
movl 0x2ac(%r14), %eax
leaq 0x10(,%rax,4), %rax
movslq 0x2c4(%r14), %rcx
xorl %esi, %esi
testl %ecx, %ecx
movl $0x0, %edi
cmovgl %ecx, %edi
cmpq %rsi, %rdi
je 0xc3b8
movl (%rdx,%rsi,4), %r8d
leaq (%rax,%r8,4), %rax
incq %rsi
jmp 0xc3a6
leaq (%rax,%rcx,2), %rax
movabsq $-0x100000000000000, %rsi # imm = 0xFF00000000000000
orq %rax, %rsi
movq 0x2b20(%r14), %rdi
callq 0x10e18
movq 0x2b10(%r14), %rsi
movq 0x2b20(%r14), %rdi
callq 0x10e18
cmpl $0x0, 0x2ac(%r14)
je 0xc423
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
callq 0x10d1e
cmpl $0x2, 0x2ac(%r14)
jne 0xc423
shrq $0x20, %rbx
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11094
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, int*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], __int32 *i32TDC)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf|| !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}

	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency + 0.001);

	WriteTDCData(new_timestamp, cnt, i32TDC);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xcb8d
cmpb $0x0, 0x2b29(%rdi)
je 0xcb8d
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x5527(%rip), %xmm0     # 0x12090
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x551b(%rip), %xmm0     # 0x12098
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xc42c
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, double*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], double *dtdc)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency + 0.001);

	WriteTDCData(new_timestamp, cnt, dtdc);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xd313
cmpb $0x0, 0x2b29(%rdi)
je 0xd313
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x4da1(%rip), %xmm0     # 0x12090
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x4d95(%rip), %xmm0     # 0x12098
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xcb98
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, unsigned short*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], unsigned __int16 * us16TDC)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency);

	WriteTDCData(new_timestamp, cnt, us16TDC);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xda27
cmpb $0x0, 0x2b29(%rdi)
je 0xda27
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x4681(%rip), %xmm0     # 0x12098
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xd31e
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::SeekToEventNumber(unsigned long long)
bool LMF_IO::SeekToEventNumber(unsigned __int64 target_number)
/////////////////////////////////////////////////////////////////
{
	if (DAQ_ID == DAQ_ID_SIMPLE) return false;

	if (target_number == 0) {
		input_lmf->seek((unsigned __int64)(Headersize + User_header_size));
		must_read_first = true;
		errorflag = 0;
		input_lmf->error = 0;
		return true;
	}

	if (data_format_in_userheader == LM_USERDEF) {errorflag = 16; return false;}

	if (!input_lmf) {
		errorflag = 9;
		return false;
	}


/*	unsigned __int64 filesize;
	unsigned __int64 pos = input_lmf->tell();
	input_lmf->seek_to_end();
	filesize = input_lmf->tell();
	input_lmf->seek(pos);
*/

	

	if (target_number < 0) return false;
	if (target_number > uint64_Numberofevents) return false;
	__int32 eventsize = 0;
	if (data_format_in_userheader == 2 ) eventsize = 2 * Numberofcoordinates;
	if (data_format_in_userheader == 5 ) eventsize = 8 * Numberofcoordinates;
	if (data_format_in_userheader == 10) eventsize = 4 * Numberofcoordinates;

	if (DAQ_ID == DAQ_ID_RAW32BIT) eventsize = 4 * number_of_channels * (max_number_of_hits+1);

	if (input_lmf->filesize < (unsigned __int64)(eventsize)*target_number + (unsigned  __int64)(Headersize + User_header_size)) return false;

	unsigned __int64 new_position = (unsigned __int64)(eventsize)*target_number + (unsigned __int64)(Headersize + User_header_size);

	input_lmf->seek(new_position);



	uint64_number_of_read_events = target_number;
	must_read_first = true;
	errorflag = 0;
	input_lmf->error = 0;
	return true;
}

// Assembly:
movl 0x288(%rdi), %ecx
cmpl $0x65, %ecx
jne 0xda48
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xdaf4
movl 0x290(%rbx), %edx
cmpl $-0x1, %edx
je 0xdb29
movq 0x2b18(%rbx), %rdi
testq %rdi, %rdi
je 0xdb35
xorl %eax, %eax
cmpq %r14, 0x268(%rbx)
jb 0xdb41
movl 0x270(%rbx), %esi
leal (%rsi,%rsi), %r8d
cmpl $0x2, %edx
cmovel %r8d, %eax
leal (,%rsi,8), %r8d
cmpl $0x5, %edx
cmovnel %eax, %r8d
shll $0x2, %esi
cmpl $0xa, %edx
cmovnel %r8d, %esi
cmpl $0x64, %ecx
jne 0xdaca
movl 0x2bc(%rbx), %esi
incl %esi
imull 0x2b4(%rbx), %esi
shll $0x2, %esi
movslq %esi, %rax
movl 0x29c(%rbx), %esi
addl 0x298(%rbx), %esi
imulq %r14, %rax
addq %rax, %rsi
cmpq %rsi, 0x10(%rdi)
jb 0xdb3f
callq 0x235c
movq %r14, 0x260(%rbx)
jmp 0xdb0c
movq 0x2b18(%rbx), %rdi
movl 0x29c(%rbx), %esi
addl 0x298(%rbx), %esi
callq 0x235c
movb $0x1, 0x2b4c(%rbx)
andl $0x0, 0x12e0(%rbx)
movq 0x2b18(%rbx), %rax
andl $0x0, 0x8(%rax)
movb $0x1, %al
jmp 0xdb41
movl $0x10, 0x12e0(%rbx)
jmp 0xdb3f
movl $0x9, 0x12e0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::Read_TDC8HP_raw_format(unsigned long long&)
bool LMF_IO::Read_TDC8HP_raw_format(unsigned __int64 &ui64TDC8HP_AbsoluteTimeStamp_)
/////////////////////////////////////////////////////////////////
{
	__int32 count;
	*input_lmf >> count;
	if (input_lmf->error) return false;
	if (!count) return false;
	if (ui32buffer_size < count) {
		if (ui32buffer) {delete[] ui32buffer; ui32buffer = 0;}
		ui32buffer_size = count + 5000;
		ui32buffer = new unsigned __int32[ui32buffer_size];
	}
	input_lmf->read(this->ui32buffer,count*sizeof(__int32));
	if (input_lmf->error) return false;
	if (!PCIGetTDC_TDC8HP_25psGroupMode(ui64TDC8HP_AbsoluteTimeStamp_, count, this->ui32buffer)) return false;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x2b18(%rdi), %rdi
leaq 0x4(%rsp), %rsi
callq 0x10fca
movq 0x2b18(%r14), %r15
cmpl $0x0, 0x8(%r15)
je 0xdddf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x4(%rsp), %r12d
testl %r12d, %r12d
je 0xddd1
movq 0x2b30(%r14), %rsi
cmpl %r12d, 0x2b38(%r14)
jge 0xde4f
testq %rsi, %rsi
je 0xde1a
movq %rsi, %rdi
callq 0x21a0
andq $0x0, 0x2b30(%r14)
movl 0x4(%rsp), %r12d
movq 0x2b18(%r14), %r15
leal 0x1388(%r12), %eax
movl %eax, 0x2b38(%r14)
movslq %r12d, %rax
cmpl $0xffffec78, %eax       # imm = 0xFFFFEC78
leaq 0x4e20(,%rax,4), %rax
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2030
movq %rax, %rsi
movq %rax, 0x2b30(%r14)
shll $0x2, %r12d
movq %r15, %rdi
movl %r12d, %edx
callq 0x11108
movq 0x2b18(%r14), %rax
cmpl $0x0, 0x8(%rax)
jne 0xddd1
movl 0x4(%rsp), %edx
movq 0x2b30(%r14), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdb4a
jmp 0xddd3
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::GetNumberOfHitsArray(unsigned int*)
void LMF_IO::GetNumberOfHitsArray(unsigned __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 0xf929
movq %r14, %rdi
callq 0xde8a
testb %al, %al
je 0xf955
movq 0x2b50(%r14), %rax
xorl %ecx, %ecx
movslq 0x2b70(%r14), %rdx
cmpq %rdx, %rcx
jge 0xf955
movl (%rax,%rcx,4), %edx
movl 0x2b74(%r14), %esi
cmpl %esi, %edx
cmovbl %edx, %esi
movl %esi, (%rbx,%rcx,4)
incq %rcx
jmp 0xf932
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xf97d
movq %r14, %rdi
callq 0xde8a
testb %al, %al
je 0xf9a9
movq 0x2b50(%r14), %rax
xorl %ecx, %ecx
movslq 0x2b70(%r14), %rdx
cmpq %rdx, %rcx
jge 0xf9a9
movl (%rax,%rcx,4), %edx
movl 0x2b74(%r14), %esi
cmpl %esi, %edx
cmovbl %edx, %esi
movl %esi, (%rbx,%rcx,4)
incq %rcx
jmp 0xf986
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x21d0
cmpl %r14d, %eax
je 0x10dc4
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x21f0
testl %eax, %eax
je 0x10dc4
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10ff1
movl $0x1, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
retq
movb $0x0, 0xc(%rbx)
cmpb $0x1, 0x18(%rbx)
jne 0x1103f
leaq 0x1469(%rip), %rax      # 0x1246b
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, (%rbx)
testq %rax, %rax
je 0x10fe6
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20c0
movq (%rbx), %rdi
callq 0x2180
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20c0
movq (%rbx), %rcx
jmp 0x11057
leaq 0x1428(%rip), %rax      # 0x1246e
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, %rcx
movq %rax, (%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x10fef
jmp 0x10fe6
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x21d0
cmpl %r14d, %eax
je 0x11142
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x21f0
testl %eax, %eax
je 0x11142
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
leaq 0x10(%rdi), %rbx
andq $0x0, 0x20(%rdi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rdi)
movl %esi, %r13d
shlq $0x4, %r13
xorl %r14d, %r14d
leaq -0x40(%rbp), %r12
cmpq %r14, %r13
je 0x24ee
xorpd %xmm0, %xmm0
movapd %xmm0, -0x40(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5464
callq 0x2040
cvtsi2sd %eax, %xmm0
divsd 0x3b3b(%rip), %xmm0     # 0x6008
addsd %xmm0, %xmm0
addsd 0x3b37(%rip), %xmm0     # 0x6010
movq (%rbx), %rax
movsd %xmm0, (%rax,%r14)
andq $0x0, 0x8(%rax,%r14)
addq $0x10, %r14
jmp 0x24a3
movl -0x2c(%rbp), %eax
movl %eax, 0x38(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5450
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
movl 0x38(%rdi), %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
shlq $0x4, %rdx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x255f
movq %rsi, %r8
shlq $0x6, %r8
movsd 0x30(%rax,%r8), %xmm1
movq 0x10(%rax,%r8), %r8
mulsd (%r8,%rdx), %xmm1
addsd %xmm1, %xmm0
incl %esi
jmp 0x2537
movsd %xmm0, 0x30(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, -0x30(%rbp)
andq $0x0, 0x10(%rdi)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x2170
movl %eax, %edi
callq 0x2190
movq 0x8(%rbx), %rax
movq %rbx, -0x38(%rbp)
subq (%rbx), %rax
shrq $0x2, %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
leaq -0x80(%rbp), %r12
cmpq -0x40(%rbp), %r14
je 0x26a1
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
andq $0x0, -0x70(%rbp)
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x5652
movq %r12, %rdi
callq 0x3340
movq -0x38(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
xorl %r13d, %r13d
movl $0x0, %r15d
cmpq %r14, %rcx
je 0x2693
movl 0x4(%rax,%r14,4), %r15d
jmp 0x2693
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rbx
movq %r12, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x246c
addq $-0x18, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5872
leaq -0x70(%rbp), %rdi
callq 0x5450
incl %r13d
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpl (%rax,%r14,4), %r13d
jb 0x265b
incq %r14
jmp 0x2607
xorl %r15d, %r15d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpl -0x4(%rax), %r15d
jae 0x26c3
movq -0x30(%rbp), %rdi
movl %r15d, %esi
callq 0x2704
incl %r15d
jmp 0x26a4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x26f0
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x3340
jmp 0x26f3
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x5450
jmp 0x26f3
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x336c
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
pushq $0x18
popq %r15
movl %r14d, %ecx
movq (%rbx), %r12
movq 0x8(%rbx), %rax
subq %r12, %rax
cqto
idivq %r15
cmpq %rcx, %rax
jbe 0x2953
leal -0x1(%r14), %eax
imulq $0x18, %rax, %rax
addq %rax, %r12
xorl %eax, %eax
movl %eax, %r13d
movq (%r12), %rdi
movq 0x8(%r12), %rax
subq %rdi, %rax
sarq $0x6, %rax
cmpq %r13, %rax
jbe 0x294e
movq %r13, %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x2588
leal 0x1(%r13), %eax
jmp 0x2921
incl %r14d
jmp 0x28fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq (%rdi), %rcx
movq (%rcx), %rsi
movq 0x8(%rcx), %rdi
subq %rsi, %rdi
sarq $0x6, %rdi
cmpq %rdi, %rdx
jne 0x2a2f
xorl %edi, %edi
movl %edi, %edi
cmpq %rdi, %rdx
jbe 0x29bb
movsd (%rax,%rdi,8), %xmm0
movq %rdi, %r8
shlq $0x6, %r8
movsd %xmm0, 0x30(%rsi,%r8)
incl %edi
jmp 0x299d
pushq $0x1
popq %r15
movl %r15d, %r15d
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %r15, %rax
jbe 0x2a20
leal -0x1(%r15), %eax
imulq $0x18, %rax, %r14
addq %rcx, %r14
xorl %eax, %eax
imulq $0x18, %r15, %r13
movl %eax, %r12d
movq (%rcx,%r13), %rdi
movq 0x8(%rcx,%r13), %rax
subq %rdi, %rax
sarq $0x6, %rax
cmpq %r12, %rax
jbe 0x2a1b
movq %r12, %rax
shlq $0x6, %rax
addq %rax, %rdi
movq %r14, %rsi
callq 0x2518
leal 0x1(%r12), %eax
movq (%rbx), %rcx
jmp 0x29e7
incl %r15d
jmp 0x29bf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x366a(%rip), %rdi      # 0x60a0
leaq 0x368a(%rip), %rsi      # 0x60c7
leaq 0x3691(%rip), %rcx      # 0x60d5
pushq $0x7c
popq %rdx
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/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
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movq %rdi, -0x30(%rbp)
movups %xmm0, (%rdi)
movq %rsi, %r14
movq (%rsi), %rcx
xorl %esi, %esi
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
decq %rax
cmpq %rsi, %rax
jbe 0x2b73
movq %rsi, -0x38(%rbp)
imulq $0x18, %rsi, %r13
movq (%rcx,%r13), %rax
xorl %r12d, %r12d
movq 0x8(%rcx,%r13), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
cmpq %r12, %rdx
jbe 0x2b67
movq %r12, -0x40(%rbp)
shlq $0x6, %r12
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%rcx,%r13), %rax
movq 0x10(%rax,%r12), %rsi
movq 0x18(%rax,%r12), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
cmpq %rbx, %rdx
jbe 0x2b5e
addq %r15, %rsi
movq -0x30(%rbp), %rdi
callq 0x3398
incq %rbx
movq (%r14), %rcx
addq $0x10, %r15
jmp 0x2b2c
movq -0x40(%rbp), %r12
incq %r12
jmp 0x2b0e
movq -0x38(%rbp), %rsi
incq %rsi
jmp 0x2ae8
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x5c12
movq %rbx, %rdi
callq 0x2280