	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mpeg4_set_direct_mv         ## -- Begin function ff_mpeg4_set_direct_mv
	.p2align	4, 0x90
_ff_mpeg4_set_direct_mv:                ## @ff_mpeg4_set_direct_mv
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movslq	(%rdi), %rax
	movslq	4(%rdi), %rcx
	movslq	8(%rdi), %r13
	imulq	%rcx, %r13
	addq	%rax, %r13
	movq	80(%rdi), %rax
	movl	(%rax,%r13,4), %ebx
	movl	%ebx, %edi
	callq	_IS_8X8
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_MV_TYPE_8X8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_ff_mpeg4_set_one_direct_mv
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	$1, %ecx
	callq	_ff_mpeg4_set_one_direct_mv
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	$2, %ecx
	callq	_ff_mpeg4_set_one_direct_mv
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	$3, %ecx
	callq	_ff_mpeg4_set_one_direct_mv
	movq	_MB_TYPE_8x8@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	movq	_MB_TYPE_L0L1@GOTPCREL(%rip), %rcx
	movq	_MB_TYPE_DIRECT2@GOTPCREL(%rip), %rdx
	jmp	LBB0_25
LBB0_2:
	movl	%ebx, %edi
	callq	_IS_INTERLACED
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	movq	_MV_TYPE_FIELD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	88(%r12), %rax
	movq	(%rax), %rbx
	leal	(,%r13,4), %eax
	movq	16(%r12), %rcx
	movq	32(%r12), %rdx
	movq	(%rcx), %rdi
	movq	8(%rcx), %rcx
	movq	72(%r12), %rsi
	movq	40(%r12), %r11
	movq	(%rdx), %r8
	movq	8(%rdx), %rdx
	movslq	%eax, %r9
	movl	(%rbx,%r9,4), %eax
	movl	%eax, (%rdi)
	movl	$0, (%rcx)
	movl	24(%r12), %r10d
	testq	%rsi, %rsi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.4:
	subl	%eax, %r10d
	movl	28(%r12), %ecx
	subl	%eax, %ecx
	jmp	LBB0_6
LBB0_19:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_ff_mpeg4_set_one_direct_mv
	movq	32(%r12), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rdx
	movq	24(%rcx), %rsi
	movl	(%rdx), %edi
	movl	%edi, (%rsi)
	movq	16(%rcx), %rbx
	movl	%edi, (%rbx)
	movq	8(%rcx), %rcx
	movl	%edi, (%rcx)
	movl	4(%rdx), %edx
	movl	%edx, 4(%rsi)
	movl	%edx, 4(%rbx)
	movl	%edx, 4(%rcx)
	movq	8(%rax), %rax
	movq	(%rax), %rcx
	movq	24(%rax), %rdx
	movl	(%rcx), %esi
	movl	%esi, (%rdx)
	movq	16(%rax), %rdi
	movl	%esi, (%rdi)
	movq	8(%rax), %rax
	movl	%esi, (%rax)
	movl	4(%rcx), %ecx
	movl	%ecx, 4(%rdx)
	movl	%ecx, 4(%rdi)
	movl	%ecx, 4(%rax)
	movq	64(%r12), %rax
	movq	_FF_BUG_DIRECT_BLOCKSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_22
## %bb.20:
	cmpl	$0, 56(%r12)
	jne	LBB0_21
LBB0_22:
	movq	_MV_TYPE_16X16@GOTPCREL(%rip), %rax
LBB0_23:
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	_MB_TYPE_16x16@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_5:
	addl	%eax, %r10d
	addl	28(%r12), %eax
	movl	%eax, %ecx
LBB0_6:
	movq	%r11, -96(%rbp)                 ## 8-byte Spill
	movq	(%r11), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %r11
	movl	(%r11), %eax
	imull	%ecx, %eax
	cltd
	idivl	%r10d
	movl	%eax, %esi
	addl	%r15d, %esi
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	(%r8), %rbx
	movl	%esi, (%rbx)
	movl	4(%r11), %eax
	imull	%ecx, %eax
	cltd
	idivl	%r10d
	addl	%r14d, %eax
	movl	%eax, 4(%rbx)
	movl	(%r11), %eax
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.7:
	subl	%eax, %esi
	jmp	LBB0_9
LBB0_8:
	movl	%ecx, %edx
	subl	%r10d, %edx
	imull	%edx, %eax
	cltd
	idivl	%r10d
	movl	%eax, %esi
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rdi
	movl	%esi, (%rdi)
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	movl	4(%rbx), %eax
	subl	4(%r11), %eax
	jmp	LBB0_12
LBB0_11:
	subl	%r10d, %ecx
	imull	4(%r11), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r10d
LBB0_12:
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	-96(%rbp), %r10                 ## 8-byte Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r11                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, 4(%rdi)
	shlq	$2, %r9
	orq	$8, %r9
	movl	(%rcx,%r9), %eax
	leal	-1(%rax), %edx
	movl	$1, %ecx
	subl	%eax, %ecx
	testq	%rsi, %rsi
	movl	%eax, 4(%rbx)
	movl	$1, 4(%r11)
	cmovel	%edx, %ecx
	movl	24(%r12), %edi
	addl	%ecx, %edi
	addl	28(%r12), %ecx
	movq	8(%r10), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %r9
	movl	(%r9), %eax
	imull	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, %esi
	addl	%r15d, %esi
	movq	8(%r8), %r8
	movl	%esi, (%r8)
	movl	4(%r9), %eax
	imull	%ecx, %eax
	cltd
	idivl	%edi
	addl	%r14d, %eax
	movl	%eax, 4(%r8)
	movl	(%r9), %eax
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.13:
	subl	%eax, %esi
	jmp	LBB0_15
LBB0_14:
	movl	%ecx, %edx
	subl	%edi, %edx
	imull	%edx, %eax
	cltd
	idivl	%edi
	movl	%eax, %esi
LBB0_15:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	movl	%esi, (%rbx)
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.16:
	movl	4(%r8), %eax
	subl	4(%r9), %eax
	jmp	LBB0_18
LBB0_17:
	subl	%edi, %ecx
	imull	4(%r9), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%edi
LBB0_18:
	movl	%eax, 4(%rbx)
	movq	_MB_TYPE_DIRECT2@GOTPCREL(%rip), %rcx
	movq	_MB_TYPE_16x8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_MB_TYPE_INTERLACED@GOTPCREL(%rip), %rcx
	movq	_MB_TYPE_L0L1@GOTPCREL(%rip), %rdx
LBB0_25:
	orl	(%rdx), %eax
	orl	(%rcx), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	_MV_TYPE_8X8@GOTPCREL(%rip), %rax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_TYPE_8X8,8,3                ## @MV_TYPE_8X8
	.comm	_MB_TYPE_DIRECT2,4,2            ## @MB_TYPE_DIRECT2
	.comm	_MB_TYPE_8x8,4,2                ## @MB_TYPE_8x8
	.comm	_MB_TYPE_L0L1,4,2               ## @MB_TYPE_L0L1
	.comm	_MV_TYPE_FIELD,8,3              ## @MV_TYPE_FIELD
	.comm	_MB_TYPE_16x8,4,2               ## @MB_TYPE_16x8
	.comm	_MB_TYPE_INTERLACED,4,2         ## @MB_TYPE_INTERLACED
	.comm	_FF_BUG_DIRECT_BLOCKSIZE,4,2    ## @FF_BUG_DIRECT_BLOCKSIZE
	.comm	_MV_TYPE_16X16,8,3              ## @MV_TYPE_16X16
	.comm	_MB_TYPE_16x16,4,2              ## @MB_TYPE_16x16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mpeg4_set_direct_mv         ; -- Begin function ff_mpeg4_set_direct_mv
	.p2align	2
_ff_mpeg4_set_direct_mv:                ; @ff_mpeg4_set_direct_mv
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	w8, w9, [x0]
	ldr	w10, [x0, #8]
	madd	w23, w10, w9, w8
	ldr	x8, [x0, #80]
	ldr	w22, [x8, w23, sxtw #2]
	mov	x0, x22
	bl	_IS_8X8
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MV_TYPE_8X8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV_TYPE_8X8@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_ff_mpeg4_set_one_direct_mv
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	bl	_ff_mpeg4_set_one_direct_mv
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #2
	bl	_ff_mpeg4_set_one_direct_mv
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #3
	bl	_ff_mpeg4_set_one_direct_mv
Lloh3:
	adrp	x8, _MB_TYPE_8x8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MB_TYPE_8x8@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
LBB0_2:
Lloh6:
	adrp	x9, _MB_TYPE_L0L1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MB_TYPE_L0L1@GOTPAGEOFF]
Lloh8:
	adrp	x10, _MB_TYPE_DIRECT2@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MB_TYPE_DIRECT2@GOTPAGEOFF]
	b	LBB0_23
LBB0_3:
	mov	x0, x22
	bl	_IS_INTERLACED
	cbz	x0, LBB0_6
; %bb.4:
	sxtw	x9, w23
Lloh10:
	adrp	x8, _MV_TYPE_FIELD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MV_TYPE_FIELD@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	ldr	x8, [x19, #88]
	ldr	x13, [x8]
	lsl	w16, w9, #2
	ldr	x8, [x19, #16]
	ldp	x15, x14, [x8]
	ldr	x12, [x19, #72]
	ldp	x8, x11, [x19, #32]
	ldp	x10, x8, [x8]
	ldr	w0, [x13, w16, sxtw #2]
	str	w0, [x15]
	str	wzr, [x14]
	ldr	w17, [x19, #24]
	cbz	x12, LBB0_9
; %bb.5:
	sub	w17, w17, w0
	ldr	w1, [x19, #28]
	sub	w0, w1, w0
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_ff_mpeg4_set_one_direct_mv
	ldr	x8, [x19, #32]
	ldp	x9, x8, [x8]
	ldp	x10, x11, [x9]
	ldr	w12, [x10]
	ldp	x9, x13, [x9, #16]
	str	w12, [x13]
	str	w12, [x9]
	str	w12, [x11]
	ldr	w10, [x10, #4]
	str	w10, [x13, #4]
	str	w10, [x9, #4]
	str	w10, [x11, #4]
	ldp	x9, x10, [x8]
	ldr	w11, [x9]
	ldp	x8, x12, [x8, #16]
	str	w11, [x12]
	str	w11, [x8]
	str	w11, [x10]
	ldr	w9, [x9, #4]
	str	w9, [x12, #4]
	str	w9, [x8, #4]
	str	w9, [x10, #4]
	ldr	x8, [x19, #64]
	ldr	w9, [x8]
Lloh13:
	adrp	x8, _FF_BUG_DIRECT_BLOCKSIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FF_BUG_DIRECT_BLOCKSIZE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x8]
Lloh16:
	adrp	x8, _MV_TYPE_16X16@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MV_TYPE_16X16@GOTPAGEOFF]
	tst	w10, w9
	b.ne	LBB0_8
; %bb.7:
	ldr	w9, [x19, #56]
Lloh18:
	adrp	x10, _MV_TYPE_8X8@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MV_TYPE_8X8@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x8, x10, eq
LBB0_8:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _MB_TYPE_16x16@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MB_TYPE_16x16@GOTPAGEOFF]
	str	x8, [x19, #48]
Lloh22:
	ldr	w8, [x9]
	b	LBB0_2
LBB0_9:
	add	w17, w0, w17
	ldr	w1, [x19, #28]
	add	w0, w0, w1
LBB0_10:
	ldr	x1, [x11]
	ldr	x1, [x1]
	ldr	x1, [x1, x9, lsl #3]
	ldr	w2, [x1]
	mul	w2, w2, w0
	sdiv	w2, w2, w17
	add	w3, w2, w21
	ldr	x2, [x10]
	str	w3, [x2]
	ldr	w4, [x1, #4]
	mul	w4, w4, w0
	sdiv	w4, w4, w17
	add	w4, w4, w20
	str	w4, [x2, #4]
	ldr	w4, [x1]
	cbz	w21, LBB0_12
; %bb.11:
	sub	w4, w3, w4
	b	LBB0_13
LBB0_12:
	sub	w3, w0, w17
	mul	w3, w4, w3
	sdiv	w4, w3, w17
LBB0_13:
	sxtw	x16, w16
	ldr	x3, [x8]
	str	w4, [x3]
	cbz	w20, LBB0_15
; %bb.14:
	ldr	w17, [x2, #4]
	ldr	w0, [x1, #4]
	sub	w17, w17, w0
	b	LBB0_16
LBB0_15:
	ldr	w1, [x1, #4]
	sub	w0, w0, w17
	mul	w0, w1, w0
	sdiv	w17, w0, w17
LBB0_16:
	str	w17, [x3, #4]
	lsl	x16, x16, #2
	orr	x16, x16, #0x8
	ldr	w13, [x13, x16]
	str	w13, [x15, #4]
	mov	w15, #1
	str	w15, [x14, #4]
	sub	w14, w13, #1
	sub	w13, w15, w13
	cmp	x12, #0
	csel	w13, w14, w13, eq
	ldp	w12, w14, [x19, #24]
	add	w12, w13, w12
	add	w13, w13, w14
	ldr	x11, [x11, #8]
	ldr	x11, [x11]
	ldr	x9, [x11, x9, lsl #3]
	ldr	w11, [x9]
	mul	w11, w11, w13
	sdiv	w11, w11, w12
	add	w11, w11, w21
	ldr	x10, [x10, #8]
	str	w11, [x10]
	ldr	w14, [x9, #4]
	mul	w14, w14, w13
	sdiv	w14, w14, w12
	add	w14, w14, w20
	str	w14, [x10, #4]
	ldr	w14, [x9]
	cbz	w21, LBB0_18
; %bb.17:
	sub	w11, w11, w14
	b	LBB0_19
LBB0_18:
	sub	w11, w13, w12
	mul	w11, w14, w11
	sdiv	w11, w11, w12
LBB0_19:
	ldr	x8, [x8, #8]
	str	w11, [x8]
	cbz	w20, LBB0_21
; %bb.20:
	ldr	w10, [x10, #4]
	ldr	w9, [x9, #4]
	sub	w9, w10, w9
	b	LBB0_22
LBB0_21:
	ldr	w9, [x9, #4]
	sub	w10, w13, w12
	mul	w9, w9, w10
	sdiv	w9, w9, w12
LBB0_22:
	str	w9, [x8, #4]
Lloh23:
	adrp	x8, _MB_TYPE_DIRECT2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MB_TYPE_DIRECT2@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _MB_TYPE_16x8@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MB_TYPE_16x8@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _MB_TYPE_INTERLACED@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MB_TYPE_INTERLACED@GOTPAGEOFF]
Lloh31:
	adrp	x10, _MB_TYPE_L0L1@GOTPAGE
Lloh32:
	ldr	x10, [x10, _MB_TYPE_L0L1@GOTPAGEOFF]
LBB0_23:
	ldr	w10, [x10]
	orr	w8, w8, w10
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_TYPE_8X8,8,3                ; @MV_TYPE_8X8
	.comm	_MB_TYPE_DIRECT2,4,2            ; @MB_TYPE_DIRECT2
	.comm	_MB_TYPE_8x8,4,2                ; @MB_TYPE_8x8
	.comm	_MB_TYPE_L0L1,4,2               ; @MB_TYPE_L0L1
	.comm	_MV_TYPE_FIELD,8,3              ; @MV_TYPE_FIELD
	.comm	_MB_TYPE_16x8,4,2               ; @MB_TYPE_16x8
	.comm	_MB_TYPE_INTERLACED,4,2         ; @MB_TYPE_INTERLACED
	.comm	_FF_BUG_DIRECT_BLOCKSIZE,4,2    ; @FF_BUG_DIRECT_BLOCKSIZE
	.comm	_MV_TYPE_16X16,8,3              ; @MV_TYPE_16X16
	.comm	_MB_TYPE_16x16,4,2              ; @MB_TYPE_16x16
.subsections_via_symbols
