	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_fix_long_mvs                ## -- Begin function ff_fix_long_mvs
	.p2align	4, 0x90
_ff_fix_long_mvs:                       ## @ff_fix_long_mvs
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %rax
	movq	_FMT_MPEG1@GOTPCREL(%rip), %rcx
	movl	$8, %edx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpq	$0, 32(%rdi)
	sete	%al
	leal	8(,%rax,8), %edx
LBB0_2:
	movl	%r8d, %ecx
	shll	%cl, %edx
	movq	40(%rdi), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %edx
	movl	%edx, %eax
	cmovgl	%ecx, %eax
	testl	%ecx, %ecx
	cmovel	%edx, %eax
	testq	%rsi, %rsi
	setne	%cl
	movl	%eax, %edx
	sarl	%cl, %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rdi), %r10d
	testl	%r10d, %r10d
	jle	LBB0_23
## %bb.3:
	movl	%eax, %ecx
	negl	%ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, %ebx
	negl	%ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	leal	-1(%rax), %ebx
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	decl	%edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%r9d, %edx
	notl	%edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	16(%rdi), %ebx
	addq	$4, -80(%rbp)                   ## 8-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rdi), %r10d
LBB0_22:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	cmpl	%r10d, %r13d
	jge	LBB0_23
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	testl	%ebx, %ebx
	jle	LBB0_22
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%rdi), %edx
	imull	%r13d, %edx
	movslq	%edx, %rdx
	leaq	(,%rdx,4), %r10
	addq	24(%rdi), %r10
	leaq	(%rsi,%rdx,4), %r14
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rdx,8), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=2
	andl	-68(%rbp), %r11d                ## 4-byte Folded Reload
	movl	%r11d, (%r10,%r12,4)
	movq	_CANDIDATE_MB_TYPE_INTRA@GOTPCREL(%rip), %rdx
	orl	(%rdx), %r11d
	movl	%r11d, (%r10,%r12,4)
	movl	$0, (%r15,%r12,8)
	movl	$0, -4(%r15,%rbx,4)
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	16(%rdi), %ebx
	incq	%r12
	cmpl	%ebx, %r12d
	jge	LBB0_21
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r10,%r12,4), %r11d
	testl	%r9d, %r11d
	je	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%r14,%r12,4)
	jne	LBB0_20
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movl	-4(%r15,%r12,8), %edx
	cmpl	%eax, %edx
	setge	%bl
	cmpl	%ecx, %edx
	setl	%r8b
	orb	%bl, %r8b
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	(%r15,%r12,8), %ebx
	cmpl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_20
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=2
	leaq	(%r12,%r12), %rbx
	cmpl	$0, 16(%rbp)
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=2
	testb	%r8b, %r8b
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpl	%eax, %edx
	movl	%ecx, %edx
	cmovgel	-64(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, -4(%r15,%rbx,4)
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	(%r15,%r12,8), %edx
	cmpl	-56(%rbp), %edx                 ## 4-byte Folded Reload
	jge	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%r15,%rbx,4)
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=2
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%r15,%rbx,4)
	jmp	LBB0_20
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMT_MPEG1,8,3                  ## @FMT_MPEG1
	.comm	_CANDIDATE_MB_TYPE_INTRA,4,2    ## @CANDIDATE_MB_TYPE_INTRA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_fix_long_mvs                ; -- Begin function ff_fix_long_mvs
	.p2align	2
_ff_fix_long_mvs:                       ; @ff_fix_long_mvs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _FMT_MPEG1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FMT_MPEG1@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	mov	w8, #8
	cmp	x9, x10
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x0, #32]
	cmp	x9, #0
	mov	w9, #16
	csel	w8, w9, w8, eq
LBB0_2:
	lsl	w8, w8, w4
	ldr	x9, [x0, #40]
	ldr	w9, [x9]
	cmp	w8, w9
	ccmp	w9, #0, #4, gt
	csel	w8, w9, w8, ne
	cmp	x1, #0
	cset	w10, ne
	ldr	w4, [x0, #8]
	cmp	w4, #1
	b.lt	LBB0_22
; %bb.3:
	mov	w9, #0
	asr	w10, w8, w10
	neg	w11, w8
	neg	w12, w10
	sub	w13, w8, #1
	sub	w14, w10, #1
	mvn	w15, w5
	ldr	w20, [x0, #16]
	add	x16, x3, #4
Lloh3:
	adrp	x17, _CANDIDATE_MB_TYPE_INTRA@GOTPAGE
Lloh4:
	ldr	x17, [x17, _CANDIDATE_MB_TYPE_INTRA@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w4, [x0, #8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w9, #1
	cmp	w9, w4
	b.ge	LBB0_22
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x3, #0
	ldr	w4, [x0, #12]
	ldr	x7, [x0, #24]
	mul	w19, w4, w9
	sbfiz	x20, x19, #2, #32
	add	x4, x7, x20
	add	x7, x1, x20
	add	x19, x16, w19, sxtw #3
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	and	w20, w20, w15
	lsl	x21, x3, #2
	str	w20, [x4, x21]
	ldr	w22, [x17]
	orr	w20, w22, w20
	str	w20, [x4, x21]
	stp	wzr, wzr, [x19, #-4]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w20, [x0, #16]
	add	x3, x3, #1
	add	x19, x19, #8
	cmp	w3, w20
	b.ge	LBB0_4
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w20, [x4, x3, lsl #2]
	tst	w20, w5
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	cbz	x1, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w21, [x7, x3, lsl #2]
	cmp	w21, w2
	b.ne	LBB0_9
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=2
	ldur	w21, [x19, #-4]
	cmp	w21, w8
	ccmp	w21, w11, #8, lt
	cset	w22, lt
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w23, [x19]
	cmp	w23, w10
	ccmp	w23, w12, #8, lt
	b.ge	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=2
	cbz	w6, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=2
	cbz	w22, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	w21, w8
	csel	w20, w13, w11, ge
	stur	w20, [x19, #-4]
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=2
	ldr	w20, [x19]
	cmp	w20, w10
	b.ge	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	w20, w12
	b.ge	LBB0_9
; %bb.20:                               ;   in Loop: Header=BB0_10 Depth=2
	str	w12, [x19]
	b	LBB0_9
LBB0_21:                                ;   in Loop: Header=BB0_10 Depth=2
	str	w14, [x19]
	b	LBB0_9
LBB0_22:
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FMT_MPEG1,8,3                  ; @FMT_MPEG1
	.comm	_CANDIDATE_MB_TYPE_INTRA,4,2    ; @CANDIDATE_MB_TYPE_INTRA
.subsections_via_symbols
