// File: /workspace/github_c_makefile_star2_O1/tvlabs[P]edge264/./edge264_slice.c
// Function: parse_I_mb_cabac
static noinline void CAFUNC(parse_I_mb, int mb_type_or_ctxIdx)
{
	static const uint8_t me_intra[48] = {174, 173, 172, 0, 45, 169, 165, 141, 44, 168, 164, 140, 46, 170, 166, 142, 1, 40, 36, 136, 132, 41, 37, 137, 133, 42, 38, 138, 134, 32, 8, 4, 128, 33, 9, 5, 129, 12, 160, 13, 161, 2, 34, 10, 6, 130, 14, 162};
	
	// Intra-specific initialisations
	#if CABAC
		ctx->nC_inc_v[0] = ctx->nC_inc_v[1] = ctx->nC_inc_v[2] = (i8x16){};
		if (ctx->unavail4x4[0] & 1) {
			mb->bits[1] |= 0x111111; // FIXME 4:2:2
			ctx->nC_inc_v[0] += (i8x16){1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0};
			ctx->nC_inc_v[1] += (i8x16){1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
			ctx->inc.coded_block_flags_16x16_s |= 0x010101;
		}
		if (ctx->unavail4x4[0] & 2) {
			mb->bits[1] |= 0x424242;
			ctx->nC_inc_v[0] += (i8x16){2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
			ctx->nC_inc_v[1] += (i8x16){2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
			ctx->inc.coded_block_flags_16x16_s |= 0x020202;
		}
	#endif
	mb->mbIsInterFlag = 0;
	mb->f.inter_eqs_s = little_endian32(0x1b5fbbff);
	mb->refIdx_l = -1;
	mb->refPic_l = -1;
	mb->mvs_v[0] = mb->mvs_v[1] = mb->mvs_v[2] = mb->mvs_v[3] = mb->mvs_v[4] = mb->mvs_v[5] = mb->mvs_v[6] = mb->mvs_v[7] = (i16x8){};
	
	// I_NxN
	if (CACOND(mb_type_or_ctxIdx == 0, !get_ae(ctx, mb_type_or_ctxIdx))) {
		#if CABAC
			mb->f.mb_type_I_NxN = 1;
			log_mb(ctx, (mb_type_or_ctxIdx == 17) ? "    mb_type: 5\n" : // in P slice
								 (mb_type_or_ctxIdx == 32) ? "    mb_type: 23\n" : // in B slice
																	  "    mb_type: 0\n"); // in I slice
		#endif
		
		// 7.3.5, 7.4.5, 9.3.3.1.1.10 and table 9-34
		int transform_size_8x8_flag = 0;
		if (ctx->t.pps.transform_8x8_mode_flag) {
			transform_size_8x8_flag = CACOND(get_u1(&ctx->t._gb), get_ae(ctx, 399 + ctx->inc.transform_size_8x8_flag));
			log_mb(ctx, "    transform_size_8x8_flag: %u\n", transform_size_8x8_flag);
		}
		
		mb->Intra4x4PredMode_v = (i8x16){-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}; // default values when A/B is unavailable
		if (transform_size_8x8_flag) {
			mb->f.transform_size_8x8_flag = transform_size_8x8_flag;
			log_mb(ctx, "    rem_intra8x8_pred_modes: [");
			for (int i = 0; i < 16; i += 4)
				mb->Intra4x4PredMode[i + 1] = mb->Intra4x4PredMode[i + 2] = mb->Intra4x4PredMode[i + 3] = CACALL(parse_intraNxN_pred_mode, i);
			log_mb(ctx, "]\n    Intra8x8PredModes: [%u,%u,%u,%u]\n",
				mb->Intra4x4PredMode[0], mb->Intra4x4PredMode[4], mb->Intra4x4PredMode[8], mb->Intra4x4PredMode[12]);
		} else {
			log_mb(ctx, "    rem_intra4x4_pred_modes: [");
			for (int i = 0; i < 16; i++)
				mb->Intra4x4PredMode[i] = CACALL(parse_intraNxN_pred_mode, i);
			log_mb(ctx, "]\n    Intra4x4PredModes: [%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u]\n",
				mb->Intra4x4PredMode[0], mb->Intra4x4PredMode[1], mb->Intra4x4PredMode[2], mb->Intra4x4PredMode[3],
				mb->Intra4x4PredMode[4], mb->Intra4x4PredMode[5], mb->Intra4x4PredMode[6], mb->Intra4x4PredMode[7],
				mb->Intra4x4PredMode[8], mb->Intra4x4PredMode[9], mb->Intra4x4PredMode[10], mb->Intra4x4PredMode[11],
				mb->Intra4x4PredMode[12], mb->Intra4x4PredMode[13], mb->Intra4x4PredMode[14], mb->Intra4x4PredMode[15]);
		}
		
		CACALL(parse_intra_chroma_pred_mode);
		CACALL(parse_coded_block_pattern, me_intra);
		CAJUMP(parse_NxN_residual);
	
	// Intra_16x16
	} else if (__builtin_expect(CACOND(mb_type_or_ctxIdx < 25, !cabac_terminate(ctx)), 1)) {
		#if !CABAC
			int mb_type = mb_type_or_ctxIdx - 1;
			mb->bits[0] = mb_type > 11 ? 0xac : 0; // zeroes ref_idx_nz as byproduct
			mb_type = mb_type > 11 ? mb_type - 12 : mb_type;
			mb->f.CodedBlockPatternChromaDC = mb_type > 3;
			mb->f.CodedBlockPatternChromaAC = mb_type >> 3;
			int mode = mb_type & 3;
		#else
			int ctxIdx = max(mb_type_or_ctxIdx, 5);
			mb->bits[0] = get_ae(ctx, ctxIdx + 1) ? 0xac : 0; // zeroes ref_idx_nz as byproduct
			int CodedBlockPatternChromaDC = get_ae(ctx, ctxIdx + 2);
			ctxIdx = max(ctxIdx, 6);
			if (CodedBlockPatternChromaDC) {
				mb->f.CodedBlockPatternChromaDC = 1;
				mb->f.CodedBlockPatternChromaAC = get_ae(ctx, ctxIdx + 2);
			}
			int mode = get_ae(ctx, ctxIdx + 3) << 1;
			mode += get_ae(ctx, max(ctxIdx + 3, 10));
			log_mb(ctx, "    mb_type: %u\n", (mb->bits[0] & 12) +
				(mb->f.CodedBlockPatternChromaDC + mb->f.CodedBlockPatternChromaAC) * 4 +
				mode + (ctxIdx == 17 ? 6 : ctxIdx == 32 ? 24 : 1));
		#endif
		
		// decode the samples before parsing residuals
		static const int8_t Intra16x16Modes[4][4] = {
			{I16x16_V_8 , I16x16_V_8  , I16x16_DCB_8, I16x16_DCAB_8},
			{I16x16_H_8 , I16x16_DCA_8, I16x16_H_8  , I16x16_DCAB_8},
			{I16x16_DC_8, I16x16_DCA_8, I16x16_DCB_8, I16x16_DCAB_8},
			{I16x16_P_8 , I16x16_DCA_8, I16x16_DCB_8, I16x16_DCAB_8},
		};
		mb->Intra4x4PredMode_v = (i8x16){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
		decode_intra16x16(Intra16x16Modes[mode][ctx->unavail4x4[0] & 3], ctx->samples_mb[0], ctx->t.stride[0], ctx->t.samples_clip_v[0]); // FIXME 4:4:4
		CACALL(parse_intra_chroma_pred_mode);
		CAJUMP(parse_Intra16x16_residual);
		
	// I_PCM
	} else {
		#if !CABAC
			unsigned bits = (SIZE_BIT - 1 - ctz(ctx->t._gb.lsb_cache)) & 7;
			ctx->t._gb.msb_cache = shld(ctx->t._gb.lsb_cache, ctx->t._gb.msb_cache, bits);
			ctx->t._gb.lsb_cache = ctx->t._gb.lsb_cache << bits;
		#else
			log_mb(ctx, (mb_type_or_ctxIdx == 17) ? "    mb_type: 30\n" : (mb_type_or_ctxIdx == 32) ? "    mb_type: 48\n" : "    mb_type: 25\n");
		#endif
		
		ctx->mb_qp_delta_nz = 0;
		mb->f.v |= flags_twice.v; // ChromaDC, ChromaAC and flags_16x16, just what we need :)
		mb->QP_s = (i8x4){0, ctx->QP_C[0][0], ctx->QP_C[1][0]};
		mb->bits_l = (uint64_t)(i32x2){0xac, 0xacacac}; // FIXME 4:2:2
		mb->nC_v[0] = mb->nC_v[1] = mb->nC_v[2] = CACOND(
			((i8x16){16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}),
			((i8x16){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}));
		mb->Intra4x4PredMode_v = (i8x16){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
		
		// PCM is so rare that it should be compact rather than fast
		int MbWidth = 16, y = 16;
		log_mb(ctx, "    pcm_samples:\n"
			"      bits_Y: %u\n"
			"      bits_C: %u\n",
			ctz(ctx->t.samples_clip[0][0] + 1), ctz(ctx->t.samples_clip[1][0] + 1));
		for (int iYCbCr = 0; iYCbCr < 3; iYCbCr++) {
			log_mb(ctx, "      %s: [", (const char *)"Y\0\0Cb\0Cr" + iYCbCr * 3);
			int BitDepth = ctz(ctx->t.samples_clip[iYCbCr][0] + 1);
			for (uint8_t *p = ctx->samples_mb[iYCbCr]; y-- > 0; p += ctx->t.stride[iYCbCr]) {
				if (BitDepth == 8) {
					((uint32_t *)p)[0] = big_endian32(get_uv(&ctx->t._gb, 32));
					((uint32_t *)p)[1] = big_endian32(get_uv(&ctx->t._gb, 32));
					log_mb(ctx, "%u,%u,%u,%u,%u,%u,%u,%u,", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
					if (MbWidth == 16) {
						((uint32_t *)p)[2] = big_endian32(get_uv(&ctx->t._gb, 32));
						((uint32_t *)p)[3] = big_endian32(get_uv(&ctx->t._gb, 32));
						log_mb(ctx, "%u,%u,%u,%u,%u,%u,%u,%u,", p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]);
					}
				} else for (int x = 0; x < MbWidth; x++) {
					((uint16_t *)p)[x] = get_uv(&ctx->t._gb, BitDepth);
					log_mb(ctx, "%u,", ((uint16_t *)p)[x]);
				}
			}
			log_mb(ctx, "]\n");
			MbWidth = (ctx->t.ChromaArrayType < 3) ? 8 : 16;
			y = (int8_t[4]){0, 8, 16, 16}[ctx->t.ChromaArrayType];
		}
		#if CABAC
			cabac_start(ctx);
		#endif
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %ymm0, 0x710(%rdi)
vmovdqa %ymm0, 0x700(%rdi)
testb $0x1, 0x6d0(%rdi)
je 0x2f866
movq 0x680(%rbx), %rax
orl $0x111111, 0xc(%rax)    # imm = 0x111111
vmovdqa 0x700(%rbx), %xmm0
vmovdqa 0x710(%rbx), %xmm1
vpaddb 0x403c(%rip), %xmm0, %xmm0 # 0x33880
vmovdqa %xmm0, 0x700(%rbx)
vpaddb 0x403c(%rip), %xmm1, %xmm0 # 0x33890
vmovdqa %xmm0, 0x710(%rbx)
orl $0x10101, 0x6c8(%rbx)   # imm = 0x10101
testb $0x2, 0x6d0(%rbx)
je 0x2f8af
movq 0x680(%rbx), %rax
orl $0x424242, 0xc(%rax)    # imm = 0x424242
vmovq 0x401b(%rip), %xmm0     # 0x338a0
vpaddb 0x700(%rbx), %xmm0, %xmm1
vmovdqa %xmm1, 0x700(%rbx)
vpaddb 0x710(%rbx), %xmm0, %xmm0
vmovdqa %xmm0, 0x710(%rbx)
orl $0x20202, 0x6c8(%rbx)   # imm = 0x20202
movq 0x680(%rbx), %rax
movb $0x0, 0x2(%rax)
movl $0x1b5fbbff, 0x2c(%rax) # imm = 0x1B5FBBFF
movq 0x680(%rbx), %rax
movq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x680(%rbx), %rax
movq %rcx, 0x18(%rax)
movq 0x680(%rbx), %rax
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x120(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0x110(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0x100(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0xf0(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0xe0(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0xd0(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0xc0(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0xb0(%rax)
movq %rbx, %rdi
movl %ebp, %esi
vzeroupper
callq 0x306b3
testl %eax, %eax
je 0x2fd1a
movq %rbx, %rdi
callq 0x3064c
testl %eax, %eax
jne 0x301f2
cmpl $0x6, %ebp
movl $0x5, %r14d
cmovgel %ebp, %r14d
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x306b3
testl %eax, %eax
movl $0xac, %ecx
cmovel %eax, %ecx
movq 0x680(%rbx), %rax
movl %ecx, 0x8(%rax)
addl $0x2, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x306b3
cmpl $0x7, %ebp
movl $0x6, %r14d
cmovgel %ebp, %r14d
testl %eax, %eax
je 0x2f9ed
movq 0x680(%rbx), %rax
movb $0x1, 0x26(%rax)
leal 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x306b3
movq 0x680(%rbx), %rcx
movb %al, 0x27(%rcx)
addl $0x3, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x306b3
movl %eax, %r15d
cmpl $0xb, %r14d
movl $0xa, %esi
cmovgel %r14d, %esi
movq %rbx, %rdi
callq 0x306b3
leal (%rax,%r15,2), %r14d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2fa8e
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movq 0x680(%rbx), %rax
movl 0x8(%rax), %ecx
andl $0xc, %ecx
movsbl 0x26(%rax), %edx
movsbl 0x27(%rax), %eax
addl %edx, %eax
cmpl $0x20, %ebp
movl $0x18, %edx
movl $0x1, %r8d
cmovel %edx, %r8d
cmpl $0x11, %ebp
movl $0x6, %edx
cmovnel %r8d, %edx
addl %r14d, %edx
addl %ecx, %edx
leal (%rdx,%rax,4), %ecx
leaq 0xab2e(%rip), %rdx      # 0x3a5ae
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
vpbroadcastb 0x7d0b(%rip), %xmm0 # 0x377a9
vmovdqa %xmm0, 0x30(%rax)
movl %r14d, %eax
movzbl 0x6d0(%rbx), %ecx
andl $0x3, %ecx
leaq 0x3ed9(%rip), %rdx      # 0x33990
leaq (%rdx,%rax,4), %rax
movsbl (%rcx,%rax), %edi
movq 0x668(%rbx), %rsi
movzwl 0x34(%rbx), %edx
callq 0x2ea7f
movq %rbx, %rdi
callq 0x31df0
movq %rbx, %rdi
callq 0x314e8
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2fb18
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xab49(%rip), %rdx      # 0x3a653
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x700(%rbx), %r13
vmovaps 0x3a09(%rip), %xmm0     # 0x33530
vmovaps %xmm0, 0x1aa0(%rbx)
vmovaps 0x3d79(%rip), %xmm0     # 0x338b0
vmovaps %xmm0, 0x1a60(%rbx)
vmovaps %xmm0, 0x1a20(%rbx)
leaq 0x1ba0(%rbx), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movabsq $0x909080706, %rax      # imm = 0x909080706
vmovq %rax, %xmm0
vmovdqa %xmm0, 0x20(%rsp)
xorl %r14d, %r14d
movq %r14, %rbp
shlq $0x4, %rbp
leaq 0x99cf(%rip), %rax      # 0x39550
movq (%rbp,%rax), %rax
movq %rax, 0x1a10(%rbx)
cwtl
movsbl 0x6c8(%rbx,%r14), %esi
addl %eax, %esi
movq %rbx, %rdi
vzeroupper
callq 0x306b3
testl %eax, %eax
je 0x2fbe0
movq 0x680(%rbx), %rax
movb $0x1, 0x28(%rax,%r14)
movabsq $0x909080706, %rax      # imm = 0x909080706
movq %rax, 0x1a18(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
movl $0xf, %edx
callq 0x315c4
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2f3e9
movq 0x680(%rbx), %rax
testb $0x20, 0x8(%rax)
je 0x2fcd6
leaq 0x9988(%rip), %rax      # 0x39580
vmovq (%rbp,%rax), %xmm0
vpunpcklqdq 0x20(%rsp), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0]
vmovdqa %xmm0, 0x1a10(%rbx)
xorl %r15d, %r15d
leaq 0x3d1a(%rip), %rax      # 0x33930
movsbq (%r15,%rax), %rax
movzwl 0x34(%rbx,%r14,2), %ecx
imulq %rax, %rcx
addq 0x668(%rbx,%r14,8), %rcx
leaq 0x3cec(%rip), %rax      # 0x33920
movsbq (%r15,%rax), %r12
addq %rcx, %r12
movq 0x680(%rbx), %rax
addq %rbp, %rax
movswq 0xb40(%rbx,%r15,2), %rcx
movsbl 0x40(%rcx,%rax), %ecx
movslq 0xb80(%rbx,%r15,4), %rdx
movsbl 0x40(%rdx,%rax), %eax
movswl 0x1a10(%rbx), %edx
addl %ecx, %edx
movsbl (%r13,%r15), %ecx
leal (%rdx,%rax,2), %esi
addl %ecx, %esi
movq %rbx, %rdi
callq 0x306b3
testl %eax, %eax
je 0x2fcb8
movq 0x680(%rbx), %rax
addq 0x8(%rsp), %rax
movb $0x1, 0x40(%r15,%rax)
movq %rbx, %rdi
movl $0x1, %esi
movl $0xf, %edx
callq 0x315c4
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0x2c64d
jmp 0x2fcc9
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0x2df44
incq %r15
cmpq $0x10, %r15
jne 0x2fc0f
movq (%rsp), %rax
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %ymm0, 0x20(%rax)
vmovdqa %ymm0, (%rax)
cmpb $0x2, 0x2a(%rbx)
jle 0x2fdd7
incq %r14
addq $0x10, 0x8(%rsp)
addq $0x10, %r13
cmpq $0x3, %r14
jne 0x2fb73
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movq 0x680(%rbx), %rax
movb $0x1, 0x22(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2fd7a
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
cmpl $0x20, %ebp
leaq 0xab1d(%rip), %rax      # 0x3a870
leaq 0xa96e(%rip), %rcx      # 0x3a6c8
cmoveq %rax, %rcx
cmpl $0x11, %ebp
leaq 0xaaf8(%rip), %rdx      # 0x3a860
cmovneq %rcx, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
cmpb $0x0, 0x22a(%rbx)
je 0x2fdf0
movsbl 0x6c4(%rbx), %esi
addl $0x18f, %esi            # imm = 0x18F
movq %rbx, %rdi
callq 0x306b3
movl %eax, %ebp
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2fdf2
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa850(%rip), %rdx      # 0x3a615
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
jmp 0x2fdf2
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
jmp 0x31bf3
xorl %ebp, %ebp
movq 0x680(%rbx), %rax
vpbroadcastb 0x79a8(%rip), %xmm0 # 0x377aa
vmovdqa %xmm0, 0x30(%rax)
testl %ebp, %ebp
je 0x2ffc7
movq 0x680(%rbx), %rax
movb $0x1, 0x24(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2fe53
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa893(%rip), %rdx      # 0x3a6d8
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r15
movq $-0x4, %r12
leaq 0xa97b(%rip), %rbp      # 0x3a7e3
movq 0x680(%rbx), %rax
movswq 0xb48(%rbx,%r12,2), %rcx
movzbl 0x30(%rax,%rcx), %ecx
movslq 0xb90(%rbx,%r12,4), %rdx
movzbl 0x30(%rax,%rdx), %r14d
cmpb %r14b, %cl
cmovll %ecx, %r14d
movl %r14d, %eax
sarb $0x7, %al
xorb %al, %r14b
subb %al, %r14b
movq %rbx, %rdi
movl $0x44, %esi
callq 0x306b3
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x2fef7
movzbl %r14b, %r13d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
movl %eax, %r14d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
leal (%r14,%rax,2), %r14d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
leal (%r14,%rax,4), %ecx
xorl %r14d, %r14d
cmpl %r13d, %ecx
setae %r14b
addl %ecx, %r14d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2ff36
movq %rax, %rdi
addq %r15, %rdi
movl $0x1000, %edx           # imm = 0x1000
subl %eax, %edx
movzwl %dx, %esi
cmpq $-0x4, %r12
movq %rbp, %rdx
leaq 0x99bf(%rip), %rax      # 0x398e3
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
movb %r14b, 0x37(%rax,%r12)
movq 0x680(%rbx), %rax
movb %r14b, 0x36(%rax,%r12)
movq 0x680(%rbx), %rax
movb %r14b, 0x35(%rax,%r12)
addq $0x4, %r12
cmpq $0xc, %r12
jb 0x2fe68
movzwl 0x1cd0(%rbx), %eax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x301cc
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movq 0x680(%rbx), %rax
movsbl 0x30(%rax), %ecx
movsbl 0x34(%rax), %r8d
movsbl 0x38(%rax), %r9d
movsbl 0x3c(%rax), %r10d
subq $0x8, %rsp
leaq 0xa742(%rip), %rdx      # 0x3a6f7
xorl %eax, %eax
pushq %r10
callq 0x1070
addq $0x10, %rsp
jmp 0x301c5
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30000
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa72d(%rip), %rdx      # 0x3a71f
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r15
leaq 0xa7d5(%rip), %r13      # 0x3a7e3
xorl %ebp, %ebp
movq 0x680(%rbx), %rax
movswq 0xb40(%rbx,%rbp,2), %rcx
movzbl 0x30(%rax,%rcx), %ecx
movslq 0xb80(%rbx,%rbp,4), %rdx
movzbl 0x30(%rax,%rdx), %r14d
cmpb %r14b, %cl
cmovll %ecx, %r14d
movl %r14d, %eax
sarb $0x7, %al
xorb %al, %r14b
subb %al, %r14b
movq %rbx, %rdi
movl $0x44, %esi
callq 0x306b3
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3009f
movzbl %r14b, %r12d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
movl %eax, %r14d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
leal (%r14,%rax,2), %r14d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x306b3
leal (%r14,%rax,4), %ecx
xorl %r14d, %r14d
cmpl %r12d, %ecx
setae %r14b
addl %ecx, %r14d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x300dd
movq %rax, %rdi
addq %r15, %rdi
movl $0x1000, %edx           # imm = 0x1000
subl %eax, %edx
movzwl %dx, %esi
testq %rbp, %rbp
movq %r13, %rdx
leaq 0x9818(%rip), %rax      # 0x398e3
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
movb %r14b, 0x30(%rax,%rbp)
incq %rbp
cmpq $0x10, %rbp
jne 0x30010
movzwl 0x1cd0(%rbx), %eax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x301cc
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movq 0x680(%rbx), %rax
movsbl 0x30(%rax), %ecx
movsbl 0x31(%rax), %r8d
movsbl 0x32(%rax), %r9d
movsbl 0x33(%rax), %edx
movq %rdx, 0x8(%rsp)
movsbl 0x34(%rax), %edx
movq %rdx, (%rsp)
movsbl 0x35(%rax), %edx
movq %rdx, 0x20(%rsp)
movsbl 0x36(%rax), %edx
movq %rdx, 0x18(%rsp)
movsbl 0x37(%rax), %edx
movq %rdx, 0x10(%rsp)
movsbl 0x38(%rax), %edx
movq %rdx, 0x38(%rsp)
movsbl 0x39(%rax), %ebp
movsbl 0x3a(%rax), %r13d
movsbl 0x3b(%rax), %r12d
movsbl 0x3c(%rax), %r15d
movsbl 0x3d(%rax), %r14d
movsbl 0x3e(%rax), %r11d
movsbl 0x3f(%rax), %r10d
subq $0x8, %rsp
leaq 0xa5a9(%rip), %rdx      # 0x3a73e
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r14
pushq %r15
pushq %r12
pushq %r13
pushq %rbp
pushq 0x78(%rsp)
pushq 0x58(%rsp)
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x60(%rsp)
pushq 0x70(%rsp)
callq 0x1070
addq $0x70, %rsp
addw %ax, 0x1cd0(%rbx)
movq %rbx, %rdi
callq 0x31df0
movq %rbx, %rdi
callq 0x30f8b
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x310f2
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30247
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
cmpl $0x20, %ebp
leaq 0xa672(%rip), %rax      # 0x3a892
leaq 0xa67c(%rip), %rcx      # 0x3a8a3
cmoveq %rax, %rcx
cmpl $0x11, %ebp
leaq 0xa64c(%rip), %rdx      # 0x3a881
cmovneq %rcx, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movb $0x0, 0x651(%rbx)
movq 0x680(%rbx), %rax
vmovdqa 0x20(%rax), %xmm0
vpor 0x2f7e(%rip), %xmm0, %xmm0 # 0x331e0
vmovdqa %xmm0, 0x20(%rax)
vpxor %xmm0, %xmm0, %xmm0
vpinsrb $0x1, 0x1ae0(%rbx), %xmm0, %xmm0
vpinsrb $0x2, 0x1b20(%rbx), %xmm0, %xmm0
movq 0x680(%rbx), %rax
vmovd %xmm0, 0x4(%rax)
movq 0x680(%rbx), %rax
movabsq $0xacacac000000ac, %rcx # imm = 0xACACAC000000AC
movq %rcx, 0x8(%rax)
movq 0x680(%rbx), %rax
vpbroadcastb 0x74f8(%rip), %xmm0 # 0x377a8
vmovdqa %xmm0, 0x60(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0x50(%rax)
movq 0x680(%rbx), %rax
vmovdqa %xmm0, 0x40(%rax)
movq 0x680(%rbx), %rax
vpbroadcastb 0x74cc(%rip), %xmm0 # 0x377a9
vmovdqa %xmm0, 0x30(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30339
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movzwl 0x170(%rbx), %eax
incq %rax
tzcntq %rax, %rcx
movzwl 0x180(%rbx), %eax
incq %rax
tzcntq %rax, %r8
leaq 0xa45f(%rip), %rdx      # 0x3a78a
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r14
leaq 0x170(%rbx), %rax
movq %rax, 0x38(%rsp)
movl $0x10, %r13d
movq $0x0, (%rsp)
movl $0x10, 0x20(%rsp)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x303a8
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movq (%rsp), %rax
leaq (%rax,%rax,2), %rcx
leaq 0x8c90(%rip), %rax      # 0x39020
addq %rax, %rcx
leaq 0xa424(%rip), %rdx      # 0x3a7be
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
testl %r13d, %r13d
jle 0x305c6
movq (%rsp), %rdx
movq %rdx, %rax
shlq $0x4, %rax
movq 0x38(%rsp), %rcx
movzwl (%rcx,%rax), %eax
incq %rax
tzcntq %rax, %rbp
movq 0x668(%rbx,%rdx,8), %r12
movl 0x20(%rsp), %r15d
movq %r13, 0x8(%rsp)
cmpl $0x8, %ebp
jne 0x3054f
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movbel %eax, (%r12)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movbel %eax, 0x4(%r12)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30492
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movzbl (%r12), %ecx
movzbl 0x1(%r12), %r8d
movzbl 0x2(%r12), %r9d
movzbl 0x3(%r12), %eax
movq %rax, 0x18(%rsp)
movzbl 0x4(%r12), %eax
movq %rax, 0x10(%rsp)
movzbl 0x5(%r12), %r13d
movzbl 0x6(%r12), %r10d
movzbl 0x7(%r12), %r11d
subq $0x8, %rsp
leaq 0xa358(%rip), %rdx      # 0x3a7ca
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r13
pushq 0x30(%rsp)
pushq 0x40(%rsp)
callq 0x1070
addq $0x30, %rsp
addw %ax, 0x1cd0(%rbx)
cmpl $0x10, 0x20(%rsp)
jne 0x305a6
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movbel %eax, 0x8(%r12)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movbel %eax, 0xc(%r12)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x305a6
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
movzbl 0x8(%r12), %ecx
movzbl 0x9(%r12), %r8d
movzbl 0xa(%r12), %r9d
movzbl 0xb(%r12), %eax
movq %rax, 0x18(%rsp)
movzbl 0xc(%r12), %eax
movq %rax, 0x10(%rsp)
movzbl 0xd(%r12), %r13d
movzbl 0xe(%r12), %r10d
movzbl 0xf(%r12), %r11d
subq $0x8, %rsp
leaq 0xa29d(%rip), %rdx      # 0x3a7ca
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r13
pushq 0x30(%rsp)
pushq 0x40(%rsp)
callq 0x1070
addq $0x30, %rsp
addw %ax, 0x1cd0(%rbx)
jmp 0x305a6
xorl %r13d, %r13d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1875d
movw %ax, (%r12,%r13,2)
movzwl 0x1cd0(%rbx), %ecx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0x3059e
movq %rcx, %rdi
addq %r14, %rdi
movl $0x1000, %esi           # imm = 0x1000
subl %ecx, %esi
movl $0xffff, %ecx           # imm = 0xFFFF
andl %ecx, %esi
andl %ecx, %eax
leaq 0xa251(%rip), %rdx      # 0x3a7df
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
incq %r13
cmpq %r13, %r15
jne 0x30552
movq 0x8(%rsp), %rdx
leal -0x1(%rdx), %eax
movq (%rsp), %rcx
movzwl 0x34(%rbx,%rcx,2), %ecx
addq %rcx, %r12
cmpl $0x1, %edx
movl %eax, %r13d
jg 0x303da
movzwl 0x1cd0(%rbx), %eax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x305fa
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa264(%rip), %rdx      # 0x3a850
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movsbq 0x2a(%rbx), %rax
xorl %ecx, %ecx
cmpq $0x3, %rax
setge %cl
leal 0x8(,%rcx,8), %ecx
movl %ecx, 0x20(%rsp)
movl $0x10100800, 0x44(%rsp) # imm = 0x10100800
movsbl 0x44(%rsp,%rax), %r13d
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq $0x3, %rcx
jne 0x30362
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f5dd