	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function decode_motion_vectors
LCPI0_0:
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_decode_motion_vectors:                 ## @decode_motion_vectors
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	8(%rdi), %r13
	movq	(%rdi), %xmm0                   ## xmm0 = mem[0],zero
	paddd	LCPI0_0(%rip), %xmm0
	psrad	$4, %xmm0
	movd	%xmm0, %eax
	pextrd	$1, %xmm0, %r12d
	imull	%eax, %r12d
	movl	$0, -44(%rbp)
	leaq	8(%r13), %rbx
	leaq	24(%r13), %rsi
	leal	(,%r12,8), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_av_fast_padded_malloc
	cmpq	$0, 8(%r13)
	je	LBB0_14
## %bb.1:
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %rcx
	movq	(%rcx), %rdx
	addq	8(%rcx), %rdx
	addq	16(%rcx), %rdx
	subq	%rdx, %rax
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%rax, %rdx
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movq	(%rbx), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.3:
	leaq	-56(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rcx
	movl	$1, %r8d
	callq	_read_code
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %eax
	movq	(%rbx), %rcx
	movslq	%r13d, %rdx
	movl	%eax, (%rcx,%rdx,8)
	movl	-44(%rbp), %eax
	leal	(%rdx,%rax), %r13d
	incl	%r13d
	cmpl	%r12d, %r13d
	jl	LBB0_4
## %bb.6:
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.7:
	xorl	%r13d, %r13d
	leaq	-56(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rcx
	movl	$1, %r8d
	callq	_read_code
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %eax
	movq	(%rbx), %rcx
	movslq	%r13d, %rdx
	movl	%eax, 4(%rcx,%rdx,8)
	movl	-44(%rbp), %eax
	leal	(%rdx,%rax), %r13d
	incl	%r13d
	cmpl	%r12d, %r13d
	jl	LBB0_8
LBB0_10:
	movq	%r15, %rdi
	callq	_get_bits_left
	testq	%rax, %rax
	jle	LBB0_11
## %bb.12:
	movq	%r15, %rdi
	callq	_get_bits_count
                                        ## kill: def $eax killed $eax def $rax
	sarl	$3, %eax
	leal	1(%rax), %esi
	movl	%esi, -44(%rbp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_bytestream2_skip
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_11:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_motion_vectors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_motion_vectors
_decode_motion_vectors:                 ; @decode_motion_vectors
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	ldr	x19, [x0, #8]
	ldp	w8, w9, [x0]
	add	w8, w8, #15
	asr	w8, w8, #4
	add	w9, w9, #15
	asr	w9, w9, #4
	mul	w24, w9, w8
	str	wzr, [sp, #12]
	add	x21, x19, #8
	add	x1, x19, #24
	lsl	w22, w24, #3
	mov	x0, x21
	mov	x2, x22
	bl	_av_fast_padded_malloc
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.1:
	ldr	w23, [x19]
	mov	x0, x19
	bl	_bytestream2_get_bytes_left
	ldr	x8, [x19, #16]
	ldp	x9, x10, [x8]
	ldr	x8, [x8, #16]
	add	x9, x9, x10
	add	x8, x9, x8
	sub	x2, x0, x8
	mov	x0, x20
	mov	x1, x23
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_14
; %bb.2:
	ldr	x0, [x21]
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.3:
	mov	w22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x20
	mov	w4, #1
	bl	_read_code
	tbnz	w0, #31, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #8]
	ldr	x9, [x21]
	sbfiz	x10, x22, #3, #32
	str	w8, [x9, x10]
	ldr	w8, [sp, #12]
	add	w8, w22, w8
	add	w22, w8, #1
	cmp	w22, w24
	b.lt	LBB0_4
; %bb.6:
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.7:
	mov	w22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x20
	mov	w4, #1
	bl	_read_code
	tbnz	w0, #31, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #8]
	ldr	x9, [x21]
	add	x9, x9, w22, sxtw #3
	str	w8, [x9, #4]
	ldr	w8, [sp, #12]
	add	w8, w22, w8
	add	w22, w8, #1
	cmp	w22, w24
	b.lt	LBB0_8
LBB0_10:
	mov	x0, x20
	bl	_get_bits_left
	cmp	x0, #0
	b.le	LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_get_bits_count
	asr	w8, w0, #3
	add	w1, w8, #1
	str	w1, [sp, #12]
	mov	x0, x19
	bl	_bytestream2_skip
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	b	_AVERROR
LBB0_13:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_14:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_motion_vectors
.subsections_via_symbols
