	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg1_encode_motion
_mpeg1_encode_motion:                   ## @mpeg1_encode_motion
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	leal	-1(%r12), %ecx
	movl	$1, %r15d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	leal	4(%r12), %eax
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_sign_extend
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	decl	%r13d
	decl	%r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r13d, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_ff_mpeg12_mbMotionVectorTable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%r14, %rdi
	jmp	LBB0_7
LBB0_4:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r13d, %ebx
	notl	%ebx
	movl	%r15d, %r13d
	decl	%r13d
	movl	%ebx, %r15d
LBB0_5:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	xorl	%edi, %edi
	cmpl	$16, %ebx
	setb	%dil
	callq	_av_assert2
	movq	_ff_mpeg12_mbMotionVectorTable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	8(%rax,%rcx,8), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_put_bits
	cmpl	$2, %r12d
	jl	LBB0_8
## %bb.6:
	andl	%r15d, %r13d
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_mpeg12_mbMotionVectorTable,8,3 ## @ff_mpeg12_mbMotionVectorTable
	.no_dead_strip	_mpeg1_encode_motion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg1_encode_motion
_mpeg1_encode_motion:                   ; @mpeg1_encode_motion
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	mov	x21, x2
	sub	w20, w2, #1
	mov	w8, #1
	lsl	w22, w8, w20
	add	w8, w2, #4
	mov	x0, x1
	mov	x1, x8
	bl	_sign_extend
	sub	w8, w22, #1
	mov	w9, #1
	sub	w10, w0, #1
	tst	w0, #0x80000000
	csinv	w23, w8, w0, eq
	csel	w24, w8, w10, ne
	csel	w22, w9, wzr, ne
	csinv	w8, w10, w0, eq
	asr	w8, w8, w20
	add	w25, w8, #1
	cmp	w8, #16
	cset	w0, lo
	bl	_av_assert2
Lloh0:
	adrp	x8, _ff_mpeg12_mbMotionVectorTable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_mpeg12_mbMotionVectorTable@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w25, sxtw #3]
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	x2, x22
	bl	_put_bits
	cmp	w21, #2
	b.lt	LBB0_5
; %bb.2:
	and	w2, w24, w23
	mov	x0, x19
	mov	x1, x20
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _ff_mpeg12_mbMotionVectorTable@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ff_mpeg12_mbMotionVectorTable@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldp	w2, w1, [x8]
	mov	x0, x19
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_put_bits
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_mpeg12_mbMotionVectorTable,8,3 ; @ff_mpeg12_mbMotionVectorTable
	.no_dead_strip	_mpeg1_encode_motion
.subsections_via_symbols
