	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @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	%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	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	movq	_CDG_PACKET_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_av_get_packet
	movl	%eax, %ecx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	_CDG_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	andl	(%rax), %edx
	movq	_CDG_COMMAND@GOTPCREL(%rip), %r12
	cmpl	(%r12), %edx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_av_packet_unref
	movl	(%r14), %edi
	movl	(%r15), %edx
	movq	%rbx, %rsi
	callq	_av_get_packet
	movl	%eax, %ecx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	movl	(%r13), %edx
	andl	(%rax), %edx
	cmpl	(%r12), %edx
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$0, (%rdx)
	jne	LBB0_7
## %bb.6:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
	movl	$1, (%rdx)
LBB0_7:
	movq	$0, 24(%rbx)
	movl	16(%rbx), %eax
	cltd
	idivl	(%r15)
	movl	%eax, 12(%rbx)
	movl	%eax, 8(%rbx)
	cmpl	$6, %ecx
	jl	LBB0_12
## %bb.8:
	movq	(%rbx), %rax
	movl	(%rax), %edx
	andl	$63, %edx
	cmpl	$9, %edx
	jne	LBB0_12
## %bb.9:
	movl	4(%rax), %edx
	andl	$63, %edx
	cmpl	$1, %edx
	jne	LBB0_12
## %bb.10:
	testb	$15, 20(%rax)
	jne	LBB0_12
## %bb.11:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_12:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDG_PACKET_SIZE,4,2            ## @CDG_PACKET_SIZE
	.comm	_CDG_MASK,4,2                   ## @CDG_MASK
	.comm	_CDG_COMMAND,4,2                ## @CDG_COMMAND
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_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
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _CDG_PACKET_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CDG_PACKET_SIZE@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_av_get_packet
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh2:
	adrp	x23, _CDG_MASK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CDG_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w8, w9, w8
Lloh4:
	adrp	x24, _CDG_COMMAND@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CDG_COMMAND@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_av_packet_unref
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	x1, x19
	bl	_av_get_packet
	cmp	w0, #0
	b.le	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	w8, [x8]
	ldr	w9, [x23]
	and	w8, w9, w8
	b	LBB0_2
LBB0_5:
	ldr	w8, [x22]
	cbnz	w8, LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	mov	w8, #1
	str	w8, [x22]
LBB0_7:
	str	xzr, [x19, #24]
	ldr	w8, [x19, #16]
	ldr	w9, [x21]
	sdiv	w8, w8, w9
	stp	w8, w8, [x19, #8]
	cmp	w0, #6
	b.lt	LBB0_12
; %bb.8:
	ldr	x8, [x19]
	ldr	w9, [x8]
	and	w9, w9, #0x3f
	cmp	w9, #9
	b.ne	LBB0_12
; %bb.9:
	ldr	w9, [x8, #4]
	and	w9, w9, #0x3f
	cmp	w9, #1
	b.ne	LBB0_12
; %bb.10:
	ldrb	w8, [x8, #20]
	tst	w8, #0xf
	b.ne	LBB0_12
; %bb.11:
Lloh9:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #20]
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CDG_PACKET_SIZE,4,2            ; @CDG_PACKET_SIZE
	.comm	_CDG_MASK,4,2                   ; @CDG_MASK
	.comm	_CDG_COMMAND,4,2                ; @CDG_COMMAND
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols
