// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/./edge264_slice.c
// Function: parse_slice_data_cavlc
static void CAFUNC(parse_slice_data)
{
	static const i8x16 block_unavailability[16] = {
		{ 0,  0,  0,  4,  0,  0,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 1,  0,  9,  4,  0,  0,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{ 6, 14,  0,  4, 14, 10,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 7, 14,  9,  4, 14, 10,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{ 0,  0,  0,  4,  0,  4,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 1,  0,  9,  4,  0,  4,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{ 6, 14,  0,  4, 14, 14,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 7, 14,  9,  4, 14, 14,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{ 8,  0,  0,  4,  0,  0,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 9,  0,  9,  4,  0,  0,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{14, 14,  0,  4, 14, 10,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{15, 14,  9,  4, 14, 10,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{ 8,  0,  0,  4,  0,  4,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{ 9,  0,  9,  4,  0,  4,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
		{14, 14,  0,  4, 14, 14,  0,  4,  0,  0,  0,  4,  0,  4,  0,  4},
		{15, 14,  9,  4, 14, 14,  0,  4,  9,  0,  9,  4,  0,  4,  0,  4},
	};
	
	int end_of_slice_flag = 0;
	do {
		#ifdef LOGS
			ctx->log_pos = snprintf(ctx->log_buf, sizeof(ctx->log_buf),
				"  - mbAddr: %u\n", ctx->CurrMbAddr);
			if (ctx->n_threads)
				log_mb(ctx, "    FrameId: %u\n"
					"    slice_type: %c (%u)\n",
					ctx->FrameId, "PBI"[ctx->t.slice_type], ctx->t.slice_type);
		#endif
		
		// update flip_bit atomically to signal mb is a priori decoded, otherwise end the slice
		int prev_recovery_bits = __atomic_exchange_n(&mb->recovery_bits, ctx->t.frame_flip_bit, __ATOMIC_ACQ_REL);
		if (prev_recovery_bits == ctx->t.frame_flip_bit)
			return;
		
		// set and reset neighbouring pointers depending on their availability
		int unavail16x16 = (ctx->mbx == 0 ? 9 : 0) | (ctx->mbx == ctx->t.pic_width_in_mbs - 1) << 2 | (ctx->mby == 0 ? 14 : 0);
		int filter_edges = ~unavail16x16;
		mbA = mb - 1;
		mbB = mbA - ctx->t.pic_width_in_mbs;
		mbC = mbB + 1;
		mbD = mbB - 1;
		i8x16 fA = mbA->f.v;
		i8x16 fB = mbB->f.v;
		uint64_t bitsA = mbA->bits_l;
		uint64_t bitsB = mbB->bits_l;
		int decoded = ctx->CurrMbAddr - ctx->t.first_mb_in_slice;
		if (decoded <= ctx->t.pic_width_in_mbs + 1) {
			if (decoded == 1) { // A becomes available
				ctx->A4x4_int8[0] = 5 - (int)sizeof(*mb);
				ctx->A4x4_int8[2] = 7 - (int)sizeof(*mb);
				ctx->A4x4_int8[8] = 13 - (int)sizeof(*mb);
				ctx->A4x4_int8[10] = 15 - (int)sizeof(*mb);
				ctx->absMvd_A[0] = 10 - (int)sizeof(*mb);
				ctx->absMvd_A[2] = 14 - (int)sizeof(*mb);
				ctx->absMvd_A[8] = 26 - (int)sizeof(*mb);
				ctx->absMvd_A[10] = 30 - (int)sizeof(*mb);
				ctx->mvs_A[0] = 5 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_A[2] = 7 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_A[8] = 13 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_A[10] = 15 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_D[2] = 5 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_D[8] = 7 - (int)(sizeof(*mb) >> 2);
				ctx->mvs_D[10] = 13 - (int)(sizeof(*mb) >> 2);
				if (ctx->t.ChromaArrayType == 1) {
					ctx->ACbCr_int8[0] = 1 - (int)sizeof(*mb);
					ctx->ACbCr_int8[2] = 3 - (int)sizeof(*mb);
					ctx->ACbCr_int8[4] = 5 - (int)sizeof(*mb);
					ctx->ACbCr_int8[6] = 7 - (int)sizeof(*mb);
				}
			} else if (decoded == 0) { // A is unavailable
				mbA = &unavail_mb;
				unavail16x16 |= 1;
				fA = unavail_mb.f.v;
				bitsA = unavail_mb.bits_l;
				filter_edges &= ~(ctx->t.disable_deblocking_filter_idc >> 1); // impacts only bit 0
			}
			if (decoded == ctx->t.pic_width_in_mbs + 1) { // D becomes available
				int offD_int32 = ((ctx->t.pic_width_in_mbs + 2) * (int)sizeof(*mb)) >> 2;
				ctx->mvs_D[0] = 15 - offD_int32;
			} else { // D is unavailable
				mbD = &unavail_mb;
				unavail16x16 |= 8;
				if (decoded == ctx->t.pic_width_in_mbs) { // B becomes available
					int offB_int8 = (ctx->t.pic_width_in_mbs + 1) * (int)sizeof(*mb);
					int offB_int32 = offB_int8 >> 2;
					ctx->B4x4_int8[0] = 10 - offB_int8;
					ctx->B4x4_int8[1] = 11 - offB_int8;
					ctx->B4x4_int8[4] = 14 - offB_int8;
					ctx->B4x4_int8[5] = 15 - offB_int8;
					ctx->absMvd_B[0] = 20 - offB_int8;
					ctx->absMvd_B[1] = 22 - offB_int8;
					ctx->absMvd_B[4] = 28 - offB_int8;
					ctx->absMvd_B[5] = 30 - offB_int8;
					ctx->mvs_B[0] = 10 - offB_int32;
					ctx->mvs_B[1] = 11 - offB_int32;
					ctx->mvs_B[4] = 14 - offB_int32;
					ctx->mvs_B[5] = 15 - offB_int32;
					ctx->mvs_C[0] = 11 - offB_int32;
					ctx->mvs_C[1] = 14 - offB_int32;
					ctx->mvs_C[4] = 15 - offB_int32;
					ctx->mvs_D[1] = 10 - offB_int32;
					ctx->mvs_D[4] = 11 - offB_int32;
					ctx->mvs_D[5] = 14 - offB_int32;
					if (ctx->t.ChromaArrayType == 1) {
						ctx->BCbCr_int8[0] = 2 - offB_int8;
						ctx->BCbCr_int8[1] = 3 - offB_int8;
						ctx->BCbCr_int8[4] = 6 - offB_int8;
						ctx->BCbCr_int8[5] = 7 - offB_int8;
					}
				} else { // B is unavailable
					mbB = &unavail_mb;
					unavail16x16 |= 2;
					fB = unavail_mb.f.v;
					bitsB = unavail_mb.bits_l;
					filter_edges &= ~ctx->t.disable_deblocking_filter_idc; // impacts only bit 1
					if (decoded == ctx->t.pic_width_in_mbs - 1) { // C becomes available
						int offC_int32 = (ctx->t.pic_width_in_mbs * (int)sizeof(*mb)) >> 2;
						ctx->mvs_C[5] = 10 - offC_int32;
					} else { // C is unavailable
						mbC = &unavail_mb;
						unavail16x16 |= 4;
					}
				}
			}
		}
		
		// initialize common macroblock values
		ctx->unavail4x4_v[0] = block_unavailability[unavail16x16];
		ctx->inc.v = fA + fB + (fB & flags_twice.v);
		mb->f.v = (i8x16){};
		if (ctx->t.disable_deblocking_filter_idc != 1)
			mb->filter_edges = filter_edges;
		mb->QP_s = ctx->t.QP_s;
		if (ctx->t.ChromaArrayType == 1) { // FIXME 4:2:2
			ctx->unavail4x4_v[1] = shuffle(ctx->unavail4x4_v[0], (i8x16){0, 4, 8, 12, 0, 4, 8, 12, -1, -1, -1, -1, -1, -1, -1, -1});
			mb->bits_l = (bitsA >> 3 & 0x11111100111111) | (bitsB >> 1 & 0x42424200424242);
		}
		mb->nC_v[0] = mb->nC_v[1] = mb->nC_v[2] = (i8x16){};
		
		// Would it actually help to push this test outside the loop?
		if (ctx->t.slice_type == 0) {
			CACALL(parse_P_mb);
		} else if (ctx->t.slice_type == 1) {
			CACALL(parse_B_mb);
		} else {
			int mb_type_or_ctxIdx = CACOND(get_ue16(&ctx->t._gb, 25), 5 - ctx->inc.mb_type_I_NxN);
			#if !CABAC
				log_mb(ctx, "    mb_type: %u\n", mb_type_or_ctxIdx);
			#endif
			CACALL(parse_I_mb, mb_type_or_ctxIdx);
		}
		#if CABAC
			end_of_slice_flag = cabac_terminate(ctx);
			log_mb(ctx, "    end_of_slice_flag: %u\n", end_of_slice_flag);
		#endif
		print_mb(ctx);
		
		// deblock mbB while in cache, then point to the next macroblock
		if (ctx->CurrMbAddr - ctx->t.pic_width_in_mbs == ctx->t.next_deblock_addr) {
			ctx->t.next_deblock_addr += 1;
			mb -= ctx->t.pic_width_in_mbs + 1;
			ctx->samples_mb[0] -= ctx->t.stride[0] * 16;
			ctx->samples_mb[1] -= ctx->t.stride[1] * 8;
			ctx->samples_mb[2] -= ctx->t.stride[1] * 8;
			deblock_mb(ctx);
			mb += ctx->t.pic_width_in_mbs + 2;
			ctx->samples_mb[0] += ctx->t.stride[0] * 16 + 16;
			ctx->samples_mb[1] += ctx->t.stride[1] * 8 + 8;
			ctx->samples_mb[2] += ctx->t.stride[1] * 8 + 8;
		} else {
			mb++;
			ctx->samples_mb[0] += 16; // FIXME 16bit
			ctx->samples_mb[1] += 8; // FIXME 4:2:2, 16bit
			ctx->samples_mb[2] += 8;
		}
		ctx->mbx++;
		ctx->CurrMbAddr++;
		ctx->mbCol++;
		if (ctx->mbx >= ctx->t.pic_width_in_mbs) {
			mb++; // skip the empty macroblock at the edge
			ctx->mbCol++;
			ctx->mby++;
			ctx->mbx = 0;
			ctx->samples_mb[0] += ctx->t.stride[0] * 16 - ctx->t.pic_width_in_mbs * 16;
			ctx->samples_mb[1] += ctx->t.stride[1] * 8 - ctx->t.pic_width_in_mbs * 8; // FIXME 4:2:2
			ctx->samples_mb[2] += ctx->t.stride[1] * 8 - ctx->t.pic_width_in_mbs * 8;
			if (ctx->t.next_deblock_idc >= 0) {
				__atomic_store_n(&ctx->d->next_deblock_addr[ctx->t.next_deblock_idc],
					(ctx->t.disable_deblocking_filter_idc != 1) ? ctx->t.next_deblock_addr : ctx->CurrMbAddr,
					__ATOMIC_RELEASE);
				// not locking mutex here is fine since the last progress broadcast will lock it
				pthread_cond_broadcast(&ctx->d->task_progress);
			}
			if (ctx->mby >= ctx->t.pic_height_in_mbs)
				return;
		}
	} while (CACOND(ctx->mb_skip_run > 0 || ctx->t._gb.msb_cache << 1 || (ctx->t._gb.lsb_cache & (ctx->t._gb.lsb_cache - 1)) || (intptr_t)(ctx->t._gb.end - ctx->t._gb.CPB) > 0, !end_of_slice_flag));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x48(%rbp), %rax
movl 0x658(%rax), %ecx
movl $0x1000, %esi           # imm = 0x1000
leaq 0x68bf2(%rip), %rdx     # 0xd08d9
movb $0x0, %al
callq 0x7070
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x1cd0(%rax)
movq -0x48(%rbp), %rax
cmpb $0x0, 0x650(%rax)
je 0x67d9e
movq -0x48(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x67d9c
movq -0x48(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x48(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movq -0x48(%rbp), %rax
movl 0x65c(%rax), %ecx
movq -0x48(%rbp), %rax
movsbq 0x20(%rax), %rdx
leaq 0x68ba8(%rip), %rax     # 0xd0912
movsbl (%rax,%rdx), %r8d
movq -0x48(%rbp), %rax
movsbl 0x20(%rax), %r9d
leaq 0x68b6a(%rip), %rdx     # 0xd08e9
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x48(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
jmp 0x67d9e
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
movb 0x2e(%rax), %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
xchgb %al, 0x1(%rcx)
movb %al, -0x52(%rbp)
movsbl -0x52(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
movsbl 0x2e(%rcx), %ecx
cmpl %ecx, %eax
jne 0x67dd3
jmp 0x68a8c
movq -0x48(%rbp), %rax
movswl 0x654(%rax), %edx
xorl %eax, %eax
movl $0x9, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movq -0x48(%rbp), %rcx
movswl 0x654(%rcx), %ecx
movq -0x48(%rbp), %rdx
movswl 0x30(%rdx), %edx
subl $0x1, %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
orl %ecx, %eax
movq -0x48(%rbp), %rcx
movswl 0x656(%rcx), %esi
xorl %ecx, %ecx
movl $0xe, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
addq $-0x130, %rcx           # imm = 0xFED0
movq -0x48(%rbp), %rax
movq %rcx, 0x688(%rax)
movq -0x48(%rbp), %rax
movq 0x688(%rax), %rcx
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
movslq %eax, %rdx
xorl %eax, %eax
subq %rdx, %rax
imulq $0x130, %rax, %rax      # imm = 0x130
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x690(%rax)
movq -0x48(%rbp), %rax
movq 0x690(%rax), %rcx
addq $0x130, %rcx            # imm = 0x130
movq -0x48(%rbp), %rax
movq %rcx, 0x698(%rax)
movq -0x48(%rbp), %rax
movq 0x690(%rax), %rcx
addq $-0x130, %rcx           # imm = 0xFED0
movq -0x48(%rbp), %rax
movq %rcx, 0x6a0(%rax)
movq -0x48(%rbp), %rax
movq 0x688(%rax), %rax
vmovdqa 0x20(%rax), %xmm0
vmovdqa %xmm0, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq 0x690(%rax), %rax
vmovdqa 0x20(%rax), %xmm0
vmovdqa %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq 0x688(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq 0x690(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
movl 0x658(%rax), %eax
movq -0x48(%rbp), %rcx
subl 0x48(%rcx), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x683d9
cmpl $0x1, -0x94(%rbp)
jne 0x6805a
movq -0x48(%rbp), %rax
movw $0xfed5, 0xb40(%rax)    # imm = 0xFED5
movq -0x48(%rbp), %rax
movw $0xfed7, 0xb44(%rax)    # imm = 0xFED7
movq -0x48(%rbp), %rax
movw $0xfedd, 0xb50(%rax)    # imm = 0xFEDD
movq -0x48(%rbp), %rax
movw $0xfedf, 0xb54(%rax)    # imm = 0xFEDF
movq -0x48(%rbp), %rax
movw $0xfeda, 0xc40(%rax)    # imm = 0xFEDA
movq -0x48(%rbp), %rax
movw $0xfede, 0xc44(%rax)    # imm = 0xFEDE
movq -0x48(%rbp), %rax
movw $0xfeea, 0xc50(%rax)    # imm = 0xFEEA
movq -0x48(%rbp), %rax
movw $0xfeee, 0xc54(%rax)    # imm = 0xFEEE
movq -0x48(%rbp), %rax
movw $0xffb9, 0xcc0(%rax)    # imm = 0xFFB9
movq -0x48(%rbp), %rax
movw $0xffbb, 0xcc4(%rax)    # imm = 0xFFBB
movq -0x48(%rbp), %rax
movw $0xffc1, 0xcd0(%rax)    # imm = 0xFFC1
movq -0x48(%rbp), %rax
movw $0xffc3, 0xcd4(%rax)    # imm = 0xFFC3
movq -0x48(%rbp), %rax
movl $0xffffffb9, 0xd88(%rax) # imm = 0xFFFFFFB9
movq -0x48(%rbp), %rax
movl $0xffffffbb, 0xda0(%rax) # imm = 0xFFFFFFBB
movq -0x48(%rbp), %rax
movl $0xffffffc1, 0xda8(%rax) # imm = 0xFFFFFFC1
movq -0x48(%rbp), %rax
movsbl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x68058
movq -0x48(%rbp), %rax
movw $0xfed1, 0xbc0(%rax)    # imm = 0xFED1
movq -0x48(%rbp), %rax
movw $0xfed3, 0xbc4(%rax)    # imm = 0xFED3
movq -0x48(%rbp), %rax
movw $0xfed5, 0xbc8(%rax)    # imm = 0xFED5
movq -0x48(%rbp), %rax
movw $0xfed7, 0xbcc(%rax)    # imm = 0xFED7
jmp 0x680ae
cmpl $0x0, -0x94(%rbp)
jne 0x680ac
movq -0x48(%rbp), %rax
leaq 0x6f262(%rip), %rcx     # 0xd72d0
movq %rcx, 0x688(%rax)
movl -0x58(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x58(%rbp)
vmovdqa 0x6f26a(%rip), %xmm0    # 0xd72f0
vmovdqa %xmm0, -0x70(%rbp)
movq 0x6f246(%rip), %rax     # 0xd72d8
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movsbl 0x27(%rax), %eax
sarl %eax
xorl $-0x1, %eax
andl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x680ae
movl -0x94(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x680f7
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
addl $0x2, %eax
imull $0x130, %eax, %eax      # imm = 0x130
sarl $0x2, %eax
movl %eax, -0x98(%rbp)
movl $0xf, %ecx
subl -0x98(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd80(%rax)
jmp 0x683d7
movq -0x48(%rbp), %rax
leaq 0x6f1ce(%rip), %rcx     # 0xd72d0
movq %rcx, 0x6a0(%rax)
movl -0x58(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x58(%rbp)
movl -0x94(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
cmpl %ecx, %eax
jne 0x6832e
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
addl $0x1, %eax
imull $0x130, %eax, %eax      # imm = 0x130
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
sarl $0x2, %eax
movl %eax, -0xa0(%rbp)
movl $0xa, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xb80(%rax)
movl $0xb, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xb84(%rax)
movl $0xe, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xb90(%rax)
movl $0xf, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xb94(%rax)
movl $0x14, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xc80(%rax)
movl $0x16, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xc84(%rax)
movl $0x1c, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xc90(%rax)
movl $0x1e, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xc94(%rax)
movl $0xa, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd00(%rax)
movl $0xb, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd04(%rax)
movl $0xe, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd10(%rax)
movl $0xf, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd14(%rax)
movl $0xb, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd40(%rax)
movl $0xe, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd44(%rax)
movl $0xf, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd50(%rax)
movl $0xa, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd84(%rax)
movl $0xb, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd90(%rax)
movl $0xe, %ecx
subl -0xa0(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd94(%rax)
movq -0x48(%rbp), %rax
movsbl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x68329
movl $0x2, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xbe0(%rax)
movl $0x3, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xbe4(%rax)
movl $0x6, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xbf0(%rax)
movl $0x7, %ecx
subl -0x9c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xbf4(%rax)
jmp 0x683d5
movq -0x48(%rbp), %rax
leaq 0x6ef97(%rip), %rcx     # 0xd72d0
movq %rcx, 0x690(%rax)
movl -0x58(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x58(%rbp)
vmovdqa 0x6ef9f(%rip), %xmm0    # 0xd72f0
vmovdqa %xmm0, -0x80(%rbp)
movq 0x6ef7b(%rip), %rax     # 0xd72d8
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
movsbl 0x27(%rax), %eax
xorl $-0x1, %eax
andl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x94(%rbp), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x683b8
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
imull $0x130, %eax, %eax      # imm = 0x130
sarl $0x2, %eax
movl %eax, -0xa4(%rbp)
movl $0xa, %ecx
subl -0xa4(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xd54(%rax)
jmp 0x683d3
movq -0x48(%rbp), %rax
leaq 0x6ef0d(%rip), %rcx     # 0xd72d0
movq %rcx, 0x698(%rax)
movl -0x58(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x58(%rbp)
jmp 0x683d5
jmp 0x683d7
jmp 0x683d9
movslq -0x58(%rbp), %rax
shlq $0x4, %rax
leaq 0x66358(%rip), %rcx     # 0xce740
vmovdqa (%rax,%rcx), %xmm0
movq -0x48(%rbp), %rax
vmovdqa %xmm0, 0x6d0(%rax)
vmovdqa -0x70(%rbp), %xmm0
vmovdqa -0x80(%rbp), %xmm1
vpaddb %xmm1, %xmm0, %xmm0
vmovdqa 0x66431(%rip), %xmm2    # 0xce840
vpand %xmm2, %xmm1, %xmm1
vpaddb %xmm1, %xmm0, %xmm0
movq -0x48(%rbp), %rax
vmovdqa %xmm0, 0x6c0(%rax)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0xc0(%rbp)
vmovdqa -0xc0(%rbp), %xmm0
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x20(%rax)
movq -0x48(%rbp), %rax
movsbl 0x27(%rax), %eax
cmpl $0x1, %eax
je 0x68467
movl -0x5c(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
movb %cl, 0x3(%rax)
movq -0x48(%rbp), %rcx
movq 0x680(%rcx), %rax
movl 0x50(%rcx), %ecx
movl %ecx, 0x4(%rax)
movq -0x48(%rbp), %rax
movsbl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x68527
movq -0x48(%rbp), %rax
vmovdqa 0x6d0(%rax), %xmm1
vmovdqa 0x60cc3(%rip), %xmm0    # 0xc9160
vmovdqa %xmm0, -0xd0(%rbp)
vmovdqa -0xd0(%rbp), %xmm0
vmovdqa %xmm1, -0x30(%rbp)
vmovdqa %xmm0, -0x40(%rbp)
vmovdqa -0x30(%rbp), %xmm1
vmovdqa -0x40(%rbp), %xmm0
vmovdqa %xmm1, -0x10(%rbp)
vmovdqa %xmm0, -0x20(%rbp)
vmovdqa -0x10(%rbp), %xmm0
vmovdqa -0x20(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
movq -0x48(%rbp), %rax
vmovdqa %xmm0, 0x6e0(%rax)
movq -0x88(%rbp), %rcx
shrq $0x3, %rcx
movabsq $0x11111100111111, %rax # imm = 0x11111100111111
andq %rax, %rcx
movq -0x90(%rbp), %rax
shrq %rax
movabsq $0x42424200424242, %rdx # imm = 0x42424200424242
andq %rdx, %rax
orq %rax, %rcx
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
movq %rcx, 0x8(%rax)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0xe0(%rbp)
vmovdqa -0xe0(%rbp), %xmm0
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x60(%rax)
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x50(%rax)
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x40(%rax)
movq -0x48(%rbp), %rax
movsbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x68586
movq -0x48(%rbp), %rdi
callq 0x7ddb0
jmp 0x68633
movq -0x48(%rbp), %rax
movsbl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x685a1
movq -0x48(%rbp), %rdi
callq 0x7e250
jmp 0x68631
movq -0x48(%rbp), %rdi
movl $0x19, %esi
callq 0x76d10
movl %eax, -0xe4(%rbp)
movq -0x48(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x68622
movq -0x48(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x48(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movl -0xe4(%rbp), %ecx
leaq 0x68311(%rip), %rdx     # 0xd0916
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x48(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
movq -0x48(%rbp), %rdi
movl -0xe4(%rbp), %esi
callq 0x7ea70
jmp 0x68633
movq -0x48(%rbp), %rdi
callq 0x7f930
movq -0x48(%rbp), %rax
movl 0x658(%rax), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
subl %ecx, %eax
movq -0x48(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jne 0x687b8
movq -0x48(%rbp), %rax
movl 0x44(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x44(%rax)
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %edx
addl $0x1, %edx
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
imulq $0x130, %rdx, %rdx      # imm = 0x130
addq %rdx, %rcx
movq %rcx, 0x680(%rax)
movq -0x48(%rbp), %rax
movzwl 0x34(%rax), %edx
shll $0x4, %edx
movq -0x48(%rbp), %rax
movq 0x668(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x668(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
movq -0x48(%rbp), %rax
movq 0x670(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x670(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
movq -0x48(%rbp), %rax
movq 0x678(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x678(%rax)
movq -0x48(%rbp), %rdi
callq 0x6a100
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %edx
addl $0x2, %edx
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
movslq %edx, %rdx
imulq $0x130, %rdx, %rdx      # imm = 0x130
addq %rdx, %rcx
movq %rcx, 0x680(%rax)
movq -0x48(%rbp), %rax
movzwl 0x34(%rax), %edx
shll $0x4, %edx
addl $0x10, %edx
movq -0x48(%rbp), %rax
movq 0x668(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x668(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
addl $0x8, %edx
movq -0x48(%rbp), %rax
movq 0x670(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x670(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
addl $0x8, %edx
movq -0x48(%rbp), %rax
movq 0x678(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x678(%rax)
jmp 0x68813
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
addq $0x130, %rcx            # imm = 0x130
movq %rcx, 0x680(%rax)
movq -0x48(%rbp), %rax
movq 0x668(%rax), %rcx
addq $0x10, %rcx
movq %rcx, 0x668(%rax)
movq -0x48(%rbp), %rax
movq 0x670(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x670(%rax)
movq -0x48(%rbp), %rax
movq 0x678(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x678(%rax)
movq -0x48(%rbp), %rax
movw 0x654(%rax), %cx
addw $0x1, %cx
movw %cx, 0x654(%rax)
movq -0x48(%rbp), %rax
movl 0x658(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x658(%rax)
movq -0x48(%rbp), %rax
movq 0x6a8(%rax), %rcx
addq $0x130, %rcx            # imm = 0x130
movq %rcx, 0x6a8(%rax)
movq -0x48(%rbp), %rax
movswl 0x654(%rax), %eax
movq -0x48(%rbp), %rcx
movswl 0x30(%rcx), %ecx
cmpl %ecx, %eax
jl 0x68a0a
movq -0x48(%rbp), %rax
movq 0x680(%rax), %rcx
addq $0x130, %rcx            # imm = 0x130
movq %rcx, 0x680(%rax)
movq -0x48(%rbp), %rax
movq 0x6a8(%rax), %rcx
addq $0x130, %rcx            # imm = 0x130
movq %rcx, 0x6a8(%rax)
movq -0x48(%rbp), %rax
movw 0x656(%rax), %cx
addw $0x1, %cx
movw %cx, 0x656(%rax)
movq -0x48(%rbp), %rax
movw $0x0, 0x654(%rax)
movq -0x48(%rbp), %rax
movzwl 0x34(%rax), %edx
shll $0x4, %edx
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
shll $0x4, %eax
subl %eax, %edx
movq -0x48(%rbp), %rax
movq 0x668(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x668(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
shll $0x3, %eax
subl %eax, %edx
movq -0x48(%rbp), %rax
movq 0x670(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x670(%rax)
movq -0x48(%rbp), %rax
movzwl 0x36(%rax), %edx
shll $0x3, %edx
movq -0x48(%rbp), %rax
movswl 0x30(%rax), %eax
shll $0x3, %eax
subl %eax, %edx
movq -0x48(%rbp), %rax
movq 0x678(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x678(%rax)
movq -0x48(%rbp), %rax
movsbl 0x2d(%rax), %eax
cmpl $0x0, %eax
jl 0x689ec
movq -0x48(%rbp), %rax
movq 0x6b0(%rax), %rax
addq $0x16c0, %rax           # imm = 0x16C0
movq -0x48(%rbp), %rcx
movsbq 0x2d(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0x48(%rbp), %rax
movsbl 0x27(%rax), %eax
cmpl $0x1, %eax
je 0x689aa
movq -0x48(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0xf4(%rbp)
jmp 0x689ba
movq -0x48(%rbp), %rax
movl 0x658(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0xf0(%rbp), %rax
movl -0xf4(%rbp), %ecx
movl %ecx, -0xe8(%rbp)
movl -0xe8(%rbp), %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movq 0x6b0(%rax), %rdi
addq $0x15d8, %rdi           # imm = 0x15D8
callq 0x7040
movq -0x48(%rbp), %rax
movswl 0x656(%rax), %eax
movq -0x48(%rbp), %rcx
movswl 0x32(%rcx), %ecx
cmpl %ecx, %eax
jl 0x68a08
jmp 0x68a8c
jmp 0x68a0a
jmp 0x68a0c
movq -0x48(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x660(%rcx)
movb %al, -0xf5(%rbp)
jg 0x68a7e
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rcx
shlq %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xf5(%rbp)
jne 0x68a7e
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
andq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xf5(%rbp)
jne 0x68a7e
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
setg %al
movb %al, -0xf5(%rbp)
movb -0xf5(%rbp), %al
testb $0x1, %al
jne 0x67cc6
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)