// File: NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::Read2TDC8PCI2Header()
__int32	LMF_IO::Read2TDC8PCI2Header()
/////////////////////////////////////////////////////////////////
{
	unsigned __int64 StartPosition = 0;
	__int32 old_byte_counter = 0;
	bool desperate_mode = false;

	TDC8PCI2.variable_event_length = 0;
	__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 >> LMF_Version; byte_counter += sizeof(__int32);
	*input_lmf >> system_timeout; byte_counter += sizeof(__int32);		// system time-out
	
	if (LMF_Version >= 9 && DAQVersion >= 20110208) {				// handle new CStringArray information
		unsigned __int32 ui32CStringCount = system_timeout;			// # of defined CStrings

		__int32 iDummy;
		__int8 cDummy;
		for(unsigned __int32 ui32Count=0;ui32Count<ui32CStringCount;ui32Count++) {	// now read every CString
			*input_lmf >> iDummy; byte_counter += sizeof(__int32);					// how many characters to read
			for(unsigned __int32 ui32Count2=0;ui32Count2<(unsigned int)iDummy;ui32Count2++)		// read character by character
				input_lmf->read(&cDummy,1);							// skip over DAq-source code
			byte_counter += iDummy;
		}
		*input_lmf >> system_timeout; byte_counter += sizeof(__int32);		// again system time-out
	}
	
	*input_lmf >> time_reference; byte_counter += sizeof(__int32);
	*input_lmf >> common_mode; byte_counter += sizeof(__int32);			// 0 common start    1 common stop
	*input_lmf >> tdcresolution; byte_counter += sizeof(double);	// tdc resolution in ns

	*input_lmf >> TDCDataType; byte_counter += sizeof(__int32);
	*input_lmf >> timerange; byte_counter += sizeof(__int32);			// time range of the tdc in microseconds
	if (DAQVersion >= 20080507 && DAQVersion < 20110208) {
		TDC8PCI2.variable_event_length = 1;
		__int32 iDummy;
		unsigned __int64 i64temp;
		*input_lmf >> i64temp;		number_of_channels =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of channels
		*input_lmf >> i64temp;		max_number_of_hits =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of hits
		if (int(number_of_channels) > num_channels)	{errorflag = 19;	return -100000;}
		if (int(max_number_of_hits) > num_ions)		{errorflag = 20;	return -100000;}

		*input_lmf >> i64temp;		number_of_channels2 =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of channels2
		*input_lmf >> i64temp;		max_number_of_hits2 =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of hits2
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);

		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);

		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);		// Sync Mode    (parameter 60)
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);		// IO address 2 (parameter 61)
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);
		*input_lmf >> iDummy;			byte_counter += sizeof(__int32);

		goto L200;
	}

	if (DAQVersion >= 20110208) {
		TDC8PCI2.variable_event_length = 1;
		__int32 iDummy;
		unsigned __int64 i64temp;
		*input_lmf >> i64temp;		number_of_channels =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of channels
		*input_lmf >> i64temp;		max_number_of_hits =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of hits
		if (int(number_of_channels) > num_channels)	{errorflag = 19;	return -100000;}
		if (int(max_number_of_hits) > num_ions)		{errorflag = 20;	return -100000;}

		*input_lmf >> i64temp;		number_of_channels2 =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of channels2
		*input_lmf >> i64temp;		max_number_of_hits2 =__int32(i64temp);	byte_counter += sizeof(unsigned __int64);			// number of hits2
		
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // indicator 2nd module
		
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
		
		
		
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // gate delay
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // gate open
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // write empty events
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // trigger at falling edge
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // trigger at rising edge
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
		
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32);

		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // gate delay
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // gate open
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // write empty events
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // trigger at falling edge
		*input_lmf >> iDummy;		byte_counter += sizeof(__int32); // trigger at rising edge
		if ((unsigned) byte_counter < User_header_size - 20) {
			*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
			*input_lmf >> iDummy;		byte_counter += sizeof(__int32);
		}

		goto L200;
	}
	

	*input_lmf >> number_of_channels; byte_counter += sizeof(__int32);	// number of channels
	*input_lmf >> max_number_of_hits; byte_counter += sizeof(__int32);	// number of hits
	if (int(number_of_channels) > num_channels)	{errorflag = 19;	return -100000;}
	if (int(max_number_of_hits) > num_ions)		{errorflag = 20;	return -100000;}
	*input_lmf >> number_of_channels2; byte_counter += sizeof(__int32);	// number of channels2
	*input_lmf >> max_number_of_hits2; byte_counter += sizeof(__int32);	// number of hits2
	*input_lmf >> data_format_in_userheader;	byte_counter += sizeof(__int32);				// data format (2=short integer)

//	input_lmf->flush();
	StartPosition = input_lmf->tell();
	old_byte_counter = byte_counter;
	desperate_mode = false;
L50:
	byte_counter = old_byte_counter;

//	TRY

	if (TDC8PCI2.use_normal_method_2nd_card) {
		if (DAQVersion >= 20020408) {
			*input_lmf >> TDC8PCI2.GateDelay_1st_card;			byte_counter += sizeof(__int32); // gate delay 1st card
			*input_lmf >> TDC8PCI2.OpenTime_1st_card ;			byte_counter += sizeof(__int32); // open time 1st card
			*input_lmf >> TDC8PCI2.WriteEmptyEvents_1st_card;	byte_counter += sizeof(__int32); // write empty events 1st card
			*input_lmf >> TDC8PCI2.TriggerFalling_1st_card;		byte_counter += sizeof(__int32); // trigger falling edge 1st card
			*input_lmf >> TDC8PCI2.TriggerRising_1st_card;		byte_counter += sizeof(__int32); // trigger rising edge 1st card
			*input_lmf >> TDC8PCI2.EmptyCounter_1st_card;		byte_counter += sizeof(__int32); // EmptyCounter 1st card
			*input_lmf >> TDC8PCI2.EmptyCounter_since_last_Event_1st_card;	byte_counter += sizeof(__int32); // Empty Counter since last event 1st card
		}
		*input_lmf >> TDC8PCI2.sync_test_on_off;			byte_counter += sizeof(__int32); // sync test on/off
		*input_lmf >> TDC8PCI2.io_address_2nd_card;			byte_counter += sizeof(__int32); // io address 2nd card
		*input_lmf >> TDC8PCI2.GateDelay_2nd_card;			byte_counter += sizeof(__int32); // gate delay 2nd card
		*input_lmf >> TDC8PCI2.OpenTime_2nd_card;			byte_counter += sizeof(__int32); // open time 2nd card
		*input_lmf >> TDC8PCI2.WriteEmptyEvents_2nd_card;	byte_counter += sizeof(__int32); // write empty events 2nd card
		*input_lmf >> TDC8PCI2.TriggerFallingEdge_2nd_card;	byte_counter += sizeof(__int32); // trigger falling edge 2nd card
		*input_lmf >> TDC8PCI2.TriggerRisingEdge_2nd_card;	byte_counter += sizeof(__int32); // trigger rising edge 2nd card
		*input_lmf >> TDC8PCI2.EmptyCounter_2nd_card;		byte_counter += sizeof(__int32); // EmptyCounter 2nd card
		*input_lmf >> TDC8PCI2.EmptyCounter_since_last_Event_2nd_card;	byte_counter += sizeof(__int32); // Empty Counter since last event 2nd card
	} else {
		*input_lmf >> module_2nd;							byte_counter += sizeof(__int32);	// indicator for 2nd module data
		*input_lmf >> TDC8PCI2.GateDelay_1st_card;			byte_counter += sizeof(__int32); // gate delay 1st card
		*input_lmf >> TDC8PCI2.OpenTime_1st_card ;			byte_counter += sizeof(__int32); // open time 1st card
		*input_lmf >> TDC8PCI2.WriteEmptyEvents_1st_card;	byte_counter += sizeof(__int32); // write empty events 1st card
		*input_lmf >> TDC8PCI2.TriggerFalling_1st_card;		byte_counter += sizeof(__int32); // trigger falling edge 1st card
		*input_lmf >> TDC8PCI2.TriggerRising_1st_card;		byte_counter += sizeof(__int32); // trigger rising edge 1st card

		*input_lmf >> TDC8PCI2.GateDelay_2nd_card;			byte_counter += sizeof(__int32); // gate delay 2nd card
		if (!desperate_mode) { // this is only a quick fix.
			*input_lmf >> TDC8PCI2.OpenTime_2nd_card;			byte_counter += sizeof(__int32); // open time 2nd card
			*input_lmf >> TDC8PCI2.WriteEmptyEvents_2nd_card;	byte_counter += sizeof(__int32); // write empty events 2nd card
			*input_lmf >> TDC8PCI2.TriggerFallingEdge_2nd_card;	byte_counter += sizeof(__int32); // trigger falling edge 2nd card
			*input_lmf >> TDC8PCI2.TriggerRisingEdge_2nd_card;	byte_counter += sizeof(__int32); // trigger rising edge 2nd card
		}
	}

/*
	CATCH( CArchiveException, e )
		if (!TDC8PCI2.use_normal_method_2nd_card) return 0;
		TDC8PCI2.use_normal_method_2nd_card = false;
		in_ar->Close(); delete in_ar; in_ar = 0;
		input_lmf->seek(StartPosition);
		in_ar = new CArchive(input_lmf,CArchive::load);
		goto L50;
	END_CATCH
*/

L200:

	if (DAQVersion < 20080507) {
		if ((unsigned) byte_counter != User_header_size - 12) {
			if (desperate_mode) return 0;
			if (!TDC8PCI2.use_normal_method_2nd_card) {
				desperate_mode = true;
			}
			TDC8PCI2.use_normal_method_2nd_card = false;
			input_lmf->seek(StartPosition);
			goto L50;
		}
	}

	if (DAQVersion >= 20080507 && DAQVersion < 20110208) {
		if ((unsigned) byte_counter != User_header_size - 20) {
			byte_counter = -1000; // XXX (this line is okay. I have put the XXX just to bring it to attention)
		}
	}

	return byte_counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movl $0x0, 0x159c(%rsi)
movl $0x0, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x12c8, %rsi           # imm = 0x12C8
callq 0x1d1f0
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x8, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x2a4, %rsi            # imm = 0x2A4
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x2a8, %rsi            # imm = 0x2A8
callq 0x1cb80
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x129c, %rsi           # imm = 0x129C
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movl 0x129c(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x2b18(%rax), %rdi
movq -0x30(%rbp), %rsi
movl 0x129c(%rax), %edx
callq 0x1cbe0
movq -0x70(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq 0x129c(%rdi), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rsi
addq $0xa0, %rdi
callq 0x2250
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x59fc
movq -0x68(%rbp), %rdi
callq 0x2240
movq -0x70(%rbp), %rsi
movq $0x0, -0x30(%rbp)
movl 0x129c(%rsi), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x12a4, %rsi           # imm = 0x12A4
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x128c, %rsi           # imm = 0x128C
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
cmpl $0x9, 0x12a4(%rax)
jl 0x5b1d
movq -0x70(%rbp), %rax
cmpl $0x132db80, 0x280(%rax) # imm = 0x132DB80
jb 0x5b1d
movq -0x70(%rbp), %rax
movl 0x128c(%rax), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x5afb
movq -0x70(%rbp), %rax
movq 0x2b18(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x38(%rbp), %eax
jae 0x5ae7
movq -0x70(%rbp), %rax
movq 0x2b18(%rax), %rdi
leaq -0x39(%rbp), %rsi
movl $0x1, %edx
callq 0x1cbe0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x5abb
movl -0x38(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x5a8d
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x128c, %rsi           # imm = 0x128C
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x240, %rsi            # imm = 0x240
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1294, %rsi           # imm = 0x1294
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x12b8, %rsi           # imm = 0x12B8
callq 0x1d1f0
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x8, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x12ac, %rsi           # imm = 0x12AC
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x2b0, %rsi            # imm = 0x2B0
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
cmpl $0x132677b, 0x280(%rax) # imm = 0x132677B
jb 0x5df2
movq -0x70(%rbp), %rax
cmpl $0x132db80, 0x280(%rax) # imm = 0x132DB80
jae 0x5df2
movq -0x70(%rbp), %rax
movl $0x1, 0x159c(%rax)
movq 0x2b18(%rax), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %ecx, 0x2b4(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rcx
movq -0x50(%rbp), %rax
movl %eax, 0x2bc(%rcx)
movslq -0x24(%rbp), %rax
addq $0x8, %rax
movl %eax, -0x24(%rbp)
movl 0x2b4(%rcx), %eax
cmpl 0x2b70(%rcx), %eax
jle 0x5c77
movq -0x70(%rbp), %rax
movl $0x13, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rcx
movl 0x2bc(%rcx), %eax
cmpl 0x2b74(%rcx), %eax
jle 0x5ca3
movq -0x70(%rbp), %rax
movl $0x14, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rax
movq 0x2b18(%rax), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %ecx, 0x2b8(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %ecx, 0x2c0(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
jmp 0x66a7
movq -0x70(%rbp), %rax
cmpl $0x132db80, 0x280(%rax) # imm = 0x132DB80
jb 0x6153
movq -0x70(%rbp), %rax
movl $0x1, 0x159c(%rax)
movq 0x2b18(%rax), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x60(%rbp), %rcx
movl %ecx, 0x2b4(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rcx
movq -0x60(%rbp), %rax
movl %eax, 0x2bc(%rcx)
movslq -0x24(%rbp), %rax
addq $0x8, %rax
movl %eax, -0x24(%rbp)
movl 0x2b4(%rcx), %eax
cmpl 0x2b70(%rcx), %eax
jle 0x5e8e
movq -0x70(%rbp), %rax
movl $0x13, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rcx
movl 0x2bc(%rcx), %eax
cmpl 0x2b74(%rcx), %eax
jle 0x5eba
movq -0x70(%rbp), %rax
movl $0x14, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rax
movq 0x2b18(%rax), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x60(%rbp), %rcx
movl %ecx, 0x2b8(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1cbb0
movq -0x70(%rbp), %rax
movq -0x60(%rbp), %rcx
movl %ecx, 0x2c0(%rax)
movslq -0x24(%rbp), %rcx
addq $0x8, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rcx
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl 0x29c(%rcx), %ecx
subl $0x14, %ecx
cmpl %ecx, %eax
jae 0x614e
movq -0x70(%rbp), %rax
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
jmp 0x66a7
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x2b4, %rsi            # imm = 0x2B4
callq 0x1cb80
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x2bc, %rsi            # imm = 0x2BC
callq 0x1cb80
movq -0x70(%rbp), %rcx
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movl 0x2b4(%rcx), %eax
cmpl 0x2b70(%rcx), %eax
jle 0x61c3
movq -0x70(%rbp), %rax
movl $0x13, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rcx
movl 0x2bc(%rcx), %eax
cmpl 0x2b74(%rcx), %eax
jle 0x61ef
movq -0x70(%rbp), %rax
movl $0x14, 0x12e0(%rax)
movl $0xfffe7960, -0x4(%rbp) # imm = 0xFFFE7960
jmp 0x6750
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x2b8, %rsi            # imm = 0x2B8
callq 0x1cb80
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x2c0, %rsi            # imm = 0x2C0
callq 0x1cb80
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x290, %rsi            # imm = 0x290
callq 0x1cf60
movq -0x70(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq $0x4, %rcx
movl %ecx, -0x24(%rbp)
movq 0x2b18(%rax), %rdi
callq 0x1d110
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movq -0x70(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, -0x24(%rbp)
testb $0x1, 0x1575(%rax)
je 0x64ff
movq -0x70(%rbp), %rax
cmpl $0x1317cb8, 0x280(%rax) # imm = 0x1317CB8
jb 0x63a4
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x4, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x8, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0xc, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x10, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x14, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x18, %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x20, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x24, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x28, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x2c, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x30, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x34, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x38, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x3c, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x40, %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
jmp 0x66a5
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x1288, %rsi           # imm = 0x1288
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x4, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x8, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0xc, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x10, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x28, %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x66a3
movq -0x70(%rbp), %rsi
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x2c, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x30, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x34, %rsi
callq 0x1cf60
movq -0x70(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
movq 0x2b18(%rsi), %rdi
addq $0x1558, %rsi           # imm = 0x1558
addq $0x38, %rsi
callq 0x1cf60
movslq -0x24(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x24(%rbp)
jmp 0x66a5
jmp 0x66a7
movq -0x70(%rbp), %rax
cmpl $0x132677b, 0x280(%rax) # imm = 0x132677B
jae 0x670d
movq -0x70(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x29c(%rcx), %ecx
subl $0xc, %ecx
cmpl %ecx, %eax
je 0x670b
testb $0x1, -0x1d(%rbp)
je 0x66da
movl $0x0, -0x4(%rbp)
jmp 0x6750
movq -0x70(%rbp), %rax
testb $0x1, 0x1575(%rax)
jne 0x66eb
movb $0x1, -0x1d(%rbp)
movq -0x70(%rbp), %rax
movb $0x0, 0x1575(%rax)
movq 0x2b18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x2440
jmp 0x6273
jmp 0x670d
movq -0x70(%rbp), %rax
cmpl $0x132677b, 0x280(%rax) # imm = 0x132677B
jb 0x674a
movq -0x70(%rbp), %rax
cmpl $0x132db80, 0x280(%rax) # imm = 0x132DB80
jae 0x674a
movq -0x70(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x29c(%rcx), %ecx
subl $0x14, %ecx
cmpl %ecx, %eax
je 0x6748
movl $0xfffffc18, -0x24(%rbp) # imm = 0xFFFFFC18
jmp 0x674a
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)