// File: /workspace/github_cpp_makefile_star2_O2/xdsopl[P]FEC/testbench.cc
// Function: void test_rs<64, 1, 16, 69643, unsigned short>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ReedSolomon<64, 1, GF::Types<16, 69643, unsigned short>>&, unsigned short*, unsigned short*, std::vector<unsigned char, std::allocator<unsigned char>>&)
void test_rs(std::string name, ReedSolomon<NR, FCR, GF::Types<M, P, TYPE>> &rs, TYPE *code, TYPE *target, std::vector<uint8_t> &data)
{
	std::cout << "testing: " << name << std::endl;

	{
		rs.encode(code);
		bool error = false;
		for (int i = 0; i < rs.N; ++i)
			error |= code[i] != target[i];
		if (error)
			std::cout << "encoder error!" << std::endl;
		assert(!error);
		//print_table(code + rs.K, "parity", NR);
		error = rs.decode(code);
		if (error)
			std::cout << "decoder error!" << std::endl;
		assert(!error);
		// first symbol is without corruption
		int pos = 0, par = 0, corrupt = -1, erasures_count = 0;
		TYPE erasures[NR];
		// need one parity symbol per erasure
		for (int i = 0; pos < rs.N && par+1 <= NR && i < NR/2; ++i, ++corrupt, ++pos, ++par)
			code[erasures[erasures_count++] = pos] ^= pos;
		// need two parity symbols per error
		for (int i = 0; pos < rs.N && par+2 <= NR && i < NR/2; ++i, ++corrupt, ++pos, par+=2)
			code[pos] ^= pos;
		int corrected = rs.decode(code, erasures, erasures_count);
		if (corrupt != corrected)
			std::cout << "decoder error: expected " << corrupt << " but got " << corrected << std::endl;
		assert(corrupt == corrected);
		TYPE syndromes[NR];
		if (corrected >= 0 && rs.compute_syndromes(code, syndromes)) {
			std::cout << "decoder error: result of correction is not a codeword!" << std::endl;
			assert(false);
		}
		error = false;
		for (int i = 0; i < rs.N; ++i)
			error |= code[i] != target[i];
		if (error)
			std::cout << "decoder error: code doesnt match target" << std::endl;
		assert(!error);
	}

	int blocks = (8 * data.size() + M * rs.K - 1) / (M * rs.K);
	TYPE *coded = new TYPE[rs.N * blocks];
	{
		unsigned acc = 0, bit = 0, pos = 0;
		for (unsigned byte : data) {
			acc |= byte << bit;
			bit += 8;
			while (bit >= M) {
				bit -= M;
				coded[pos++] = rs.N & acc;
				acc >>= M;
				if (pos % rs.N >= rs.K)
					pos += NR;
			}
		}
	}
	{
		auto start = std::chrono::system_clock::now();
		for (int i = 0; i < blocks; ++i)
			rs.encode(coded + i * rs.N);
		auto end = std::chrono::system_clock::now();
		auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
		int mbs = (data.size() + msec.count() / 2) / msec.count();
		int bytes = (rs.N * blocks * M) / 8;
		float redundancy = (100.0f*(bytes-data.size())) / data.size();
		std::cout << "encoding of " << data.size() << " random bytes into " << bytes << " codeword bytes (" << std::setprecision(1) << std::fixed << redundancy << "% redundancy) in " << blocks << " blocks took " << msec.count() << " milliseconds (" << mbs << "KB/s)." << std::endl;
	}
	std::random_device rd;
	std::default_random_engine generator(rd());
	std::uniform_int_distribution<int> bit_dist(0, M-1), pos_dist(0, rs.N-1);
	auto rnd_bit = std::bind(bit_dist, generator);
	auto rnd_pos = std::bind(pos_dist, generator);
	std::vector<uint8_t> recovered(data.size());
	TYPE *tmp = new TYPE[rs.N * blocks];
	TYPE *erasures = new TYPE[NR * blocks];
	for (int places = 0; places <= NR; ++places) {
		for (int erasures_count = 0; erasures_count <= places; ++erasures_count) {
			for (int i = 0; i < rs.N * blocks; ++i)
				tmp[i] = coded[i];
			int corrupt = 0;
			for (int i = 0; i < blocks; ++i) {
				for (int j = 0; j < places; ++j) {
					erasures[i*NR + j] = rnd_pos();
					for (int k = 0; k < j;) {
						if (erasures[i*NR + k++] == erasures[i*NR + j]) {
							erasures[i*NR + j] = rnd_pos();
							k = 0;
						}
					}
					tmp[i * rs.N + erasures[i*NR + j]] ^= 1 << rnd_bit();
					++corrupt;
				}
			}
			int corrected = 0, wrong = 0;
			auto start = std::chrono::system_clock::now();
			for (int i = 0; i < blocks; ++i) {
				int result = rs.decode(tmp + i * rs.N, erasures + i * NR, erasures_count);
				if (places > NR/2 && places > erasures_count && result >= 0)
					for (int j = i * rs.N; j < (i + 1) * rs.N; ++j)
						wrong += coded[j] != tmp[j];
				corrected += result;
			}
			auto end = std::chrono::system_clock::now();
			auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
			int bytes = (rs.N * blocks * M) / 8;
			int mbs = (bytes + msec.count() / 2) / msec.count();
			std::cout << "decoding with " << places << " errors and " << erasures_count << " known erasures per block took " << msec.count() << " milliseconds (" << mbs << "KB/s).";
			if (corrupt != corrected || wrong)
				std::cout << " expected " << corrupt << " corrected errors but got " << corrected << " and " << wrong << " wrong corrections.";
			std::cout << std::endl;
			assert((places > NR/2 && places > erasures_count) || (corrupt == corrected && !wrong));
			if (corrupt == corrected && !wrong) {
				unsigned acc = 0, bit = 0, pos = 0;
				for (uint8_t &byte: recovered) {
					while (bit < 8) {
						acc |= (unsigned)tmp[pos++] << bit;
						bit += M;
						if (pos % rs.N >= rs.K)
							pos += NR;
					}
					bit -= 8;
					byte = 255 & acc;
					acc >>= 8;
				}
				for (int i = 0; i < blocks; ++i) {
					TYPE syndromes[NR];
					if (rs.compute_syndromes(tmp + i * rs.N, syndromes)) {
						std::cout << "decoder error: result of correction is not a codeword!" << std::endl;
						assert(false);
					}
				}
				if (data != recovered) {
					std::cout << "decoder error: data could not be recovered from corruption!" << std::endl;
					assert(places > NR/2 && places > erasures_count);
				}
			}
		}
	}
	delete[] erasures;
	delete[] tmp;
	delete[] coded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x14b8, %rsp           # imm = 0x14B8
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0xce561(%rip), %rdi     # 0xd3fd8
leaq 0x6e81(%rip), %rsi      # 0xc8ff
callq 0x2160
movq %rax, %rdi
movq %r15, %rsi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %r13, %rdi
movq %r14, %rsi
callq 0xae38
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0xffff, %rax           # imm = 0xFFFF
je 0x5ac0
movzwl (%r14,%rax,2), %edx
cmpw (%rbx,%rax,2), %dx
setne %dl
orb %dl, %cl
incq %rax
jmp 0x5aa5
testb $0x1, %cl
jne 0x636c
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xaf6c
testl %eax, %eax
jne 0x63a3
xorl %eax, %eax
cmpq $0x20, %rax
je 0x5afa
movw %ax, 0x130(%rsp,%rax,2)
xorw %ax, (%r14,%rax,2)
incq %rax
jmp 0x5ae2
pushq $0x20
popq %rax
cmpq $0x30, %rax
je 0x5b0d
xorw %ax, (%r14,%rax,2)
incq %rax
jmp 0x5afd
movq %r12, 0x28(%rsp)
leaq 0x130(%rsp), %rdx
pushq $0x20
popq %rcx
movq %r13, %rdi
movq %r14, %rsi
callq 0xaf6c
cmpl $0x2f, %eax
jne 0x63da
leaq 0xb0(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0xb016
testl %eax, %eax
jne 0x6434
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x28(%rsp), %rsi
cmpq $0xffff, %rax           # imm = 0xFFFF
je 0x5b70
movzwl (%r14,%rax,2), %edx
cmpw (%rbx,%rax,2), %dx
setne %dl
orb %dl, %cl
incq %rax
jmp 0x5b55
movq %r13, 0x40(%rsp)
testb $0x1, %cl
jne 0x6468
movq (%rsi), %r15
movq 0x8(%rsi), %r12
movq %r12, %rax
subq %r15, %rax
leaq 0xffbef(,%rax,8), %rax
xorl %ebp, %ebp
movl $0xffbf0, %ecx          # imm = 0xFFBF0
xorl %edx, %edx
divq %rcx
movq %rax, %rbx
imull $0xffff, %ebx, %eax     # imm = 0xFFFF
movq %rax, 0x38(%rsp)
movslq %eax, %r14
addq %r14, %r14
testl %ebx, %ebx
pushq $-0x1
popq %rax
cmovsq %rax, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x18(%rsp)
movl $0xffff, %edi           # imm = 0xFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %r12, %r15
je 0x5c1b
movzbl (%r15), %eax
shll %cl, %eax
orl %eax, %r8d
addl $0x8, %ecx
cmpl $0x10, %ecx
jb 0x5c16
leal 0x1(%rbp), %esi
movl %ebp, %eax
movq 0x18(%rsp), %rdx
movw %r8w, (%rdx,%rax,2)
movl %esi, %eax
xorl %edx, %edx
divl %edi
cmpl $0xffbf, %edx           # imm = 0xFFBF
jb 0x5c0b
addl $0x41, %ebp
movl %ebp, %esi
addl $-0x10, %ecx
shrl $0x10, %r8d
movl %esi, %ebp
jmp 0x5be4
incq %r15
jmp 0x5bd3
callq 0x2040
movq %rax, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
movq %rax, 0x50(%rsp)
imulq $0x1fffe, %rax, %rax    # imm = 0x1FFFE
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %r13
movq 0x40(%rsp), %rbp
cmpq %r12, 0x58(%rsp)
je 0x5c6c
movq 0x18(%rsp), %rax
leaq (%rax,%r12), %rsi
movq %rbp, %rdi
callq 0xae38
addq $0x1fffe, %r12          # imm = 0x1FFFE
jmp 0x5c4b
callq 0x2040
movq %rax, %rcx
subq %r15, %rcx
movl $0xf4240, %esi          # imm = 0xF4240
movq %rcx, %rax
cqto
idivq %rsi
movq %rax, %r15
movq 0x8(%r13), %rsi
subq (%r13), %rsi
movl $0x1e8480, %edi         # imm = 0x1E8480
movq %rcx, %rax
cqto
idivq %rdi
addq %rsi, %rax
xorl %edx, %edx
divq %r15
movq %rax, %r12
imull $0xffff0, %ebx, %ebp    # imm = 0xFFFF0
sarl $0x3, %ebp
movslq %ebp, %rax
movq %rax, 0x68(%rsp)
subq %rsi, %rax
js 0x5cc4
cvtsi2ss %rax, %xmm1
jmp 0x5cd9
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss 0x6323(%rip), %xmm1     # 0xc004
testq %rsi, %rsi
js 0x5ced
cvtsi2ss %rsi, %xmm0
jmp 0x5d02
movq %rsi, %rax
shrq %rax
andl $0x1, %esi
orq %rax, %rsi
cvtsi2ss %rsi, %xmm0
addss %xmm0, %xmm0
divss %xmm0, %xmm1
movss %xmm1, 0x8(%rsp)
movq 0xce2c5(%rip), %rdi     # 0xd3fd8
leaq 0x6d74(%rip), %rsi      # 0xca8e
callq 0x2160
movq 0x28(%rsp), %r13
movq 0x8(%r13), %rsi
subq (%r13), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x6d60(%rip), %rsi      # 0xca9b
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebp, %esi
callq 0x21e0
leaq 0x6d5b(%rip), %rsi      # 0xcaaf
movq %rax, %rdi
callq 0x2160
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x1, 0x8(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movss 0x8(%rsp), %xmm0
callq 0x2100
leaq 0x6d2c(%rip), %rsi      # 0xcac1
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebx, %esi
callq 0x21e0
leaq 0x6d25(%rip), %rsi      # 0xcad3
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x6d19(%rip), %rsi      # 0xcae1
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movl %r12d, %esi
callq 0x21e0
leaq 0x6d0f(%rip), %rsi      # 0xcaf1
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x130(%rsp), %r15
movq %r15, %rdi
callq 0x27a6
movq %r15, %rdi
callq 0x21b0
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl $0x1, %edx
adcl $0x0, %edx
movabsq $0xf00000000, %rax      # imm = 0xF00000000
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movabsq $0xfffe00000000, %rax   # imm = 0xFFFE00000000
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movq 0x8(%r13), %rsi
subq (%r13), %rsi
leaq 0x78(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x27fc
movq %r14, %rdi
callq 0x2030
movq %rax, 0x8(%rsp)
movl %ebx, %eax
shll $0x6, %eax
movslq %eax, %rdi
addq %rdi, %rdi
testl %ebx, %ebx
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rax, 0x30(%rsp)
xorl %ebp, %ebp
movq 0x38(%rsp), %rax
testl %eax, %eax
cmovlel %ebp, %eax
addl %eax, %eax
movq %rax, 0x38(%rsp)
pushq $0x1
popq %rax
leaq 0x90(%rsp), %rbx
movl %eax, 0x24(%rsp)
movl $0x0, 0x10(%rsp)
cmpq $0x41, %rbp
je 0x62ad
xorl %eax, %eax
movl %eax, 0x14(%rsp)
cmpl 0x24(%rsp), %eax
je 0x6295
xorl %eax, %eax
cmpq %rax, 0x38(%rsp)
je 0x5ef7
movq 0x18(%rsp), %rcx
movzwl (%rcx,%rax), %ecx
movq 0x8(%rsp), %rdx
movw %cx, (%rdx,%rax)
addq $0x2, %rax
jmp 0x5ed8
movq 0x30(%rsp), %r14
xorl %edx, %edx
cmpq 0x50(%rsp), %rdx
je 0x5f92
movl %edx, %eax
shll $0x6, %eax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,2), %r13
movq %rdx, 0x48(%rsp)
imulq $0x1fffe, %rdx, %r12    # imm = 0x1FFFE
addq 0x8(%rsp), %r12
xorl %r15d, %r15d
cmpq %rbp, %r15
je 0x5f81
movq %rbx, %rdi
callq 0x6a80
movw %ax, (%r13,%r15,2)
xorl %ecx, %ecx
cmpq %rcx, %r15
jbe 0x5f5d
leaq 0x1(%rcx), %rdx
cmpw %ax, (%r14,%rcx,2)
movq %rdx, %rcx
jne 0x5f40
movq %rbx, %rdi
callq 0x6a80
jmp 0x5f38
leaq 0xa0(%rsp), %rdi
callq 0x6a80
pushq $0x1
popq %rdx
movl %eax, %ecx
shll %cl, %edx
movzwl (%r13,%r15,2), %eax
xorw %dx, (%r12,%rax,2)
incq %r15
jmp 0x5f2b
movq 0x48(%rsp), %rdx
incq %rdx
subq $-0x80, %r14
jmp 0x5efe
callq 0x2040
movq %rax, 0x70(%rsp)
movl 0x14(%rsp), %eax
movq %rax, 0x60(%rsp)
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpq 0x50(%rsp), %r14
je 0x604f
movl %r12d, 0x48(%rsp)
imulq $0xffff, %r14, %r12     # imm = 0xFFFF
movq 0x8(%rsp), %rax
leaq (%rax,%r12,2), %rsi
movq %r14, %rdx
shlq $0x7, %rdx
addq 0x30(%rsp), %rdx
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %ecx
callq 0xaf6c
cmpq $0x21, %rbp
jb 0x6038
cmpq 0x60(%rsp), %rbp
jbe 0x6038
testl %eax, %eax
js 0x6038
movl %r13d, %ecx
addq %rcx, %rcx
movq 0x8(%rsp), %rdx
addq %rcx, %rdx
addq 0x18(%rsp), %rcx
addl $0xffff, %r12d          # imm = 0xFFFF
xorl %esi, %esi
leal (%rsi,%r13), %edi
cmpl %edi, %r12d
jle 0x6038
movzwl (%rcx,%rsi,2), %edi
xorl %r8d, %r8d
cmpw (%rdx,%rsi,2), %di
setne %r8b
addl %r8d, %r15d
incq %rsi
jmp 0x6018
movl 0x48(%rsp), %r12d
addl %eax, %r12d
incq %r14
addq $0xffff, %r13           # imm = 0xFFFF
jmp 0x5fb1
callq 0x2040
movq %rax, %rcx
subq 0x70(%rsp), %rcx
movq %rcx, %rax
cqto
movl $0xf4240, %esi          # imm = 0xF4240
idivq %rsi
movq %rax, %r13
movq %rcx, %rax
cqto
movl $0x1e8480, %ecx         # imm = 0x1E8480
idivq %rcx
addq 0x68(%rsp), %rax
cqto
idivq %r13
movq %rax, %r14
movq 0xcdf4b(%rip), %rdi     # 0xd3fd8
leaq 0x6a64(%rip), %rsi      # 0xcaf8
callq 0x2160
movq %rax, %rdi
movl %ebp, %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x6a5a(%rip), %rsi      # 0xcb07
callq 0x2160
movq %rax, %rdi
movl 0x14(%rsp), %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x6a4c(%rip), %rsi      # 0xcb14
callq 0x2160
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x69ff(%rip), %rsi      # 0xcae1
callq 0x2160
movq %rax, %rdi
movl %r14d, %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x69f5(%rip), %rsi      # 0xcaf1
callq 0x2160
movl 0x10(%rsp), %eax
xorl %r12d, %eax
orl %r15d, %eax
setne %r14b
je 0x6173
movq 0xcdec0(%rip), %rdi     # 0xd3fd8
leaq 0x68ea(%rip), %rsi      # 0xca09
callq 0x2160
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x69fa(%rip), %rsi      # 0xcb34
callq 0x2160
movq %rax, %rdi
movl %r12d, %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x69ba(%rip), %rsi      # 0xcb0e
callq 0x2160
movq %rax, %rdi
movl %r15d, %esi
callq 0x21e0
movq %rax, %rdi
leaq 0x69e1(%rip), %rsi      # 0xcb4f
callq 0x2160
movq 0xcde5e(%rip), %rdi     # 0xd3fd8
callq 0x20a0
cmpq $0x21, %rbp
setb %al
cmpq 0x60(%rsp), %rbp
setbe %r12b
orb %al, %r12b
movl %r12d, %eax
andb %r14b, %al
cmpb $0x1, %al
je 0x632e
testb %r14b, %r14b
jne 0x628a
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %r8
xorl %r9d, %r9d
xorl %ecx, %ecx
xorl %r10d, %r10d
cmpq %r8, %rdi
je 0x6217
movl %ecx, %r11d
orl $0x10, %r11d
cmpl $0x7, %ecx
ja 0x6208
leal 0x1(%r10), %esi
movl %r10d, %eax
movq 0x8(%rsp), %rdx
movzwl (%rdx,%rax,2), %r14d
shll %cl, %r14d
movl %esi, %eax
xorl %edx, %edx
movl $0xffff, %ecx           # imm = 0xFFFF
divl %ecx
cmpl $0xffbf, %edx           # imm = 0xFFBF
jb 0x61fd
addl $0x41, %r10d
movl %r10d, %esi
orl %r14d, %r9d
movl %r11d, %ecx
movl %esi, %r10d
jmp 0x61ca
addl $-0x8, %ecx
movb %r9b, (%rdi)
shrl $0x8, %r9d
incq %rdi
jmp 0x61be
movq 0x58(%rsp), %r14
movq 0x8(%rsp), %r15
testq %r14, %r14
je 0x6253
movq 0x40(%rsp), %rdi
movq %r15, %rsi
leaq 0xb0(%rsp), %rdx
callq 0xb016
testl %eax, %eax
jne 0x62f4
addq $0x1fffe, %r15          # imm = 0x1FFFE
addq $-0x1fffe, %r14         # imm = 0xFFFE0002
jmp 0x6221
movq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x6a89
testb %al, %al
je 0x628a
movq 0xcdd6b(%rip), %rdi     # 0xd3fd8
leaq 0x695d(%rip), %rsi      # 0xcbd1
callq 0x2160
movq %rax, %rdi
callq 0x20a0
testb %r12b, %r12b
jne 0x634d
movl 0x14(%rsp), %eax
incl %eax
jmp 0x5ec8
incq %rbp
movl 0x10(%rsp), %eax
addl 0x50(%rsp), %eax
movl %eax, 0x10(%rsp)
incl 0x24(%rsp)
jmp 0x5ebc
movq 0x30(%rsp), %rdi
callq 0x21a0
movq 0x8(%rsp), %rdi
callq 0x21a0
movq 0x18(%rsp), %rdi
callq 0x21a0
leaq 0x78(%rsp), %rdi
callq 0x65dc
leaq 0x130(%rsp), %rdi
callq 0x64da
addq $0x14b8, %rsp           # imm = 0x14B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcdcdd(%rip), %rdi     # 0xd3fd8
leaq 0x6727(%rip), %rsi      # 0xca29
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x674a(%rip), %rdi      # 0xca60
leaq 0x6602(%rip), %rsi      # 0xc91f
leaq 0x87f9(%rip), %rcx      # 0xeb1d
movl $0xa3, %edx
callq 0x20d0
leaq 0x682e(%rip), %rdi      # 0xcb63
leaq 0x65e3(%rip), %rsi      # 0xc91f
leaq 0x87da(%rip), %rcx      # 0xeb1d
movl $0x91, %edx
callq 0x20d0
leaq 0x68b9(%rip), %rdi      # 0xcc0d
leaq 0x65c4(%rip), %rsi      # 0xc91f
leaq 0x87bb(%rip), %rcx      # 0xeb1d
movl $0xa8, %edx
callq 0x20d0
movq 0xcdc65(%rip), %rdi     # 0xd3fd8
leaq 0x658f(%rip), %rsi      # 0xc909
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x658a(%rip), %rdi      # 0xc918
leaq 0x658a(%rip), %rsi      # 0xc91f
leaq 0x8781(%rip), %rcx      # 0xeb1d
pushq $0x2b
jmp 0x649a
movq 0xcdc2e(%rip), %rdi     # 0xd3fd8
leaq 0x663b(%rip), %rsi      # 0xc9ec
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x6553(%rip), %rdi      # 0xc918
leaq 0x6553(%rip), %rsi      # 0xc91f
leaq 0x874a(%rip), %rcx      # 0xeb1d
pushq $0x30
jmp 0x649a
movl %eax, %ebp
movq 0xcdbf5(%rip), %rdi     # 0xd3fd8
leaq 0x6611(%rip), %rsi      # 0xc9fb
callq 0x2160
pushq $0x2f
popq %rsi
movq %rax, %rdi
callq 0x21e0
leaq 0x6744(%rip), %rsi      # 0xcb45
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebp, %esi
callq 0x21e0
movq %rax, %rdi
callq 0x20a0
leaq 0x65f2(%rip), %rdi      # 0xca14
leaq 0x64f6(%rip), %rsi      # 0xc91f
leaq 0x86ed(%rip), %rcx      # 0xeb1d
pushq $0x3d
jmp 0x649a
movq 0xcdb9d(%rip), %rdi     # 0xd3fd8
leaq 0x65e7(%rip), %rsi      # 0xca29
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x660a(%rip), %rdi      # 0xca60
leaq 0x64c2(%rip), %rsi      # 0xc91f
leaq 0x86b9(%rip), %rcx      # 0xeb1d
pushq $0x41
jmp 0x649a
movq 0xcdb69(%rip), %rdi     # 0xd3fd8
leaq 0x65f0(%rip), %rsi      # 0xca66
callq 0x2160
movq %rax, %rdi
callq 0x20a0
leaq 0x648e(%rip), %rdi      # 0xc918
leaq 0x648e(%rip), %rsi      # 0xc91f
leaq 0x8685(%rip), %rcx      # 0xeb1d
pushq $0x48
popq %rdx
callq 0x20d0
jmp 0x64b7
jmp 0x64b7
jmp 0x64a6
movq %rax, %rbx
jmp 0x64c4
jmp 0x64b7
jmp 0x64b7
jmp 0x64b7
jmp 0x64b7
jmp 0x64b7
jmp 0x64b7
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x65dc
leaq 0x130(%rsp), %rdi
callq 0x64da
movq %rbx, %rdi
callq 0x21f0
nop