	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_calc_pts
_ogg_calc_pts:                          ## @ogg_calc_pts
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r8
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movslq	%esi, %rbx
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %r9
	movq	(%r9), %rcx
	movq	%rcx, %rdx
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	%rcx, (%r8)
	movq	(%r9), %rdx
LBB0_2:
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rax,%rbx,8), %r14
	movq	(%rax,%rbx,8), %r15
	cmpq	%rdx, %r15
	jne	LBB0_4
## %bb.3:
	movq	%rcx, %r15
	jmp	LBB0_5
LBB0_4:
	movq	%rdx, (%r14)
	movq	(%r9), %rdx
LBB0_5:
	leaq	(%rax,%rbx,8), %rcx
	addq	$8, %rcx
	movq	8(%rax,%rbx,8), %r10
	cmpq	%rdx, %r10
	je	LBB0_9
## %bb.6:
	testq	%r8, %r8
	je	LBB0_8
## %bb.7:
	movq	%r10, (%r8)
	movq	(%r9), %rdx
LBB0_8:
	movq	%rdx, (%rcx)
LBB0_9:
	cmpq	$0, 32(%rax,%rbx,8)
	je	LBB0_16
## %bb.10:
	movq	16(%rax,%rbx,8), %rdx
	cmpq	$-1, %rdx
	je	LBB0_16
## %bb.11:
	leaq	(%rax,%rbx,8), %r12
	addq	$16, %r12
	movq	24(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.13:
	movq	%r8, %rcx
	callq	_ogg_gptopts
	movq	%rax, %r15
	jmp	LBB0_15
LBB0_14:
	callq	_ogg_gptopts
	movq	%rax, (%r14)
LBB0_15:
	movq	$-1, (%r12)
LBB0_16:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_ogg_calc_pts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_calc_pts
_ogg_calc_pts:                          ; @ogg_calc_pts
	.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	x8, x2
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x9, [x0]
	ldr	x9, [x9]
	sxtw	x10, w1
Lloh0:
	adrp	x11, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x19, [x11]
	mov	x12, x19
	cbz	x2, LBB0_2
; %bb.1:
	str	x19, [x8]
	ldr	x12, [x11]
LBB0_2:
	mov	w13, #40
	madd	x20, x10, x13, x9
	ldr	x13, [x20]
	cmp	x13, x12
	b.eq	LBB0_4
; %bb.3:
	str	x12, [x20]
	ldr	x12, [x11]
	mov	x19, x13
LBB0_4:
	mov	w13, #40
	madd	x3, x10, x13, x9
	ldr	x13, [x3, #8]!
	cmp	x13, x12
	b.eq	LBB0_8
; %bb.5:
	cbz	x8, LBB0_7
; %bb.6:
	str	x13, [x8]
	ldr	x12, [x11]
LBB0_7:
	str	x12, [x3]
LBB0_8:
	mov	w11, #40
	madd	x11, x10, x11, x9
	ldr	x11, [x11, #32]
	cbz	x11, LBB0_15
; %bb.9:
	mov	w11, #40
	madd	x21, x10, x11, x9
	ldr	x2, [x21, #16]!
	cmn	x2, #1
	b.eq	LBB0_15
; %bb.10:
	mov	w11, #40
	madd	x9, x10, x11, x9
	ldr	x9, [x9, #24]
	cbz	x9, LBB0_13
; %bb.11:
	ldr	x9, [x9]
	cbz	x9, LBB0_13
; %bb.12:
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x3, x8
	bl	_ogg_gptopts
	mov	x19, x0
	b	LBB0_14
LBB0_13:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ogg_gptopts
	str	x0, [x20]
LBB0_14:
	mov	x8, #-1
	str	x8, [x21]
LBB0_15:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_ogg_calc_pts
.subsections_via_symbols
