// File: NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::decompress_synchronous_fADC8_signal(fADC8_signal_info_struct&, unsigned int*, unsigned int, int&, short*, int, short*, int, short*, int, short*, int)
bool LMF_IO::decompress_synchronous_fADC8_signal(fADC8_signal_info_struct &signal_info, unsigned __int32 source_buffer[], unsigned __int32 source_buffer_size_in_32bit_words, __int32 &number_of_filled_16bit_words,
												__int16 i16bit_target_buffer1[], __int32 target_buffer1_size_in_16bit_words,
												__int16 i16bit_target_buffer2[], __int32 target_buffer2_size_in_16bit_words,
												__int16 i16bit_target_buffer3[], __int32 target_buffer3_size_in_16bit_words,
												__int16 i16bit_target_buffer4[], __int32 target_buffer4_size_in_16bit_words)
{

	number_of_filled_16bit_words = -1;

	if (signal_info.signal_type != FADC8_HEADER_EVENT_ID_5G_ADC1234) {
		number_of_filled_16bit_words = 0;
		return false;
	}

	unsigned __int32 limit_;
	if (signal_info.signallength_including_header_in_32bit_words - 4 < __int32(source_buffer_size_in_32bit_words)) {
		limit_ = signal_info.signallength_including_header_in_32bit_words - 4;
	} else {
		limit_ = source_buffer_size_in_32bit_words;
	}


	if (signal_info.megasamples_per_second == 5000) {

		for (unsigned __int32 i=4;i<limit_ + 4-16;i+=16)  { // xxx stimmt -16?
			if (target_buffer1_size_in_16bit_words < number_of_filled_16bit_words +1 + 4*4*3) break;

			for (__int32 j=0; j<4; j++) {
				for (__int32 shift_ = 20;shift_ >= 0;shift_-=10) {
					i16bit_target_buffer1[(++number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+0 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer1[(++number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+8 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer1[(++number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+4 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer1[(++number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+12+j] >> shift_) & 0x3ff;
				}
			}

		}
		number_of_filled_16bit_words++;
		//trace_filter(i16bit_target_buffer1,number_of_filled_16bit_words, signal_info);
		return true;
	}





	if (signal_info.megasamples_per_second == 2500) {
		for (unsigned __int32 i=4;i<limit_ + 4-16;i+=16)  {
			if (target_buffer1_size_in_16bit_words < number_of_filled_16bit_words +1 + 2*4*3) break;
			if (target_buffer3_size_in_16bit_words < number_of_filled_16bit_words +1 + 2*4*3) break;

			for (__int32 j=0; j<4; j++) {
				for (__int32 shift_ = 20;shift_ >= 0;shift_-=10) {
					++number_of_filled_16bit_words;
					i16bit_target_buffer1[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+0 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer3[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+8 +j] >> shift_) & 0x3ff;

					++number_of_filled_16bit_words;
					i16bit_target_buffer1[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+4 +j] >> shift_) & 0x3ff;					
					i16bit_target_buffer3[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+12+j] >> shift_) & 0x3ff;
				}	
			}

		}
		//trace_filter(i16bit_target_buffer1,number_of_filled_16bit_words, signal_info);
		//trace_filter(i16bit_target_buffer3,number_of_filled_16bit_words, signal_info);
		number_of_filled_16bit_words++;
		return true;
	}


		if (signal_info.megasamples_per_second == 1250) {
		for (unsigned __int32 i=4;i<limit_ + 4-16;i+=16)  {
			if (target_buffer1_size_in_16bit_words < number_of_filled_16bit_words +1 + 4*3) break;
			if (target_buffer2_size_in_16bit_words < number_of_filled_16bit_words +1 + 4*3) break;
			if (target_buffer3_size_in_16bit_words < number_of_filled_16bit_words +1 + 4*3) break;
			if (target_buffer4_size_in_16bit_words < number_of_filled_16bit_words +1 + 4*3) break;

			for (__int32 j=0; j<4; j++) {
				for (__int32 shift_ = 20;shift_ >= 0;shift_-=10) {
					++number_of_filled_16bit_words;
					i16bit_target_buffer1[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+0 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer2[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+4 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer3[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+8 +j] >> shift_) & 0x3ff;
					i16bit_target_buffer4[(number_of_filled_16bit_words) > 0 ? number_of_filled_16bit_words : 0] = (source_buffer[i+12+j] >> shift_) & 0x3ff;
				}
			}

		}
		//trace_filter(i16bit_target_buffer1,number_of_filled_16bit_words, signal_info);
		//trace_filter(i16bit_target_buffer2,number_of_filled_16bit_words, signal_info);
		//trace_filter(i16bit_target_buffer3,number_of_filled_16bit_words, signal_info);
		//trace_filter(i16bit_target_buffer4,number_of_filled_16bit_words, signal_info);
		number_of_filled_16bit_words++;
		return true;
	}

	number_of_filled_16bit_words = 0;
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x40(%rbp), %eax
movq 0x38(%rbp), %rax
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movsbl 0x18(%rax), %eax
cmpl $0x7, %eax
je 0x1c344
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x1cadc
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
subl $0x4, %eax
cmpl -0x24(%rbp), %eax
jge 0x1c362
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
subl $0x4, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1c368
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movswl 0x32(%rax), %eax
cmpl $0x1388, %eax           # imm = 0x1388
jne 0x1c5ac
movl $0x4, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl $0x4, %ecx
subl $0x10, %ecx
cmpl %ecx, %eax
jae 0x1c598
movl 0x10(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0x30, %ecx
cmpl %ecx, %eax
jge 0x1c3ae
jmp 0x1c598
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x1c588
movl $0x14, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jl 0x1c578
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x0, %ecx
addl -0x44(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x48(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x6a(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jle 0x1c413
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x70(%rbp)
jmp 0x1c41a
xorl %eax, %eax
movl %eax, -0x70(%rbp)
jmp 0x1c41a
movq -0x68(%rbp), %rax
movw -0x6a(%rbp), %dx
movl -0x70(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x8, %ecx
addl -0x44(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x48(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x7a(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jle 0x1c46f
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x1c476
xorl %eax, %eax
movl %eax, -0x80(%rbp)
jmp 0x1c476
movq -0x78(%rbp), %rax
movw -0x7a(%rbp), %dx
movl -0x80(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x4, %ecx
addl -0x44(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x48(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x8a(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jle 0x1c4d4
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x90(%rbp)
jmp 0x1c4de
xorl %eax, %eax
movl %eax, -0x90(%rbp)
jmp 0x1c4de
movq -0x88(%rbp), %rax
movw -0x8a(%rbp), %dx
movl -0x90(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0xc, %ecx
addl -0x44(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x48(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x9a(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jle 0x1c545
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xa0(%rbp)
jmp 0x1c54f
xorl %eax, %eax
movl %eax, -0xa0(%rbp)
jmp 0x1c54f
movq -0x98(%rbp), %rax
movw -0x9a(%rbp), %dx
movl -0xa0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x48(%rbp), %eax
subl $0xa, %eax
movl %eax, -0x48(%rbp)
jmp 0x1c3c6
jmp 0x1c57a
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c3b5
jmp 0x1c58a
movl -0x40(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x40(%rbp)
jmp 0x1c382
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1cadc
movq -0x18(%rbp), %rax
movswl 0x32(%rax), %eax
cmpl $0x9c4, %eax            # imm = 0x9C4
jne 0x1c82c
movl $0x4, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl $0x4, %ecx
subl $0x10, %ecx
cmpl %ecx, %eax
jae 0x1c818
movl 0x10(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0x18, %ecx
cmpl %ecx, %eax
jge 0x1c5f2
jmp 0x1c818
movl 0x30(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0x18, %ecx
cmpl %ecx, %eax
jge 0x1c60a
jmp 0x1c818
movl $0x0, -0x50(%rbp)
cmpl $0x4, -0x50(%rbp)
jge 0x1c808
movl $0x14, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0x1c7f8
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x0, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xaa(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c67c
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xb0(%rbp)
jmp 0x1c686
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x1c686
movq -0xa8(%rbp), %rax
movw -0xaa(%rbp), %dx
movl -0xb0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x8, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xba(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c6e6
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc0(%rbp)
jmp 0x1c6f0
xorl %eax, %eax
movl %eax, -0xc0(%rbp)
jmp 0x1c6f0
movq -0xb8(%rbp), %rax
movw -0xba(%rbp), %dx
movl -0xc0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x4, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xca(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c75b
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xd0(%rbp)
jmp 0x1c765
xorl %eax, %eax
movl %eax, -0xd0(%rbp)
jmp 0x1c765
movq -0xc8(%rbp), %rax
movw -0xca(%rbp), %dx
movl -0xd0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0xc, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xda(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c7c5
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xe0(%rbp)
jmp 0x1c7cf
xorl %eax, %eax
movl %eax, -0xe0(%rbp)
jmp 0x1c7cf
movq -0xd8(%rbp), %rax
movw -0xda(%rbp), %dx
movl -0xe0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x54(%rbp), %eax
subl $0xa, %eax
movl %eax, -0x54(%rbp)
jmp 0x1c622
jmp 0x1c7fa
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1c611
jmp 0x1c80a
movl -0x4c(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1c5c6
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1cadc
movq -0x18(%rbp), %rax
movswl 0x32(%rax), %eax
cmpl $0x4e2, %eax            # imm = 0x4E2
jne 0x1cace
movl $0x4, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl $0x4, %ecx
subl $0x10, %ecx
cmpl %ecx, %eax
jae 0x1cabd
movl 0x10(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jge 0x1c872
jmp 0x1cabd
movl 0x20(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jge 0x1c88a
jmp 0x1cabd
movl 0x30(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jge 0x1c8a2
jmp 0x1cabd
movl 0x40(%rbp), %eax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jge 0x1c8ba
jmp 0x1cabd
movl $0x0, -0x5c(%rbp)
cmpl $0x4, -0x5c(%rbp)
jge 0x1caad
movl $0x14, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jl 0x1ca9d
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x0, %ecx
addl -0x5c(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x60(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xea(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c92c
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xf0(%rbp)
jmp 0x1c936
xorl %eax, %eax
movl %eax, -0xf0(%rbp)
jmp 0x1c936
movq -0xe8(%rbp), %rax
movw -0xea(%rbp), %dx
movl -0xf0(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x4, %ecx
addl -0x5c(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x60(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0xfa(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1c996
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x100(%rbp)
jmp 0x1c9a0
xorl %eax, %eax
movl %eax, -0x100(%rbp)
jmp 0x1c9a0
movq -0xf8(%rbp), %rax
movw -0xfa(%rbp), %dx
movl -0x100(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x8, %ecx
addl -0x5c(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x60(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x10a(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1ca00
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x110(%rbp)
jmp 0x1ca0a
xorl %eax, %eax
movl %eax, -0x110(%rbp)
jmp 0x1ca0a
movq -0x108(%rbp), %rax
movw -0x10a(%rbp), %dx
movl -0x110(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0xc, %ecx
addl -0x5c(%rbp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x60(%rbp), %ecx
shrl %cl, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, -0x11a(%rbp)
movq 0x38(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x1ca6a
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x120(%rbp)
jmp 0x1ca74
xorl %eax, %eax
movl %eax, -0x120(%rbp)
jmp 0x1ca74
movq -0x118(%rbp), %rax
movw -0x11a(%rbp), %dx
movl -0x120(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x60(%rbp), %eax
subl $0xa, %eax
movl %eax, -0x60(%rbp)
jmp 0x1c8d2
jmp 0x1ca9f
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1c8c1
jmp 0x1caaf
movl -0x58(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x58(%rbp)
jmp 0x1c846
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1cadc
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)