// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/./edge264_slice.c
// Function: parse_P_sub_mb_cavlc
static void CAFUNC(parse_P_sub_mb, unsigned ref_idx_flags)
{
	// initializations for sub_mb_type
	log_mb(ctx, "    sub_mb_types: [");
	mb->mvs_v[0] = mb->mvs_v[1] = mb->mvs_v[2] = (i16x8){}; // values pointed to when A/B/C/D are unavailable
	mb->f.inter_eqs_s = 0;
	unsigned mvd_flags = 0;
	for (int i8x8 = 0; i8x8 < 4; i8x8++) {
		int i4x4 = i8x8 * 4;
		int flags = 1;
		int eqs = 0x1b;
		#if !CABAC
			int sub_mb_type = get_ue16(&ctx->t._gb, 3);
		#endif
		if (CACOND(sub_mb_type == 0, get_ae(ctx, 21)) || // 8x8
			(ctx->transform_8x8_mode_flag = 0, flags = 5, eqs = 0x11, CACOND(sub_mb_type == 1, !get_ae(ctx, 22)))) { // 8x4
			ctx->unavail4x4[i4x4] = (ctx->unavail4x4[i4x4] & 11) | (ctx->unavail4x4[i4x4 + 1] & 4);
			ctx->unavail4x4[i4x4 + 2] |= 4;
			ctx->refIdx4x4_C[i4x4] = 0x0d63 >> i4x4 & 15;
			ctx->mvs_C[i4x4] = ctx->mvs_C[i4x4 + 1];
		} else { // 4xN
			ctx->refIdx4x4_C[i4x4] = 0xdc32 >> i4x4 & 15;
			ctx->mvs_C[i4x4] = ctx->mvs_B[i4x4 + 1];
			if (CACOND(sub_mb_type == 2, get_ae(ctx, 23)))
				flags = 3, eqs = 0x0a;
			else
				flags = 15, eqs = 0;
		}
		mvd_flags |= flags << i4x4;
		mb->f.inter_eqs[i8x8] = eqs;
		log_mb(ctx, (i8x8 < 3) ? "%u," : "%u]\n", 0xc0000480 >> flags * 2 & 3);
	}
	CACALL(parse_ref_idx, ref_idx_flags);
	
	// load neighbouring refIdx values and shuffle them into A/B/C/D
	i8x16 BC = (i64x2){(int64_t)mbB->refIdx_l, (int64_t)mbC->refIdx_l};
	i8x16 Ar = (i64x2){(int64_t)mbA->refIdx_l, (int64_t)mb->refIdx_l};
	i8x16 BCAr0 = unziplo32(BC, Ar);
	i8x16 r0 = shuffle(BCAr0, ((i8x16){12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15}));
	i8x16 A0 = shuffle(BCAr0, ((i8x16){9, 12, 9, 12, 12, 13, 12, 13, 11, 14, 11, 14, 14, 15, 14, 15}));
	i8x16 B0 = shuffle(BCAr0, ((i8x16){2, 2, 12, 12, 3, 3, 13, 13, 12, 12, 14, 14, 13, 13, 15, 15}));
	i8x16 C0 = shuffle(BCAr0, ctx->refIdx4x4_C_v);
	i8x16 D0 = shuffle(BCAr0, ((i8x16){-1, 2, 9, 12, 2, 3, 12, 13, 9, 12, 11, 14, 12, 13, 14, 15}));
	D0[0] = mbD->refIdx[3];
	
	// combine them into a vector of 4-bit equality masks
	union { int8_t q[16]; i8x16 v; } refIdx4x4_eq;
	i8x16 u = ctx->unavail4x4_v[0];
	i8x16 uC = u & 4;
	refIdx4x4_eq.v = (uC - ifelse_mask(uC==4, r0==D0, r0==C0) * 2 - (r0==B0)) * 2 - (r0==A0 | u==14);
	
	// loop on mvs
	log_mb(ctx, "    mvds: [");
	do {
		int i = __builtin_ctz(mvd_flags);
		i16x8 mvd = CACALL(parse_mvd_pair, mb->absMvd, i);
		
		// branch on equality mask
		i16x8 mvp;
		int eq = refIdx4x4_eq.q[i];
		int mvs_DC = eq & 8 ? ctx->mvs_D[i] : ctx->mvs_C[i];
		if (__builtin_expect(0xe9e9 >> eq & 1, 1)) {
			i16x8 mvA = (i32x4){mb->mvs_s[ctx->mvs_A[i]]};
			i16x8 mvB = (i32x4){mb->mvs_s[ctx->mvs_B[i]]};
			i16x8 mvDC = (i32x4){mb->mvs_s[mvs_DC]};
			mvp = median16(mvA, mvB, mvDC);
		} else {
			int mvs_AB = eq & 1 ? ctx->mvs_A[i] : ctx->mvs_B[i];
			mvp = (i32x4){mb->mvs_s[(eq & 4 ? mvs_DC : mvs_AB)]};
		}
		
		// broadcast absMvd and mvs to memory then call decoding
		static const int8_t masks[16] = {0, 15, 10, 5, 12, 3, 0, 0, 8, 0, 0, 0, 4, 0, 2, 1};
		static const int8_t widths[16] = {0, 8, 4, 4, 8, 8, 0, 0, 4, 0, 0, 0, 4, 0, 4, 4};
		static const int8_t heights[16] = {0, 8, 8, 8, 4, 4, 0, 0, 4, 0, 0, 0, 4, 0, 4, 4};
		int type = mvd_flags >> (i & -4) & 15;
		int m = masks[type];
		int i8x8 = i >> 2;
		i16x8 bits = {1, 2, 4, 8};
		i16x8 absMvd_mask = ((i16x8){m, m, m, m, m, m, m, m} & bits) == bits;
		i16x8 absMvd_old = (i64x2){mb->absMvd_l[i8x8]};
		i16x8 mvs_mask = ziplo16(absMvd_mask, absMvd_mask);
		i32x4 mv = mvp + mvd;
		i16x8 mvs = broadcast32(mv, 0);
		mb->absMvd_l[i8x8] = ((i64x2)ifelse_mask(absMvd_mask, pack_absMvd(mvd), absMvd_old))[0];
		mb->mvs_v[i8x8] = ifelse_mask(mvs_mask, mvs, mb->mvs_v[i8x8]);
		decode_inter(ctx, i, widths[type], heights[type]);
	} while (mvd_flags &= mvd_flags - 1);
	log_mb(ctx, "]\n");
	CAJUMP(parse_inter_residual);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, -0x2f8(%rbp)
movl %esi, -0x2fc(%rbp)
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x7ffce
movq -0x2f8(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
leaq 0x5099a(%rip), %rdx     # 0xd0948
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0x310(%rbp)
vmovdqa -0x310(%rbp), %xmm0
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xd0(%rax)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xc0(%rax)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xb0(%rax)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
movl $0x0, 0x2c(%rax)
movl $0x0, -0x314(%rbp)
movl $0x0, -0x318(%rbp)
cmpl $0x4, -0x318(%rbp)
jge 0x8031a
movl -0x318(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x31c(%rbp)
movl $0x1, -0x320(%rbp)
movl $0x1b, -0x324(%rbp)
movq -0x2f8(%rbp), %rdi
movl $0x3, %esi
callq 0x76d10
movl %eax, -0x328(%rbp)
cmpl $0x0, -0x328(%rbp)
je 0x800cc
movq -0x2f8(%rbp), %rax
movb $0x0, 0xdc0(%rax)
movl $0x5, -0x320(%rbp)
movl $0x11, -0x324(%rbp)
cmpl $0x1, -0x328(%rbp)
jne 0x8019c
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movsbl 0x6d0(%rax,%rcx), %eax
andl $0xb, %eax
movq -0x2f8(%rbp), %rcx
movl -0x31c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsbl 0x6d0(%rcx,%rdx), %ecx
andl $0x4, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movb %dl, 0x6d0(%rax,%rcx)
movq -0x2f8(%rbp), %rax
movl -0x31c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl 0x6d0(%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, 0x6d0(%rax,%rcx)
movl -0x31c(%rbp), %ecx
movl $0xd63, %eax            # imm = 0xD63
sarl %cl, %eax
andl $0xf, %eax
movb %al, %dl
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movb %dl, 0xc20(%rax,%rcx)
movq -0x2f8(%rbp), %rax
movl -0x31c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0xd40(%rax,%rcx,4), %edx
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movl %edx, 0xd40(%rax,%rcx,4)
jmp 0x80227
movl -0x31c(%rbp), %ecx
movl $0xdc32, %eax           # imm = 0xDC32
sarl %cl, %eax
andl $0xf, %eax
movb %al, %dl
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movb %dl, 0xc20(%rax,%rcx)
movq -0x2f8(%rbp), %rax
movl -0x31c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl 0xd00(%rax,%rcx,4), %edx
movq -0x2f8(%rbp), %rax
movslq -0x31c(%rbp), %rcx
movl %edx, 0xd40(%rax,%rcx,4)
cmpl $0x2, -0x328(%rbp)
jne 0x80211
movl $0x3, -0x320(%rbp)
movl $0xa, -0x324(%rbp)
jmp 0x80225
movl $0xf, -0x320(%rbp)
movl $0x0, -0x324(%rbp)
jmp 0x80227
movl -0x320(%rbp), %eax
movl -0x31c(%rbp), %ecx
shll %cl, %eax
orl -0x314(%rbp), %eax
movl %eax, -0x314(%rbp)
movl -0x324(%rbp), %eax
movb %al, %dl
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
movslq -0x318(%rbp), %rcx
movb %dl, 0x2c(%rax,%rcx)
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x80304
movq -0x2f8(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
movl -0x318(%rbp), %ecx
leaq 0x5082b(%rip), %rdx     # 0xd0aed
leaq 0x5087e(%rip), %rax     # 0xd0b47
cmpl $0x3, %ecx
cmovlq %rax, %rdx
movl -0x320(%rbp), %ecx
shll %ecx
movl $0xc0000480, %eax       # imm = 0xC0000480
shrl %cl, %eax
movl %eax, %ecx
andl $0x3, %ecx
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
jmp 0x80306
movl -0x318(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x318(%rbp)
jmp 0x8004d
movq -0x2f8(%rbp), %rdi
movl -0x2fc(%rbp), %esi
callq 0x80da0
movq -0x2f8(%rbp), %rcx
movq 0x690(%rcx), %rax
movq 0x698(%rcx), %rcx
vmovq 0x10(%rcx), %xmm1
vmovq 0x10(%rax), %xmm0
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovdqa %xmm0, -0x350(%rbp)
vmovdqa -0x350(%rbp), %xmm0
vmovdqa %xmm0, -0x340(%rbp)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rcx
movq 0x688(%rax), %rax
vmovq 0x10(%rcx), %xmm1
vmovq 0x10(%rax), %xmm0
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovdqa %xmm0, -0x370(%rbp)
vmovdqa -0x370(%rbp), %xmm0
vmovdqa %xmm0, -0x360(%rbp)
vmovaps -0x340(%rbp), %xmm0
vmovaps -0x360(%rbp), %xmm1
vshufps $0x88, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,2],xmm1[0,2]
vmovaps %xmm0, -0x380(%rbp)
vmovdqa -0x380(%rbp), %xmm1
vmovdqa 0x48ed1(%rip), %xmm0    # 0xc92a0
vmovdqa %xmm0, -0x3a0(%rbp)
vmovdqa -0x3a0(%rbp), %xmm0
vmovdqa %xmm1, -0x260(%rbp)
vmovdqa %xmm0, -0x270(%rbp)
vmovdqa -0x260(%rbp), %xmm1
vmovdqa -0x270(%rbp), %xmm0
vmovdqa %xmm1, -0x240(%rbp)
vmovdqa %xmm0, -0x250(%rbp)
vmovdqa -0x240(%rbp), %xmm0
vmovdqa -0x250(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x390(%rbp)
vmovdqa -0x380(%rbp), %xmm1
vmovdqa 0x48e74(%rip), %xmm0    # 0xc92b0
vmovdqa %xmm0, -0x3c0(%rbp)
vmovdqa -0x3c0(%rbp), %xmm0
vmovdqa %xmm1, -0x280(%rbp)
vmovdqa %xmm0, -0x290(%rbp)
vmovdqa -0x280(%rbp), %xmm1
vmovdqa -0x290(%rbp), %xmm0
vmovdqa %xmm1, -0x220(%rbp)
vmovdqa %xmm0, -0x230(%rbp)
vmovdqa -0x220(%rbp), %xmm0
vmovdqa -0x230(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x3b0(%rbp)
vmovdqa -0x380(%rbp), %xmm1
vmovdqa 0x48e17(%rip), %xmm0    # 0xc92c0
vmovdqa %xmm0, -0x3e0(%rbp)
vmovdqa -0x3e0(%rbp), %xmm0
vmovdqa %xmm1, -0x2a0(%rbp)
vmovdqa %xmm0, -0x2b0(%rbp)
vmovdqa -0x2a0(%rbp), %xmm1
vmovdqa -0x2b0(%rbp), %xmm0
vmovdqa %xmm1, -0x200(%rbp)
vmovdqa %xmm0, -0x210(%rbp)
vmovdqa -0x200(%rbp), %xmm0
vmovdqa -0x210(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x3d0(%rbp)
vmovdqa -0x380(%rbp), %xmm1
movq -0x2f8(%rbp), %rax
vmovdqa 0xc20(%rax), %xmm0
vmovdqa %xmm1, -0x2c0(%rbp)
vmovdqa %xmm0, -0x2d0(%rbp)
vmovdqa -0x2c0(%rbp), %xmm1
vmovdqa -0x2d0(%rbp), %xmm0
vmovdqa %xmm1, -0x1e0(%rbp)
vmovdqa %xmm0, -0x1f0(%rbp)
vmovdqa -0x1e0(%rbp), %xmm0
vmovdqa -0x1f0(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x3f0(%rbp)
vmovdqa -0x380(%rbp), %xmm1
vmovdqa 0x48d56(%rip), %xmm0    # 0xc92d0
vmovdqa %xmm0, -0x410(%rbp)
vmovdqa -0x410(%rbp), %xmm0
vmovdqa %xmm1, -0x2e0(%rbp)
vmovdqa %xmm0, -0x2f0(%rbp)
vmovdqa -0x2e0(%rbp), %xmm1
vmovdqa -0x2f0(%rbp), %xmm0
vmovdqa %xmm1, -0x1c0(%rbp)
vmovdqa %xmm0, -0x1d0(%rbp)
vmovdqa -0x1c0(%rbp), %xmm0
vmovdqa -0x1d0(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x400(%rbp)
movq -0x2f8(%rbp), %rax
movq 0x6a0(%rax), %rax
movb 0x13(%rax), %al
movb %al, -0x400(%rbp)
movq -0x2f8(%rbp), %rax
vmovdqa 0x6d0(%rax), %xmm0
vmovdqa %xmm0, -0x430(%rbp)
vmovdqa -0x430(%rbp), %xmm0
vmovdqa 0x48ccb(%rip), %xmm1    # 0xc92e0
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x440(%rbp)
vmovdqa -0x440(%rbp), %xmm0
vmovdqa -0x390(%rbp), %xmm2
vmovdqa -0x3f0(%rbp), %xmm3
vpcmpeqb %xmm3, %xmm2, %xmm3
vmovdqa -0x400(%rbp), %xmm4
vpcmpeqb %xmm4, %xmm2, %xmm2
vpcmpeqb %xmm1, %xmm0, %xmm1
vmovdqa %xmm3, -0x80(%rbp)
vmovdqa %xmm2, -0x90(%rbp)
vmovdqa %xmm1, -0xa0(%rbp)
vmovdqa -0x80(%rbp), %xmm1
vmovdqa -0x90(%rbp), %xmm2
vmovdqa -0xa0(%rbp), %xmm3
vpblendvb %xmm3, %xmm2, %xmm1, %xmm1
vpaddb %xmm1, %xmm1, %xmm1
vpsubb %xmm1, %xmm0, %xmm0
vmovdqa -0x390(%rbp), %xmm1
vmovdqa -0x3d0(%rbp), %xmm2
vpcmpeqb %xmm2, %xmm1, %xmm2
vpsubb %xmm2, %xmm0, %xmm0
vpaddb %xmm0, %xmm0, %xmm0
vmovdqa -0x3b0(%rbp), %xmm2
vpcmpeqb %xmm2, %xmm1, %xmm1
vmovdqa -0x430(%rbp), %xmm2
vmovdqa 0x48c33(%rip), %xmm3    # 0xc92f0
vpcmpeqb %xmm3, %xmm2, %k0
vpmovm2b %k0, %xmm2
vpor %xmm2, %xmm1, %xmm1
vpsubb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x420(%rbp)
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x8074f
movq -0x2f8(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
leaq 0x5020d(%rip), %rdx     # 0xd093c
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
jmp 0x80751
movl -0x314(%rbp), %eax
tzcntl %eax, %eax
movl %eax, -0x444(%rbp)
movq -0x2f8(%rbp), %rdi
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rsi
addq $0x70, %rsi
movl -0x444(%rbp), %edx
callq 0x812e0
vmovdqa %xmm0, -0x460(%rbp)
movslq -0x444(%rbp), %rax
movsbl -0x420(%rbp,%rax), %eax
movl %eax, -0x474(%rbp)
movl -0x474(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x807cd
movq -0x2f8(%rbp), %rax
movslq -0x444(%rbp), %rcx
movl 0xd80(%rax,%rcx,4), %eax
movl %eax, -0x594(%rbp)
jmp 0x807e8
movq -0x2f8(%rbp), %rax
movslq -0x444(%rbp), %rcx
movl 0xd40(%rax,%rcx,4), %eax
movl %eax, -0x594(%rbp)
movl -0x594(%rbp), %eax
movl %eax, -0x478(%rbp)
movl -0x474(%rbp), %ecx
movl $0xe9e9, %eax           # imm = 0xE9E9
sarl %cl, %eax
andl $0x1, %eax
cltq
cmpq $0x0, %rax
je 0x809b8
movq -0x2f8(%rbp), %rcx
movq 0x680(%rcx), %rax
movslq -0x444(%rbp), %rdx
movswq 0xcc0(%rcx,%rdx,2), %rcx
vmovd 0xb0(%rax,%rcx,4), %xmm0
vmovdqa %xmm0, -0x4a0(%rbp)
vmovdqa -0x4a0(%rbp), %xmm0
vmovdqa %xmm0, -0x490(%rbp)
movq -0x2f8(%rbp), %rcx
movq 0x680(%rcx), %rax
movslq -0x444(%rbp), %rdx
movslq 0xd00(%rcx,%rdx,4), %rcx
vmovd 0xb0(%rax,%rcx,4), %xmm0
vmovdqa %xmm0, -0x4c0(%rbp)
vmovdqa -0x4c0(%rbp), %xmm0
vmovdqa %xmm0, -0x4b0(%rbp)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
movslq -0x478(%rbp), %rcx
vmovd 0xb0(%rax,%rcx,4), %xmm0
vmovdqa %xmm0, -0x4e0(%rbp)
vmovdqa -0x4e0(%rbp), %xmm0
vmovdqa %xmm0, -0x4d0(%rbp)
vmovdqa -0x490(%rbp), %xmm2
vmovdqa -0x4b0(%rbp), %xmm1
vmovdqa -0x4d0(%rbp), %xmm0
vmovdqa %xmm2, -0x190(%rbp)
vmovdqa %xmm1, -0x1a0(%rbp)
vmovdqa %xmm0, -0x1b0(%rbp)
vmovdqa -0x190(%rbp), %xmm1
vmovdqa -0x1a0(%rbp), %xmm0
vmovdqa %xmm1, -0x150(%rbp)
vmovdqa %xmm0, -0x160(%rbp)
vmovdqa -0x150(%rbp), %xmm0
vmovdqa -0x160(%rbp), %xmm1
vpmaxsw %xmm1, %xmm0, %xmm1
vmovdqa -0x1b0(%rbp), %xmm0
vmovdqa %xmm1, -0x110(%rbp)
vmovdqa %xmm0, -0x120(%rbp)
vmovdqa -0x110(%rbp), %xmm0
vmovdqa -0x120(%rbp), %xmm1
vpminsw %xmm1, %xmm0, %xmm1
vmovdqa -0x190(%rbp), %xmm2
vmovdqa -0x1a0(%rbp), %xmm0
vmovdqa %xmm2, -0x130(%rbp)
vmovdqa %xmm0, -0x140(%rbp)
vmovdqa -0x130(%rbp), %xmm0
vmovdqa -0x140(%rbp), %xmm2
vpminsw %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, -0x170(%rbp)
vmovdqa %xmm0, -0x180(%rbp)
vmovdqa -0x170(%rbp), %xmm0
vmovdqa -0x180(%rbp), %xmm1
vpmaxsw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x470(%rbp)
jmp 0x80a7b
movl -0x474(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x809e4
movq -0x2f8(%rbp), %rax
movslq -0x444(%rbp), %rcx
movswl 0xcc0(%rax,%rcx,2), %eax
movl %eax, -0x598(%rbp)
jmp 0x809ff
movq -0x2f8(%rbp), %rax
movslq -0x444(%rbp), %rcx
movl 0xd00(%rax,%rcx,4), %eax
movl %eax, -0x598(%rbp)
movl -0x598(%rbp), %eax
movl %eax, -0x4e4(%rbp)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
addq $0xb0, %rax
movq %rax, -0x5a0(%rbp)
movl -0x474(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x80a42
movl -0x478(%rbp), %eax
movl %eax, -0x5a4(%rbp)
jmp 0x80a4e
movl -0x4e4(%rbp), %eax
movl %eax, -0x5a4(%rbp)
movq -0x5a0(%rbp), %rax
movl -0x5a4(%rbp), %ecx
movslq %ecx, %rcx
vmovd (%rax,%rcx,4), %xmm0
vmovdqa %xmm0, -0x500(%rbp)
vmovdqa -0x500(%rbp), %xmm0
vmovdqa %xmm0, -0x470(%rbp)
movl -0x314(%rbp), %eax
movb -0x444(%rbp), %dl
andb $-0x4, %dl
movb %dl, %cl
shrxl %ecx, %eax, %eax
andl $0xf, %eax
movl %eax, -0x504(%rbp)
movslq -0x504(%rbp), %rax
leaq 0x4ddc8(%rip), %rcx     # 0xce870
movsbl (%rax,%rcx), %eax
movl %eax, -0x508(%rbp)
movl -0x444(%rbp), %eax
sarl $0x2, %eax
movl %eax, -0x50c(%rbp)
vmovdqa 0x48837(%rip), %xmm0    # 0xc9300
vmovdqa %xmm0, -0x520(%rbp)
vpbroadcastw -0x508(%rbp), %xmm0
vmovdqa %xmm0, -0x540(%rbp)
vmovdqa -0x540(%rbp), %xmm0
vmovdqa -0x520(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vpcmpeqw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x530(%rbp)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
movslq -0x50c(%rbp), %rcx
vmovq 0x70(%rax,%rcx,8), %xmm0
vmovdqa %xmm0, -0x560(%rbp)
vmovdqa -0x560(%rbp), %xmm0
vmovdqa %xmm0, -0x550(%rbp)
vmovdqa -0x530(%rbp), %xmm0
vmovdqa %xmm0, -0x60(%rbp)
vmovdqa %xmm0, -0x70(%rbp)
vmovdqa -0x60(%rbp), %xmm0
vmovdqa -0x70(%rbp), %xmm1
vpunpcklwd %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
vmovdqa %xmm0, -0x570(%rbp)
vmovdqa -0x470(%rbp), %xmm0
vmovdqa -0x460(%rbp), %xmm1
vpaddw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x580(%rbp)
vpbroadcastd -0x580(%rbp), %xmm0
vmovdqa %xmm0, -0x590(%rbp)
vmovdqa -0x550(%rbp), %xmm2
vmovdqa -0x460(%rbp), %xmm0
vmovdqa %xmm0, -0x40(%rbp)
vpbroadcastd -0x40(%rbp), %xmm0
vmovdqa %xmm0, -0x50(%rbp)
vmovdqa -0x50(%rbp), %xmm0
vmovdqa %xmm0, -0x20(%rbp)
vmovdqa %xmm0, -0x30(%rbp)
vmovdqa -0x20(%rbp), %xmm0
vmovdqa -0x30(%rbp), %xmm1
vpacksswb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x10(%rbp)
vpabsb -0x10(%rbp), %xmm1
vmovdqa -0x530(%rbp), %xmm0
vmovdqa %xmm2, -0xb0(%rbp)
vmovdqa %xmm1, -0xc0(%rbp)
vmovdqa %xmm0, -0xd0(%rbp)
vmovdqa -0xb0(%rbp), %xmm0
vmovdqa -0xc0(%rbp), %xmm1
vmovdqa -0xd0(%rbp), %xmm2
vpblendvb %xmm2, %xmm1, %xmm0, %xmm0
vmovq %xmm0, %rdx
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
movslq -0x50c(%rbp), %rcx
movq %rdx, 0x70(%rax,%rcx,8)
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
addq $0xb0, %rax
movslq -0x50c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm2
vmovdqa -0x590(%rbp), %xmm1
vmovdqa -0x570(%rbp), %xmm0
vmovdqa %xmm2, -0xe0(%rbp)
vmovdqa %xmm1, -0xf0(%rbp)
vmovdqa %xmm0, -0x100(%rbp)
vmovdqa -0xe0(%rbp), %xmm0
vmovdqa -0xf0(%rbp), %xmm1
vmovdqa -0x100(%rbp), %xmm2
vpblendvb %xmm2, %xmm1, %xmm0, %xmm0
movq -0x2f8(%rbp), %rax
movq 0x680(%rax), %rax
addq $0xb0, %rax
movslq -0x50c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movq -0x2f8(%rbp), %rdi
movl -0x444(%rbp), %esi
movslq -0x504(%rbp), %rcx
leaq 0x4dba4(%rip), %rax     # 0xce880
movsbl (%rax,%rcx), %edx
movslq -0x504(%rbp), %rcx
leaq 0x4dba2(%rip), %rax     # 0xce890
movsbl (%rax,%rcx), %ecx
callq 0x83230
movl -0x314(%rbp), %eax
subl $0x1, %eax
andl -0x314(%rbp), %eax
movl %eax, -0x314(%rbp)
cmpl $0x0, %eax
jne 0x80751
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x80d8b
movq -0x2f8(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x2f8(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
leaq 0x4fe4d(%rip), %rdx     # 0xd0bb8
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x2f8(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
movq -0x2f8(%rbp), %rdi
callq 0x83140
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbp
retq