	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_get_length
_ogg_get_length:                        ## @ogg_get_length
	.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	%rdi, %r15
	movq	24(%rdi), %rdi
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%rdi)
	je	LBB0_32
## %bb.1:
	movq	(%r15), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_32
## %bb.2:
	movq	32(%r15), %r13
	callq	_avio_size
	testq	%rax, %rax
	js	LBB0_32
## %bb.3:
	movq	%rax, %r14
	movq	_MAX_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r15, %rdi
	callq	_ogg_save
	testl	%eax, %eax
	js	LBB0_31
## %bb.4:
	xorl	%ebx, %ebx
	subq	%r12, %r14
	cmovleq	%rbx, %r14
	movq	24(%r15), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_avio_seek
	movl	$-1, (%r13)
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ogg_read_page
	testl	%eax, %eax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %r12
	je	LBB0_23
LBB0_5:
	movq	%rbx, %r14
	movq	%r15, %rdi
	callq	_ogg_restore
	movq	%r15, %rdi
	callq	_ogg_save
	testl	%eax, %eax
	js	LBB0_31
## %bb.6:
	movq	16(%r15), %rax
	movq	24(%r15), %rdi
	movq	(%rax), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_seek
	movq	%r15, %rdi
	callq	_ogg_reset
	movq	%r14, %rbx
	testl	%ebx, %ebx
	jle	LBB0_22
## %bb.7:
	leaq	-44(%rbp), %r14
	jmp	LBB0_11
LBB0_31:
	movl	%eax, %ebx
	jmp	LBB0_32
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	movq	%r8, %rbx
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	testl	%ebx, %ebx
	jle	LBB0_22
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ogg_packet
	testl	%eax, %eax
	jne	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	js	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ogg_calc_pts
	movq	8(%r15), %rdx
	movslq	-44(%rbp), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movq	(%rdx), %rsi
	movq	(%r12), %rdi
	cmpq	%rdi, %rsi
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %r8
	movq	8(%rdx), %rbx
	cmpq	%rdi, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdi, %rbx
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%r13), %rdi
	shlq	$4, %rcx
	cmpl	$0, 4(%rdi,%rcx)
	movq	%r8, %rbx
	jne	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	%rdi, %rcx
	addq	$4, %rcx
	subq	%rax, %rsi
	movq	%rsi, (%rdx)
	jmp	LBB0_21
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdi, %rbx
	je	LBB0_9
## %bb.19:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%r13), %rax
	shlq	$4, %rcx
	cmpl	$0, 4(%rax,%rcx)
	movq	%r8, %rbx
	jne	LBB0_10
## %bb.20:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	%rax, %rcx
	addq	$4, %rcx
LBB0_21:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, (%rcx)
	decl	%ebx
	jmp	LBB0_10
LBB0_22:
	movq	%r15, %rdi
	callq	_ogg_restore
	xorl	%ebx, %ebx
LBB0_32:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	jmp	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_26 Depth=1
	subq	%rsi, %rax
	movq	%rax, (%rdx)
	movq	8(%r13), %rax
	shlq	$4, %rcx
	xorl	%edx, %edx
	cmpl	$-1, 4(%rax,%rcx)
	sete	%dl
	subl	%edx, %ebx
	movl	$1, 4(%rax,%rcx)
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ogg_read_page
	testl	%eax, %eax
	jne	LBB0_5
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movslq	-44(%rbp), %rsi
	movq	%rsi, %rcx
	shlq	$4, %rcx
	movl	(%rax,%rcx), %edx
	leal	1(%rdx), %edi
	cmpl	$2, %edi
	jb	LBB0_25
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	cmpq	$0, 8(%rax,%rcx)
	je	LBB0_25
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_ogg_gptopts
	movq	8(%r15), %rdx
	movslq	-44(%rbp), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movq	%rax, (%rdx)
	movq	8(%rdx), %rsi
	cmpq	(%r12), %rsi
	jne	LBB0_24
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	8(%r13), %rax
	shlq	$4, %rcx
	cmpl	$0, 4(%rax,%rcx)
	jne	LBB0_25
## %bb.30:                              ##   in Loop: Header=BB0_26 Depth=1
	addq	%rcx, %rax
	addq	$4, %rax
	movl	$-1, (%rax)
	incl	%ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_MAX_PAGE_SIZE,8,3              ## @MAX_PAGE_SIZE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_ogg_get_length
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_get_length
_ogg_get_length:                        ; @ogg_get_length
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	ldr	x0, [x0, #24]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.1:
	ldr	x8, [x19]
Lloh3:
	adrp	x21, _AV_NOPTS_VALUE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.2:
	ldr	x22, [x19, #32]
	bl	_avio_size
	tbnz	x0, #63, LBB0_19
; %bb.3:
	mov	x20, x0
Lloh5:
	adrp	x8, _MAX_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x23, [x8]
	mov	x0, x19
	bl	_ogg_save
	tbnz	w0, #31, LBB0_20
; %bb.4:
	subs	x8, x20, x23
	csel	x1, x8, xzr, gt
	ldr	x0, [x19, #24]
Lloh8:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_avio_seek
	mov	w24, #-1
	str	w24, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ogg_read_page
	mov	w20, #0
	cbz	w0, LBB0_21
LBB0_5:
	mov	x0, x19
	bl	_ogg_restore
	mov	x0, x19
	bl	_ogg_save
	tbnz	w0, #31, LBB0_20
; %bb.6:
	ldp	x8, x0, [x19, #16]
	ldr	x1, [x8]
	ldr	w2, [x23]
	bl	_avio_seek
	mov	x0, x19
	bl	_ogg_reset
	cmp	w20, #1
	b.lt	LBB0_18
; %bb.7:
	mov	w23, #1
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x11, [x22, #8]
	add	x9, x11, x9, lsl #4
	ldr	w11, [x9, #4]!
	cbz	w11, LBB0_16
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	cmp	w20, #0
	b.le	LBB0_18
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_ogg_packet
	cbnz	w0, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [sp, #12]
	tbnz	w1, #31, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x2, #0
	bl	_ogg_calc_pts
	ldr	x8, [x19, #8]
	ldrsw	x9, [sp, #12]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x10, [x8]
	ldr	x11, [x21]
	cmp	x10, x11
	b.eq	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x12, [x8, #8]
	cmp	x0, x11
	ccmp	x12, x11, #0, ne
	b.eq	LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	x12, x11
	b.eq	LBB0_9
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x22, #8]
	add	x9, x8, x9, lsl #4
	ldr	w8, [x9, #4]!
	cbnz	w8, LBB0_9
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	sub	x10, x10, x0
	str	x10, [x8]
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	str	w23, [x9]
	sub	w20, w20, #1
	b	LBB0_9
LBB0_18:
	mov	x0, x19
	bl	_ogg_restore
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_21:
	mov	w25, #1
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	sub	x10, x0, x10
	str	x10, [x9]
	ldr	x9, [x22, #8]
	add	x8, x9, x8, lsl #4
	ldr	w9, [x8, #4]
	cmn	w9, #1
	cset	w9, eq
	sub	w20, w20, w9
	str	w25, [x8, #4]
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_ogg_read_page
	cbnz	w0, LBB0_5
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldrsw	x1, [sp, #12]
	lsl	x9, x1, #4
	ldr	w2, [x8, x9]
	add	w9, w2, #1
	cmp	w9, #2
	b.lo	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	add	x8, x8, x1, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_23
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x3, #0
	bl	_ogg_gptopts
	ldr	x9, [x19, #8]
	ldrsw	x8, [sp, #12]
	ldr	x9, [x9, x8, lsl #3]
	str	x0, [x9]
	ldr	x10, [x9, #8]
	ldr	x11, [x21]
	cmp	x10, x11
	b.ne	LBB0_22
; %bb.27:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x9, [x22, #8]
	add	x8, x9, x8, lsl #4
	ldr	w9, [x8, #4]!
	cbnz	w9, LBB0_23
; %bb.28:                               ;   in Loop: Header=BB0_24 Depth=1
	str	w24, [x8]
	add	w20, w20, #1
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_MAX_PAGE_SIZE,8,3              ; @MAX_PAGE_SIZE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_ogg_get_length
.subsections_via_symbols
