// File: NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(unsigned long long, unsigned int*, int*)
void LMF_IO::WriteTDCData(unsigned __int64 timestamp, unsigned __int32 cnt[], __int32 * i32TDC)
/////////////////////////////////////////////////////////////////
{
	unsigned __int16 dummy_uint16;
	__int32 dummy_int32;
	double dummy_double;

	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	
	++uint64_number_of_written_events;

	WriteEventHeader(timestamp,cnt);

	__int32 i,j;
	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 + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));
				*output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					dummy_uint16 = (unsigned __int16)(i32TDC[i*num_ions+j]);
					*output_lmf << dummy_uint16;
				}
				dummy_uint16 = (unsigned __int16)(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 + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));
				*output_lmf << dummy_double;
				for (j=0;j<hits;++j) {
					dummy_double = double(i32TDC[i*num_ions+j]);
					*output_lmf << dummy_double;
				}
				dummy_double = 0.;
				for (j=hits;j<max_number_of_hits_output;++j) *output_lmf << dummy_double;
			}
			if (data_format_in_userheader_output == 10) {
				*output_lmf << __int32(hits + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));
				for (j=0;j<hits;++j) *output_lmf << i32TDC[i*num_ions+j];
				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 + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));
				*output_lmf << dummy_uint16;
				if (DAQ_ID_output == DAQ_ID_2TDC8 || DAQ_ID_output == DAQ_ID_TDC8 || DAQ_ID_output == DAQ_ID_HM1) {
					for (j=0;j<hits;++j) {
						dummy_uint16 = (unsigned __int16)(i32TDC[i*num_ions+j]);
						*output_lmf << dummy_uint16;
					}
				} else {
				for (j=0;j<hits;++j) *output_lmf << i32TDC[i*num_ions+j];
				}
			}
		}
				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) { // here we write only the stuff for the second TDC (because the first TDC was written above)
		for (i=number_of_channels_output;i<number_of_channels2_output+number_of_channels_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 + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));  *output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					dummy_uint16 = (unsigned __int16)(i32TDC[i*num_ions+j]);
					*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 + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));		*output_lmf << dummy_double;
				for (j=0;j<hits;++j) {
					dummy_double = double(i32TDC[i*num_ions+j]);
					*output_lmf << dummy_double;
			}
				dummy_double = 0.;
				for (j=hits;j<max_number_of_hits2_output;++j) *output_lmf << dummy_double;
			}
			if (data_format_in_userheader_output == 10) {
				dummy_int32 = __int32(hits + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));		*output_lmf << dummy_int32;
				for (j=0;j<hits;++j) *output_lmf << i32TDC[i*num_ions+j];
				dummy_int32 = 0;
				for (j=hits;j<max_number_of_hits2_output;++j) *output_lmf << dummy_int32;
			}
			if (data_format_in_userheader_output == LM_USERDEF) {
				dummy_uint16 = (unsigned __int16)(hits + (DAQ_ID == DAQ_ID_HM1 ? 1 : 0));
				*output_lmf << dummy_uint16;
				for (j=0;j<hits;++j) {
					dummy_uint16 = (unsigned __int16)(i32TDC[i*num_ions+j]);
					*output_lmf << dummy_uint16;
				}
			}
		}
	}

	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)(i32TDC[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) *output_lmf << i32TDC[channel*num_ions+i];
				}
			}
		}
	} // 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, -0x58(%rbp)
cmpq $0x0, 0x2b20(%rax)
je 0x14777
movq -0x58(%rbp), %rax
testb $0x1, 0x2b29(%rax)
jne 0x1478a
movq -0x58(%rbp), %rax
movl $0xa, 0x12e0(%rax)
jmp 0x15188
movq -0x58(%rbp), %rdi
movq 0x2b10(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x2b10(%rdi)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x145f0
movq -0x58(%rbp), %rax
cmpl $0x65, 0x28c(%rax)
je 0x14bfb
movl $0x0, -0x34(%rbp)
movq -0x58(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jge 0x14b59
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jle 0x14802
movq -0x58(%rbp), %rax
movl 0x2cc(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x148c8
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x1488c
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1484a
movw $0x0, -0x22(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x148c6
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14898
jmp 0x148c8
movq -0x58(%rbp), %rax
cmpl $0x5, 0x294(%rax)
jne 0x1499b
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x1495c
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14916
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x14999
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1496a
jmp 0x1499b
movq -0x58(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x14a51
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x3c(%rbp), %esi
movl 0x288(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
addl %eax, %esi
callq 0x1d170
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x14a15
movq -0x58(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
callq 0x1d170
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x149db
movl $0x0, -0x28(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2cc(%rcx), %eax
jge 0x14a4f
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x1d170
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14a22
jmp 0x14a51
movq -0x58(%rbp), %rax
cmpl $-0x1, 0x294(%rax)
jne 0x14b49
movq -0x58(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movq -0x58(%rbp), %rax
cmpl $0x5, 0x28c(%rax)
je 0x14ab9
movq -0x58(%rbp), %rax
cmpl $0x2, 0x28c(%rax)
je 0x14ab9
movq -0x58(%rbp), %rax
cmpl $0x1, 0x28c(%rax)
jne 0x14b04
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x14b02
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14ac0
jmp 0x14b47
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x14b45
movq -0x58(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
callq 0x1d170
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14b0b
jmp 0x14b47
jmp 0x14b49
jmp 0x14b4b
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x147c5
movq -0x58(%rbp), %rax
cmpl $0x8, 0x28c(%rax)
jne 0x14b8a
movq -0x58(%rbp), %rax
cmpl $0x9, 0x12a8(%rax)
jl 0x14b8a
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movq 0x2d8(%rax), %rsi
callq 0x1cce0
movq -0x58(%rbp), %rax
cmpl $0x8, 0x28c(%rax)
jne 0x14bf9
movq -0x58(%rbp), %rax
cmpl $0xa, 0x12a8(%rax)
jl 0x14bf9
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl 0x1280(%rax), %esi
callq 0x1d170
movl $0x0, -0x40(%rbp)
movq -0x58(%rbp), %rcx
movl -0x40(%rbp), %eax
cmpl 0x1280(%rcx), %eax
jge 0x14bf7
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movslq -0x40(%rbp), %rcx
movzbl 0x2e0(%rax,%rcx), %esi
callq 0x1cc60
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x14bc1
jmp 0x14bf9
jmp 0x14bfb
movq -0x58(%rbp), %rax
cmpl $0x5, 0x28c(%rax)
jne 0x14f5e
movq -0x58(%rbp), %rax
cmpl $0x0, 0x2c8(%rax)
jle 0x14f5e
movq -0x58(%rbp), %rax
movl 0x2c4(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %eax
movl 0x2c8(%rdx), %ecx
addl 0x2c4(%rdx), %ecx
cmpl %ecx, %eax
jge 0x14f5c
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jle 0x14c6f
movq -0x58(%rbp), %rax
movl 0x2d0(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x14d35
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x14cf9
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14cb7
movw $0x0, -0x22(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x14d33
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14d05
jmp 0x14d35
movq -0x58(%rbp), %rax
cmpl $0x5, 0x294(%rax)
jne 0x14e08
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x14dc9
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14d83
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x14e06
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x1d130
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14dd7
jmp 0x14e08
movq -0x58(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x14ec4
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
movl %ecx, -0x28(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x1d170
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x14e88
movq -0x58(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
callq 0x1d170
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14e4e
movl $0x0, -0x28(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x2d0(%rcx), %eax
jge 0x14ec2
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x1d170
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14e95
jmp 0x14ec4
movq -0x58(%rbp), %rax
cmpl $-0x1, 0x294(%rax)
jne 0x14f4c
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
movl 0x288(%rax), %edi
xorl %edx, %edx
movl $0x1, %esi
cmpl $0x1, %edi
cmovel %esi, %edx
addl %edx, %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x14f4a
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x34(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x38(%rbp), %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14f08
jmp 0x14f4c
jmp 0x14f4e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x14c2a
jmp 0x14f5e
movq -0x58(%rbp), %rax
cmpl $0x65, 0x28c(%rax)
jne 0x15186
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x58(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x14fc0
movl -0x4c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %edx
movl (%rcx,%rdx,4), %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmoval %edx, %ecx
addl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x14f7d
movq -0x58(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x14fe8
movq -0x58(%rbp), %rax
movl -0x4c(%rbp), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movq -0x58(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x15008
movq -0x58(%rbp), %rax
movq 0x2b20(%rax), %rdi
movl -0x4c(%rbp), %esi
callq 0x1caf0
movq -0x58(%rbp), %rax
cmpl $0x2, 0x294(%rax)
jne 0x150cb
movl $0x0, -0x48(%rbp)
movq -0x58(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x150c9
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jbe 0x150b9
movq -0x58(%rbp), %rax
movl -0x48(%rbp), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rdx
movl -0x48(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
jae 0x150b7
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movl -0x48(%rbp), %edx
imull 0x2b74(%rax), %edx
addl -0x4c(%rbp), %edx
movl %edx, %edx
movl (%rcx,%rdx,4), %ecx
movw %cx, -0x22(%rbp)
movq 0x2b20(%rax), %rdi
movzwl -0x22(%rbp), %esi
callq 0x1cca0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1506f
jmp 0x150b9
jmp 0x150bb
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x15020
jmp 0x150cb
movq -0x58(%rbp), %rax
cmpl $0xa, 0x294(%rax)
jne 0x15184
movl $0x0, -0x48(%rbp)
movq -0x58(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x2c4(%rcx), %eax
jae 0x15182
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jbe 0x15172
movq -0x58(%rbp), %rax
movl -0x48(%rbp), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rdx
movl -0x48(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movl %ecx, -0x28(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x1d170
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
jae 0x15170
movq -0x58(%rbp), %rdx
movq 0x2b20(%rdx), %rdi
movq -0x20(%rbp), %rax
movl -0x48(%rbp), %ecx
imull 0x2b74(%rdx), %ecx
addl -0x4c(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %esi
callq 0x1d170
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x15130
jmp 0x15172
jmp 0x15174
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x150e3
jmp 0x15184
jmp 0x15186
jmp 0x15188
addq $0x60, %rsp
popq %rbp
retq
nop