	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmv_read_packet
_xmv_read_packet:                       ## @xmv_read_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	16(%rbx), %rax
	cmpq	24(%rbx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_xmv_fetch_new_packet
	testl	%eax, %eax
	jne	LBB0_10
LBB0_2:
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.4:
	decq	%rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_xmv_fetch_audio_packet
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	movq	$0, (%rbx)
	movq	24(%rbx), %rcx
	jmp	LBB0_9
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_xmv_fetch_video_packet
	testl	%eax, %eax
	jne	LBB0_6
LBB0_7:
	movq	(%rbx), %rcx
	incq	%rcx
	movq	%rcx, (%rbx)
	xorl	%eax, %eax
	cmpq	8(%rbx), %rcx
	jl	LBB0_10
## %bb.8:
	movq	$0, (%rbx)
	movq	16(%rbx), %rcx
	incq	%rcx
	xorl	%eax, %eax
LBB0_9:
	movq	%rcx, 16(%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xmv_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmv_read_packet
_xmv_read_packet:                       ; @xmv_read_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldp	x8, x9, [x21, #16]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_xmv_fetch_new_packet
	cbnz	w0, LBB0_10
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.3:
	sub	x2, x8, #1
	mov	x0, x20
	mov	x1, x19
	bl	_xmv_fetch_audio_packet
	cbz	w0, LBB0_6
LBB0_4:
	str	xzr, [x21]
	ldr	x8, [x21, #24]
	b	LBB0_9
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_xmv_fetch_video_packet
	cbnz	w0, LBB0_4
LBB0_6:
	ldp	x8, x9, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	str	xzr, [x21]
	ldr	x8, [x21, #16]
	add	x8, x8, #1
LBB0_9:
	str	x8, [x21, #16]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xmv_read_packet
.subsections_via_symbols
