	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_read_header
_ogg_read_header:                       ## @ogg_read_header
	.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	%rdi, %rbx
	movq	16(%rdi), %r12
	movl	$-1, (%r12)
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ogg_packet
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 16(%r12)
	je	LBB0_1
## %bb.4:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r13d, %r13d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpl	$0, 4(%r12)
	jle	LBB0_14
## %bb.5:
	movl	$40, %r15d
	xorl	%ebx, %ebx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	4(%r12), %rax
	addq	$48, %r15
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r14
	cmpq	$0, -40(%r14,%r15)
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-8(%r14,%r15), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-32(%r14,%r15), %r9
	movq	(%rax), %r8
	cmpq	%r8, %r9
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_11
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	8(%r12), %rdi
	movq	$0, -8(%rdi,%r15)
	addq	%r15, %rdi
	callq	_av_freep
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-24(%r14,%r15), %rdx
	movq	_OGG_NOGRANULE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_ogg_gptopts
	movq	8(%r12), %rcx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%rcx,%rbx,8), %rcx
	movl	%eax, (%rcx)
	movl	%eax, -16(%r14,%r15)
	jmp	LBB0_13
LBB0_2:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_ogg_read_close
	jmp	LBB0_16
LBB0_14:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_ogg_get_length
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ogg_read_close
	movl	%ebx, %r13d
	jmp	LBB0_16
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ogg_read_close
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"found headers\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Header parsing failed for stream %d\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"Headers mismatch for stream %d: expected %d received %d.\n"

	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_OGG_NOGRANULE_VALUE,8,3        ## @OGG_NOGRANULE_VALUE
	.no_dead_strip	_ogg_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_read_header
_ogg_read_header:                       ; @ogg_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x23, [x0, #16]
	mov	w8, #-1
	str	w8, [x23]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_ogg_packet
	tbnz	w0, #31, LBB0_15
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_1
; %bb.3:
Lloh0:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w8, [x23, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x20, #0
	mov	w24, #24
Lloh5:
	adrp	x25, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x25, [x25, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh9:
	adrp	x26, _OGG_NOGRANULE_VALUE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _OGG_NOGRANULE_VALUE@GOTPAGEOFF]
Lloh11:
	adrp	x28, _AV_EF_EXPLODE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _AV_EF_EXPLODE@GOTPAGEOFF]
Lloh13:
	adrp	x22, l_.str.2@PAGE
Lloh14:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x23, #4]
	add	x24, x24, #48
	cmp	x20, x8
	b.ge	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x23, #8]
	add	x8, x27, x24
	ldur	x9, [x8, #-24]
	tbnz	x9, #63, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x27, x24
	ldur	x8, [x8, #-16]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh15:
	adrp	x10, _AV_LOG_WARNING@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x10]
	stp	x9, x8, [sp, #8]
	str	x20, [sp]
	mov	x0, x19
	mov	x2, x22
	bl	_av_log
	ldr	w8, [x19]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_11
	b	LBB0_17
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x25]
	str	x20, [sp]
	mov	x0, x19
	mov	x2, x21
	bl	_av_log
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	str	xzr, [x8, #8]
	add	x0, x8, #16
	bl	_av_freep
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x27, x24
	ldur	x2, [x8, #-8]
	ldr	x8, [x26]
	cmp	x2, x8
	b.eq	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x3, #0
	bl	_ogg_gptopts
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x20, lsl #3]
	str	w0, [x8]
	str	w0, [x27, x24]
	b	LBB0_5
LBB0_13:
	mov	x0, x19
	bl	_ogg_get_length
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w20, #0
	b	LBB0_16
LBB0_15:
	mov	x20, x0
	mov	x0, x19
	bl	_ogg_read_close
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	mov	x0, x19
	bl	_ogg_read_close
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_16
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"found headers\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Header parsing failed for stream %d\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"Headers mismatch for stream %d: expected %d received %d.\n"

	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_OGG_NOGRANULE_VALUE,8,3        ; @OGG_NOGRANULE_VALUE
	.no_dead_strip	_ogg_read_header
.subsections_via_symbols
