// File: /workspace/github_c_makefile_star2_O3/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)
movb 0x6d0(%rdi), %al
testb $0x1, %al
je 0x301aa
movq 0x680(%rbx), %rax
orl $0x111111, 0xc(%rax)    # imm = 0x111111
vmovdqa 0x700(%rbx), %xmm0
vpaddb 0x3836(%rip), %xmm0, %xmm0 # 0x339b0
vmovdqa %xmm0, 0x700(%rbx)
vmovdqa 0x710(%rbx), %xmm0
vpaddb 0x382e(%rip), %xmm0, %xmm0 # 0x339c0
vmovdqa %xmm0, 0x710(%rbx)
orl $0x10101, 0x6c8(%rbx)   # imm = 0x10101
movb 0x6d0(%rbx), %al
testb $0x2, %al
je 0x301ee
movq 0x680(%rbx), %rax
orl $0x424242, 0xc(%rax)    # imm = 0x424242
vmovq 0x380c(%rip), %xmm0     # 0x339d0
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 0x3102b
testl %eax, %eax
je 0x30659
movq %rbx, %rdi
callq 0x30fc4
testl %eax, %eax
jne 0x30b42
cmpl $0x6, %ebp
movl $0x5, %r14d
cmovgel %ebp, %r14d
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x3102b
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 0x3102b
cmpl $0x7, %ebp
movl $0x6, %r14d
cmovgel %ebp, %r14d
testl %eax, %eax
je 0x3032c
movq 0x680(%rbx), %rax
movb $0x1, 0x26(%rax)
leal 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x3102b
movq 0x680(%rbx), %rcx
movb %al, 0x27(%rcx)
addl $0x3, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3102b
movl %eax, %r15d
cmpl $0xb, %r14d
movl $0xa, %esi
cmovael %r14d, %esi
movq %rbx, %rdi
callq 0x3102b
leal (%rax,%r15,2), %r14d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x303cd
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 0xa36f(%rip), %rdx      # 0x3a72e
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
vpbroadcastb 0x753c(%rip), %xmm0 # 0x37919
vmovdqa %xmm0, 0x30(%rax)
movl %r14d, %eax
movzbl 0x6d0(%rbx), %ecx
andl $0x3, %ecx
leaq 0x36ca(%rip), %rdx      # 0x33ac0
leaq (%rdx,%rax,4), %rax
movsbl (%rcx,%rax), %edi
movq 0x668(%rbx), %rsi
movzwl 0x34(%rbx), %edx
callq 0x2f3bc
movq %rbx, %rdi
callq 0x3271f
movq %rbx, %rdi
callq 0x31e18
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30457
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa38a(%rip), %rdx      # 0x3a7d3
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x700(%rbx), %r13
vmovaps 0x31da(%rip), %xmm0     # 0x33640
vmovaps %xmm0, 0x1aa0(%rbx)
vmovaps 0x356a(%rip), %xmm0     # 0x339e0
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 0x9200(%rip), %rax      # 0x396c0
movq (%rbp,%rax), %rax
movq %rax, 0x1a10(%rbx)
cwtl
movsbl 0x6c8(%rbx,%r14), %esi
addl %eax, %esi
movq %rbx, %rdi
vzeroupper
callq 0x3102b
testl %eax, %eax
je 0x3051f
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 0x31f10
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2fd26
movq 0x680(%rbx), %rax
testb $0x20, 0x8(%rax)
je 0x30615
leaq 0x91b9(%rip), %rax      # 0x396f0
vmovq (%rbp,%rax), %xmm0
vpunpcklqdq 0x20(%rsp), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0]
vmovdqa %xmm0, 0x1a10(%rbx)
xorl %r15d, %r15d
leaq 0x350b(%rip), %rax      # 0x33a60
movsbq (%r15,%rax), %rax
movzwl 0x34(%rbx,%r14,2), %ecx
imulq %rax, %rcx
addq 0x668(%rbx,%r14,8), %rcx
leaq 0x34dd(%rip), %rax      # 0x33a50
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 0x3102b
testl %eax, %eax
je 0x305f7
movq 0x680(%rbx), %rax
addq 0x8(%rsp), %rax
movb $0x1, 0x40(%r15,%rax)
movq %rbx, %rdi
movl $0x1, %esi
movl $0xf, %edx
callq 0x31f10
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0x2cf66
jmp 0x30608
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0x2e856
incq %r15
cmpq $0x10, %r15
jne 0x3054e
movq (%rsp), %rax
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %ymm0, 0x20(%rax)
vmovdqa %ymm0, (%rax)
cmpb $0x2, 0x2a(%rbx)
jle 0x308e8
incq %r14
addq $0x10, 0x8(%rsp)
addq $0x10, %r13
cmpq $0x3, %r14
jne 0x304b2
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 0x306b9
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
cmpl $0x20, %ebp
leaq 0xa35e(%rip), %rax      # 0x3a9f0
leaq 0xa1af(%rip), %rcx      # 0x3a848
cmoveq %rax, %rcx
cmpl $0x11, %ebp
leaq 0xa339(%rip), %rdx      # 0x3a9e0
cmovneq %rcx, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
cmpb $0x0, 0x22a(%rbx)
je 0x30901
movsbl 0x6c4(%rbx), %esi
addl $0x18f, %esi            # imm = 0x18F
movq %rbx, %rdi
callq 0x3102b
movl %eax, %ebp
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30718
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa08d(%rip), %rdx      # 0x3a795
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
vpbroadcastb 0x71f2(%rip), %xmm0 # 0x3791a
vmovdqa %xmm0, 0x30(%rax)
testl %ebp, %ebp
je 0x30916
movq 0x680(%rbx), %rax
movb $0x1, 0x24(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30779
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0xa0ed(%rip), %rdx      # 0x3a858
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r14
movq $-0x4, %r12
leaq 0xa1d5(%rip), %rbp      # 0x3a963
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), %r15d
cmpb %r15b, %cl
cmovll %ecx, %r15d
movl %r15d, %eax
sarb $0x7, %al
xorb %al, %r15b
subb %al, %r15b
movq %rbx, %rdi
movl $0x44, %esi
callq 0x3102b
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3081d
movzbl %r15b, %r13d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
movl %eax, %r15d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
leal (%r15,%rax,2), %r15d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
leal (%r15,%rax,4), %ecx
xorl %r15d, %r15d
cmpl %r13d, %ecx
setae %r15b
addl %ecx, %r15d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x3085c
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %edx           # imm = 0x1000
subl %eax, %edx
movzwl %dx, %esi
cmpq $-0x4, %r12
movq %rbp, %rdx
leaq 0x9219(%rip), %rax      # 0x39a63
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
movb %r15b, 0x37(%rax,%r12)
movq 0x680(%rbx), %rax
movb %r15b, 0x36(%rax,%r12)
movq 0x680(%rbx), %rax
movb %r15b, 0x35(%rax,%r12)
addq $0x4, %r12
cmpq $0xc, %r12
jb 0x3078e
movzwl 0x1cd0(%rbx), %eax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x30b1c
addq %rax, %r14
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 0x9fa4(%rip), %rdx      # 0x3a877
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
callq 0x1070
addq $0x10, %rsp
jmp 0x30b15
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
jmp 0x32528
movq 0x680(%rbx), %rax
vpbroadcastb 0x7009(%rip), %xmm0 # 0x3791a
vmovdqa %xmm0, 0x30(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x3094f
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
leaq 0x9f5e(%rip), %rdx      # 0x3a89f
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r14
leaq 0xa006(%rip), %r13      # 0x3a963
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), %r15d
cmpb %r15b, %cl
cmovll %ecx, %r15d
movl %r15d, %eax
sarb $0x7, %al
xorb %al, %r15b
subb %al, %r15b
movq %rbx, %rdi
movl $0x44, %esi
callq 0x3102b
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x309ee
movzbl %r15b, %r12d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
movl %eax, %r15d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
leal (%r15,%rax,2), %r15d
movq %rbx, %rdi
movl $0x45, %esi
callq 0x3102b
leal (%r15,%rax,4), %ecx
xorl %r15d, %r15d
cmpl %r12d, %ecx
setae %r15b
addl %ecx, %r15d
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30a2c
movq %rax, %rdi
addq %r14, %rdi
movl $0x1000, %edx           # imm = 0x1000
subl %eax, %edx
movzwl %dx, %esi
testq %rbp, %rbp
movq %r13, %rdx
leaq 0x9049(%rip), %rax      # 0x39a63
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x1cd0(%rbx)
movq 0x680(%rbx), %rax
movb %r15b, 0x30(%rax,%rbp)
incq %rbp
cmpq $0x10, %rbp
jne 0x3095f
movzwl 0x1cd0(%rbx), %eax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x30b1c
addq %rax, %r14
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, 0x30(%rsp)
movsbl 0x39(%rax), %edx
movq %rdx, 0x40(%rsp)
movsbl 0x3a(%rax), %r11d
movsbl 0x3b(%rax), %r15d
movsbl 0x3c(%rax), %r12d
movsbl 0x3d(%rax), %r13d
movsbl 0x3e(%rax), %ebp
movsbl 0x3f(%rax), %r10d
subq $0x8, %rsp
leaq 0x9dde(%rip), %rdx      # 0x3a8be
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
pushq %rbp
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq 0x78(%rsp)
pushq 0x70(%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 0x3271f
movq %rbx, %rdi
callq 0x318b7
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31a1e
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30b97
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
movzwl %cx, %esi
cmpl $0x20, %ebp
leaq 0x9ea2(%rip), %rax      # 0x3aa12
leaq 0x9eac(%rip), %rcx      # 0x3aa23
cmoveq %rax, %rcx
cmpl $0x11, %ebp
leaq 0x9e7c(%rip), %rdx      # 0x3aa01
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 0x272e(%rip), %xmm0, %xmm0 # 0x332e0
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 0x6d18(%rip), %xmm0 # 0x37918
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 0x6cec(%rip), %xmm0 # 0x37919
vmovdqa %xmm0, 0x30(%rax)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30c8e
leaq (%rbx,%rax), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movzwl 0x170(%rbx), %eax
incq %rax
tzcntq %rax, %rcx
movzwl 0x180(%rbx), %eax
incq %rax
tzcntq %rax, %r8
leaq 0x9c91(%rip), %rdx      # 0x3a90a
xorl %eax, %eax
callq 0x1070
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
leaq 0x1cd2(%rbx), %r14
leaq 0x170(%rbx), %rcx
movq %rcx, 0x30(%rsp)
movl $0x10, %r13d
movq $0x0, (%rsp)
movl $0x10, 0x20(%rsp)
movzwl %ax, %ecx
cmpl $0xfff, %ecx            # imm = 0xFFF
ja 0x30d00
movq %rcx, %rdi
addq %r14, %rdi
movl $0x1000, %eax           # imm = 0x1000
subl %ecx, %eax
movzwl %ax, %esi
movq (%rsp), %rax
leaq (%rax,%rax,2), %rcx
leaq 0x84af(%rip), %rax      # 0x39190
addq %rax, %rcx
leaq 0x9c53(%rip), %rdx      # 0x3a93e
xorl %eax, %eax
callq 0x1070
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
testl %r13d, %r13d
jle 0x30f3b
movq (%rsp), %rdx
movq %rdx, %rax
shlq $0x4, %rax
movq 0x30(%rsp), %rcx
movzwl (%rcx,%rax), %eax
incq %rax
tzcntq %rax, %rbp
movq 0x668(%rbx,%rdx,8), %r15
movl 0x20(%rsp), %r12d
movq %r13, 0x8(%rsp)
cmpl $0x8, %ebp
jne 0x30ec5
movq %rbx, %rdi
movl $0x20, %esi
callq 0x18ad7
movbel %eax, (%r15)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x18ad7
movl %eax, %r10d
movbel %eax, 0x4(%r15)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30dfb
bswapl %r10d
movl %r10d, %ecx
shrl $0x18, %ecx
movq %rcx, 0x10(%rsp)
movl %r10d, %r13d
shrl $0x10, %r13d
movl %r10d, %r11d
shrl $0x8, %r11d
leaq (%r14,%rax), %rdi
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movzbl (%r15), %ecx
movzbl 0x1(%r15), %r8d
movzbl 0x2(%r15), %r9d
movzbl 0x3(%r15), %eax
movq %rax, 0x18(%rsp)
movl $0xff, %eax
andl %eax, %r10d
andl %eax, %r11d
andl %eax, %r13d
subq $0x8, %rsp
leaq 0x9b76(%rip), %rdx      # 0x3a94a
xorl %eax, %eax
pushq 0x18(%rsp)
pushq %r13
pushq %r11
pushq %r10
pushq 0x40(%rsp)
callq 0x1070
addq $0x30, %rsp
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
cmpl $0x10, 0x20(%rsp)
jne 0x30f1b
movq %rbx, %rdi
movl $0x20, %esi
callq 0x18ad7
movbel %eax, 0x8(%r15)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x18ad7
movl %eax, %r10d
movbel %eax, 0xc(%r15)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30f1b
bswapl %r10d
movl %r10d, %ecx
shrl $0x18, %ecx
movq %rcx, 0x10(%rsp)
movl %r10d, %r13d
shrl $0x10, %r13d
movl %r10d, %r11d
shrl $0x8, %r11d
leaq (%r14,%rax), %rdi
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movzbl 0x8(%r15), %ecx
movzbl 0x9(%r15), %r8d
movzbl 0xa(%r15), %r9d
movzbl 0xb(%r15), %eax
movq %rax, 0x18(%rsp)
movl $0xff, %eax
andl %eax, %r10d
andl %eax, %r11d
andl %eax, %r13d
subq $0x8, %rsp
leaq 0x9aae(%rip), %rdx      # 0x3a94a
xorl %eax, %eax
pushq 0x18(%rsp)
pushq %r13
pushq %r11
pushq %r10
pushq 0x40(%rsp)
callq 0x1070
addq $0x30, %rsp
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
jmp 0x30f1b
xorl %r13d, %r13d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18ad7
movl %eax, %ecx
movw %cx, (%r15,%r13,2)
movzwl 0x1cd0(%rbx), %eax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x30f13
leaq (%r14,%rax), %rdi
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movzwl %cx, %ecx
leaq 0x9a61(%rip), %rdx      # 0x3a95f
xorl %eax, %eax
callq 0x1070
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
incq %r13
cmpq %r13, %r12
jne 0x30ec8
movq 0x8(%rsp), %rsi
leal -0x1(%rsi), %ecx
movq (%rsp), %rdx
movzwl 0x34(%rbx,%rdx,2), %edx
addq %rdx, %r15
cmpl $0x1, %esi
movl %ecx, %r13d
jg 0x30d32
movzwl %ax, %ecx
cmpl $0x1000, %ecx           # imm = 0x1000
jae 0x30f72
movq %rcx, %rdi
addq %r14, %rdi
movl $0x1000, %eax           # imm = 0x1000
subl %ecx, %eax
movzwl %ax, %esi
leaq 0x9a73(%rip), %rdx      # 0x3a9d0
xorl %eax, %eax
callq 0x1070
addw 0x1cd0(%rbx), %ax
movw %ax, 0x1cd0(%rbx)
movsbq 0x2a(%rbx), %rcx
xorl %edx, %edx
cmpq $0x3, %rcx
setge %dl
leal 0x8(,%rdx,8), %edx
movl %edx, 0x20(%rsp)
movl $0x10100800, 0x3c(%rsp) # imm = 0x10100800
movsbl 0x3c(%rsp,%rcx), %r13d
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
cmpq $0x3, %rdx
jne 0x30cb7
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fa12