// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/./edge264_mvpred.c
// Function: decode_P_skip
static noinline void decode_P_skip(Edge264Context *ctx) {
	mb->f.inter_eqs_s = little_endian32(0x1b5fbbff);
	mb->refPic_s[0] = ((i32x4)set8(ctx->t.RefPicList_v[0][0]))[0];
	mb->refPic_s[1] = -1;
	int refIdxA = mbA->refIdx[1];
	int refIdxB = mbB->refIdx[2];
	int mvA = mbA->mvs_s[5];
	int mvB = mbB->mvs_s[10];
	i16x8 mv = {};
	if ((refIdxA | mvA) && (refIdxB | mvB) && !(ctx->unavail4x4[0] & 3)) {
		int refIdxC;
		if (__builtin_expect(ctx->unavail4x4[5] & 4, 0)) {
			refIdxC = mbD->refIdx[3];
			mv = (i32x4){mbD->mvs_s[15]};
		} else {
			refIdxC = mbC->refIdx[2];
			mv = (i32x4){mbC->mvs_s[10]};
		}
		// B/C unavailability (->A) was ruled out, thus not tested here
		int eq = !refIdxA + !refIdxB * 2 + !refIdxC * 4;
		if (__builtin_expect(0xe9 >> eq & 1, 1)) {
			mv = median16((i32x4){mvA}, (i32x4){mvB}, mv);
		} else if (eq != 4) {
			mv = (i32x4){(eq == 1) ? mvA : mvB};
		}
	}
	i16x8 mvs = broadcast32(mv, 0);
	mb->mvs_v[0] = mb->mvs_v[1] = mb->mvs_v[2] = mb->mvs_v[3] = mvs;
	mb->mvs_v[4] = mb->mvs_v[5] = mb->mvs_v[6] = mb->mvs_v[7] = (i16x8){};
	decode_inter(ctx, 0, 16, 16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
movl $0x1b5fbbff, 0x2c(%rax) # imm = 0x1B5FBBFF
movq -0xe0(%rbp), %rax
vmovdqa 0x1a0(%rax), %xmm0
vpextrb $0x0, %xmm0, -0xd1(%rbp)
movb -0xd1(%rbp), %al
movb %al, -0x191(%rbp)
movb %al, -0x1(%rbp)
movb %al, -0x2(%rbp)
movb %al, -0x3(%rbp)
movb %al, -0x4(%rbp)
movb %al, -0x5(%rbp)
movb %al, -0x6(%rbp)
movb %al, -0x7(%rbp)
movb %al, -0x8(%rbp)
movb %al, -0x9(%rbp)
movb %al, -0xa(%rbp)
movb %al, -0xb(%rbp)
movb %al, -0xc(%rbp)
movb %al, -0xd(%rbp)
movb %al, -0xe(%rbp)
movb %al, -0xf(%rbp)
movb %al, -0x10(%rbp)
movzbl -0x10(%rbp), %eax
vmovd %eax, %xmm0
movzbl -0xf(%rbp), %eax
vpinsrb $0x1, %eax, %xmm0, %xmm0
movzbl -0xe(%rbp), %eax
vpinsrb $0x2, %eax, %xmm0, %xmm0
movzbl -0xd(%rbp), %eax
vpinsrb $0x3, %eax, %xmm0, %xmm0
movzbl -0xc(%rbp), %eax
vpinsrb $0x4, %eax, %xmm0, %xmm0
movzbl -0xb(%rbp), %eax
vpinsrb $0x5, %eax, %xmm0, %xmm0
movzbl -0xa(%rbp), %eax
vpinsrb $0x6, %eax, %xmm0, %xmm0
movzbl -0x9(%rbp), %eax
vpinsrb $0x7, %eax, %xmm0, %xmm0
movzbl -0x8(%rbp), %eax
vpinsrb $0x8, %eax, %xmm0, %xmm0
movzbl -0x7(%rbp), %eax
vpinsrb $0x9, %eax, %xmm0, %xmm0
movzbl -0x6(%rbp), %eax
vpinsrb $0xa, %eax, %xmm0, %xmm0
movzbl -0x5(%rbp), %eax
vpinsrb $0xb, %eax, %xmm0, %xmm0
movzbl -0x4(%rbp), %eax
vpinsrb $0xc, %eax, %xmm0, %xmm0
movzbl -0x3(%rbp), %eax
vpinsrb $0xd, %eax, %xmm0, %xmm0
movzbl -0x2(%rbp), %eax
vpinsrb $0xe, %eax, %xmm0, %xmm0
movzbl -0x1(%rbp), %eax
vpinsrb $0xf, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
movl %ecx, 0x18(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
movq -0xe0(%rbp), %rax
movq 0x688(%rax), %rax
movsbl 0x11(%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0xe0(%rbp), %rax
movq 0x690(%rax), %rax
movsbl 0x12(%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq 0x688(%rax), %rax
movl 0xc4(%rax), %eax
movl %eax, -0xec(%rbp)
movq -0xe0(%rbp), %rax
movq 0x690(%rax), %rax
movl 0xd8(%rax), %eax
movl %eax, -0xf0(%rbp)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0x100(%rbp)
movl -0xe4(%rbp), %eax
orl -0xec(%rbp), %eax
cmpl $0x0, %eax
je 0x1e3e5
movl -0xe8(%rbp), %eax
orl -0xf0(%rbp), %eax
cmpl $0x0, %eax
je 0x1e3e5
movq -0xe0(%rbp), %rax
movsbl 0x6d0(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x1e3e5
movq -0xe0(%rbp), %rax
movsbl 0x6d5(%rax), %eax
andl $0x4, %eax
cltq
cmpq $0x0, %rax
je 0x1e1fd
movq -0xe0(%rbp), %rax
movq 0x6a0(%rax), %rax
movsbl 0x13(%rax), %eax
movl %eax, -0x104(%rbp)
movq -0xe0(%rbp), %rax
movq 0x6a0(%rax), %rax
vmovd 0xec(%rax), %xmm0
vmovdqa %xmm0, -0x120(%rbp)
vmovdqa -0x120(%rbp), %xmm0
vmovdqa %xmm0, -0x100(%rbp)
jmp 0x1e243
movq -0xe0(%rbp), %rax
movq 0x698(%rax), %rax
movsbl 0x12(%rax), %eax
movl %eax, -0x104(%rbp)
movq -0xe0(%rbp), %rax
movq 0x698(%rax), %rax
vmovd 0xd8(%rax), %xmm0
vmovdqa %xmm0, -0x130(%rbp)
vmovdqa -0x130(%rbp), %xmm0
vmovdqa %xmm0, -0x100(%rbp)
cmpl $0x0, -0xe4(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, -0xe8(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll %ecx
addl %ecx, %eax
cmpl $0x0, -0x104(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x134(%rbp)
movl -0x134(%rbp), %ecx
movl $0xe9, %eax
sarl %cl, %eax
andl $0x1, %eax
cltq
cmpq $0x0, %rax
je 0x1e393
vmovd -0xec(%rbp), %xmm0
vmovdqa %xmm0, -0x150(%rbp)
vmovdqa -0x150(%rbp), %xmm2
vmovd -0xf0(%rbp), %xmm0
vmovdqa %xmm0, -0x160(%rbp)
vmovdqa -0x160(%rbp), %xmm1
vmovdqa -0x100(%rbp), %xmm0
vmovdqa %xmm2, -0xb0(%rbp)
vmovdqa %xmm1, -0xc0(%rbp)
vmovdqa %xmm0, -0xd0(%rbp)
vmovdqa -0xb0(%rbp), %xmm1
vmovdqa -0xc0(%rbp), %xmm0
vmovdqa %xmm1, -0x70(%rbp)
vmovdqa %xmm0, -0x80(%rbp)
vmovdqa -0x70(%rbp), %xmm0
vmovdqa -0x80(%rbp), %xmm1
vpmaxsw %xmm1, %xmm0, %xmm1
vmovdqa -0xd0(%rbp), %xmm0
vmovdqa %xmm1, -0x30(%rbp)
vmovdqa %xmm0, -0x40(%rbp)
vmovdqa -0x30(%rbp), %xmm0
vmovdqa -0x40(%rbp), %xmm1
vpminsw %xmm1, %xmm0, %xmm1
vmovdqa -0xb0(%rbp), %xmm2
vmovdqa -0xc0(%rbp), %xmm0
vmovdqa %xmm2, -0x50(%rbp)
vmovdqa %xmm0, -0x60(%rbp)
vmovdqa -0x50(%rbp), %xmm0
vmovdqa -0x60(%rbp), %xmm2
vpminsw %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, -0x90(%rbp)
vmovdqa %xmm0, -0xa0(%rbp)
vmovdqa -0x90(%rbp), %xmm0
vmovdqa -0xa0(%rbp), %xmm1
vpmaxsw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x100(%rbp)
jmp 0x1e3e3
cmpl $0x4, -0x134(%rbp)
je 0x1e3e1
cmpl $0x1, -0x134(%rbp)
jne 0x1e3b3
movl -0xec(%rbp), %eax
movl %eax, -0x198(%rbp)
jmp 0x1e3bf
movl -0xf0(%rbp), %eax
movl %eax, -0x198(%rbp)
movl -0x198(%rbp), %eax
vmovd %eax, %xmm0
vmovdqa %xmm0, -0x170(%rbp)
vmovdqa -0x170(%rbp), %xmm0
vmovdqa %xmm0, -0x100(%rbp)
jmp 0x1e3e3
jmp 0x1e3e5
vpbroadcastd -0x100(%rbp), %xmm0
vmovdqa %xmm0, -0x180(%rbp)
vmovdqa -0x180(%rbp), %xmm0
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xe0(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xd0(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xc0(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xb0(%rax)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0x190(%rbp)
vmovdqa -0x190(%rbp), %xmm0
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x120(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x110(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0x100(%rax)
movq -0xe0(%rbp), %rax
movq 0x680(%rax), %rax
vmovdqa %xmm0, 0xf0(%rax)
movq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %ecx
movl %ecx, %edx
callq 0x21380
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq