// File: NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(unsigned long long, unsigned int*, double*)
void LMF_IO::WriteTDCData(unsigned __int64 timestamp, unsigned __int32 cnt[], double * d64TDC)
/////////////////////////////////////////////////////////////////
{
	unsigned __int16 dummy_uint16;
	double dummy_double;
	__int32 dummy_int32;

	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	
	++uint64_number_of_written_events;

	WriteEventHeader(timestamp,cnt);

	__int32 i,j;
	__int32 ii = 0;
	if (DAQ_ID_output != DAQ_ID_SIMPLE) {
		for (i=0;i<number_of_channels_output;++i) {
			__int32 hits = cnt[i];
			if (hits > max_number_of_hits_output) hits = max_number_of_hits_output;
			if (data_format_in_userheader_output == 2) {
				dummy_uint16 = (unsigned __int16)(hits);
				*output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					dummy_uint16 = (unsigned __int16)(d64TDC[i*num_ions+j]+1.e-6);
					*output_lmf << dummy_uint16;
				}
				dummy_uint16 = 0;
				for (j=hits;j<max_number_of_hits_output;++j) *output_lmf << dummy_uint16;
			}
			if (data_format_in_userheader_output == 5) {
				dummy_double = double(hits);
				*output_lmf << dummy_double;
				for (j=0;j<hits;++j) 	*output_lmf << d64TDC[i*num_ions+j];
				dummy_double = 0.;
				for (j=hits;j<max_number_of_hits_output;++j) *output_lmf << dummy_double;
			}
			if (data_format_in_userheader_output == 10) {
				dummy_int32 = __int32(hits);
				*output_lmf << dummy_int32;
				for (j=0;j<hits;++j) {
					if (d64TDC[i*num_ions+j] >= 0.) ii =__int32(d64TDC[i*num_ions+j]+1.e-6);
					if (d64TDC[i*num_ions+j] <  0.) ii =__int32(d64TDC[i*num_ions+j]-1.e-6);
					*output_lmf << ii;
				}
				dummy_int32 = 0;
				for (j=hits;j<max_number_of_hits_output;++j) *output_lmf << dummy_int32;
			}
			if (data_format_in_userheader_output == LM_USERDEF) {
				dummy_uint16 = (unsigned __int16)(hits);
				*output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					if (d64TDC[i*num_ions+j] >= 0.) ii =__int32(d64TDC[i*num_ions+j]+1.e-6);
					if (d64TDC[i*num_ions+j] <  0.) ii =__int32(d64TDC[i*num_ions+j]-1.e-6);
					if (DAQ_ID_output != DAQ_ID_HM1 && DAQ_ID_output != DAQ_ID_TDC8 && DAQ_ID_output != DAQ_ID_2TDC8) *output_lmf << ii;
						else *output_lmf << (unsigned __int16)(ii);
				}
			}
		}
				if (DAQ_ID_output == DAQ_ID_TDC8HP && this->LMF_Version_output >= 9) {
					*output_lmf << ui64LevelInfo;
				}
				if (DAQ_ID_output == DAQ_ID_TDC8HP && this->LMF_Version_output >= 10) {
					*output_lmf << number_of_bytes_in_PostEventData;
					for (__int32 i=0;i<number_of_bytes_in_PostEventData;i++) *output_lmf << ui8_PostEventData[i];
		}
	}
	if (DAQ_ID_output == DAQ_ID_2TDC8 && number_of_channels2_output > 0) {
		for (i=number_of_channels_output;i<number_of_channels_output+number_of_channels2_output;++i) {
			__int32 hits = cnt[i];
			if (hits > max_number_of_hits2_output) hits = max_number_of_hits2_output;
			if (data_format_in_userheader_output == 2) {
				dummy_uint16 = (unsigned __int16)(hits);
				*output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					dummy_uint16 = (unsigned __int16)(d64TDC[i*num_ions+j]+1.e-6);
					*output_lmf << dummy_uint16;
				}
				dummy_uint16 = 0;
				for (j=hits;j<max_number_of_hits2_output;++j) *output_lmf << dummy_uint16;
			}
			if (data_format_in_userheader_output == 5) {
				dummy_double = double(hits);
				*output_lmf << dummy_double;
				for (j=0;j<hits;++j) *output_lmf << d64TDC[i*num_ions+j];
				dummy_double = 0.;
				for (j=hits;j<max_number_of_hits2_output;++j) *output_lmf << dummy_double;
			}
			if (data_format_in_userheader_output == 10) {
				*output_lmf <<__int32(hits);
				for (j=0;j<hits;++j) {
					if (d64TDC[i*num_ions+j] >= 0.) ii =__int32(d64TDC[i*num_ions+j]+1.e-6);
					if (d64TDC[i*num_ions+j] <  0.) ii =__int32(d64TDC[i*num_ions+j]-1.e-6);
					*output_lmf << ii;
				}
				dummy_int32 = 0;
				for (j=hits;j<max_number_of_hits2_output;++j) *output_lmf << dummy_int32;
			}
		}
	}

	if (DAQ_ID_output == DAQ_ID_SIMPLE) {
		unsigned __int32 channel;
		unsigned __int32 i;
		i = 0;
		for (channel=0;channel < (unsigned __int32)number_of_channels_output;++channel) i = i + cnt[channel] + (cnt[channel]>0 ? 1 : 0);
		if (data_format_in_userheader_output == 2)  {
			dummy_uint16 = (unsigned __int16)i;
			*output_lmf << dummy_uint16;
		}
		if (data_format_in_userheader_output == 10) *output_lmf << i;
		if (data_format_in_userheader_output == 2) {
			for (channel=0;channel < (unsigned __int32)number_of_channels_output;++channel) {
				if (cnt[channel]>0) {
					dummy_uint16 = (unsigned __int16)((channel << 8) + cnt[channel]);
					*output_lmf << dummy_uint16;
					for (i=0;i < cnt[channel]; ++i) {
						dummy_uint16 = (unsigned __int16)(d64TDC[channel*num_ions+i]);
						*output_lmf << dummy_uint16;
					}
				}
			}
		}
		if (data_format_in_userheader_output == 10) {
			for (channel=0;channel < (unsigned __int32)number_of_channels_output;++channel) {
				if (cnt[channel]>0) {
					dummy_int32 = __int32((channel << 24) + cnt[channel]);
					*output_lmf << dummy_int32;
					for (i=0;i<cnt[channel];++i) {
						dummy_int32 = __int32(d64TDC[channel*num_ions+i]);
						*output_lmf << dummy_int32;
					}
				}
			}
		}
	} // end if (DAQ_ID_output == DAQ_ID_SIMPLE)

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, 0x2b20(%rax)
je 0x15277
movq -0x60(%rbp), %rax
testb $0x1, 0x2b29(%rax)
jne 0x1528a
movq -0x60(%rbp), %rax
movl $0xa, 0x12e0(%rax)
jmp 0x15d26
movq -0x60(%rbp), %rdi
movq 0x2b10(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x2b10(%rdi)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x145f0
movq -0x60(%rbp), %rax
movl $0x0, -0x40(%rbp)
cmpl $0x65, 0x28c(%rax)
je 0x157b9
movl $0x0, -0x38(%rbp)
movq -0x60(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jge 0x15717
movq -0x60(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jle 0x15309
movq -0x60(%rbp), %rax
movl 0x2cc(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x153d0
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x15394
movq -0x60(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x38(%rbp), %edx
movl 0x2b74(%rax), %esi
imull %esi, %edx
movl -0x3c(%rbp), %esi
addl %esi, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd 0x9ce3(%rip), %xmm1     # 0x1f050
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1533c
movw $0x0, -0x22(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x153ce
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x153a0
jmp 0x153d0
movq -0x60(%rbp), %rax
cmpl $0x5, 0x294(%rax)
jne 0x15482
movq -0x60(%rbp), %rax
cvtsi2sdl -0x44(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x15443
movq -0x60(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x1d130
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15407
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x15480
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15451
jmp 0x15482
movq -0x60(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x155c0
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, -0x34(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x1d170
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x15584
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x15511
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x9b4b(%rip), %xmm0     # 0x1f050
addsd (%rax,%rcx,8), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x15563
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x9af8(%rip), %xmm1     # 0x1f050
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x40(%rbp), %esi
callq 0x1d170
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x154b3
movl $0x0, -0x34(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x155be
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x1d170
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15591
jmp 0x155c0
movq -0x60(%rbp), %rax
cmpl $-0x1, 0x294(%rax)
jne 0x15707
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x15705
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x15651
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x9a0b(%rip), %xmm0     # 0x1f050
addsd (%rax,%rcx,8), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x156a3
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x99b8(%rip), %xmm1     # 0x1f050
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x1, 0x28c(%rax)
je 0x156df
movq -0x60(%rbp), %rax
cmpl $0x2, 0x28c(%rax)
je 0x156df
movq -0x60(%rbp), %rax
cmpl $0x5, 0x28c(%rax)
je 0x156df
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x40(%rbp), %esi
callq 0x1d170
jmp 0x156f5
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x40(%rbp), %eax
movzwl %ax, %esi
callq 0x1cca0
jmp 0x156f7
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x155f3
jmp 0x15707
jmp 0x15709
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x152cc
movq -0x60(%rbp), %rax
cmpl $0x8, 0x28c(%rax)
jne 0x15748
movq -0x60(%rbp), %rax
cmpl $0x9, 0x12a8(%rax)
jl 0x15748
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movq 0x2d8(%rax), %rsi
callq 0x1cce0
movq -0x60(%rbp), %rax
cmpl $0x8, 0x28c(%rax)
jne 0x157b7
movq -0x60(%rbp), %rax
cmpl $0xa, 0x12a8(%rax)
jl 0x157b7
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl 0x1280(%rax), %esi
callq 0x1d170
movl $0x0, -0x48(%rbp)
movq -0x60(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x1280(%rcx), %eax
jge 0x157b5
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movslq -0x48(%rbp), %rcx
movzbl 0x2e0(%rax,%rcx), %esi
callq 0x1cc60
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1577f
jmp 0x157b7
jmp 0x157b9
movq -0x60(%rbp), %rax
cmpl $0x5, 0x28c(%rax)
jne 0x15af0
movq -0x60(%rbp), %rax
cmpl $0x0, 0x2c8(%rax)
jle 0x15af0
movq -0x60(%rbp), %rax
movl 0x2c4(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x60(%rbp), %rdx
movl -0x38(%rbp), %eax
movl 0x2c4(%rdx), %ecx
addl 0x2c8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x15aee
movq -0x60(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jle 0x1582d
movq -0x60(%rbp), %rax
movl 0x2d0(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x158f4
movq -0x60(%rbp), %rax
movl -0x4c(%rbp), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x158b8
movq -0x60(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x38(%rbp), %edx
movl 0x2b74(%rax), %esi
imull %esi, %edx
movl -0x3c(%rbp), %esi
addl %esi, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd 0x97bf(%rip), %xmm1     # 0x1f050
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15860
movw $0x0, -0x22(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x158f2
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x158c4
jmp 0x158f4
movq -0x60(%rbp), %rax
cmpl $0x5, 0x294(%rax)
jne 0x159a6
movq -0x60(%rbp), %rax
cvtsi2sdl -0x4c(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x15967
movq -0x60(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x1d130
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1592b
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x159a4
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15975
jmp 0x159a6
movq -0x60(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x15ade
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x4c(%rbp), %esi
callq 0x1d170
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x15aa2
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x15a2f
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x962d(%rip), %xmm0     # 0x1f050
addsd (%rax,%rcx,8), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x15a81
movq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x95da(%rip), %xmm1     # 0x1f050
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x40(%rbp), %esi
callq 0x1d170
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x159d1
movl $0x0, -0x34(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x15adc
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x1d170
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x15aaf
jmp 0x15ade
jmp 0x15ae0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x157e8
jmp 0x15af0
movq -0x60(%rbp), %rax
cmpl $0x65, 0x28c(%rax)
jne 0x15d24
movl $0x0, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x60(%rbp), %rcx
movl -0x50(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x15b52
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x50(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movq -0x18(%rbp), %rcx
movl -0x50(%rbp), %edx
movl (%rcx,%rdx,4), %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmoval %edx, %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x15b0f
movq -0x60(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x15b7a
movq -0x60(%rbp), %rax
movl -0x54(%rbp), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movq -0x60(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x15b9a
movq -0x60(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x54(%rbp), %esi
callq 0x1caf0
movq -0x60(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x15c61
movl $0x0, -0x50(%rbp)
movq -0x60(%rbp), %rcx
movl -0x50(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x15c5f
movq -0x18(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jbe 0x15c4f
movq -0x60(%rbp), %rax
movl -0x50(%rbp), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rdx
movl -0x50(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x50(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
jae 0x15c4d
movq -0x60(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x50(%rbp), %edx
movl 0x2b74(%rax), %esi
imull %esi, %edx
movl -0x54(%rbp), %esi
addl %esi, %edx
cvttsd2si (%rcx,%rdx,8), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x15c01
jmp 0x15c4f
jmp 0x15c51
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x15bb2
jmp 0x15c61
movq -0x60(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x15d22
movl $0x0, -0x50(%rbp)
movq -0x60(%rbp), %rcx
movl -0x50(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x15d20
movq -0x18(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jbe 0x15d10
movq -0x60(%rbp), %rax
movl -0x50(%rbp), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rdx
movl -0x50(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movl %ecx, -0x34(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x1d170
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x50(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
jae 0x15d0e
movq -0x60(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x50(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x54(%rbp), %edx
movl %edx, %edx
cvttsd2si (%rcx,%rdx,8), %ecx
movl %ecx, -0x34(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x34(%rbp), %esi
callq 0x1d170
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x15cc6
jmp 0x15d10
jmp 0x15d12
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x15c79
jmp 0x15d22
jmp 0x15d24
jmp 0x15d26
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)