	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmv_fetch_video_packet
_xmv_fetch_video_packet:                ## @xmv_fetch_video_packet
	.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	(%rdi), %r12
	movq	8(%rdi), %r14
	movq	(%r14), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	cmpq	(%r14), %rax
	jne	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_avio_rl32
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %r13d
	andl	$524284, %r13d                  ## imm = 0x7FFFC
	leal	8(%r13), %ebx
	cmpl	8(%r14), %ebx
	jle	LBB0_2
LBB0_9:
	movq	_EIO@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_2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	$4, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_av_get_packet
	cmpl	%r13d, %eax
	jne	LBB0_8
## %bb.3:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	sarl	$17, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rbx
	movl	%r13d, %eax
	leaq	(%rbx,%rax,4), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_AV_RL32
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_AV_WB32
	addq	$16, %rbx
	cmpq	%r12, %rbx
	jb	LBB0_4
## %bb.5:
	movq	(%r15), %rcx
	movl	32(%r14), %eax
	movl	%eax, 32(%r15)
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	addq	16(%r14), %rax
	movq	%rax, 24(%r14)
	movq	$0, 24(%r15)
	movq	%rax, 16(%r15)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 12(%r15)
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	testb	$-128, (%rcx)
	movl	$0, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	movl	%ecx, 8(%r15)
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, 8(%r14)
	movl	%ecx, %ecx
	addq	%rcx, (%r14)
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_xmv_fetch_video_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmv_fetch_video_packet
_xmv_fetch_video_packet:                ; @xmv_fetch_video_packet
	.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	x19, x1
	ldp	x20, x23, [x0]
	ldr	x1, [x23]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_avio_seek
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_avio_rl32
	ubfiz	w8, w0, #2, #17
	add	w24, w8, #8
	ldr	w9, [x23, #8]
	cmp	w24, w9
	b.le	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_3:
	mov	x21, x0
	add	w22, w8, #4
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_av_get_packet
	cmp	w0, w22
	b.ne	LBB0_7
; %bb.4:
	asr	w21, w21, #17
	ldr	x20, [x19]
	add	x22, x20, w22, uxtw #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_AV_RL32
	mov	x1, x0
	mov	x0, x20
	bl	_AV_WB32
	add	x20, x20, #16
	cmp	x20, x22
	b.lo	LBB0_5
; %bb.6:
	mov	w0, #0
	ldr	w8, [x23, #32]
	str	w8, [x19, #32]
	ldr	x8, [x23, #16]
	add	x8, x8, w21, sxtw
Lloh6:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x19, #12]
	ldr	x9, [x19]
	stp	x8, xzr, [x19, #16]
	stp	x8, x8, [x23, #16]
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w8, #0x80
	csel	w8, w9, wzr, eq
	str	w8, [x19, #8]
	ldr	w8, [x23, #8]
	sub	w8, w8, w24
	str	w8, [x23, #8]
	ldr	x8, [x23]
	add	x8, x8, w24, uxtw
	str	x8, [x23]
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_xmv_fetch_video_packet
.subsections_via_symbols
