// File: /workspace/github_c_makefile_star2_O0/ijleesw[P]data-compression/src/tunstall/tunstall.hpp
// Function: Tunstall::createDecodingTables2()
void Tunstall::createDecodingTables2() {
	uint32_t n_symbols = probabilities.size();
	if(n_symbols <= 1) return;

	uint32_t dictionary_size = 1<<wordsize;
	//std::vector<TSymbol> queues(2*dictionary_size);
	vector<uint32_t> queues(2*dictionary_size);
	index.resize(2*dictionary_size);
	lengths.resize(2*dictionary_size);

	size_t end = 0;
	vector<unsigned char> &buffer = table;
	assert(wordsize == 8);
	buffer.resize(8192);
	uint32_t pos = 0;    //keep track of buffer lenght/
	vector<uint32_t> starts(n_symbols);

	uint32_t n_words = 0;

	uint32_t count = 2;
	uint32_t p0 = probabilities[0].probability<<8;
	uint32_t p1 = probabilities[1].probability<<8;
	uint32_t prob = (p0*p0)>>16;
	uint32_t max_count = (dictionary_size - 1)/(n_symbols - 1);
	while(prob > p1 && count < max_count) {
		prob = (prob*p0) >> 16;
		count++;
	}

	if(count >= 16) { //Very low entropy results in large tables > 8K.
		//  AAAA...A first word
		//  AAAA...B all shorter A...B can be compacted on the last one.
		//  AAAA...C and all shorter A .. C

		buffer[pos++] = probabilities[0].symbol;
		for(uint32_t k = 1; k < n_symbols; k++) {
			for(uint32_t i = 0; i < count-1; i++)
				buffer[pos++] = probabilities[0].symbol;
			buffer[pos++] = probabilities[k].symbol;
		}
		starts[0] = (count-1)*n_symbols;
		for(uint32_t k = 1; k < n_symbols; k++)
			starts[k] = k;

		for(uint32_t col = 0; col < count; col++) {
			for(uint32_t row = 1; row < n_symbols; row++) {
				uint32_t dest = row + col*n_symbols;
				uint32_t &probability = queues[dest];
				if(col == 0)
					probability = (probabilities[row].probability<<8);
				else
					probability = (prob * (probabilities[row].probability<<8)) >> 16;
				index[dest] = row*count - col;
				lengths[dest] = col+1;
			}
			if(col == 0)
				prob = p0;
			else
				prob = (prob*p0) >> 16;
		}

		uint32_t first = (count-1)*n_symbols;
		//TSymbol &first = queues[];
		queues[first] = prob;
		index[first] = 0;
		lengths[first] = count;
		n_words = 1 + count*(n_symbols - 1);
		end = count*n_symbols;
		assert(n_words == pos);

	} else {
		n_words = n_symbols;
		//initialize adding all symbols to queues
		for(uint32_t i = 0; i < n_symbols; i++) {
			starts[i] = i;
			queues[end] = (uint32_t)(probabilities[i].probability<<8);
			index[end] = pos;
			lengths[end++] = 1;
			buffer[pos++] = probabilities[i].symbol;
		}
	}

	while(n_words < dictionary_size) {
		//find highest probability word
		uint32_t best = 0;
		uint32_t max_prob = 0;
		for(uint32_t i = 0; i < n_symbols; i++) {
			uint32_t p = queues[starts[i]];
			if(p > max_prob) {
				best = i;
				max_prob = p;
			}
		}
		uint32_t symbol = starts[best];
		uint32_t probability = queues[symbol];
		uint32_t offset = index[symbol];
		uint32_t length = lengths[symbol];
		uint32_t r = 0;
		for(; r < n_symbols; r++) {
			uint32_t p = probabilities[r].probability;
			queues[end] = ( (probability * (unsigned int)(p<<8) )>>16);
			index[end] = pos;
			lengths[end++] = length + 1;

			assert(pos + length < buffer.size());
			memcpy(&buffer[pos], &buffer[offset], length);
			pos += length;
			buffer[pos++] = probabilities[r].symbol;

			if(n_words + r == dictionary_size -1)
				break;
		}
		if(r == n_symbols)
			starts[best] += n_symbols; //remove word only if all other rows expanded.
		n_words += n_symbols -1;
	}

	//compact index and lengths
	size_t word = 0;
	for(size_t i = 0, row = 0; i < end; i++, row++) {
		if(row >= n_symbols)
			row = 0;
		if(starts[row] > i)
			continue;

		index[word] = index[i];
		lengths[word] = lengths[i];
		word++;
	}
	index.resize(dictionary_size);
	lengths.resize(dictionary_size);
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
movq 0x180(%rsp), %rdi
movq %rdi, 0x88(%rsp)
addq $0x10, %rdi
callq 0x6120
movl %eax, 0x17c(%rsp)
cmpl $0x1, 0x17c(%rsp)
ja 0x270e
jmp 0x34b4
movq 0x88(%rsp), %rax
movb 0x4(%rax), %cl
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x178(%rsp)
movl 0x178(%rsp), %eax
addl %eax, %eax
movq %rax, 0x78(%rsp)
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x6140
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x160(%rsp), %rdi
callq 0x6150
jmp 0x2766
leaq 0x15f(%rsp), %rdi
callq 0x61d0
movq 0x88(%rsp), %rdi
addq $0x28, %rdi
movl 0x178(%rsp), %eax
addl %eax, %eax
movl %eax, %esi
callq 0x61e0
jmp 0x2791
movq 0x88(%rsp), %rdi
addq $0x40, %rdi
movl 0x178(%rsp), %eax
addl %eax, %eax
movl %eax, %esi
callq 0x61e0
jmp 0x27af
movq 0x88(%rsp), %rax
movq $0x0, 0x140(%rsp)
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x138(%rsp)
cmpl $0x8, 0x4(%rax)
jne 0x27da
jmp 0x2838
leaq 0xb827(%rip), %rdi      # 0xe008
leaq 0xb82e(%rip), %rsi      # 0xe016
movl $0x10e, %edx            # imm = 0x10E
leaq 0xb83c(%rip), %rcx      # 0xe030
callq 0x20d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x15f(%rsp), %rdi
callq 0x61d0
jmp 0x34ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x34dd
movq 0x138(%rsp), %rdi
movl $0x2000, %esi           # imm = 0x2000
callq 0x6280
jmp 0x284c
movl $0x0, 0x134(%rsp)
movl 0x17c(%rsp), %eax
movq %rax, 0x68(%rsp)
leaq 0x117(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x6140
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x118(%rsp), %rdi
callq 0x6150
jmp 0x288e
leaq 0x117(%rsp), %rdi
callq 0x61d0
movq 0x88(%rsp), %rdi
movl $0x0, 0x110(%rsp)
movl $0x2, 0x10c(%rsp)
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6320
movq 0x88(%rsp), %rdi
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movl %eax, 0x108(%rsp)
addq $0x10, %rdi
movl $0x1, %esi
callq 0x6320
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movl %eax, 0x104(%rsp)
movl 0x108(%rsp), %eax
imull 0x108(%rsp), %eax
shrl $0x10, %eax
movl %eax, 0x100(%rsp)
movl 0x178(%rsp), %eax
subl $0x1, %eax
movl 0x17c(%rsp), %ecx
subl $0x1, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, 0xfc(%rsp)
movl 0x100(%rsp), %ecx
xorl %eax, %eax
cmpl 0x104(%rsp), %ecx
movb %al, 0x67(%rsp)
jbe 0x295b
movl 0x10c(%rsp), %eax
cmpl 0xfc(%rsp), %eax
setb %al
movb %al, 0x67(%rsp)
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x2965
jmp 0x29b7
movl 0x100(%rsp), %eax
imull 0x108(%rsp), %eax
shrl $0x10, %eax
movl %eax, 0x100(%rsp)
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x2930
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x117(%rsp), %rdi
callq 0x61d0
jmp 0x34dd
cmpl $0x10, 0x10c(%rsp)
jb 0x2e36
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6320
movb (%rax), %al
movb %al, 0x66(%rsp)
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x134(%rsp)
movl %eax, %eax
movl %eax, %esi
callq 0x6340
movb 0x66(%rsp), %cl
movb %cl, (%rax)
movl $0x1, 0xf8(%rsp)
movl 0xf8(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x2b01
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
movl 0x10c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x2aa1
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6320
movb (%rax), %al
movb %al, 0x65(%rsp)
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x134(%rsp)
movl %eax, %eax
movl %eax, %esi
callq 0x6340
movb 0x65(%rsp), %cl
movb %cl, (%rax)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x2a34
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
movl 0xf8(%rsp), %eax
movl %eax, %esi
callq 0x6320
movb (%rax), %al
movb %al, 0x64(%rsp)
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x134(%rsp)
movl %eax, %eax
movl %eax, %esi
callq 0x6340
movb 0x64(%rsp), %cl
movb %cl, (%rax)
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
jmp 0x2a15
movl 0x10c(%rsp), %eax
subl $0x1, %eax
imull 0x17c(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x118(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6360
movl 0x60(%rsp), %ecx
movl %ecx, (%rax)
movl $0x1, 0xf0(%rsp)
movl 0xf0(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x2b83
movl 0xf0(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl 0x5c(%rsp), %ecx
movl %ecx, (%rax)
movl 0xf0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x2b39
movl $0x0, 0xec(%rsp)
movl 0xec(%rsp), %eax
cmpl 0x10c(%rsp), %eax
jae 0x2d3e
movl $0x1, 0xe8(%rsp)
movl 0xe8(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x2cf3
movl 0xe8(%rsp), %eax
movl 0xec(%rsp), %ecx
imull 0x17c(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, %esi
leaq 0x160(%rsp), %rdi
callq 0x6360
movq %rax, 0xd8(%rsp)
cmpl $0x0, 0xec(%rsp)
jne 0x2c35
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
movl 0xe8(%rsp), %eax
movl %eax, %esi
callq 0x6320
movzbl 0x1(%rax), %ecx
shll $0x8, %ecx
movq 0xd8(%rsp), %rax
movl %ecx, (%rax)
jmp 0x2c75
movq 0x88(%rsp), %rdi
movl 0x100(%rsp), %eax
movl %eax, 0x58(%rsp)
addq $0x10, %rdi
movl 0xe8(%rsp), %eax
movl %eax, %esi
callq 0x6320
movl 0x58(%rsp), %ecx
movzbl 0x1(%rax), %eax
shll $0x8, %eax
imull %eax, %ecx
shrl $0x10, %ecx
movq 0xd8(%rsp), %rax
movl %ecx, (%rax)
movq 0x88(%rsp), %rdi
movl 0xe8(%rsp), %eax
imull 0x10c(%rsp), %eax
subl 0xec(%rsp), %eax
movl %eax, 0x50(%rsp)
addq $0x28, %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movl 0x50(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
addq $0x40, %rdi
movl 0xe4(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movl 0x54(%rsp), %ecx
movl %ecx, (%rax)
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0x2bad
cmpl $0x0, 0xec(%rsp)
jne 0x2d0d
movl 0x108(%rsp), %eax
movl %eax, 0x100(%rsp)
jmp 0x2d26
movl 0x100(%rsp), %eax
imull 0x108(%rsp), %eax
shrl $0x10, %eax
movl %eax, 0x100(%rsp)
jmp 0x2d28
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0x2b8e
movl 0x10c(%rsp), %eax
subl $0x1, %eax
imull 0x17c(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0x100(%rsp), %eax
movl %eax, 0x48(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %esi
leaq 0x160(%rsp), %rdi
callq 0x6360
movl 0x48(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
addq $0x28, %rdi
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movq 0x88(%rsp), %rdi
movl $0x0, (%rax)
movl 0x10c(%rsp), %eax
movl %eax, 0x4c(%rsp)
addq $0x40, %rdi
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movl 0x4c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x10c(%rsp), %eax
movl 0x17c(%rsp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
addl $0x1, %eax
movl %eax, 0x110(%rsp)
movl 0x10c(%rsp), %eax
imull 0x17c(%rsp), %eax
movl %eax, %eax
movq %rax, 0x140(%rsp)
movl 0x110(%rsp), %eax
cmpl 0x134(%rsp), %eax
jne 0x2e12
jmp 0x2e31
leaq 0xb23e(%rip), %rdi      # 0xe057
leaq 0xb1f6(%rip), %rsi      # 0xe016
movl $0x146, %edx            # imm = 0x146
leaq 0xb204(%rip), %rcx      # 0xe030
callq 0x20d0
jmp 0x2f84
movl 0x17c(%rsp), %eax
movl %eax, 0x110(%rsp)
movl $0x0, 0xd0(%rsp)
movl 0xd0(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x2f82
movl 0xd0(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0xd0(%rsp), %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl 0x38(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
addq $0x10, %rdi
movl 0xd0(%rsp), %eax
movl %eax, %esi
callq 0x6320
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movl %eax, 0x3c(%rsp)
movq 0x140(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0x6360
movl 0x3c(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
movl 0x134(%rsp), %eax
movl %eax, 0x40(%rsp)
addq $0x28, %rdi
movq 0x140(%rsp), %rsi
callq 0x5fc0
movl 0x40(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
addq $0x40, %rdi
movq 0x140(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x140(%rsp)
callq 0x5fc0
movq 0x88(%rsp), %rdi
movl $0x1, (%rax)
addq $0x10, %rdi
movl 0xd0(%rsp), %eax
movl %eax, %esi
callq 0x6320
movb (%rax), %al
movb %al, 0x47(%rsp)
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x134(%rsp)
movl %eax, %eax
movl %eax, %esi
callq 0x6340
movb 0x47(%rsp), %cl
movb %cl, (%rax)
movl 0xd0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd0(%rsp)
jmp 0x2e4f
jmp 0x2f84
jmp 0x2f86
movl 0x110(%rsp), %eax
cmpl 0x178(%rsp), %eax
jae 0x3325
movl $0x0, 0xcc(%rsp)
movl $0x0, 0xc8(%rsp)
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x303f
movl 0xc4(%rsp), %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl (%rax), %eax
movl %eax, %esi
leaq 0x160(%rsp), %rdi
callq 0x6360
movl (%rax), %eax
movl %eax, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpl 0xc8(%rsp), %eax
jbe 0x3027
movl 0xc4(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0xc8(%rsp)
jmp 0x3029
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x2fbb
movl 0xcc(%rsp), %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl (%rax), %eax
movl %eax, 0xbc(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, %esi
leaq 0x160(%rsp), %rdi
callq 0x6360
movq 0x88(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0xb8(%rsp)
addq $0x28, %rdi
movl 0xbc(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movq 0x88(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0xb4(%rsp)
addq $0x40, %rdi
movl 0xbc(%rsp), %eax
movl %eax, %esi
callq 0x5fc0
movl (%rax), %eax
movl %eax, 0xb0(%rsp)
movl $0x0, 0xac(%rsp)
movl 0xac(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x32cf
movq 0x88(%rsp), %rdi
addq $0x10, %rdi
movl 0xac(%rsp), %eax
movl %eax, %esi
callq 0x6320
movzbl 0x1(%rax), %eax
movl %eax, 0xa8(%rsp)
movl 0xb8(%rsp), %eax
movl 0xa8(%rsp), %ecx
shll $0x8, %ecx
imull %ecx, %eax
shrl $0x10, %eax
movl %eax, 0x24(%rsp)
movq 0x140(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0x6360
movl 0x24(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
movl 0x134(%rsp), %eax
movl %eax, 0x28(%rsp)
addq $0x28, %rdi
movq 0x140(%rsp), %rsi
callq 0x5fc0
movl 0x28(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
movl 0xb0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
addq $0x40, %rdi
movq 0x140(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x140(%rsp)
callq 0x5fc0
movl 0x2c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x134(%rsp), %eax
addl 0xb0(%rsp), %eax
movl %eax, %eax
movq %rax, 0x30(%rsp)
movq 0x138(%rsp), %rdi
callq 0x6380
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x31d4
jmp 0x31f3
leaq 0xae8b(%rip), %rdi      # 0xe066
leaq 0xae34(%rip), %rsi      # 0xe016
movl $0x16a, %edx            # imm = 0x16A
leaq 0xae42(%rip), %rcx      # 0xe030
callq 0x20d0
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %esi
callq 0x6340
movq %rax, 0x18(%rsp)
movq 0x138(%rsp), %rdi
movl 0xb4(%rsp), %eax
movl %eax, %esi
callq 0x6340
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movl 0xb0(%rsp), %eax
movl %eax, %edx
callq 0x2100
movq 0x88(%rsp), %rdi
movl 0xb0(%rsp), %eax
addl 0x134(%rsp), %eax
movl %eax, 0x134(%rsp)
addq $0x10, %rdi
movl 0xac(%rsp), %eax
movl %eax, %esi
callq 0x6320
movb (%rax), %al
movb %al, 0x23(%rsp)
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x134(%rsp)
movl %eax, %eax
movl %eax, %esi
callq 0x6340
movb 0x23(%rsp), %cl
movb %cl, (%rax)
movl 0x110(%rsp), %eax
addl 0xac(%rsp), %eax
movl 0x178(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x32b7
jmp 0x32cf
jmp 0x32b9
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0x30ce
movl 0xac(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jne 0x3308
movl 0x17c(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0xcc(%rsp), %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl 0x14(%rsp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl 0x17c(%rsp), %eax
subl $0x1, %eax
addl 0x110(%rsp), %eax
movl %eax, 0x110(%rsp)
jmp 0x2f86
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x98(%rsp), %rax
cmpq 0x140(%rsp), %rax
jae 0x3462
movq 0x90(%rsp), %rax
movl 0x17c(%rsp), %ecx
cmpq %rcx, %rax
jb 0x337f
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rsi
leaq 0x118(%rsp), %rdi
callq 0x6360
movl (%rax), %eax
cmpq 0x98(%rsp), %rax
jbe 0x33a5
jmp 0x3435
movq 0x88(%rsp), %rdi
addq $0x28, %rdi
movq 0x98(%rsp), %rsi
callq 0x5fc0
movq 0x88(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0xc(%rsp)
addq $0x28, %rdi
movq 0xa0(%rsp), %rsi
callq 0x5fc0
movl 0xc(%rsp), %ecx
movq 0x88(%rsp), %rdi
movl %ecx, (%rax)
addq $0x40, %rdi
movq 0x98(%rsp), %rsi
callq 0x5fc0
movq 0x88(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x10(%rsp)
addq $0x40, %rdi
movq 0xa0(%rsp), %rsi
callq 0x5fc0
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
movq 0xa0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x3349
movq 0x88(%rsp), %rdi
addq $0x28, %rdi
movl 0x178(%rsp), %eax
movl %eax, %esi
callq 0x61e0
jmp 0x347e
movq 0x88(%rsp), %rdi
addq $0x40, %rdi
movl 0x178(%rsp), %eax
movl %eax, %esi
callq 0x61e0
jmp 0x349a
leaq 0x118(%rsp), %rdi
callq 0x63a0
leaq 0x160(%rsp), %rdi
callq 0x63a0
addq $0x188, %rsp            # imm = 0x188
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x63a0
leaq 0x160(%rsp), %rdi
callq 0x63a0
movq 0x150(%rsp), %rdi
callq 0x2280
nopw (%rax,%rax)