// File: /workspace/github_cpp_makefile_star2_O3/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadfADC4Header_up_to_v11()
__int32	LMF_IO::ReadfADC4Header_up_to_v11()
{
	__int32 i32Dummy = 0;
	unsigned __int64 ui64Dummy = 0;
	double dDummy = 0.;
	bool bDummy = false;
	char cDummy = 0;

	__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 >> this->number_of_DAQ_source_strings;  byte_counter += sizeof(__int32);

	DAQ_source_strings = new std::string*[number_of_DAQ_source_strings];
	memset(DAQ_source_strings,0,sizeof(std::string*)*number_of_DAQ_source_strings);
	for (__int32 i=0;i<number_of_DAQ_source_strings;++i) {
		__int32 string_len;
		*input_lmf >> string_len;	byte_counter += sizeof(__int32);
		DAQ_source_strings[i] = new std::string();
		DAQ_source_strings[i]->reserve(string_len);
		while (string_len > 0) {
			__int8 c;
			*input_lmf >> c;	byte_counter += sizeof(__int8);
			*DAQ_source_strings[i] += c;
			--string_len;
		}
	}

	*input_lmf >> time_reference;	byte_counter += sizeof(__int32);
	*input_lmf >> tdcresolution;	byte_counter += sizeof(double);					// tdc resolution in ns
	*input_lmf >> TDCDataType;		byte_counter += sizeof(__int32);

	unsigned __int64 temp_uint64;
	*input_lmf >> temp_uint64;		byte_counter += sizeof(unsigned __int64);		// number of channels
	number_of_channels =__int32(temp_uint64);

	*input_lmf >> temp_uint64;		byte_counter += sizeof(unsigned __int64);		// number of hits
	max_number_of_hits =__int32(temp_uint64);

	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 >> data_format_in_userheader;	byte_counter += sizeof(__int32);	// data format (2=short integer)

	*input_lmf >> fADC4.i32NumberOfADCmodules;	byte_counter += sizeof(__int32);


	__int32 check_value;
	*input_lmf >> check_value; byte_counter += sizeof(__int32);

	if (check_value == 12345678) {
		for (__int32 i=0;i<fADC4.i32NumberOfADCmodules;i++) {
			*input_lmf >> fADC4.ndigo_parameters[i].bandwidth;		byte_counter += sizeof(double);
			*input_lmf >> fADC4.ndigo_parameters[i].board_id;		byte_counter += sizeof(__int32);
			*input_lmf >> fADC4.ndigo_parameters[i].channel_mask;	byte_counter += sizeof(__int32);
			*input_lmf >> fADC4.ndigo_parameters[i].channels;		byte_counter += sizeof(__int32);
			*input_lmf >> fADC4.ndigo_parameters[i].sample_period;	byte_counter += sizeof(double);
			*input_lmf >> fADC4.ndigo_parameters[i].sample_rate;	byte_counter += sizeof(double);
			*input_lmf >> fADC4.ndigo_parameters[i].version;		byte_counter += sizeof(__int32);
		}
	} else {
			unsigned __int64 pos = input_lmf->tell(); input_lmf->seek(pos-4); byte_counter -= sizeof(__int32);
	for (__int32 i=0;i<fADC4.i32NumberOfADCmodules;i++) {
		input_lmf->read((char*)&fADC4.ndigo_parameters[i],sizeof(ndigo_param_info)); byte_counter += sizeof(ndigo_param_info);
				__int32 size_diff = sizeof(ndigo_param_info) - fADC4.ndigo_parameters[i].size;
				if (size_diff) {
					pos = input_lmf->tell(); input_lmf->seek(pos-size_diff); byte_counter -= size_diff;
				}
	}

	}

	



	for (unsigned __int32 i = 0; i < number_of_channels; i++) {
		*input_lmf >> fADC4.threshold_GT[i];	byte_counter += sizeof(double);
		*input_lmf >> fADC4.threshold_LT[i];	byte_counter += sizeof(double);
	}

	for (unsigned __int32 i = 0; i < number_of_channels; i++) {
		*input_lmf >> fADC4.set_DC_offset[i];	byte_counter += sizeof(double);
	}

	if (LMF_Version > 10) {
		for (unsigned __int32 i = 0; i < number_of_channels; i++) {
			*input_lmf >> fADC4.GND_level[i];	byte_counter += sizeof(double);
		}
	} else memset(fADC4.GND_level,0,80*sizeof(double));

	__int32 num_temp = fADC4.i32NumberOfADCmodules < 4 ? 4 : fADC4.i32NumberOfADCmodules;
	for (__int32 i=0;i<num_temp;i++) { // write ADC mode 4x1.25Gs or 2x2.5Gs or 1x5Gs)
		*input_lmf >> fADC4.sampling_mode[i];	byte_counter += sizeof(__int32);
	}

	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32); // precursor in steps of 3.2 ns
	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32); // length after end of signal in steps of 3.2 ns
	for (unsigned __int32 i=2;i<number_of_channels;i++) {
		*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32); // read precursor and length for all other channels. Currently only for future use
		*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32);
	}

	*input_lmf >> ui64Dummy;	byte_counter += sizeof(__int64);				// ui64RisingEnable
	*input_lmf >> ui64Dummy;	byte_counter += sizeof(__int64);				// ui64FallingEnable
	*input_lmf >> i32Dummy;		byte_counter += sizeof(__int32);				// i32TriggerEdge
	*input_lmf >> fADC4.iTriggerChannel;	byte_counter += sizeof(__int32);	// i32TriggerChannel
	fADC4.iTriggerChannel--;

	*input_lmf >> bDummy;	byte_counter += sizeof(bool);					// bOutputLevel
	*input_lmf >> fADC4.dGroupRangeStart;	byte_counter += sizeof(double);	// dGroupRangeStart
	*input_lmf >> fADC4.dGroupRangeEnd;		byte_counter += sizeof(double);	// dGroupRangeEnd

	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32);				// read Config file
	fADC4.csConfigFile = "";
	for(__int32 i32Count=0;i32Count<i32Dummy;i32Count++)
	{
		input_lmf->read(&cDummy,1);	byte_counter += sizeof(char);
		fADC4.csConfigFile += cDummy;
	}
	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32);				// read INL file
	fADC4.csINLFile = "";
	for(__int32 i32Count=0;i32Count<i32Dummy;i32Count++)
	{
		input_lmf->read(&cDummy,1);	byte_counter += sizeof(char);
		fADC4.csINLFile += cDummy;
	}
	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32);				// read DNL file
	fADC4.csDNLFile = "";
	for(__int32 i32Count=0;i32Count<i32Dummy;i32Count++)
	{
		input_lmf->read(&cDummy,1);	byte_counter += sizeof(char);
		fADC4.csDNLFile += cDummy;
	}

	*input_lmf >> i32Dummy;	byte_counter += sizeof(__int32);	// dummy
	*input_lmf >> dDummy;	byte_counter += sizeof(double);		// dGroupTimeout

	// read TDCInfo
	*input_lmf >> TDC8HP.Number_of_TDCs;  byte_counter += sizeof(__int32);
	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);
	}

	// now handle additional bools
	*input_lmf >> fADC4.number_of_bools; byte_counter += sizeof(__int32);
	for (__int32 i=0;i<fADC4.number_of_bools;++i) {
		*input_lmf >> bDummy;	byte_counter += sizeof(bool);
	}


	// now handle additional 32Bit values (signed or unsigned)
	*input_lmf >> fADC4.number_of_int32s;		byte_counter += sizeof(__int32);
	if (fADC4.number_of_int32s == 3 && this->LMF_Version == 11) this->LMF_Version = 12; // dirty work around for old LMFs
	
	__int32 counter = fADC4.number_of_int32s;
	if (counter > 0) {*input_lmf >> fADC4.i32NumberOfDAQLoops;		counter--;	byte_counter += sizeof(__int32);}
	if (counter > 0) {*input_lmf >> TDC8HP.TDC8HP_DriverVersion;	counter--;	byte_counter += sizeof(__int32);}
	while (counter > 0) {
		*input_lmf >> i32Dummy;
		byte_counter += sizeof(__int32);
		counter--;
	}

	*input_lmf >> fADC4.number_of_doubles;		byte_counter += sizeof(__int32);
	counter = fADC4.number_of_doubles;
	if (LMF_Version > 10) {
		for (__int32 i=0;i<fADC4.i32NumberOfADCmodules;i++) {
			*input_lmf >> fADC4.bits_per_mVolt[i];	byte_counter += sizeof(double);
			counter--;
		}
	} else {
		*input_lmf >> dDummy; byte_counter += sizeof(double);	counter--;
		for (__int32 i=0;i<fADC4.i32NumberOfADCmodules;i++) fADC4.bits_per_mVolt[i] = dDummy;
	}
	while (counter >0)	{*input_lmf >> dDummy;	byte_counter += sizeof(double);	counter--;}

	*input_lmf >> i32Dummy;			byte_counter += sizeof(__int32);
	if (i32Dummy != 1234567) return 0;
	
	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq %r12, 0x40(%rsp)
movq %r12, 0x20(%rsp)
movb %r12b, 0xf(%rsp)
movb %r12b, 0x7(%rsp)
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 %r12b, (%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
movq %rsi, 0x28(%rsp)
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1328(%rbx), %r15
movq %r15, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x1c, %ebp
movslq 0x1328(%rbx), %r14
leaq (,%r14,8), %r12
testq %r14, %r14
movq $-0x1, %rdi
cmovnsq %r12, %rdi
callq 0x2030
movq %rax, 0x1330(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20b0
testq %r14, %r14
jle 0x715b
xorl %r14d, %r14d
leaq 0x10(%rsp), %r12
leaq 0x1c(%rsp), %r13
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x4, %ebp
movl $0x20, %edi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1330(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq 0x1330(%rbx), %rax
movq (%rax,%r14,8), %rdi
movslq 0x10(%rsp), %rsi
callq 0x2210
cmpl $0x0, 0x10(%rsp)
jle 0x714c
movq 0x2b18(%rbx), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x133bc
incl %ebp
movsbl 0x1c(%rsp), %esi
movq 0x1330(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x20f0
movl 0x10(%rsp), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsp)
cmpl $0x1, %eax
jg 0x7111
incq %r14
movslq (%r15), %rax
cmpq %rax, %r14
jl 0x70b6
movq 0x2b18(%rbx), %rdi
leaq 0x240(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x12b8(%rbx), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x12ac(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
movl $0x8, %edx
callq 0x133bc
movl (%r15), %eax
movl %eax, 0x2b4(%rbx)
movq 0x2b18(%rbx), %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x133bc
movl (%r15), %eax
movl %eax, 0x2bc(%rbx)
movl 0x2b4(%rbx), %ecx
cmpl 0x2b70(%rbx), %ecx
jle 0x71fc
movl $0x13, 0x12e0(%rbx)
jmp 0x720e
cmpl %eax, 0x2b74(%rbx)
jge 0x7218
movl $0x14, 0x12e0(%rbx)
movl $0xfffe7960, %eax       # imm = 0xFFFE7960
jmp 0x7c78
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1a84(%rbx), %r15
movq %r15, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1c(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
cmpl $0xbc614e, (%r12)       # imm = 0xBC614E
jne 0x7340
addl $0x2c, %ebp
cmpl $0x0, (%r15)
jle 0x7408
leaq 0x1ac4(%rbx), %r12
xorl %r14d, %r14d
movq 0x2b18(%rbx), %rdi
leaq 0x4(%r12), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1c(%r12), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x24(%r12), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x20(%r12), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x14(%r12), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0xc(%r12), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x28, %ebp
incq %r14
movslq 0x1a84(%rbx), %rax
addq $0x40, %r12
cmpq %rax, %r14
jl 0x7289
jmp 0x7408
movq 0x2b18(%rbx), %r14
movq (%r14), %rdi
movq 0x20(%r14), %r12
addq $-0x4, %r12
movq %r12, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x736a
movl $0x1, 0x8(%r14)
jmp 0x736e
movq %r12, 0x20(%r14)
addl $0x28, %ebp
cmpl $0x0, (%r15)
jle 0x7408
leaq 0x1ac0(%rbx), %r12
xorl %r14d, %r14d
movq %r15, 0x38(%rsp)
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x40, %edx
callq 0x133bc
addl $0x40, %ebp
movl (%r12), %eax
cmpl $0x40, %eax
je 0x73f9
movl $0x40, %r15d
subl %eax, %r15d
movq 0x2b18(%rbx), %rax
movq (%rax), %rdi
movq %rax, 0x30(%rsp)
movq 0x20(%rax), %r13
movslq %r15d, %rax
subq %rax, %r13
movq %r13, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x73e8
movq 0x30(%rsp), %rax
movl $0x1, 0x8(%rax)
jmp 0x73f1
movq 0x30(%rsp), %rax
movq %r13, 0x20(%rax)
subl %r15d, %ebp
movq 0x38(%rsp), %r15
incq %r14
movslq (%r15), %rax
addq $0x40, %r12
cmpq %rax, %r14
jl 0x738a
movb $0x1, %r14b
cmpl $0x0, 0x2b4(%rbx)
je 0x74a1
leaq 0x1fc0(%rbx), %r12
xorl %r13d, %r13d
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x280(%r12), %rsi
movl $0x8, %edx
callq 0x133bc
addl $0x10, %ebp
incq %r13
movl 0x2b4(%rbx), %eax
addq $0x8, %r12
cmpq %rax, %r13
jb 0x7422
testl %eax, %eax
je 0x74a1
leaq 0x2740(%rbx), %r12
xorl %r14d, %r14d
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x133bc
addl $0x8, %ebp
incq %r14
movl 0x2b4(%rbx), %eax
addq $0x8, %r12
cmpq %rax, %r14
jb 0x7472
testl %eax, %eax
sete %r14b
movq 0x28(%rsp), %rax
cmpl $0xb, (%rax)
jl 0x74e8
movq %r15, %r13
testb %r14b, %r14b
jne 0x74fe
leaq 0x24c0(%rbx), %r12
xorl %r14d, %r14d
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x133bc
addl $0x8, %ebp
incq %r14
movl 0x2b4(%rbx), %eax
addq $0x8, %r12
cmpq %rax, %r14
jb 0x74bd
jmp 0x74fe
movq %r15, %r13
leaq 0x24c0(%rbx), %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x20b0
movl 0x1a84(%rbx), %r14d
cmpl $0x5, %r14d
movl $0x4, %eax
cmovll %eax, %r14d
leaq 0x29c0(%rbx), %r12
leal (,%r14,4), %r15d
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
addq $0x4, %r12
decq %r14
jne 0x7521
addl %r15d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
cmpl $0x3, 0x2b4(%rbx)
jb 0x75be
movl $0x2, %r14d
leaq 0x8(%rsp), %r12
movq %r13, %r15
addl $0x8, %ebp
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
incl %r14d
cmpl 0x2b4(%rbx), %r14d
jb 0x7585
jmp 0x75c1
movq %r13, %r15
movq 0x2b18(%rbx), %rdi
leaq 0x40(%rsp), %r12
movq %r12, %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1a90(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
decl 0x1a90(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1aa8(%rbx), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x1ab0(%rbx), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x35, %ebp
leaq 0x2ab0(%rbx), %r13
movq 0x2ab8(%rbx), %rdx
leaq 0xcf7f(%rip), %rcx      # 0x14616
xorl %r14d, %r14d
movq %r13, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21f0
cmpl $0x0, (%r12)
jle 0x76e1
leaq 0x7(%rsp), %r12
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x133bc
movsbl 0x7(%rsp), %esi
movq %r13, %rdi
callq 0x20f0
incl %r14d
cmpl 0x8(%rsp), %r14d
jl 0x76b3
addl %r14d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x4, %ebp
leaq 0x2ad0(%rbx), %r12
movq 0x2ad8(%rbx), %rdx
leaq 0xcf04(%rip), %rcx      # 0x14616
xorl %r14d, %r14d
movq %r12, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21f0
cmpl $0x0, (%r13)
jle 0x775c
leaq 0x7(%rsp), %r13
movq 0x2b18(%rbx), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x133bc
movsbl 0x7(%rsp), %esi
movq %r12, %rdi
callq 0x20f0
incl %r14d
cmpl 0x8(%rsp), %r14d
jl 0x772e
addl %r14d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x4, %ebp
leaq 0x2af0(%rbx), %r12
movq 0x2af8(%rbx), %rdx
leaq 0xce89(%rip), %rcx      # 0x14616
xorl %r14d, %r14d
movq %r12, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21f0
cmpl $0x0, (%r13)
jle 0x77d7
leaq 0x7(%rsp), %r13
movq 0x2b18(%rbx), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x133bc
movsbl 0x7(%rsp), %esi
movq %r12, %rdi
callq 0x20f0
incl %r14d
cmpl 0x8(%rsp), %r14d
jl 0x77a9
addl %r14d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
leaq 0x14f8(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x10, %ebp
cmpl $0x0, 0x14f8(%rbx)
jle 0x79d9
xorl %r12d, %r12d
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0xc, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x10, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x14, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x18, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x20, %rsi
movl $0x8, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x28, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x2c, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x30, %rsi
movl $0x4, %edx
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rax
movq 0x38(%rax), %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rax
movq 0x40(%rax), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x133bc
movq 0x2b18(%rbx), %rdi
movq 0x1500(%rbx,%r12,8), %rsi
addq $0x48, %rsi
movl $0x1, %edx
callq 0x133bc
addl $0xc031, %ebp           # imm = 0xC031
incq %r12
movslq 0x14f8(%rbx), %rax
cmpq %rax, %r12
jl 0x782e
movq 0x2b18(%rbx), %rdi
leaq 0x1a94(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x4, %ebp
cmpl $0x0, 0x1a94(%rbx)
jle 0x7a28
xorl %r14d, %r14d
leaq 0xf(%rsp), %r12
movq 0x2b18(%rbx), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x133bc
incl %r14d
cmpl 0x1a94(%rbx), %r14d
jl 0x7a05
addl %r14d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x1a98(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movl 0x1a98(%rbx), %r12d
cmpl $0x3, %r12d
jne 0x7a63
cmpl $0xb, 0x12a4(%rbx)
jne 0x7a63
movq 0x28(%rsp), %rax
movl $0xc, (%rax)
jmp 0x7a68
testl %r12d, %r12d
jle 0x7add
movq 0x2b18(%rbx), %rdi
leaq 0x1a88(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
cmpl $0x1, %r12d
jne 0x7a8b
addl $0x8, %ebp
jmp 0x7ae0
movq 0x2b18(%rbx), %rdi
leaq 0x151c(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
addl $0xc, %ebp
movl %r12d, %r13d
addl $-0x2, %r13d
je 0x7ae0
shll $0x2, %r13d
decl %r12d
leaq 0x8(%rsp), %r14
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x133bc
decl %r12d
cmpl $0x1, %r12d
ja 0x7abb
addl %r13d, %ebp
jmp 0x7ae0
addl $0x4, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x1aa0(%rbx), %rsi
movl $0x4, %edx
callq 0x133bc
movl 0x1aa0(%rbx), %r12d
cmpl $0xb, 0x12a4(%rbx)
jl 0x7b51
addl $0x4, %ebp
cmpl $0x0, (%r15)
jle 0x7c1c
leaq 0x2a10(%rbx), %r14
xorl %r15d, %r15d
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x133bc
addl $0x8, %ebp
incq %r15
movslq 0x1a84(%rbx), %rax
addq $0x8, %r14
cmpq %rax, %r15
jl 0x7b1f
subl %r15d, %r12d
jmp 0x7c1c
movq 0x2b18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
movl $0x8, %edx
callq 0x133bc
addl $0xc, %ebp
decl %r12d
movslq 0x1a84(%rbx), %rcx
testq %rcx, %rcx
jle 0x7c1c
movsd 0x20(%rsp), %xmm0
leal 0x1(%rcx), %eax
decq %rcx
movq %rcx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
shrl %eax
shlq $0x4, %rax
movdqa 0xc4af(%rip), %xmm2     # 0x14050
xorl %ecx, %ecx
movdqa 0xc4b5(%rip), %xmm3     # 0x14060
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movdqa 0xc4b5(%rip), %xmm5     # 0x14070
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm1, %xmm7
pcmpeqd %xmm1, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x7bf8
movsd %xmm0, 0x2a10(%rbx,%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x7c0f
movsd %xmm0, 0x2a18(%rbx,%rcx)
paddq %xmm5, %xmm2
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x7bbb
testl %r12d, %r12d
jle 0x7c51
leal (,%r12,8), %r15d
incl %r12d
leaq 0x20(%rsp), %r14
movq 0x2b18(%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x133bc
decl %r12d
cmpl $0x1, %r12d
ja 0x7c31
addl %r15d, %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
movl $0x4, %edx
callq 0x133bc
addl $0x4, %ebp
xorl %eax, %eax
cmpl $0x12d687, (%rbx)       # imm = 0x12D687
cmovel %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop