LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2561
movq (%rbx), %rsi
movsbl %bpl, %edi
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpq %rax, %rcx
jae 0x255a
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0xfffd, %ebp           # imm = 0xFFFD
ja 0x259f
movq (%rbx), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpq %rax, %rcx
jae 0x258e
movq %rax, 0x10(%rbx)
movzwl %bp, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13404
movq (%rbx), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpl $-0x1, %ebp
je 0x25e6
cmpq %rax, %rcx
jae 0x25c9
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x13404
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13378
cmpq %rax, %rcx
jae 0x25ef
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x13404
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x13378
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13448
// File: /workspace/github_cpp_makefile_star2_O3/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), %r14
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x3924
movl $0x1, 0x8(%r14)
jmp 0x392c
movq $0x0, 0x20(%r14)
cmpb $0x1, 0x12e4(%rbx)
jne 0x394b
movl $0x64, 0x288(%rbx)
movl $0xa, 0x290(%rbx)
jmp 0x39c2
cmpl $0x64, 0x288(%rbx)
je 0x39c2
movl $0x65, 0x288(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x27c(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
movl $0x4, %edx
callq 0x133bc
movl (%r14), %eax
movq %rax, 0x268(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
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_O3/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 %r12
pushq %rbx
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
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 0x133bc
movslq 0x129c(%rbx), %rax
movb $0x0, (%r15,%rax)
leaq 0xa0(%rbx), %r14
movq 0xa8(%rbx), %r12
movq %r15, %rdi
callq 0x2090
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21f0
movq %r15, %rdi
callq 0x21a0
movl 0x129c(%rbx), %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x240(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2b4(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2bc(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movl 0x2b4(%rbx), %eax
cmpl 0x2b70(%rbx), %eax
jle 0x6dcd
movl $0x13, 0x12e0(%rbx)
jmp 0x6de5
movl 0x2bc(%rbx), %eax
cmpl 0x2b74(%rbx), %eax
jle 0x6dec
movl $0x14, 0x12e0(%rbx)
movl $0xfffe7960, %ebp       # imm = 0xFFFE7960
jmp 0x6e00
addl $0x28, %ebp
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x12b8(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
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 0x133bc
movslq 0x129c(%rbx), %r13
movb $0x0, (%r15,%r13)
leaq 0xa0(%rbx), %r14
movq 0xa8(%rbx), %r12
movq %r15, %rdi
callq 0x2090
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21f0
movq %r15, %rdi
callq 0x21a0
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
leal 0x18(%r13), %ebp
movl 0x12a4(%rbx), %eax
cmpl $0xa, %eax
jne 0x6f15
movq %rbx, %rdi
callq 0x8ff0
addl %eax, %ebp
movl 0x12a4(%rbx), %eax
cmpl $0x9, %eax
jne 0x6f24
movq %rbx, %rdi
callq 0x8980
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b20(%rdi), %r12
testq %r12, %r12
je 0x88c9
cmpb $0x0, 0x2b29(%rbx)
je 0x88c9
movq %rdx, %r14
movq %rsi, %r15
cmpb $0x1, 0x1a78(%rbx)
jne 0x886e
movq %r12, %rdi
xorl %esi, %esi
callq 0x1365e
movq 0x2b20(%rbx), %r12
movq (%r12), %rcx
movl $0x1, %esi
movl $0x38, %edx
movq %r15, %rdi
callq 0x2240
movq 0x10(%r12), %rcx
movq 0x20(%r12), %rax
addq $0x38, %rax
movq %rax, 0x20(%r12)
cmpq %rax, %rcx
jae 0x88a1
movq %rax, 0x10(%r12)
cmpb $0x8, 0x18(%r15)
je 0x88be
movq 0x2b20(%rbx), %rdi
movl 0x28(%r15), %edx
shll $0x2, %edx
movq %r14, %rsi
callq 0x1348c
movb $0x1, 0x1a78(%rbx)
movb $0x1, %al
jmp 0x88d5
movl $0xa, 0x12e0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x1a78(%rdi)
jne 0x8904
movq 0x2b20(%rbx), %rdi
movl $0xbc614e, %esi         # imm = 0xBC614E
callq 0x1365e
cmpb $0x1, 0x1854(%rbx)
jne 0x896a
movq 0x2b20(%rbx), %rdi
movl 0x1280(%rbx), %esi
callq 0x1365e
cmpl $0x0, 0x1280(%rbx)
jle 0x896a
xorl %r14d, %r14d
movq 0x2b20(%rbx), %r15
movsbl 0x2e0(%rbx,%r14), %edi
movq (%r15), %rsi
callq 0x2190
movq 0x10(%r15), %rcx
movq 0x20(%r15), %rax
incq %rax
movq %rax, 0x20(%r15)
cmpq %rax, %rcx
jae 0x895b
movq %rax, 0x10(%r15)
incq %r14
movslq 0x1280(%rbx), %rax
cmpq %rax, %r14
jl 0x892b
movb $0x0, 0x1a78(%rbx)
incq 0x2b10(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13618
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x13378
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13378
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x1348c
movl 0xa8(%rbx), %ebp
movq 0x2b20(%rbx), %rdi
movl 0x12a8(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x240(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x2c4(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x2cc(%rbx), %esi
callq 0x1365e
addl $0x28, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13618
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x13378
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13378
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x1348c
movl 0xa8(%rbx), %r14d
movl 0xc8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13378
movq 0x2b20(%rbx), %rdi
movq 0xc0(%rbx), %rsi
movl 0xc8(%rbx), %edx
callq 0x1348c
movl 0xc8(%rbx), %r15d
movq 0x2b20(%rbx), %rdi
movl 0x1290(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x244(%rbx), %esi
callq 0x1365e
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x1365e
leal (%r14,%r15), %eax
addl $0x24, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xe26a
cmpl $-0x1, 0x294(%r14)
jne 0xe2c6
movl 0x2ac(%r14), %eax
leaq 0x10(,%rax,4), %rax
movslq 0x2c4(%r14), %rcx
testq %rcx, %rcx
jle 0xe296
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
leaq (%rax,%rdi,4), %rax
incq %rsi
cmpq %rsi, %rcx
jne 0xe287
leaq (%rax,%rcx,2), %rax
movabsq $-0x100000000000000, %rsi # imm = 0xFF00000000000000
orq %rax, %rsi
movq 0x2b20(%r14), %rdi
callq 0x13448
movq 0x2b10(%r14), %rsi
movq 0x2b20(%r14), %rdi
callq 0x13448
cmpl $0x0, 0x2ac(%r14)
je 0xe301
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
callq 0x13378
cmpl $0x2, 0x2ac(%r14)
jne 0xe301
shrq $0x20, %rbx
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1365e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xeb55
cmpb $0x0, 0x2b29(%rdi)
je 0xeb55
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x558f(%rip), %xmm0     # 0x140c0
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x5583(%rip), %xmm0     # 0x140c8
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xe30a
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xf3f1
cmpb $0x0, 0x2b29(%rdi)
je 0xf3f1
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x4cf3(%rip), %xmm0     # 0x140c0
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x4ce7(%rip), %xmm0     # 0x140c8
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xeb60
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xfc45
cmpb $0x0, 0x2b29(%rdi)
je 0xfc45
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x4493(%rip), %xmm0     # 0x140c8
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xf3fc
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xfc66
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xfd23
movl 0x290(%rbx), %edx
cmpl $-0x1, %edx
je 0xfd53
movq 0x2b18(%rbx), %r12
testq %r12, %r12
je 0xfd5f
xorl %eax, %eax
cmpq %r14, 0x268(%rbx)
jb 0xfd9a
movl 0x270(%rbx), %esi
leal (%rsi,%rsi), %edi
cmpl $0x2, %edx
cmovel %edi, %eax
leal (,%rsi,8), %edi
cmpl $0x5, %edx
cmovnel %eax, %edi
shll $0x2, %esi
cmpl $0xa, %edx
cmovnel %edi, %esi
cmpl $0x64, %ecx
jne 0xfce7
movl 0x2bc(%rbx), %esi
incl %esi
imull 0x2b4(%rbx), %esi
shll $0x2, %esi
movslq %esi, %rax
movl 0x29c(%rbx), %r15d
addl 0x298(%rbx), %r15d
imulq %r14, %rax
addq %rax, %r15
cmpq %r15, 0x10(%r12)
jb 0xfd69
movq (%r12), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0xfd73
movl $0x1, 0x8(%r12)
jmp 0xfd78
movq 0x2b18(%rbx), %r15
movl 0x29c(%rbx), %r14d
addl 0x298(%rbx), %r14d
movq (%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0xfd6d
movl $0x1, 0x8(%r15)
jmp 0xfd7f
movl $0x10, 0x12e0(%rbx)
jmp 0xfd69
movl $0x9, 0x12e0(%rbx)
xorl %eax, %eax
jmp 0xfd9a
movq %r14, 0x20(%r15)
jmp 0xfd7f
movq %r15, 0x20(%r12)
movq %r14, 0x260(%rbx)
movb $0x1, 0x2b4c(%rbx)
xorl %eax, %eax
movl %eax, 0x12e0(%rbx)
movq 0x2b18(%rbx), %rcx
movl %eax, 0x8(%rcx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%r14), %r15
cmpl $0x0, 0x8(%r15)
je 0x10048
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x4(%rsp), %r12d
testl %r12d, %r12d
je 0x1003a
movq 0x2b30(%r14), %rsi
cmpl %r12d, 0x2b38(%r14)
jge 0x100bf
testq %rsi, %rsi
je 0x10086
movq %rsi, %rdi
callq 0x21a0
movq $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
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x2030
movq %rax, %rsi
movq %rax, 0x2b30(%r14)
shll $0x2, %r12d
movq %r15, %rdi
movl %r12d, %edx
callq 0x136e6
movq 0x2b18(%r14), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1003a
movl 0x4(%rsp), %edx
movq 0x2b30(%r14), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xfda6
jmp 0x1003c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x11eb3
movq %r14, %rdi
callq 0x100fa
testb %al, %al
je 0x11ee7
cmpl $0x0, 0x2b70(%r14)
jle 0x11ee7
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 0x11ec6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x11f0f
movq %r14, %rdi
callq 0x100fa
testb %al, %al
je 0x11f43
cmpl $0x0, 0x2b70(%r14)
jle 0x11f43
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 0x11f22
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x133f8
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x2200
testl %eax, %eax
je 0x133f8
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x135a7
movl $0x1, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
retq
movb $0x0, 0xc(%rbx)
cmpb $0x1, 0x18(%rbx)
jne 0x135f7
leaq 0xee3(%rip), %rax       # 0x1449b
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, (%rbx)
testq %rax, %rax
je 0x1359c
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
movq (%rbx), %rcx
jmp 0x1360f
leaq 0xea0(%rip), %rax       # 0x1449e
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, %rcx
movq %rax, (%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x135a5
jmp 0x1359c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13722
movl $0x1, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x2200
testl %eax, %eax
je 0x13722
movb $0x1, 0xc(%rbx)
addq %r14, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $0x0, 0x10(%rdi)
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
movq 0x8(%rbx), %rax
movq %rax, %rcx
movq %rbx, -0x38(%rbp)
subq (%rbx), %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
je 0x277a
movl %ecx, %eax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
leaq -0x80(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x6164
movq %r15, %rdi
callq 0x3764
movq -0x38(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
xorl %r12d, %r12d
cmpq %r14, %rcx
je 0x2718
movl 0x4(%rax,%r14,4), %r12d
cmpl $0x0, (%rax,%r14,4)
je 0x2765
xorl %r13d, %r13d
movq -0x30(%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 0x638e
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2755
callq 0x21a0
incl %r13d
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpl (%rax,%r14,4), %r13d
jb 0x2722
incq %r14
cmpq -0x40(%rbp), %r14
jne 0x26d3
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, -0x4(%rax)
je 0x27a0
xorl %r15d, %r15d
movq -0x30(%rbp), %rdi
movl %r15d, %esi
callq 0x27e6
incl %r15d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpl -0x4(%rax), %r15d
jb 0x2783
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x3764
jmp 0x27d5
jmp 0x27bf
movq %rax, %r14
jmp 0x27d5
movq %rax, %r14
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x27d5
callq 0x21a0
movq -0x30(%rbp), %rdi
callq 0x37ba
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ac3
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 0x2abb
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 0x2ab0
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 0x2a97
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdi
ja 0x2a75
incl %edx
cmpq %rdx, %rcx
ja 0x2a59
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c07
cmpq %rcx, %r8
je 0x2b27
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 0x2b0b
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 0x2bf8
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 0x2be9
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 0x2bd8
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 0x2bb3
jmp 0x2bdc
xorpd %xmm0, %xmm0
movsd %xmm0, 0x30(%r14)
incl %ebx
cmpq %rbx, %rdi
ja 0x2b8f
incl %edx
movq %rdx, %rsi
cmpq %rdx, -0x30(%rbp)
ja 0x2b58
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4492(%rip), %rdi      # 0x70a0
leaq 0x44b2(%rip), %rsi      # 0x70c7
leaq 0x44b9(%rip), %rcx      # 0x70d5
movl $0x7c, %edx
callq 0x20f0
// File: /workspace/github_cpp_makefile_star2_O3/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 (%rsi), %rax
movq %rsi, -0x30(%rbp)
movq 0x8(%rsi), %rcx
movq %rcx, %rdx
subq %rax, %rdx
cmpq $0x18, %rdx
je 0x2dd7
xorl %edi, %edi
leaq (%rdi,%rdi,2), %r13
movq (%rax,%r13,8), %rsi
cmpq %rsi, 0x8(%rax,%r13,8)
je 0x2db0
movq %rdi, -0x38(%rbp)
xorl %edi, %edi
movq %rdi, %r12
shlq $0x6, %r12
movq 0x10(%rsi,%r12), %rdx
cmpq %rdx, 0x18(%rsi,%r12)
je 0x2d8c
movq %rdi, -0x40(%rbp)
xorl %r14d, %r14d
xorl %r15d, %r15d
addq %r14, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2d54
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2d63
movq %rbx, %rdi
callq 0x6732
movq -0x30(%rbp), %rax
movq (%rax), %rax
incq %r15
movq (%rax,%r13,8), %rcx
movq 0x10(%rcx,%r12), %rdx
movq 0x18(%rcx,%r12), %rcx
subq %rdx, %rcx
sarq $0x4, %rcx
addq $0x10, %r14
cmpq %r15, %rcx
ja 0x2d35
movq (%rax,%r13,8), %rsi
movq -0x40(%rbp), %rdi
incq %rdi
movq 0x8(%rax,%r13,8), %rcx
subq %rsi, %rcx
sarq $0x6, %rcx
cmpq %rdi, %rcx
ja 0x2d18
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x38(%rbp), %rdi
incq %rdi
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
decq %rdx
cmpq %rdi, %rdx
ja 0x2cff
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 0x2df9
callq 0x21a0
movq %r14, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ec9
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 0x2eb3
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 0x2eab
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 0x2e90
subl %r15d, %edi
incq %r11
cmpq %r9, %r11
jne 0x2e5c
incq %rdx
cmpq %rcx, %rdx
jne 0x2e38
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2efb
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 0x2eec
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2fdd
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 0x2fc6
popq %rbp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0x31a7
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 0x3183
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3195
movq %rbx, %rdi
movq %r15, %rdx
callq 0x65f6
movq (%r14), %rax
movq 0x8(%r14), %rcx
incq %r12
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
ja 0x315b
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 0x31c7
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0x3259
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq -0x30(%rbp), %r12
movsd (%rax,%r13,8), %xmm0
movq (%r14), %rdx
mulsd (%rdx,%r13,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3235
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3247
movq %rbx, %rdi
movq %r12, %rdx
callq 0x65f6
movq (%r15), %rax
movq 0x8(%r15), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r13, %rdx
ja 0x3209
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 0x327b
callq 0x21a0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c3d(%rip), %rax      # 0xa190
cvtsd2ss (%rax), %xmm0
leaq -0x15b0(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x38dc
movq %rbx, %rdi
callq 0x4114
movq 0x6c16(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x8(%rax), %xmm0
leaq -0x1298(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0x1298(%rbp), %rdi
callq 0x4114
movq 0x6bea(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rax), %xmm0
leaq -0xf80(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0xf80(%rbp), %rdi
callq 0x4114
movq 0x6bbe(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x18(%rax), %xmm0
leaq -0xc68(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0xc68(%rbp), %rdi
callq 0x4114
movq 0x6b92(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x20(%rax), %xmm0
leaq -0x950(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0x950(%rbp), %rdi
callq 0x4114
movq 0x6b66(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x28(%rax), %xmm0
leaq -0x638(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0x638(%rbp), %rdi
callq 0x4114
movq 0x6b3a(%rip), %rax      # 0xa190
xorps %xmm0, %xmm0
cvtsd2ss 0x30(%rax), %xmm0
leaq -0x320(%rbp), %rdi
movl $0x1, %esi
callq 0x38dc
leaq -0x320(%rbp), %rdi
callq 0x4114
leaq -0x320(%rbp), %rdi
callq 0x4b5e
leaq -0x638(%rbp), %rdi
callq 0x4b5e
leaq -0x950(%rbp), %rdi
callq 0x4b5e
leaq -0xc68(%rbp), %rdi
callq 0x4b5e
leaq -0xf80(%rbp), %rdi
callq 0x4b5e
leaq -0x1298(%rbp), %rdi
callq 0x4b5e
leaq -0x15b0(%rbp), %rdi
callq 0x4b5e
xorl %eax, %eax
addq $0x15a8, %rsp           # imm = 0x15A8
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x320(%rbp), %rdi
callq 0x4b5e
jmp 0x36f1
jmp 0x36ee
movq %rax, %rbx
leaq -0x638(%rbp), %rdi
callq 0x4b5e
jmp 0x3704
jmp 0x3701
movq %rax, %rbx
leaq -0x950(%rbp), %rdi
callq 0x4b5e
jmp 0x3717
jmp 0x3714
movq %rax, %rbx
leaq -0xc68(%rbp), %rdi
callq 0x4b5e
jmp 0x372a
jmp 0x3727
movq %rax, %rbx
leaq -0xf80(%rbp), %rdi
callq 0x4b5e
leaq -0x1298(%rbp), %rdi
callq 0x4b5e
leaq -0x15b0(%rbp), %rdi
callq 0x4b5e
movq %rbx, %rdi
callq 0x2290
jmp 0x3758
movq %rax, %rbx
jmp 0x3736
jmp 0x375f
movq %rax, %rbx
jmp 0x3742