	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_read_packet
_ogg_read_packet:                       ## @ogg_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ogg_reset
	movq	$0, 16(%rbx)
LBB0_2:
	leaq	-52(%rbp), %r12
	leaq	-44(%rbp), %r13
	leaq	-112(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_ogg_packet
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %r15d
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	cmpl	$0, (%rax,%r15,4)
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r15,2), %rcx
	shlq	$4, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addq	%rcx, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %esi
	leaq	-104(%rbp), %rdx
	callq	_ogg_calc_pts
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%rbx, %rdi
	callq	_ogg_validate_keyframe
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rcx
	cmpq	$0, 40(%rax,%rsi)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_3
LBB0_8:
	movq	%rdx, %r14
	movq	%rcx, %r12
	leaq	(%rcx,%rsi), %rax
	addq	$40, %rax
	movq	$0, (%rax)
	movl	-44(%rbp), %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_17
## %bb.9:
	movl	-48(%rbp), %eax
	movl	%eax, (%rbx)
	movq	40(%rbx), %rdi
	leaq	(%r15,%r15,2), %r15
	shlq	$4, %r15
	movslq	-52(%rbp), %rsi
	addq	32(%r12,%r15), %rsi
	movl	-44(%rbp), %edx
	callq	_memcpy
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movq	-104(%rbp), %rax
	movq	%rax, 24(%rbx)
	movl	(%r14), %eax
	movl	%eax, 4(%rbx)
	movl	24(%r12,%r15), %eax
	movl	%eax, 16(%rbx)
	movq	-112(%rbp), %rax
	movq	%rax, 8(%rbx)
	cmpq	$0, 16(%r12,%r15)
	je	LBB0_12
## %bb.10:
	movq	_AV_PKT_DATA_SKIP_SAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	leaq	(%r12,%r15), %r14
	addq	$16, %r14
	addq	$16, %rax
	movq	(%r14), %rsi
	movq	%rax, %rdi
	callq	_AV_WL32
	movq	$0, (%r14)
LBB0_12:
	cmpq	$0, 8(%r12,%r15)
	je	LBB0_15
## %bb.13:
	movq	_AV_PKT_DATA_METADATA_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12,%r15), %edx
	movq	%rbx, %rdi
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	leaq	(%r12,%r15), %rbx
	addq	$8, %rbx
	movq	(%rbx), %rsi
	movl	-4(%rbx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_av_freep
	movl	$0, -4(%rbx)
LBB0_15:
	movl	-44(%rbp), %eax
	jmp	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	callq	_av_packet_unref
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_17:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AV_PKT_DATA_SKIP_SAMPLES,4,2   ## @AV_PKT_DATA_SKIP_SAMPLES
	.comm	_AV_PKT_DATA_METADATA_UPDATE,4,2 ## @AV_PKT_DATA_METADATA_UPDATE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ogg_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_read_packet
_ogg_read_packet:                       ; @ogg_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x21, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ogg_reset
	str	xzr, [x21, #16]
LBB0_2:
	mov	w24, #48
Lloh0:
	adrp	x25, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	add	x4, sp, #8
	mov	x0, x21
	bl	_ogg_packet
	tbnz	w0, #31, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w20, [sp, #28]
	tbnz	w20, #31, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x20, lsl #2]
	cbz	w8, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	ldr	x23, [x8]
	madd	x26, x20, x24, x23
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	bl	_ogg_calc_pts
	mov	x22, x0
	ldp	w2, w1, [sp, #24]
	ldr	w3, [sp, #20]
	mov	x0, x21
	bl	_ogg_validate_keyframe
	mov	x8, x26
	ldr	x9, [x8, #40]!
	cbz	x9, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x26]
	ldr	w10, [x25]
	tst	w10, w9
	b.eq	LBB0_3
LBB0_8:
	str	xzr, [x8]
	ldr	w1, [sp, #20]
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_17
; %bb.9:
	ldp	w9, w8, [sp, #24]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	str	w8, [x19]
	ldr	x0, [x19, #40]
	mov	w8, #48
	madd	x21, x20, x8, x23
	ldr	x8, [x21, #32]
	add	x1, x8, x9
	ldr	w2, [sp, #20]
	bl	_memcpy
	ldr	x8, [sp]
	stp	x8, x22, [x19, #24]
	ldr	w8, [x26]
	str	w8, [x19, #4]
	ldr	x8, [x21, #16]!
	ldr	w9, [x21, #8]
	str	w9, [x19, #16]
	ldr	x9, [sp, #8]
	str	x9, [x19, #8]
	cbz	x8, LBB0_12
; %bb.10:
Lloh2:
	adrp	x8, _AV_PKT_DATA_SKIP_SAMPLES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_PKT_DATA_SKIP_SAMPLES@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #10
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_16
; %bb.11:
	add	x0, x0, #16
	ldr	x1, [x21]
	bl	_AV_WL32
	str	xzr, [x21]
LBB0_12:
	mov	w8, #48
	madd	x21, x20, x8, x23
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_15
; %bb.13:
Lloh5:
	adrp	x8, _AV_PKT_DATA_METADATA_UPDATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_PKT_DATA_METADATA_UPDATE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w8, #48
	madd	x20, x20, x8, x23
	ldr	w2, [x20, #4]!
	mov	x0, x19
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_16
; %bb.14:
	ldr	x1, [x21]
	ldr	w2, [x20]
	bl	_memcpy
	mov	x0, x21
	bl	_av_freep
	str	wzr, [x20]
LBB0_15:
	ldr	w0, [sp, #20]
	b	LBB0_17
LBB0_16:
	mov	x0, x19
	bl	_av_packet_unref
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AV_PKT_DATA_SKIP_SAMPLES,4,2   ; @AV_PKT_DATA_SKIP_SAMPLES
	.comm	_AV_PKT_DATA_METADATA_UPDATE,4,2 ; @AV_PKT_DATA_METADATA_UPDATE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ogg_read_packet
.subsections_via_symbols
