// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadTDC8HPHeader_LMFV_1_to_7(int)
__int32	LMF_IO::ReadTDC8HPHeader_LMFV_1_to_7(__int32 byte_counter_external)
/////////////////////////////////////////////////////////////////
{
	this->TDC8HP.ui32oldRollOver = 0;
	this->TDC8HP.ui64RollOvers = 0;
	this->TDC8HP.ui32AbsoluteTimeStamp = 0;
	this->TDC8HP.ui64TDC8HP_AbsoluteTimeStamp = 0;

	__int32		byte_counter = 0;

	unsigned __int64 StartPosition1 = input_lmf->tell();

	*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->flush();
	unsigned __int64 StartPosition = input_lmf->tell();
	__int32 old_byte_counter = byte_counter;
L50:
	byte_counter = old_byte_counter;

	if (DAQVersion > 20080000) TDC8HP.UserHeaderVersion = 4;

	if (TDC8HP.UserHeaderVersion >= 1) {
		*input_lmf >> LMF_Version; byte_counter += sizeof(__int32);
		if (LMF_Version == 8) TDC8HP.UserHeaderVersion = 5;
		if (LMF_Version >= 9) TDC8HP.UserHeaderVersion = 6;
		if (LMF_Version >= 10) TDC8HP.UserHeaderVersion = 7;
	}
	
	if (TDC8HP.UserHeaderVersion >= 5) {
		input_lmf->seek(StartPosition1);
		if (TDC8HP.UserHeaderVersion < 7) return ReadTDC8HPHeader_LMFV_8_to_9();
		return ReadTDC8HPHeader_LMFV_10();
	}

	*input_lmf >> time_reference; byte_counter += sizeof(__int32);
	*input_lmf >> tdcresolution; byte_counter += sizeof(double);		// tdc resolution in ns
	if (tdcresolution < 0.0001 || tdcresolution > 100.) {
		if (TDC8HP.UserHeaderVersion != 0) return 0;
		TDC8HP.UserHeaderVersion = 1;

		input_lmf->seek(StartPosition);
		goto L50;
	}
	//tdcresolution = double(__int32(tdcresolution*1000000+0.01))/1000000.;
	if (TDC8HP.UserHeaderVersion >= 1) {
		*input_lmf >> TDCDataType; byte_counter += sizeof(__int32);
	}


	unsigned __int64 TempPosition = input_lmf->tell();
	bool bRead32bit = false;

L100:

	if (DAQVersion < 20080000 || bRead32bit) {
		*input_lmf >> number_of_channels; byte_counter += sizeof(__int32);			// number of channels
	} else {
		unsigned __int64 temp;
		*input_lmf >> temp;
		if (temp > 4000000000) {
			input_lmf->seek(TempPosition);
			bRead32bit = true;
			goto L100;
		}
		number_of_channels =__int32(temp);
		byte_counter += sizeof(unsigned __int64);			// number of channels
	}

	if (number_of_channels < 1 || number_of_channels > 100) {
		if (TDC8HP.UserHeaderVersion != 0) return 0;
//		in_ar->Close(); delete in_ar; in_ar = 0;
		input_lmf->seek(StartPosition);
//		in_ar = new CArchive(input_lmf,CArchive::load);
		goto L50;
	}


	if (DAQVersion < 20080000 || bRead32bit) {
		*input_lmf >> max_number_of_hits; byte_counter += sizeof(__int32);			// number of hits
	} else {
		unsigned __int64 temp;
		*input_lmf >> temp;
		max_number_of_hits =__int32(temp);
		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;}

	if (max_number_of_hits < 1 || max_number_of_hits > 100) {
		if (TDC8HP.UserHeaderVersion != 0) return 0;
//		in_ar->Close(); delete in_ar; in_ar = 0;
		input_lmf->seek(StartPosition);
//		in_ar = new CArchive(input_lmf,CArchive::load);
		goto L50;
	}

	*input_lmf >> data_format_in_userheader;	byte_counter += sizeof(__int32);	// data format (2=short integer)
	*input_lmf >> TDC8HP.no_config_file_read;	byte_counter += sizeof(__int32);	// parameter 60-1
	if (DAQVersion < 20080000 || bRead32bit) {
		unsigned __int32 temp;
		*input_lmf >> temp; TDC8HP.RisingEnable_p61 = temp;		byte_counter += sizeof(__int32);	// parameter 61-1
		*input_lmf >> temp; TDC8HP.FallingEnable_p62 = temp;		byte_counter += sizeof(__int32);	// parameter 62-1
	} else {
		*input_lmf >> TDC8HP.RisingEnable_p61;		byte_counter += sizeof(__int64);	// parameter 61-1
		*input_lmf >> TDC8HP.FallingEnable_p62;		byte_counter += sizeof(__int64);	// parameter 62-1
	}
	*input_lmf >> TDC8HP.TriggerEdge_p63;		byte_counter += sizeof(__int32);	// parameter 63-1
	*input_lmf >> TDC8HP.TriggerChannel_p64;	byte_counter += sizeof(__int32);	// parameter 64-1
	*input_lmf >> TDC8HP.OutputLevel_p65;		byte_counter += sizeof(__int32);	// parameter 65-1
	*input_lmf >> TDC8HP.GroupingEnable_p66;	byte_counter += sizeof(__int32);	// parameter 66-1
	*input_lmf >> TDC8HP.AllowOverlap_p67;		byte_counter += sizeof(__int32);	// parameter 67-1
	*input_lmf >> TDC8HP.TriggerDeadTime_p68;	byte_counter += sizeof(double);		// parameter 68-1
	*input_lmf >> TDC8HP.GroupRangeStart_p69;	byte_counter += sizeof(double);		// parameter 69-1
	*input_lmf >> TDC8HP.GroupRangeEnd_p70;		byte_counter += sizeof(double);		// parameter 70-1
	*input_lmf >> TDC8HP.ExternalClock_p71;		byte_counter += sizeof(__int32);	// parameter 71-1
	*input_lmf >> TDC8HP.OutputRollOvers_p72;	byte_counter += sizeof(__int32);	// parameter 72-1
	*input_lmf >> TDC8HP.DelayTap0_p73;			byte_counter += sizeof(__int32);	// parameter 73-1
	*input_lmf >> TDC8HP.DelayTap1_p74;			byte_counter += sizeof(__int32);	// parameter 74-1
	*input_lmf >> TDC8HP.DelayTap2_p75;			byte_counter += sizeof(__int32);	// parameter 75-1
	*input_lmf >> TDC8HP.DelayTap3_p76;			byte_counter += sizeof(__int32);	// parameter 76-1
	*input_lmf >> TDC8HP.INL_p80;				byte_counter += sizeof(__int32);	// parameter 80-1
	*input_lmf >> TDC8HP.DNL_p81;				byte_counter += sizeof(__int32);	// parameter 81-1

	*input_lmf >> TDC8HP.csConfigFile_Length;
	byte_counter += sizeof(__int32);
	__int8_temp = new __int8[TDC8HP.csConfigFile_Length+1];
	input_lmf->read(__int8_temp,TDC8HP.csConfigFile_Length);
	__int8_temp[TDC8HP.csConfigFile_Length] = 0;
	TDC8HP.csConfigFile = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += TDC8HP.csConfigFile_Length;

	*input_lmf >> TDC8HP.csINLFile_Length;
	byte_counter += sizeof(__int32);
	__int8_temp = new __int8[TDC8HP.csINLFile_Length+1];
	input_lmf->read(__int8_temp,TDC8HP.csINLFile_Length);
	__int8_temp[TDC8HP.csINLFile_Length] = 0;
	TDC8HP.csINLFile = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += TDC8HP.csINLFile_Length;

	*input_lmf >> TDC8HP.csDNLFile_Length;
	byte_counter += sizeof(__int32);
	__int8_temp = new __int8[TDC8HP.csDNLFile_Length+1];
	input_lmf->read(__int8_temp,TDC8HP.csDNLFile_Length);
	__int8_temp[TDC8HP.csDNLFile_Length] = 0;
	TDC8HP.csDNLFile = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += TDC8HP.csDNLFile_Length;

	if (DAQVersion < 20080000) {
		if ((unsigned) byte_counter == User_header_size - 12 - 4) {  // Cobold 2002 v11
			if (TDC8HP.UserHeaderVersion < 2) TDC8HP.UserHeaderVersion = 2;
			*input_lmf >> TDC8HP.SyncValidationChannel;  byte_counter += sizeof(__int32); 	// parameter 77-1
		}
		if ((unsigned) byte_counter == User_header_size - 12 - 4 - 4) { // never used in official Cobold releases
			TDC8HP.UserHeaderVersion = 3;
			*input_lmf >> TDC8HP.SyncValidationChannel;  byte_counter += sizeof(__int32);
			*input_lmf >> TDC8HP.VHR_25ps;				 byte_counter += sizeof(bool);
		}
	} else {
		if (this->data_format_in_userheader == -1) TDC8HP.variable_event_length = 1;
		*input_lmf >> TDC8HP.SyncValidationChannel;  byte_counter += sizeof(__int32);
		*input_lmf >> TDC8HP.VHR_25ps;  byte_counter += sizeof(bool);

		*input_lmf >> TDC8HP.GroupTimeOut;  byte_counter += sizeof(double);

		*input_lmf >> TDC8HP.SSEEnable;  byte_counter += sizeof(bool);
		*input_lmf >> TDC8HP.MMXEnable;  byte_counter += sizeof(bool);
		*input_lmf >> TDC8HP.DMAEnable;  byte_counter += sizeof(bool);

		unsigned __int64 TempPosition = input_lmf->tell();
		bool bNoTDCInfoRead = false;
		__int32 old_byte_counter2 = byte_counter;

L200:
		byte_counter = old_byte_counter2;
		input_lmf->seek(TempPosition);

		if (!bNoTDCInfoRead) {
			// read TDCInfo
			*input_lmf >> TDC8HP.Number_of_TDCs;  byte_counter += sizeof(__int32);
				if (TDC8HP.Number_of_TDCs<0 || TDC8HP.Number_of_TDCs>3) {bNoTDCInfoRead = true;	goto L200;}
			for(__int32 iCount=0;iCount<TDC8HP.Number_of_TDCs;++iCount) {
				*input_lmf >> TDC8HP.TDC_info[iCount]->index;				byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->channelCount;		byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->channelStart;		byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->highResChannelCount;	byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->highResChannelStart;	byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->lowResChannelCount;	byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->lowResChannelStart;	byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->resolution;			byte_counter += sizeof(double);
				*input_lmf >> TDC8HP.TDC_info[iCount]->serialNumber;		byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->version;				byte_counter += sizeof(__int32);
				*input_lmf >> TDC8HP.TDC_info[iCount]->fifoSize;			byte_counter += sizeof(__int32);
				input_lmf->read((__int8*)TDC8HP.TDC_info[iCount]->INLCorrection,sizeof(__int32)*8*1024);	byte_counter += sizeof(__int32)*8*1024;
				input_lmf->read((__int8*)TDC8HP.TDC_info[iCount]->DNLData,sizeof(unsigned __int16)*8*1024);	byte_counter += sizeof(unsigned __int16)*8*1024;
				*input_lmf >> TDC8HP.TDC_info[iCount]->flashValid;			byte_counter += sizeof(bool);
			}
		}

		bool bool_dummy;
		*input_lmf >> bool_dummy; byte_counter += sizeof(bool);
		*input_lmf >> bool_dummy; byte_counter += sizeof(bool);
		*input_lmf >> bool_dummy; byte_counter += sizeof(bool);
		*input_lmf >> bool_dummy; byte_counter += sizeof(bool);
		*input_lmf >> bool_dummy; byte_counter += sizeof(bool);

		*input_lmf >> TDC8HP.i32NumberOfDAQLoops;	byte_counter += sizeof(__int32);
		if (TDC8HP.i32NumberOfDAQLoops == 0x12345678) TDC8HP.i32NumberOfDAQLoops = 1;
		*input_lmf >> TDC8HP.TDC8HP_DriverVersion;	byte_counter += sizeof(__int32);
		if (TDC8HP.TDC8HP_DriverVersion == 0x12345678) TDC8HP.TDC8HP_DriverVersion = 0;
		*input_lmf >> TDC8HP.iTriggerChannelMask;	byte_counter += sizeof(__int32);
		if (TDC8HP.iTriggerChannelMask == 0x12345678) TDC8HP.iTriggerChannelMask = 0;
		*input_lmf >> TDC8HP.iTime_zero_channel;	byte_counter += sizeof(__int32);
		if (TDC8HP.iTime_zero_channel == 0x12345678) TDC8HP.iTime_zero_channel = -1;

		if (TDC8HP.i32NumberOfDAQLoops != 0x12345678) {
			if (TDC8HP.i32NumberOfDAQLoops<-2 || TDC8HP.i32NumberOfDAQLoops > 2e6) {bNoTDCInfoRead = true;	goto L200;}
		}
		
		if (TDC8HP.iTime_zero_channel != 0x12345678) {
			if (TDC8HP.iTime_zero_channel <-1 || TDC8HP.iTime_zero_channel  > 50)  {bNoTDCInfoRead = true;	goto L200;}
		}

		__int32 int_dummy;
		*input_lmf >> int_dummy; byte_counter += sizeof(__int32);

		double double_dummy;
		*input_lmf >> double_dummy; byte_counter += sizeof(double);
		*input_lmf >> double_dummy; byte_counter += sizeof(double);
		*input_lmf >> double_dummy; byte_counter += sizeof(double);
		*input_lmf >> double_dummy; byte_counter += sizeof(double);
		*input_lmf >> double_dummy; byte_counter += sizeof(double);
		
		if (!bNoTDCInfoRead && ((unsigned) (byte_counter_external + byte_counter) == User_header_size+4)) {bNoTDCInfoRead = true;	goto L200;}
	}
	
	if (bRead32bit && LMF_Version == 6) {
		TDC8HP.exotic_file_type = 1;
	}

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, 0x160(%rsp)
movq %rdi, %rbx
movq $0x0, 0x1548(%rdi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x1534(%rdi)
movq 0x2b18(%rdi), %rdi
movq 0x20(%rdi), %rax
movq %rax, 0x180(%rsp)
leaq 0x12c8(%rbx), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
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 0x139ac
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), %r15d
leal 0x14(%r15), %ebp
movq 0x2b18(%rbx), %rax
movq 0x20(%rax), %r12
leaq 0x12a4(%rbx), %rax
movq %rax, 0x188(%rsp)
addl $0x18, %r15d
leaq 0x240(%rbx), %rax
movq %rax, 0x198(%rsp)
leaq 0x12b8(%rbx), %rax
movq %rax, 0x190(%rsp)
leaq 0x12ac(%rbx), %rax
movq %rax, 0x170(%rsp)
leaq 0x2b4(%rbx), %rax
movq %rax, 0x178(%rsp)
leaq 0x2bc(%rbx), %rax
movq %rax, 0x168(%rsp)
leaq 0x290(%rbx), %rax
movq %rax, 0x58(%rsp)
leaq 0x13fc(%rbx), %rax
movq %rax, 0x158(%rsp)
leaq 0x1400(%rbx), %rax
movq %rax, 0x80(%rsp)
leaq 0x1408(%rbx), %rax
movq %rax, 0x78(%rsp)
leaq 0x1410(%rbx), %rax
movq %rax, 0x150(%rsp)
leaq 0x1414(%rbx), %rax
movq %rax, 0x148(%rsp)
leaq 0x1418(%rbx), %rax
movq %rax, 0x140(%rsp)
leaq 0x141c(%rbx), %rax
movq %rax, 0x138(%rsp)
leaq 0x1424(%rbx), %rax
movq %rax, 0x130(%rsp)
leaq 0x1428(%rbx), %rax
movq %rax, 0x128(%rsp)
leaq 0x1430(%rbx), %rax
movq %rax, 0x120(%rsp)
leaq 0x1438(%rbx), %rax
movq %rax, 0x118(%rsp)
leaq 0x1440(%rbx), %rax
movq %rax, 0x110(%rsp)
leaq 0x1444(%rbx), %rax
movq %rax, 0x108(%rsp)
leaq 0x1448(%rbx), %rax
movq %rax, 0x100(%rsp)
leaq 0x144c(%rbx), %rax
movq %rax, 0xf8(%rsp)
leaq 0x1450(%rbx), %rax
movq %rax, 0xf0(%rsp)
leaq 0x1454(%rbx), %rax
movq %rax, 0xe8(%rsp)
leaq 0x1458(%rbx), %rax
movq %rax, 0xe0(%rsp)
leaq 0x145c(%rbx), %rax
movq %rax, 0xd8(%rsp)
leaq 0x14d0(%rbx), %rax
movq %rax, 0xd0(%rsp)
leaq 0x1470(%rbx), %rax
movq %rax, 0xc8(%rsp)
leaq 0x14d4(%rbx), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1490(%rbx), %rax
movq %rax, 0xb8(%rsp)
leaq 0x14d8(%rbx), %rax
movq %rax, 0xb0(%rsp)
leaq 0x14b0(%rbx), %rax
movq %rax, 0xa8(%rsp)
leaq 0x14e4(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x14e0(%rbx), %rax
movq %rax, 0x50(%rsp)
leaq 0x14f0(%rbx), %rax
movq %rax, 0xa0(%rsp)
leaq 0x14ec(%rbx), %rax
movq %rax, 0x98(%rsp)
leaq 0x14ed(%rbx), %rax
movq %rax, 0x90(%rsp)
leaq 0x14ee(%rbx), %rax
movq %rax, 0x88(%rsp)
leaq 0x14f8(%rbx), %rax
movq %rax, 0x60(%rsp)
leaq 0x1518(%rbx), %rax
movq %rax, 0x38(%rsp)
leaq 0x151c(%rbx), %rax
movq %rax, 0x70(%rsp)
leaq 0x1520(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0x1524(%rbx), %rax
movq %rax, 0x30(%rsp)
movq %r15, 0x20(%rsp)
movl %ebp, 0xc(%rsp)
cmpl $0x1326581, 0x280(%rbx) # imm = 0x1326581
jb 0x57a0
movl $0x4, 0x14dc(%rbx)
cmpl $0x0, 0x14dc(%rbx)
movl %ebp, %r13d
jle 0x57f0
movq 0x2b18(%rbx), %rdi
movq 0x188(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movl 0x12a4(%rbx), %eax
movl %r15d, %r13d
cmpl $0x8, %eax
jl 0x57f0
setne %cl
movzbl %cl, %ecx
addl $0x5, %ecx
cmpl $0xa, %eax
movl $0x7, %eax
cmovgel %eax, %ecx
movl %ecx, 0x14dc(%rbx)
movl %r15d, %r13d
cmpl $0x5, 0x14dc(%rbx)
movq 0x2b18(%rbx), %r14
jge 0x6455
movq %r14, %rdi
movq 0x198(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x190(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movsd 0x12b8(%rbx), %xmm0
movsd 0xf816(%rip), %xmm1     # 0x15058
ucomisd %xmm0, %xmm1
ja 0x5852
ucomisd 0xf810(%rip), %xmm0     # 0x15060
jbe 0x5897
cmpl $0x0, 0x14dc(%rbx)
jne 0x6478
movl $0x1, 0x14dc(%rbx)
movq 0x2b18(%rbx), %r14
movq (%r14), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x588e
movl $0x1, 0x8(%r14)
jmp 0x578a
movq %r12, 0x20(%r14)
jmp 0x578a
cmpl $0x0, 0x14dc(%rbx)
jle 0x58bf
movq 0x2b18(%rbx), %rdi
movq 0x170(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
addl $0x10, %r13d
jmp 0x58c3
addl $0xc, %r13d
movq 0x2b18(%rbx), %rax
movq 0x20(%rax), %r14
movl $0x0, 0x8(%rsp)
cmpl $0x1326580, 0x280(%rbx) # imm = 0x1326580
jb 0x595f
testb $0x1, 0x8(%rsp)
jne 0x595f
movq 0x2b18(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x10(%rsp), %rbp
movl $0xee6b2801, %eax       # imm = 0xEE6B2801
cmpq %rax, %rbp
jae 0x591a
movl %ebp, 0x2b4(%rbx)
addl $0x8, %r13d
jmp 0x594b
movq 0x2b18(%rbx), %r15
movq (%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x593c
movl $0x1, 0x8(%r15)
jmp 0x5940
movq %r14, 0x20(%r15)
movb $0x1, %al
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %r15
movl $0xee6b2800, %eax       # imm = 0xEE6B2800
cmpq %rax, %rbp
movl 0xc(%rsp), %ebp
ja 0x58d6
jmp 0x597c
movq 0x2b18(%rbx), %rdi
movq 0x178(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
addl $0x4, %r13d
movl 0x2b4(%rbx), %eax
addl $-0x65, %eax
cmpl $-0x65, %eax
ja 0x59c7
xorl %ecx, %ecx
cmpl $0x0, 0x14dc(%rbx)
movl $0x0, %eax
jne 0x5afc
movq 0x2b18(%rbx), %r14
movq (%r14), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x5af2
movl $0x1, 0x8(%r14)
jmp 0x5af6
cmpl $0x1326580, 0x280(%rbx) # imm = 0x1326580
jb 0x59da
testb $0x1, 0x8(%rsp)
je 0x59f9
movq 0x2b18(%rbx), %rdi
movq 0x168(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
addl $0x4, %r13d
jmp 0x5a1d
movq 0x2b18(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movl 0x10(%rsp), %eax
movl %eax, 0x2bc(%rbx)
addl $0x8, %r13d
movl 0x2b4(%rbx), %eax
cmpl 0x2b70(%rbx), %eax
jle 0x5a37
movl $0x13, 0x12e0(%rbx)
jmp 0x5a4f
movl 0x2bc(%rbx), %eax
cmpl 0x2b74(%rbx), %eax
jle 0x5a5b
movl $0x14, 0x12e0(%rbx)
movl $0xfffe7960, %eax       # imm = 0xFFFE7960
xorl %ecx, %ecx
jmp 0x5afc
addl $-0x65, %eax
cmpl $-0x65, %eax
jbe 0x598a
movq 0x2b18(%rbx), %rdi
movq 0x58(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x158(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
cmpl $0x1326580, 0x280(%rbx) # imm = 0x1326580
jb 0x5aa9
testb $0x1, 0x8(%rsp)
je 0x5b0d
movq 0x2b18(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0x4, %edx
callq 0x139ac
movl 0x10(%rsp), %eax
movq %rax, 0x1400(%rbx)
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x139ac
movl 0x10(%rsp), %eax
movq %rax, 0x1408(%rbx)
addl $0x10, %r13d
jmp 0x5b40
movq %r12, 0x20(%r14)
movb $0x1, %cl
movl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
testb %cl, %cl
jne 0x578a
jmp 0x649b
movq 0x2b18(%rbx), %rdi
movq 0x80(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x78(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
addl $0x18, %r13d
movq 0x2b18(%rbx), %rdi
movq 0x150(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x148(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x140(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x138(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x130(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x128(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x120(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x118(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x110(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x108(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x100(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xf8(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xf0(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xe8(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xe0(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xd8(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xd0(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movslq 0x14d0(%rbx), %r15
movq %r15, %rdi
incq %rdi
callq 0x2030
movq %rax, %r14
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x139ac
movslq 0x14d0(%rbx), %rax
xorl %ebp, %ebp
movb %bpl, (%r14,%rax)
movq 0x1478(%rbx), %r15
movq %r14, %rdi
callq 0x2090
movq 0xc8(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x21f0
movq %r14, %rdi
callq 0x21a0
movq 0x2b18(%rbx), %rdi
addl 0x14d0(%rbx), %r13d
movq 0xc0(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movslq 0x14d4(%rbx), %r15
movq %r15, %rdi
incq %rdi
callq 0x2030
movq %rax, %r14
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x139ac
movslq 0x14d4(%rbx), %rax
movb %bpl, (%r14,%rax)
movq 0x1498(%rbx), %r15
movq %r14, %rdi
callq 0x2090
movq 0xb8(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x21f0
movq %r14, %rdi
callq 0x21a0
movq 0x2b18(%rbx), %rdi
addl 0x14d4(%rbx), %r13d
movq 0xb0(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movslq 0x14d8(%rbx), %r15
movq %r15, %rdi
incq %rdi
callq 0x2030
movq %rax, %r14
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x139ac
movslq 0x14d8(%rbx), %rax
movb %bpl, (%r14,%rax)
movq 0x14b8(%rbx), %r15
movq %r14, %rdi
callq 0x2090
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x21f0
movq %r14, %rdi
callq 0x21a0
movl 0x14d8(%rbx), %eax
leal (%rax,%r13), %r14d
addl $0x58, %r14d
cmpl $0x132657f, 0x280(%rbx) # imm = 0x132657F
ja 0x5eb0
movl 0x29c(%rbx), %eax
addl $-0x10, %eax
cmpl %eax, %r14d
jne 0x63d2
cmpl $0x1, 0x14dc(%rbx)
movl 0xc(%rsp), %ebp
jg 0x5e91
movl $0x2, 0x14dc(%rbx)
movq 0x2b18(%rbx), %rdi
movq 0x28(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
addl $0x4, %r14d
jmp 0x63d6
movq 0x58(%rsp), %rax
cmpl $-0x1, (%rax)
movl 0xc(%rsp), %ebp
jne 0x5ec8
movl $0x1, 0x14e8(%rbx)
movq 0x2b18(%rbx), %rdi
movq 0x28(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x50(%rsp), %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0xa0(%rsp), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x98(%rsp), %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x90(%rsp), %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x88(%rsp), %rsi
movl $0x1, %edx
callq 0x139ac
leal 0x10(%r14), %eax
movl %eax, 0x44(%rsp)
movq 0x2b18(%rbx), %rax
movq 0x20(%rax), %r15
addl $0x14, %r14d
movq %r14, 0x48(%rsp)
xorl %edx, %edx
movb %dl, 0x4(%rsp)
movq 0x2b18(%rbx), %r14
movq (%r14), %rdi
movq %r15, %r13
movq %r15, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x5f9f
movl $0x1, 0x8(%r14)
jmp 0x5fa3
movq %r13, 0x20(%r14)
movl 0x44(%rsp), %eax
movl %eax, %r13d
testb $0x1, 0x4(%rsp)
jne 0x619d
movq 0x2b18(%rbx), %rdi
movq 0x60(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movb $0x1, %dl
cmpl $0x3, 0x14f8(%rbx)
ja 0x5f76
movq 0x60(%rsp), %rax
cmpl $0x0, (%rax)
movq 0x48(%rsp), %r13
jle 0x619d
xorl %r14d, %r14d
movq 0x48(%rsp), %r13
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0xc, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x10, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x14, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x18, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x20, %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x28, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x2c, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x30, %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rax
movq 0x38(%rax), %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rax
movq 0x40(%rax), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r14,8), %rsi
addq $0x48, %rsi
movl $0x1, %edx
callq 0x139ac
addl $0xc031, %r13d          # imm = 0xC031
incq %r14
movslq 0x14f8(%rbx), %rax
cmpq %rax, %r14
jl 0x5ff1
movq 0x2b18(%rbx), %rdi
leaq 0x1f(%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x38(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
cmpl $0x12345678, 0x1518(%rbx) # imm = 0x12345678
jne 0x6233
movq 0x38(%rsp), %rax
movl $0x1, (%rax)
movq 0x2b18(%rbx), %rdi
movq 0x70(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
cmpl $0x12345678, 0x151c(%rbx) # imm = 0x12345678
jne 0x6260
movq 0x70(%rsp), %rax
movl $0x0, (%rax)
movq 0x2b18(%rbx), %rdi
movq 0x68(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
cmpl $0x12345678, 0x1520(%rbx) # imm = 0x12345678
jne 0x628d
movq 0x68(%rsp), %rax
movl $0x0, (%rax)
movq 0x2b18(%rbx), %rdi
movq 0x30(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
cmpl $0x12345678, 0x1524(%rbx) # imm = 0x12345678
jne 0x62ba
movq 0x30(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leal 0x15(%r13), %eax
movq 0x38(%rsp), %rcx
movl (%rcx), %ecx
cmpl $0x12345678, %ecx       # imm = 0x12345678
setne %dl
addl $0xffe17b7f, %ecx       # imm = 0xFFE17B7F
cmpl $0xffe17b7d, %ecx       # imm = 0xFFE17B7D
setb %sil
movb $0x1, %cl
testb %sil, %dl
je 0x62ec
movb $0x1, %dl
jmp 0x63c8
movq 0x30(%rsp), %rcx
movl (%rcx), %ecx
cmpl $0x12345678, %ecx       # imm = 0x12345678
setne %sil
addl $-0x33, %ecx
cmpl $-0x34, %ecx
setb %dil
movb $0x1, %cl
movb $0x1, %dl
testb %dil, %sil
jne 0x63c8
movq 0x2b18(%rbx), %rdi
leaq 0x1a4(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
addl $0x41, %r13d
testb $0x1, 0x4(%rsp)
jne 0x63bd
movq 0x160(%rsp), %rax
addl %r13d, %eax
movl 0x29c(%rbx), %esi
addl $0x4, %esi
movb $0x1, %cl
movb $0x1, %dl
cmpl %esi, %eax
je 0x63c5
xorl %ecx, %ecx
movb 0x4(%rsp), %al
movl %eax, %edx
movl %r13d, %eax
testb %cl, %cl
jne 0x5f76
jmp 0x6421
movl 0xc(%rsp), %ebp
movl 0x29c(%rbx), %eax
addl $-0x14, %eax
cmpl %eax, %r14d
jne 0x641e
movl $0x3, 0x14dc(%rbx)
movq 0x2b18(%rbx), %rdi
movq 0x28(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
movq 0x50(%rsp), %rsi
movl $0x1, %edx
callq 0x139ac
addl $0x5, %r14d
movl %r14d, %eax
xorl %ecx, %ecx
testb $0x1, 0x8(%rsp)
je 0x644b
cmpl $0x6, 0x12a4(%rbx)
movq 0x20(%rsp), %r15
jne 0x5afc
movl $0x1, 0x13f8(%rbx)
jmp 0x5a54
movq 0x20(%rsp), %r15
jmp 0x5afc
movq (%r14), %rdi
movq 0x180(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x647c
movl $0x1, 0x8(%r14)
jmp 0x6480
xorl %eax, %eax
jmp 0x649b
movq %r15, 0x20(%r14)
cmpl $0x6, 0x14dc(%rbx)
jg 0x6493
movq %rbx, %rdi
callq 0x9f2c
jmp 0x649b
movq %rbx, %rdi
callq 0xaaa0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop