// File: /workspace/github_c_makefile_star2_O1/ebiggers[P]xpack/lib/xpack_compress.c
// Function: write_block
static size_t
write_block(struct xpack_compressor *c, void *out, size_t out_nbytes_avail,
	    u32 block_size, u32 last_litrunlen, bool is_final_block)
{
	struct header_ostream os;
	size_t header_size;
	size_t items_size;
	int block_type;
	unsigned num_state_counts;
	unsigned order;

	/* Final litrunlen */
	record_litrunlen(c, &c->matches[c->num_matches], last_litrunlen);
	c->matches[c->num_matches].offset_sym = MAX_OFFSET_ALPHABET_SIZE;
	c->num_matches++;

	/* Choose the block type */
	block_type = choose_block_type(c);

	header_ostream_init(&os, out, out_nbytes_avail);

	/* Output the "final block" flag */
	header_ostream_write_bits(&os, is_final_block, 1);

	/* Output the block type */
	header_ostream_write_bits(&os, block_type, NUM_BLOCKTYPE_BITS);

	/* Output the block size */
	write_block_size(&os, block_size);

	/* Compute FSE state counts for each alphabet */

	c->codes.log2_num_literal_states =
		choose_state_counts(c->freqs.literal,
				    LITERAL_ALPHABET_SIZE,
				    MAX_LOG2_NUM_LITERAL_STATES,
				    c->codes.literal_state_counts);

	c->codes.log2_num_litrunlen_states =
		choose_state_counts(c->freqs.litrunlen,
				    LITRUNLEN_ALPHABET_SIZE,
				    MAX_LOG2_NUM_LITRUNLEN_STATES,
				    c->codes.litrunlen_state_counts);

	c->codes.log2_num_length_states =
		choose_state_counts(c->freqs.length,
				    LENGTH_ALPHABET_SIZE,
				    MAX_LOG2_NUM_LENGTH_STATES,
				    c->codes.length_state_counts);

	c->codes.log2_num_offset_states =
		choose_state_counts(c->freqs.offset,
				    MAX_OFFSET_ALPHABET_SIZE,
				    MAX_LOG2_NUM_OFFSET_STATES,
				    c->codes.offset_state_counts);

	if (block_type == BLOCKTYPE_ALIGNED) {
		c->codes.log2_num_aligned_states =
			choose_state_counts(c->freqs.aligned,
					    ALIGNED_ALPHABET_SIZE,
					    MAX_LOG2_NUM_ALIGNED_STATES,
					    c->codes.aligned_state_counts);
	}

	/* Output the FSE state counts for each alphabet */
	header_ostream_write_bits(&os, c->codes.log2_num_literal_states, 4);
	header_ostream_write_bits(&os, c->codes.log2_num_litrunlen_states, 4);
	header_ostream_write_bits(&os, c->codes.log2_num_length_states, 4);
	header_ostream_write_bits(&os, c->codes.log2_num_offset_states, 4);
	if (block_type == BLOCKTYPE_ALIGNED)
		header_ostream_write_bits(&os, c->codes.log2_num_aligned_states, 4);

#ifndef _MSC_VER
	STATIC_ASSERT(offsetof(struct codes,
			       aligned_state_counts[ALIGNED_ALPHABET_SIZE]) ==
		      offsetof(struct codes, state_counts) + sizeof(c->codes.state_counts));
#endif
	num_state_counts = ARRAY_LEN(c->codes.state_counts);
	if (block_type != BLOCKTYPE_ALIGNED)
		num_state_counts -= ALIGNED_ALPHABET_SIZE;

	write_state_counts(&os, c->codes.state_counts, num_state_counts);

	/* Output the number of extra bytes */
	order = bsr32(c->num_extra_bytes + 1);
	header_ostream_write_bits(&os, order, 5);
	header_ostream_write_bits(&os,
				  (c->num_extra_bytes + 1) - ((u32)1 << order),
				  order);

	/* Align to the next byte boundary */
	header_size = header_ostream_flush(&os);
	if (header_size == 0)
		return 0;

	/* Add the extra bytes */
	if (c->num_extra_bytes >= out_nbytes_avail - header_size)
		return 0;
	memcpy((u8 *)out + header_size, c->extra_bytes, c->num_extra_bytes);
	header_size += c->num_extra_bytes;

	/* Build the FSE encoding tables for each alphabet */

	build_fse_encoding_tables(c, c->codes.literal_sym_encinfo,
				  c->codes.literal_next_statesx,
				  c->codes.literal_state_counts,
				  LITERAL_ALPHABET_SIZE,
				  c->codes.log2_num_literal_states);

	build_fse_encoding_tables(c, c->codes.litrunlen_sym_encinfo,
				  c->codes.litrunlen_next_statesx,
				  c->codes.litrunlen_state_counts,
				  LITRUNLEN_ALPHABET_SIZE,
				  c->codes.log2_num_litrunlen_states);

	build_fse_encoding_tables(c, c->codes.length_sym_encinfo,
				  c->codes.length_next_statesx,
				  c->codes.length_state_counts,
				  LENGTH_ALPHABET_SIZE,
				  c->codes.log2_num_length_states);

	build_fse_encoding_tables(c, c->codes.offset_sym_encinfo,
				  c->codes.offset_next_statesx,
				  c->codes.offset_state_counts,
				  MAX_OFFSET_ALPHABET_SIZE,
				  c->codes.log2_num_offset_states);

	if (block_type == BLOCKTYPE_ALIGNED) {
		build_fse_encoding_tables(c, c->codes.aligned_sym_encinfo,
					  c->codes.aligned_next_statesx,
					  c->codes.aligned_state_counts,
					  ALIGNED_ALPHABET_SIZE,
					  c->codes.log2_num_aligned_states);
	}

	/* Encode the items */

	items_size = encode_items(c, (u8 *)out + header_size,
				  out_nbytes_avail - header_size,
				  block_type == BLOCKTYPE_ALIGNED);
	if (items_size == 0)
		return 0;

	return header_size + items_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x8(%rsp)
movl %ecx, %ebx
movq %rdx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
leaq 0x4c810(%rdi), %rax
movq %rax, 0x50(%rsp)
movl 0x3228(%rdi), %eax
leaq (%rdi,%rax,8), %rsi
addq $0x4c810, %rsi          # imm = 0x4C810
movl %r8d, %edx
callq 0x3ca6
movl 0x3228(%r14), %eax
movb $0x20, 0x4c812(%r14,%rax,8)
incl %eax
movl %eax, 0x3228(%r14)
leaq 0x5e8(%r14), %rax
movq %rax, 0x38(%rsp)
pcmpeqd %xmm1, %xmm1
pxor %xmm2, %xmm2
movl $0x17a, %eax            # imm = 0x17A
movdqa 0x21d9(%rip), %xmm0     # 0x6010
movdqu (%r14,%rax,4), %xmm3
movdqa %xmm1, %xmm4
pxor %xmm0, %xmm1
movdqa %xmm3, %xmm5
pxor %xmm0, %xmm5
movdqa %xmm2, %xmm6
pxor %xmm0, %xmm2
pcmpgtd %xmm5, %xmm2
pcmpgtd %xmm1, %xmm5
pand %xmm5, %xmm4
pandn %xmm3, %xmm5
movdqa %xmm5, %xmm1
por %xmm4, %xmm1
pand %xmm2, %xmm6
pandn %xmm3, %xmm2
por %xmm6, %xmm2
addq $0x4, %rax
cmpq $0x182, %rax            # imm = 0x182
jne 0x3e37
pshufd $0xee, %xmm2, %xmm3     # xmm3 = xmm2[2,3,2,3]
movdqa %xmm2, %xmm4
pxor %xmm0, %xmm4
movdqa %xmm3, %xmm5
pxor %xmm0, %xmm5
pcmpgtd %xmm5, %xmm4
pand %xmm4, %xmm2
pandn %xmm3, %xmm4
por %xmm2, %xmm4
pshufd $0x55, %xmm4, %xmm2     # xmm2 = xmm4[1,1,1,1]
movdqa %xmm4, %xmm3
pxor %xmm0, %xmm3
movdqa %xmm2, %xmm5
pxor %xmm0, %xmm5
pcmpgtd %xmm5, %xmm3
pand %xmm3, %xmm4
pandn %xmm2, %xmm3
por %xmm4, %xmm3
movd %xmm3, %r15d
pshufd $0xee, %xmm1, %xmm2     # xmm2 = xmm1[2,3,2,3]
movdqa %xmm1, %xmm3
pxor %xmm0, %xmm3
movdqa %xmm2, %xmm4
pxor %xmm0, %xmm4
pcmpgtd %xmm3, %xmm4
pand %xmm4, %xmm1
pandn %xmm2, %xmm4
por %xmm1, %xmm4
pshufd $0x55, %xmm4, %xmm1     # xmm1 = xmm4[1,1,1,1]
movdqa %xmm4, %xmm2
pxor %xmm0, %xmm2
pxor %xmm1, %xmm0
pcmpgtd %xmm2, %xmm0
pand %xmm0, %xmm4
pandn %xmm1, %xmm0
por %xmm4, %xmm0
movd %xmm0, %eax
leal (%rbx,%rbx), %ecx
cmpl $0x8000, %ebx           # imm = 0x8000
movl $0x1, %r12d
cmovnel %ecx, %r12d
movl $0x5, %ecx
movl $0x19, %ebx
cmovel %ecx, %ebx
leal (%rax,%rax,2), %ebp
shlq $0x4, %r12
leaq 0x28(%r14), %rdi
leaq 0x2734(%r14), %r13
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
movq %r13, %rcx
callq 0x4b39
movl %eax, 0x2720(%r14)
leaq 0x428(%r14), %rdi
leaq 0x2934(%r14), %rcx
movl $0x10, %esi
movl $0x9, %edx
movq %rcx, 0x40(%rsp)
callq 0x4b39
movl %eax, 0x2724(%r14)
leaq 0x468(%r14), %rdi
leaq 0x2954(%r14), %rcx
movl $0x40, %esi
movl $0x9, %edx
movq %rcx, 0x28(%rsp)
callq 0x4b39
movl %eax, 0x2728(%r14)
leaq 0x568(%r14), %rdi
leaq 0x29d4(%r14), %rcx
movl $0x20, %esi
movl $0x9, %edx
movq %rcx, 0x30(%rsp)
callq 0x4b39
xorl %ecx, %ecx
movl %eax, 0x272c(%r14)
movl %r15d, 0x14(%rsp)
movl %ebp, 0x10(%rsp)
cmpl %r15d, %ebp
setb %cl
movzbl 0x8(%rsp), %eax
leaq (%rax,%rcx,2), %rax
leaq 0x2(%r12,%rax), %r12
jae 0x4027
leaq 0x2a14(%r14), %rcx
movq 0x38(%rsp), %rdi
movl $0x8, %esi
movl $0x7, %edx
callq 0x4b39
movl %eax, 0x2730(%r14)
movl 0x2720(%r14), %eax
movl 0x2724(%r14), %edx
movl %ebx, %ecx
shlq %cl, %rax
leal 0x4(%rbx), %ecx
shlq %cl, %rdx
orq %rax, %rdx
movl 0x2728(%r14), %eax
leal 0x8(%rbx), %ecx
shlq %cl, %rax
orq %rdx, %rax
movl 0x272c(%r14), %esi
leal 0xc(%rbx), %ecx
shlq %cl, %rsi
orq %rax, %rsi
orq %r12, %rsi
leal 0x10(%rbx), %eax
movl $0x170, %ecx            # imm = 0x170
movl 0x10(%rsp), %edx
cmpl 0x14(%rsp), %edx
movq 0x20(%rsp), %r9
jae 0x4096
movl 0x2730(%r14), %edx
movl %eax, %ecx
shlq %cl, %rdx
orq %rdx, %rsi
addl $0x14, %ebx
movl $0x178, %ecx            # imm = 0x178
movl %ebx, %eax
movq 0x18(%rsp), %rdx
leaq (%r9,%rdx), %rdi
leaq 0x660(%r14), %rdx
movq %rdx, 0x8(%rsp)
movl %ecx, %edx
xorl %ecx, %ecx
movl $0x84, %r8d
movq %r9, %rbx
leal 0x1(%rcx), %r10d
movl %ecx, %r15d
movzwl (%r13,%r15,2), %r15d
testl %r15d, %r15d
je 0x40e7
bsrl %r15d, %ebp
btcl %ebp, %r15d
shll $0x4, %r15d
orl %ebp, %r15d
xorl $-0x20, %ebp
addl $0x24, %ebp
movl %r15d, %r11d
jmp 0x419a
cmpl %edx, %r10d
jae 0x4103
movl %r10d, %r10d
cmpw $0x0, (%r13,%r10,2)
jne 0x4103
incq %r10
cmpq %r10, %rdx
jne 0x40ef
movl %edx, %r10d
movl %r10d, %r15d
subl %ecx, %r15d
cmpl $0x5, %r15d
jb 0x417b
movq %rsi, %r12
cmpl %r8d, %r15d
movl $0x84, %ebp
cmovbl %r15d, %ebp
movl %ebp, %r11d
shll $0x4, %r11d
addl $-0x41, %r11d
movq %r11, %rsi
movl %eax, %ecx
shlq %cl, %rsi
orq %r12, %rsi
leal 0xb(%rax), %ecx
cmpl $0x40, %ecx
jb 0x416b
movq %rdi, %rcx
subq %rbx, %rcx
movq %rdi, %r12
cmpq $0x8, %rcx
jl 0x4155
movq %rsi, (%rbx)
addq $0x8, %rbx
movq %rbx, %r12
leal -0x35(%rax), %r9d
negb %al
movq %r11, %rsi
movl %eax, %ecx
shrq %cl, %rsi
movq %r12, %rbx
movl %r9d, %eax
jmp 0x416d
movl %ecx, %eax
subl %ebp, %r15d
cmpl $0x4, %r15d
ja 0x410f
movl $0xb, %ebp
movl %r15d, %ecx
shll $0x4, %ecx
addl $-0x2, %ecx
testl %r15d, %r15d
movl $0x6, %r9d
cmovnel %r9d, %ebp
cmovel %r11d, %ecx
movl %ecx, %r11d
je 0x41db
movq %rsi, %r9
movl %r11d, %r15d
movq %r15, %rsi
movl %eax, %ecx
shlq %cl, %rsi
orq %r9, %rsi
addl %ebp, %eax
cmpl $0x40, %eax
jb 0x41db
movq %rdi, %rcx
subq %rbx, %rcx
movq %rdi, %r12
cmpq $0x8, %rcx
jl 0x41cb
movq %rsi, (%rbx)
addq $0x8, %rbx
movq %rbx, %r12
addl $-0x40, %eax
movl %ebp, %ecx
subl %eax, %ecx
shrq %cl, %r15
movq %r12, %rbx
movq %r15, %rsi
movl %r10d, %ecx
cmpl %edx, %r10d
jb 0x40b8
movl 0x322c(%r14), %r8d
incl %r8d
bsrl %r8d, %edx
movq %rdx, %r9
movl %eax, %ecx
shlq %cl, %r9
orq %rsi, %r9
leal 0x5(%rax), %esi
cmpl $0x40, %esi
jb 0x4238
movq %rdi, %rcx
subq %rbx, %rcx
movq %rdi, %r10
cmpq $0x8, %rcx
movq 0x20(%rsp), %r12
jl 0x4226
movq %r9, (%rbx)
addq $0x8, %rbx
movq %rbx, %r10
leal -0x3b(%rax), %esi
negb %al
movq %rdx, %r9
movl %eax, %ecx
shrq %cl, %r9
movq %r10, %rbx
jmp 0x423d
movq 0x20(%rsp), %r12
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %r10d
addl %r8d, %r10d
movq %r10, %r8
movl %esi, %ecx
shlq %cl, %r8
orq %r9, %r8
leal (%rdx,%rsi), %eax
cmpl $0x40, %eax
jb 0x4287
movq %rdi, %rcx
subq %rbx, %rcx
movq %rdi, %rsi
cmpq $0x8, %rcx
jl 0x4277
movq %r8, (%rbx)
addq $0x8, %rbx
movq %rbx, %rsi
addl $-0x40, %eax
subl %eax, %edx
movl %edx, %ecx
shrq %cl, %r10
movq %rsi, %rbx
movq %r10, %r8
testl %eax, %eax
jle 0x42a5
addl $0x8, %eax
cmpq %rdi, %rbx
je 0x4299
movb %r8b, (%rbx)
incq %rbx
shrq $0x8, %r8
addl $-0x8, %eax
cmpl $0x8, %eax
jg 0x428e
cmpq %rdi, %rbx
sete %al
subq %r12, %rbx
sete %cl
orb %al, %cl
jne 0x44bf
movl 0x322c(%r14), %edx
movq 0x18(%rsp), %rax
subq %rbx, %rax
cmpq %rdx, %rax
jbe 0x44bf
leaq (%r12,%rbx), %rdi
leaq 0x171798(%r14), %rsi
callq 0x1050
movl 0x322c(%r14), %ebp
addq %rbx, %rbp
leaq 0x1220(%r14), %rdx
movl 0x2720(%r14), %r9d
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rcx
movl $0x100, %r8d            # imm = 0x100
callq 0x4cbb
leaq 0xe60(%r14), %r15
leaq 0x1a20(%r14), %rbx
movl 0x2724(%r14), %r9d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq 0x40(%rsp), %rcx
movl $0x10, %r8d
callq 0x4cbb
leaq 0xee0(%r14), %rsi
leaq 0x1e20(%r14), %rdx
movl 0x2728(%r14), %r9d
movq %r14, %rdi
movq 0x28(%rsp), %rcx
movl $0x40, %r8d
callq 0x4cbb
leaq 0x10e0(%r14), %rsi
leaq 0x2220(%r14), %rdx
movl 0x272c(%r14), %r9d
movq %r14, %rdi
movq 0x30(%rsp), %rcx
movl $0x20, %r8d
callq 0x4cbb
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x43c1
leaq 0x11e0(%r14), %rsi
leaq 0x2620(%r14), %rdx
leaq 0x2a14(%r14), %rcx
movl 0x2730(%r14), %r9d
movq %r14, %rdi
movl $0x8, %r8d
callq 0x4cbb
leaq (%r12,%rbp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
addq %rax, %r12
movq %rbp, 0x38(%rsp)
subq %rbp, %rax
cmpq $0x8, %rax
movl $0x8, %edx
cmovbq %rax, %rdx
movq %r12, 0x20(%rsp)
movl 0x2724(%r14), %ecx
movl 0x2728(%r14), %eax
movl $0x1, %r13d
movq %rcx, 0x30(%rsp)
shll %cl, %r13d
movl $0x1, %ebp
movq %rax, 0x40(%rsp)
movl %eax, %ecx
shll %cl, %ebp
movl $0x1, %eax
movl 0x272c(%r14), %ecx
movl $0x1, %r8d
movq %rcx, 0x28(%rsp)
shll %cl, %r8d
movl 0x2730(%r14), %ecx
movq %rcx, 0x48(%rsp)
shll %cl, %eax
movq %rax, 0x18(%rsp)
subq %rdx, %r12
movl 0x3228(%r14), %edx
movl %edx, %ecx
decl %ecx
js 0x44c7
movl %ecx, %esi
movq 0x50(%rsp), %rax
cmpb $0x20, 0x2(%rax,%rsi,8)
jne 0x44c7
movzbl (%rax,%rsi,8), %r10d
movl (%r15,%r10,8), %esi
addl %r13d, %esi
movl %esi, %r9d
shrl $0xa, %r9d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl %r9d, %ecx
shll %cl, %r11d
notl %r11d
andl %r13d, %r11d
shrl %cl, %r13d
addl 0x4(%r15,%r10,8), %r13d
negb %cl
movq %r11, %r10
shlq %cl, %r10
movzwl (%rbx,%r13,2), %r13d
movq %r10, (%r12)
movq %r12, %rcx
subq 0x8(%rsp), %rcx
shrl $0xd, %esi
cmpq %rsi, %rcx
cmovgeq %rsi, %rcx
subq %rcx, %r12
andl $0x7, %r9d
addl $-0x2, %edx
movl %edx, %ecx
jmp 0x44cd
xorl %r15d, %r15d
jmp 0x4aa9
xorl %r9d, %r9d
xorl %r11d, %r11d
testl %ecx, %ecx
js 0x46d0
movl %ecx, %ebx
movzbl 0x4c812(%r14,%rbx,8), %r10d
cmpl $0x3, %r10d
jb 0x4561
leal -0x3(%r10), %ecx
movl 0x4c814(%r14,%rbx,8), %edx
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x4568
cmpl $0x3, %ecx
jb 0x4568
movl %edx, %esi
leal -0x6(%r10), %ecx
shlq %cl, %r11
shrl $0x3, %esi
orq %rsi, %r11
leal (%r10,%r9), %esi
addl $-0x6, %esi
andl $0x7, %edx
movl 0x11e0(%r14,%rdx,8), %ecx
movq 0x18(%rsp), %rax
addl %eax, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
shll %cl, %r9d
shlq %cl, %r11
notl %r9d
andl %eax, %r9d
orq %r9, %r11
movl %ecx, %r9d
shrl %cl, %eax
addl %esi, %r9d
addl 0x11e4(%r14,%rdx,8), %eax
movzwl 0x2620(%r14,%rax,2), %eax
movq %rax, 0x18(%rsp)
jmp 0x4571
movq 0x8(%rsp), %rdi
jmp 0x459f
shlq %cl, %r11
orq %rdx, %r11
addl %ecx, %r9d
movl %r9d, %ecx
negb %cl
movq %r11, %rdx
shlq %cl, %rdx
movq %rdx, (%r12)
movq %r12, %rcx
movq 0x8(%rsp), %rdi
subq %rdi, %rcx
movl %r9d, %edx
shrl $0x3, %edx
cmpq %rdx, %rcx
cmovgeq %rdx, %rcx
subq %rcx, %r12
andl $0x7, %r9d
movl %r10d, %edx
movl 0x10e0(%r14,%rdx,8), %ecx
addl %r8d, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
shlq %cl, %r11
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %eax, %esi
andl %r8d, %esi
orq %rsi, %r11
movl %ecx, %esi
shrl %cl, %r8d
addl %r9d, %esi
addl 0x10e4(%r14,%rdx,8), %r8d
movzwl 0x2220(%r14,%r8,2), %r8d
movl %esi, %ecx
negb %cl
movq %r11, %rdx
shlq %cl, %rdx
movq %rdx, (%r12)
movq %r12, %rdx
subq %rdi, %rdx
movl %esi, %ecx
shrl $0x3, %ecx
cmpq %rcx, %rdx
cmovgeq %rcx, %rdx
movzbl 0x4c811(%r14,%rbx,8), %r15d
movl 0xee0(%r14,%r15,8), %r10d
addl %ebp, %r10d
shrl $0xa, %r10d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %r10d, %ecx
shll %cl, %r9d
notl %r9d
andl %ebp, %r9d
shlq %cl, %r11
shrl %cl, %ebp
addl 0xee4(%r14,%r15,8), %ebp
movzbl 0x4c810(%r14,%rbx,8), %r15d
movl 0xe60(%r14,%r15,8), %ecx
addl %r13d, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
orq %r9, %r11
notl %eax
andl %r13d, %eax
shlq %cl, %r11
orq %rax, %r11
shrl %cl, %r13d
movl %ecx, %r9d
addl %r10d, %r9d
addl 0xe64(%r14,%r15,8), %r13d
movq %r12, %r10
subq %rdx, %r10
negq %rdx
andl $0x7, %esi
addl %esi, %r9d
movl %r9d, %ecx
negb %cl
movq %r11, %rax
shlq %cl, %rax
movzwl 0x1e20(%r14,%rbp,2), %ebp
movzwl 0x1a20(%r14,%r13,2), %r13d
movq %rax, (%r12,%rdx)
movq %r10, %rax
subq %rdi, %rax
movl %r9d, %ecx
shrl $0x3, %ecx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
subq %rax, %r10
andl $0x7, %r9d
movq %r10, %r12
testq %rbx, %rbx
leaq -0x1(%rbx), %rbx
jg 0x44d7
jmp 0x46d3
movq %r12, %r10
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x4728
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x48(%rsp), %rcx
shll %cl, %eax
movq 0x18(%rsp), %rdx
addl %eax, %edx
shlq %cl, %r11
orq %rdx, %r11
addl %ecx, %r9d
movl %r9d, %ecx
negb %cl
movq %r11, %rax
shlq %cl, %rax
movq %rax, (%r10)
movq %r10, %rax
movq 0x8(%rsp), %r12
subq %r12, %rax
movl %r9d, %ecx
shrl $0x3, %ecx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
subq %rax, %r10
andl $0x7, %r9d
jmp 0x472d
movq 0x8(%rsp), %r12
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
addl %eax, %r8d
shlq %cl, %r11
orq %r8, %r11
leal (%rcx,%r9), %esi
movl %esi, %ecx
negb %cl
movq %r11, %rdx
shlq %cl, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rdx, (%r10)
movq %r10, %r8
subq %r12, %r8
movl %esi, %ecx
shrl $0x3, %ecx
cmpq %rcx, %r8
cmovgeq %rcx, %r8
movq %r10, %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq 0x40(%rsp), %rcx
shll %cl, %edi
subq %r8, %rdx
andl $0x7, %esi
addl %edi, %ebp
shlq %cl, %r11
orq %rbp, %r11
addl %ecx, %esi
movl %esi, %ecx
negb %cl
movq %r11, %rdi
shlq %cl, %rdi
negq %r8
movq %rdx, %r9
subq %r12, %r9
movl %esi, %ecx
shrl $0x3, %ecx
cmpq %rcx, %r9
cmovgeq %rcx, %r9
movl %ebx, %ecx
shll %cl, %eax
movq %rdi, (%r10,%r8)
andl $0x7, %esi
addl %eax, %r13d
shlq %cl, %r11
orq %r13, %r11
addl %ebx, %esi
movl %esi, %ecx
negb %cl
movq %r11, %rax
shlq %cl, %rax
subq %r9, %rdx
movq %rdx, %rcx
subq %r12, %rcx
movl %esi, %edi
shrl $0x3, %edi
cmpq %rdi, %rcx
cmovgeq %rdi, %rcx
movq %rax, (%rdx)
subq %rcx, %rdx
movl 0x2720(%r14), %eax
movl $0x1, %r9d
movl %eax, %ecx
shll %cl, %r9d
movl 0x3224(%r14), %r8d
leal -0x1(%r8), %ecx
andl $0x7, %esi
testl %ecx, %ecx
jle 0x48d2
movl %ecx, %ebx
movl %r9d, %r10d
movzbl 0x3230(%r14,%rbx), %edi
movl 0x660(%r14,%rdi,8), %ecx
addl %r10d, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
shll %cl, %r15d
notl %r15d
shlq %cl, %r11
andl %r10d, %r15d
orq %r15, %r11
movl %ecx, %ebp
addl %esi, %ebp
shrl %cl, %r10d
addl 0x664(%r14,%rdi,8), %r10d
movzwl 0x1220(%r14,%r10,2), %r10d
movzbl 0x322f(%r14,%rbx), %r15d
movl 0x660(%r14,%r15,8), %ecx
addl %r9d, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
shlq %cl, %r11
notl %esi
andl %r9d, %esi
orq %rsi, %r11
movl %ecx, %esi
shrl %cl, %r9d
addl %ebp, %esi
addl 0x664(%r14,%r15,8), %r9d
movzwl 0x1220(%r14,%r9,2), %r9d
movl %esi, %ecx
negb %cl
movq %r11, %rdi
shlq %cl, %rdi
movq %rdi, (%rdx)
movq %rdx, %rcx
subq %r12, %rcx
movl %esi, %edi
shrl $0x3, %edi
cmpq %rdi, %rcx
cmovgeq %rdi, %rcx
subq %rcx, %rdx
leaq -0x2(%rbx), %rcx
andl $0x7, %esi
cmpq $0x2, %rbx
movq %rcx, %rbx
jg 0x4815
jmp 0x48d5
movl %r9d, %r10d
testb $0x1, %r8b
jne 0x4926
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebx
shlq %cl, %r11
addl %ebx, %r10d
orq %r10, %r11
addl %eax, %esi
movl %esi, %ecx
negb %cl
movq %r11, %rdi
shlq %cl, %rdi
movq %rdi, (%rdx)
movq %rdx, %rcx
subq %r12, %rcx
movl %esi, %edi
shrl $0x3, %edi
cmpq %rdi, %rcx
cmovgeq %rdi, %rcx
subq %rcx, %rdx
movl %eax, %ecx
shlq %cl, %r11
addl %ebx, %r9d
orq %r9, %r11
movl %esi, %ebx
movq %rdx, %r10
jmp 0x49dc
movzbl 0x3230(%r14), %r12d
movl 0x660(%r14,%r12,8), %ecx
addl %r10d, %ecx
shrl $0xa, %ecx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
shll %cl, %edi
shlq %cl, %r11
notl %edi
andl %r10d, %edi
orq %rdi, %r11
movl %ecx, %ebx
shrl %cl, %r10d
addl %esi, %ebx
addl 0x664(%r14,%r12,8), %r10d
movq 0x8(%rsp), %r12
movzwl 0x1220(%r14,%r10,2), %esi
movl %ebx, %ecx
negb %cl
movq %r11, %rdi
shlq %cl, %rdi
movq %rdi, (%rdx)
movq %rdx, %r14
subq %r12, %r14
movl %ebx, %ecx
shrl $0x3, %ecx
cmpq %rcx, %r14
cmovgeq %rcx, %r14
movq %rdx, %r10
movl %eax, %ecx
shll %cl, %r15d
subq %r14, %r10
andl $0x7, %ebx
addl %r15d, %r9d
shlq %cl, %r11
orq %r9, %r11
addl %eax, %ebx
movl %ebx, %ecx
negb %cl
movq %r11, %rdi
shlq %cl, %rdi
negq %r14
movq %r10, %rcx
subq %r12, %rcx
movl %ebx, %r9d
shrl $0x3, %r9d
cmpq %r9, %rcx
cmovgeq %r9, %rcx
movq %rdi, (%rdx,%r14)
subq %rcx, %r10
addl %esi, %r15d
movl %eax, %ecx
shlq %cl, %r11
orq %r15, %r11
movq 0x20(%rsp), %r14
movq 0x38(%rsp), %r15
andl $0x7, %ebx
addl %eax, %ebx
movl %ebx, %ecx
negb %cl
movq %r11, %rax
shlq %cl, %rax
movq %rax, (%r10)
movq %r10, %rdx
subq %r12, %rdx
movl %ebx, %eax
shrl $0x3, %eax
cmpq %rax, %rdx
cmovgeq %rax, %rdx
movq %r10, %rsi
subq %rdx, %rsi
andl $0x7, %ebx
leal 0x1(%r8), %eax
bsrl %eax, %eax
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edi
shlq %cl, %r11
leal (%rdi,%r8), %ecx
incl %ecx
orq %rcx, %r11
leal (%rbx,%rax), %edi
shlq $0x5, %r11
orq %rax, %r11
movb $0x3b, %cl
subb %dil, %cl
movq %r11, %rdi
shlq %cl, %rdi
negq %rdx
addl %ebx, %eax
addl $0x5, %eax
movq %rdi, (%r10,%rdx)
movq %rsi, %rcx
subq %r12, %rcx
movl %eax, %edx
shrl $0x3, %edx
cmpq %rdx, %rcx
cmovgeq %rdx, %rcx
subq %rcx, %rsi
cmpq %r12, %rsi
je 0x4a87
andl $0x7, %eax
movb $0x8, %cl
subb %al, %cl
xorb $0x7, %al
shll %cl, %r11d
btsl %eax, %r11d
movb %r11b, 0x7(%rsi)
addq $0x7, %rsi
subq %rsi, %r14
jmp 0x4a8a
xorl %r14d, %r14d
testq %r14, %r14
je 0x4a9c
movq %r12, %rdi
movq %r14, %rdx
callq 0x1070
jmp 0x4a9f
xorl %r14d, %r14d
addq %r14, %r15
testq %r14, %r14
cmoveq %r14, %r15
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq