	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function svq3_mc_dir
_svq3_mc_dir:                           ## @svq3_mc_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r12d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r13
	movl	%esi, %eax
	andl	$5, %eax
	movl	%esi, %ecx
	andb	$1, %cl
	movl	$16, %ebx
	shrl	%cl, %ebx
	movl	$16, %r8d
	cmpl	$4, %eax
	cmovel	%eax, %ebx
	sete	%al
	leal	1(%rsi), %ecx
	movl	$2863311531, %edi               ## imm = 0xAAAAAAAB
	imulq	%rdi, %rcx
	shrq	$33, %rcx
                                        ## kill: def $cl killed $cl killed $rcx
	shrl	%cl, %r8d
	movq	_PREDICT_MODE@GOTPCREL(%rip), %rcx
	xorl	%r9d, %r9d
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	cmpl	%edx, (%rcx)
	movl	$96, %ecx
	cmovnel	%r9d, %ecx
	movl	$-96, %edx
	cmovnel	%r9d, %edx
	movl	%edx, -92(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edx
	subl	%ebx, %edx
	leal	(%rdx,%rdx,2), %edx
	movl	4(%r13), %edi
	subl	%r8d, %edi
	leal	(%rdi,%rdi,2), %edi
	leal	(%rcx,%rdx,2), %edx
	movl	%edx, -128(%rbp)                ## 4-byte Spill
	leal	(%rcx,%rdi,2), %ecx
	movl	%ecx, -140(%rbp)                ## 4-byte Spill
	movl	%ebx, %ecx
	shrl	$2, %ecx
	movl	%ecx, -96(%rbp)                 ## 4-byte Spill
	leal	-2(%rsi), %ecx
	movl	%ecx, -124(%rbp)                ## 4-byte Spill
	addl	$-5, %esi
	cmpl	$3, %esi
	setb	%cl
	orb	%al, %cl
	movb	%cl, -49(%rbp)                  ## 1-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	shrl	$2, %r8d
	movl	%r8d, -136(%rbp)                ## 4-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%rbx), %eax
	leal	(%rax,%rax,2), %eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	leaq	52(%r13), %rax
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movslq	%r12d, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_1 Depth=1
	addl	-56(%rbp), %r9d                 ## 4-byte Folded Reload
	cmpl	$16, %r9d
	jae	LBB0_29
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	cmpl	$3, -124(%rbp)                  ## 4-byte Folded Reload
	setb	%al
	movl	%r9d, %ecx
	shrl	$2, %ecx
	movq	%rcx, -176(%rbp)                ## 8-byte Spill
	movl	%r9d, %ecx
	shrl	%ecx
	andl	$2, %ecx
	movl	%r9d, %edx
	andl	$8, %edx
	orl	%ecx, %edx
	movl	%edx, -144(%rbp)                ## 4-byte Spill
	cmpl	$8, %r9d
	setb	%cl
	andb	%al, %cl
	movb	%cl, -50(%rbp)                  ## 1-byte Spill
	movl	-92(%rbp), %ebx                 ## 4-byte Reload
	movl	-128(%rbp), %r10d               ## 4-byte Reload
	xorl	%esi, %esi
	movl	%r9d, -148(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	32(%r13), %rax
	movq	(%rax), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	movl	(%rax,%rcx,4), %ebx
	movl	16(%r13), %r14d
	movl	-48(%rbp), %edi
	movl	-44(%rbp), %esi
	callq	_pack16to32
	movl	%ebx, %edi
	movl	-96(%rbp), %esi                 ## 4-byte Reload
	movl	-136(%rbp), %edx                ## 4-byte Reload
	movl	%r14d, %ecx
	movl	%eax, %r8d
	movl	$4, %r9d
	callq	_fill_rectangle
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	addl	-80(%rbp), %esi                 ## 4-byte Folded Reload
	movl	-132(%rbp), %eax                ## 4-byte Reload
	movl	-152(%rbp), %r10d               ## 4-byte Reload
	subl	%eax, %r10d
	movl	-156(%rbp), %ebx                ## 4-byte Reload
	subl	%eax, %ebx
	cmpl	$16, %esi
	movl	-148(%rbp), %r9d                ## 4-byte Reload
	jae	LBB0_28
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	8(%r13), %r14d
	movl	12(%r13), %r15d
	movl	%esi, %eax
	shrl	$2, %eax
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	leal	(%rcx,%r15,4), %ecx
	imull	16(%r13), %ecx
	leal	(%rax,%r14,4), %edx
	addl	%edx, %ecx
	shll	$4, %r15d
	addl	%r9d, %r15d
	andl	$1, %eax
	orl	-144(%rbp), %eax                ## 4-byte Folded Reload
	shrl	%esi
	andl	$4, %esi
	orl	%eax, %esi
	movslq	%ecx, %rdx
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movq	_PREDICT_MODE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	56(%r13), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax,%rdx,8), %rcx
	movl	(%rcx), %eax
	movl	4(%rcx), %ecx
	addl	%eax, %eax
	addl	%ecx, %ecx
	movl	20(%r13), %esi
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	24(%r13), %r8d
	subl	%r8d, %esi
	imull	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %edi
	incl	%edi
	sarl	%edi
	movl	%edi, -48(%rbp)
	imull	%ecx, %esi
	movl	%esi, %eax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=2
	subq	$8, %rsp
	movq	%r13, %rdi
	movl	-96(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	$1, %r8d
	leaq	-48(%rbp), %r9
	leaq	-44(%rbp), %rax
	pushq	%rax
	movl	%r10d, %r12d
	callq	_svq3_pred_motion
	movl	%r12d, %r10d
	addq	$16, %rsp
	movl	-48(%rbp), %edi
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	imull	%esi, %eax
	movl	24(%r13), %r8d
	cltd
	idivl	%r8d
	movl	%eax, %edi
	incl	%edi
	sarl	%edi
	movl	%edi, -48(%rbp)
	imull	%esi, %ecx
	movl	%ecx, %eax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	cltd
	idivl	%r8d
	incl	%eax
	sarl	%eax
	movl	%eax, -44(%rbp)
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	%r14d, %r13d
	shll	$4, %r13d
	shll	$5, %r14d
	leal	(%r14,%r14,2), %eax
	movl	%ebx, -156(%rbp)                ## 4-byte Spill
	movl	%ebx, %esi
	subl	%eax, %esi
	movl	%r10d, -152(%rbp)               ## 4-byte Spill
	movl	%r10d, %edx
	subl	%eax, %edx
	callq	_av_clip
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %edi
	leal	(%r15,%r15), %eax
	leal	(%rax,%rax,2), %eax
	movl	-92(%rbp), %esi                 ## 4-byte Reload
	subl	%eax, %esi
	movl	-140(%rbp), %edx                ## 4-byte Reload
	subl	%eax, %edx
	callq	_av_clip
	movl	%eax, -44(%rbp)
	xorl	%r12d, %r12d
	movl	$0, %eax
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movq	_PREDICT_MODE@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	-168(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_get_interleaved_se_golomb
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_get_interleaved_se_golomb
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	addl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	movq	_THIRDPEL_MODE@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	-48(%rbp), %esi
	incl	%esi
	sarl	%esi
	leal	(%rsi,%rax), %ecx
	movl	%ecx, -48(%rbp)
	movl	-44(%rbp), %edi
	incl	%edi
	sarl	%edi
	leal	(%rdi,%r12), %edx
	movl	%edx, -44(%rbp)
	leal	(%rsi,%rax), %r9d
	addl	$196608, %r9d                   ## imm = 0x30000
	movl	$2863311531, %esi               ## imm = 0xAAAAAAAB
	imulq	%rsi, %r9
	shrq	$33, %r9
	addl	$-65536, %r9d                   ## imm = 0xFFFF0000
	leal	(%rdi,%r12), %eax
	addl	$196608, %eax                   ## imm = 0x30000
	imulq	%rsi, %rax
	shrq	$33, %rax
	addl	$-65536, %eax                   ## imm = 0xFFFF0000
	leal	(%r9,%r9,2), %esi
	subl	%esi, %ecx
	leal	(%rax,%rax,2), %esi
	subl	%esi, %edx
	leal	(%rcx,%rdx,4), %ebx
	subq	$8, %rsp
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%r13d, %esi
	movq	%rdi, %r13
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	movq	-112(%rbp), %r12                ## 8-byte Reload
	pushq	%r12
	pushq	$1
	pushq	%rbx
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	pushq	%rax
	callq	_svq3_mc_dir_part
	addq	$48, %rsp
	movl	-48(%rbp), %edi
	addl	%edi, %edi
	movl	%edi, -48(%rbp)
	movl	-44(%rbp), %esi
	addl	%esi, %esi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	-48(%rbp), %ecx
	movq	_HALFPEL_MODE@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	_PREDICT_MODE@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=2
	addl	$393219, %ecx                   ## imm = 0x60003
	movl	$2863311531, %edx               ## imm = 0xAAAAAAAB
	imulq	%rdx, %rcx
	shrq	$34, %rcx
	leal	(%rax,%rcx), %r9d
	addl	$-65536, %r9d                   ## imm = 0xFFFF0000
	movl	%r9d, -48(%rbp)
	movl	-44(%rbp), %eax
	movl	$393219, %ecx                   ## imm = 0x60003
	addl	%ecx, %eax
	imulq	%rdx, %rax
	shrq	$34, %rax
	addl	%r12d, %eax
	addl	$-65536, %eax                   ## imm = 0xFFFF0000
	movl	%eax, -44(%rbp)
	subq	$8, %rsp
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%r13d, %esi
	movq	%rdi, %r13
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	movq	-112(%rbp), %r12                ## 8-byte Reload
	pushq	%r12
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_svq3_mc_dir_part
	addq	$48, %rsp
	movl	-48(%rbp), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %edi
	movl	%edi, -48(%rbp)
	movl	-44(%rbp), %eax
	addl	%eax, %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=2
	addl	$196609, %ecx                   ## imm = 0x30001
	movl	$2863311531, %esi               ## imm = 0xAAAAAAAB
	imulq	%rsi, %rcx
	shrq	$33, %rcx
	leal	(%rcx,%rax), %edx
	leal	(%rcx,%rax), %r9d
	addl	$-65536, %r9d                   ## imm = 0xFFFF0000
	movl	%r9d, -48(%rbp)
	movl	-44(%rbp), %eax
	movl	$196609, %ecx                   ## imm = 0x30001
	addl	%ecx, %eax
	imulq	%rsi, %rax
	shrq	$33, %rax
	leal	(%rax,%r12), %ecx
	addl	%r12d, %eax
	addl	$-65536, %eax                   ## imm = 0xFFFF0000
	movl	%eax, -44(%rbp)
	andl	$1, %edx
	andl	$1, %ecx
	leal	(%rdx,%rcx,2), %ebx
	sarl	%r9d
	sarl	%eax
	subq	$8, %rsp
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%r13d, %esi
	movq	%rdi, %r13
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	movq	-112(%rbp), %r12                ## 8-byte Reload
	pushq	%r12
	pushq	$0
	pushq	%rbx
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	pushq	%rax
	callq	_svq3_mc_dir_part
	addq	$48, %rsp
	movl	-48(%rbp), %eax
	leal	(%rax,%rax,2), %edi
	movl	%edi, -48(%rbp)
	movl	-44(%rbp), %eax
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=2
	leal	(%rax,%rax,2), %esi
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	%esi, -44(%rbp)
	movq	_PREDICT_MODE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_27
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=2
	callq	_pack16to32
	movl	%eax, %ebx
	cmpb	$0, -50(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	40(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	_scan8@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	movslq	(%rcx,%r15,4), %rcx
	movl	32(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	callq	_AV_WN32A
	cmpl	$8, -80(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$7, -64(%rbp)                   ## 4-byte Folded Reload
	ja	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	40(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	_scan8@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%r15,4), %rcx
	movl	36(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	callq	_AV_WN32A
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$8, -80(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$7, -64(%rbp)                   ## 4-byte Folded Reload
	ja	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	40(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	_scan8@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movslq	(%rcx,%rdx,4), %rcx
	movl	4(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	callq	_AV_WN32A
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=2
	cmpb	$0, -49(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	40(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	_scan8@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movslq	(%rcx,%rdx,4), %rcx
	movl	(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	callq	_AV_WN32A
	jmp	LBB0_27
LBB0_29:
	xorl	%eax, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PREDICT_MODE,4,2               ## @PREDICT_MODE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.comm	_THIRDPEL_MODE,4,2              ## @THIRDPEL_MODE
	.comm	_HALFPEL_MODE,4,2               ## @HALFPEL_MODE
	.comm	_scan8,8,3                      ## @scan8
	.no_dead_strip	_svq3_mc_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function svq3_mc_dir
_svq3_mc_dir:                           ; @svq3_mc_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w4, [sp, #40]                   ; 4-byte Folded Spill
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x21, x2
	mov	x22, x0
	mov	w24, #0
	mov	w8, #5
	and	w8, w1, w8
	and	w9, w1, #0x1
	mov	w10, #16
	lsr	w9, w10, w9
	cmp	w8, #4
	csel	w23, w8, w9, eq
	cset	w8, eq
	add	w9, w1, #1
	mov	w11, #43691
	movk	w11, #43690, lsl #16
	umull	x9, w9, w11
	lsr	x9, x9, #33
	lsr	w13, w10, w9
Lloh0:
	adrp	x9, _PREDICT_MODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PREDICT_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #96
	cmp	w9, w2
	csel	w9, w10, wzr, eq
	mov	w10, #-96
	csel	w10, w10, wzr, eq
	str	w10, [sp, #56]                  ; 4-byte Folded Spill
	ldp	w10, w11, [x0]
	sub	w10, w10, w23
	mov	w12, #6
	sub	w11, w11, w13
	lsr	w14, w23, #2
	stp	w13, w14, [sp, #72]             ; 8-byte Folded Spill
	madd	w10, w10, w12, w9
	madd	w9, w11, w12, w9
	stp	w9, w10, [sp, #48]              ; 8-byte Folded Spill
	add	x9, x0, #52
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	sub	w10, w1, #2
	str	x3, [sp, #96]                   ; 8-byte Folded Spill
	sxtw	x28, w3
	sub	w9, w1, #5
	cmp	w9, #3
	cset	w9, lo
	orr	w8, w8, w9
	stp	w10, w8, [sp, #16]              ; 8-byte Folded Spill
	lsr	w25, w13, #2
	add	w8, w23, w23, lsl #1
	lsl	w8, w8, #1
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #72]                   ; 4-byte Folded Reload
	add	w24, w24, w8
	cmp	w24, #16
	b.hs	LBB0_30
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	w27, #0
	mov	w26, #0
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cmp	w8, #3
	lsr	w10, w24, #2
	lsr	w8, w24, #1
	and	w8, w8, #0x2
	and	w9, w24, #0x8
	orr	w8, w8, w9
	stp	w8, w10, [sp, #60]              ; 8-byte Folded Spill
	ccmp	w24, #8, #2, lo
	cset	w8, lo
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	str	w24, [sp, #68]                  ; 4-byte Folded Spill
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #32]
	ldr	x8, [x8]
	ldr	x8, [x8, x28, lsl #3]
	ldr	w9, [sp, #92]                   ; 4-byte Folded Reload
	ldr	w19, [x8, w9, sxtw #2]
	ldr	w24, [x22, #16]
	ldp	w1, w0, [x29, #-88]
	bl	_pack16to32
	mov	x4, x0
	mov	x0, x19
	ldr	w1, [sp, #76]                   ; 4-byte Folded Reload
	mov	x2, x25
	mov	x3, x24
	mov	w5, #4
	bl	_fill_rectangle
	add	w26, w26, w23
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	sub	w27, w27, w8
	cmp	w26, #16
	ldr	w24, [sp, #68]                  ; 4-byte Folded Reload
	b.hs	LBB0_1
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w8, w26, #2
	mov	x11, x26
	ldp	w26, w19, [x22, #8]
	add	w8, w8, w26, lsl #2
	ldr	w9, [sp, #64]                   ; 4-byte Folded Reload
	add	w9, w9, w19, lsl #2
	ldr	w10, [x22, #16]
	madd	w12, w9, w10, w8
	ubfx	w8, w11, #2, #1
	str	w11, [sp, #88]                  ; 4-byte Folded Spill
	lsr	w9, w11, #1
	and	w9, w9, #0x4
	ldr	w10, [sp, #60]                  ; 4-byte Folded Reload
	orr	w8, w10, w8
	orr	w1, w8, w9
Lloh3:
	adrp	x8, _PREDICT_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PREDICT_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	str	w12, [sp, #92]                  ; 4-byte Folded Spill
	str	x1, [sp, #80]                   ; 8-byte Folded Spill
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #56]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8, w12, sxtw #3]
	ldp	w9, w8, [x8]
	lsl	w10, w9, #1
	lsl	w8, w8, #1
	ldr	w9, [x22, #20]
	ldr	x11, [sp, #96]                  ; 8-byte Folded Reload
	cbz	w11, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	w11, [x22, #24]
	sub	w9, w9, w11
	mul	w10, w9, w10
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=2
	sub	x5, x29, #84
	sub	x6, x29, #88
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	ldr	w2, [sp, #76]                   ; 4-byte Folded Reload
	ldr	x3, [sp, #96]                   ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #1
	bl	_svq3_pred_motion
	ldur	w0, [x29, #-84]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=2
	mul	w10, w9, w10
	ldr	w11, [x22, #24]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=2
	sdiv	w10, w10, w11
	add	w10, w10, #1
	asr	w0, w10, #1
	mul	w8, w9, w8
	sdiv	w8, w8, w11
	add	w8, w8, #1
	asr	w8, w8, #1
	stp	w8, w0, [x29, #-88]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=2
	add	w19, w24, w19, lsl #4
	mov	w8, #-96
	mul	w8, w26, w8
	ldr	w24, [sp, #56]                  ; 4-byte Folded Reload
	add	w9, w24, w27
	add	w1, w9, w8
	ldr	w9, [sp, #52]                   ; 4-byte Folded Reload
	add	w9, w9, w27
	add	w2, w9, w8
	bl	_av_clip
	stur	w0, [x29, #-84]
	ldur	w0, [x29, #-88]
	add	w8, w19, w19, lsl #1
	lsl	w8, w8, #1
	sub	w1, w24, w8
	ldr	w9, [sp, #48]                   ; 4-byte Folded Reload
	sub	w2, w9, w8
	bl	_av_clip
	stur	w0, [x29, #-88]
Lloh6:
	adrp	x8, _PREDICT_MODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PREDICT_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=2
	mov	w20, #0
	mov	w0, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x24, x27
	mov	x27, x22
	mov	x22, x19
	mov	x19, x21
	mov	x21, x25
	mov	x25, x28
	mov	x28, x23
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x23
	bl	_get_interleaved_se_golomb
	mov	x20, x0
	mov	x0, x23
	mov	x23, x28
	mov	x28, x25
	mov	x25, x21
	mov	x21, x19
	mov	x19, x22
	mov	x22, x27
	mov	x27, x24
	bl	_get_interleaved_se_golomb
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	w8, [sp, #88]                   ; 4-byte Folded Reload
	add	w1, w8, w26, lsl #4
	mov	x26, x8
Lloh9:
	adrp	x8, _THIRDPEL_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _THIRDPEL_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=2
	ldp	w9, w8, [x29, #-88]
	add	w8, w8, #1
	add	w8, w0, w8, asr #1
	add	w9, w9, #1
	add	w9, w20, w9, asr #1
	stp	w9, w8, [x29, #-88]
	add	w10, w8, #48, lsl #12           ; =196608
	mov	w11, #43691
	movk	w11, #43690, lsl #16
	umull	x10, w10, w11
	lsr	x10, x10, #33
	sub	w5, w10, #16, lsl #12           ; =65536
	add	w10, w9, #48, lsl #12           ; =196608
	umull	x10, w10, w11
	lsr	x10, x10, #33
	sub	w6, w10, #16, lsl #12           ; =65536
	sub	w10, w5, w5, lsl #2
	add	w8, w10, w8
	sub	w10, w6, w6, lsl #2
	add	w9, w10, w9
	add	w7, w8, w9, lsl #2
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	ldr	x8, [sp, #96]                   ; 8-byte Folded Reload
	stp	w8, w9, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x22
	mov	x2, x19
	mov	x3, x23
	ldr	w4, [sp, #72]                   ; 4-byte Folded Reload
	bl	_svq3_mc_dir_part
	ldur	w8, [x29, #-84]
	lsl	w0, w8, #1
	stur	w0, [x29, #-84]
	ldur	w8, [x29, #-88]
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=2
Lloh12:
	adrp	x8, _HALFPEL_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HALFPEL_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x8]
	ldur	w8, [x29, #-84]
	cmp	w9, w21
	b.eq	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=2
Lloh15:
	adrp	x9, _PREDICT_MODE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PREDICT_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w9, w21
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=2
	mov	w9, #3
	movk	w9, #6, lsl #16
	add	w8, w8, w9
	mov	w10, #43691
	movk	w10, #43690, lsl #16
	umull	x8, w8, w10
	lsr	x8, x8, #34
	add	w8, w0, w8
	sub	w5, w8, #16, lsl #12            ; =65536
	ldur	w8, [x29, #-88]
	add	w8, w8, w9
	umull	x8, w8, w10
	lsr	x8, x8, #34
	add	w8, w20, w8
	sub	w6, w8, #16, lsl #12            ; =65536
	stp	w6, w5, [x29, #-88]
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	ldr	x8, [sp, #96]                   ; 8-byte Folded Reload
	stp	w8, w9, [sp, #4]
	str	wzr, [sp]
	mov	x0, x22
	mov	x2, x19
	mov	x3, x23
	ldr	w4, [sp, #72]                   ; 4-byte Folded Reload
	mov	w7, #0
	bl	_svq3_mc_dir_part
	ldur	w8, [x29, #-84]
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #1
	stur	w0, [x29, #-84]
	ldur	w8, [x29, #-88]
	add	w8, w8, w8, lsl #1
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=2
	lsl	w1, w8, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	w11, #1
	movk	w11, #3, lsl #16
	add	w8, w8, w11
	mov	w12, #43691
	movk	w12, #43690, lsl #16
	umull	x8, w8, w12
	lsr	x8, x8, #33
	add	w8, w8, w0
	sub	w9, w8, #16, lsl #12            ; =65536
	ldur	w10, [x29, #-88]
	add	w10, w10, w11
	umull	x10, w10, w12
	lsr	x10, x10, #33
	add	w10, w10, w20
	and	w7, w8, #0x1
	bfi	w7, w10, #1, #1
	sub	w8, w10, #16, lsl #12           ; =65536
	stp	w8, w9, [x29, #-88]
	asr	w5, w9, #1
	asr	w6, w8, #1
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	ldr	x8, [sp, #96]                   ; 8-byte Folded Reload
	stp	w8, w9, [sp, #4]
	str	wzr, [sp]
	mov	x0, x22
	mov	x2, x19
	mov	x3, x23
	ldr	w4, [sp, #72]                   ; 4-byte Folded Reload
	bl	_svq3_mc_dir_part
	ldur	w8, [x29, #-84]
	add	w0, w8, w8, lsl #1
	stur	w0, [x29, #-84]
	ldur	w8, [x29, #-88]
	add	w1, w8, w8, lsl #1
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=2
	stur	w1, [x29, #-88]
Lloh18:
	adrp	x8, _PREDICT_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PREDICT_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_3
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=2
	bl	_pack16to32
	mov	x19, x0
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #40]
	ldr	x8, [x8, x28, lsl #3]
Lloh21:
	adrp	x9, _scan8@GOTPAGE
Lloh22:
	ldr	x9, [x9, _scan8@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	ldr	x10, [sp, #80]                  ; 8-byte Folded Reload
	ldrsw	x9, [x9, w10, uxtw #2]
	add	x8, x8, x9, lsl #2
	ldr	w0, [x8, #32]
	mov	x1, x19
	bl	_AV_WN32A
	cmp	w23, #8
	b.ne	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_4 Depth=2
	cmp	w26, #7
	b.hi	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #40]
	ldr	x8, [x8, x28, lsl #3]
Lloh24:
	adrp	x9, _scan8@GOTPAGE
Lloh25:
	ldr	x9, [x9, _scan8@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	ldr	x10, [sp, #80]                  ; 8-byte Folded Reload
	ldrsw	x9, [x9, x10, lsl #2]
	add	x8, x8, x9, lsl #2
	ldr	w0, [x8, #36]
	mov	x1, x19
	bl	_AV_WN32A
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=2
	cmp	w23, #8
	b.ne	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_4 Depth=2
	cmp	w26, #7
	b.hi	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #40]
	ldr	x8, [x8, x28, lsl #3]
Lloh27:
	adrp	x9, _scan8@GOTPAGE
Lloh28:
	ldr	x9, [x9, _scan8@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ldr	x10, [sp, #80]                  ; 8-byte Folded Reload
	ldrsw	x9, [x9, w10, uxtw #2]
	add	x8, x8, x9, lsl #2
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_AV_WN32A
LBB0_28:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_3
; %bb.29:                               ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x22, #40]
	ldr	x8, [x8, x28, lsl #3]
Lloh30:
	adrp	x9, _scan8@GOTPAGE
Lloh31:
	ldr	x9, [x9, _scan8@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	ldr	x10, [sp, #80]                  ; 8-byte Folded Reload
	ldrsw	x9, [x9, w10, uxtw #2]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x19
	bl	_AV_WN32A
	b	LBB0_3
LBB0_30:
	mov	w0, #0
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PREDICT_MODE,4,2               ; @PREDICT_MODE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.comm	_THIRDPEL_MODE,4,2              ; @THIRDPEL_MODE
	.comm	_HALFPEL_MODE,4,2               ; @HALFPEL_MODE
	.comm	_scan8,8,3                      ; @scan8
	.no_dead_strip	_svq3_mc_dir
.subsections_via_symbols
