	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _os_lacing_expand
__os_lacing_expand:                     ## @_os_lacing_expand
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rax, %rcx
	subq	%rsi, %rcx
	xorl	%r14d, %r14d
	cmpq	8(%rdi), %rcx
	jg	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	_LONG_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %rdx
	subq	%rsi, %rdx
	cmpq	%rdx, %rax
	jg	LBB0_2
## %bb.3:
	leaq	(%rax,%rsi), %rdx
	addq	$-32, %rcx
	cmpq	%rcx, %rdx
	leaq	32(%rax,%rsi), %r15
	cmovgeq	%rdx, %r15
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	__ogg_realloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, 24(%rbx)
	movq	16(%rbx), %rdi
	movq	%r15, %rsi
	callq	__ogg_realloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	movq	%rax, 16(%rbx)
	movq	%r15, (%rbx)
	jmp	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	callq	_ogg_stream_clear
	movl	$-1, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LONG_MAX,8,3                   ## @LONG_MAX
	.no_dead_strip	__os_lacing_expand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _os_lacing_expand
__os_lacing_expand:                     ; @_os_lacing_expand
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x8, x9, [x0]
	sub	x10, x8, x1
	cmp	x10, x9
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x9, _LONG_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sub	x10, x9, x1
	cmp	x8, x10
	b.gt	LBB0_6
; %bb.3:
	sub	x9, x9, #32
	add	x8, x8, x1
	cmp	x8, x9
	add	x9, x8, #32
	csel	x20, x9, x8, lt
	ldr	x0, [x19, #24]
	mov	x1, x20
	bl	__ogg_realloc
	cbz	x0, LBB0_6
; %bb.4:
	str	x0, [x19, #24]
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	__ogg_realloc
	cbz	x0, LBB0_6
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #16]
	str	x20, [x19]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_ogg_stream_clear
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LONG_MAX,8,3                   ; @LONG_MAX
	.no_dead_strip	__os_lacing_expand
.subsections_via_symbols
