	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prefix_ref_iterator_advance
_prefix_ref_iterator_advance:           ## @prefix_ref_iterator_advance
	.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, %r14
	movq	8(%rdi), %rdi
	callq	_ref_iterator_advance
	movl	%eax, %ebx
	movq	_ITER_OK@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	je	LBB0_1
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rdi
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_ref_iterator_advance
	cmpl	(%r15), %eax
	jne	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movl	32(%r14), %esi
	callq	_compare_prefix
	testl	%eax, %eax
	js	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rdi
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.9:
	callq	_ref_iterator_abort
LBB0_4:
	movl	%eax, %ebx
LBB0_5:
	movq	$0, 8(%r14)
	movq	%r14, %rdi
	callq	_ref_iterator_abort
	movq	_ITER_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
## %bb.6:
	movq	_ITER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	cmpq	$0, (%r14)
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	je	LBB0_14
## %bb.11:
	callq	_strlen
	movq	(%r14), %rdi
	cmpq	%rdi, %rax
	jg	LBB0_13
## %bb.12:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
	movq	(%r14), %rdi
LBB0_13:
	movq	8(%r14), %rax
	addq	(%rax), %rdi
LBB0_14:
	movq	%rdi, 16(%r14)
	movl	12(%rax), %ecx
	movl	%ecx, 28(%r14)
	movl	8(%rax), %eax
	movl	%eax, 24(%r14)
	movl	(%r15), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ITER_OK,4,2                    ## @ITER_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempt to trim too many characters"

	.comm	_ITER_DONE,4,2                  ## @ITER_DONE
	.comm	_ITER_ERROR,4,2                 ## @ITER_ERROR
	.no_dead_strip	_prefix_ref_iterator_advance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prefix_ref_iterator_advance
_prefix_ref_iterator_advance:           ; @prefix_ref_iterator_advance
	.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	x19, x0
	ldr	x0, [x0, #8]
	bl	_ref_iterator_advance
	mov	x20, x0
Lloh0:
	adrp	x21, _ITER_OK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ITER_OK@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_3
	b	LBB0_8
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_ref_iterator_advance
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	w1, [x19, #32]
	bl	_compare_prefix
	tbnz	w0, #31, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.6:
	bl	_ref_iterator_abort
LBB0_7:
	mov	x20, x0
LBB0_8:
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_ref_iterator_abort
Lloh2:
	adrp	x8, _ITER_DONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ITER_DONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _ITER_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ITER_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w0, w8
	csel	w0, w20, w9, eq
LBB0_9:
	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
LBB0_10:
	ldp	x9, x8, [x19]
	ldr	x0, [x8]
	cbz	x9, LBB0_14
; %bb.11:
	bl	_strlen
	ldr	x9, [x19]
	cmp	x0, x9
	b.gt	LBB0_13
; %bb.12:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
	ldr	x9, [x19]
LBB0_13:
	ldr	x8, [x19, #8]
	ldr	x10, [x8]
	add	x0, x9, x10
LBB0_14:
	str	x0, [x19, #16]
	ldr	d0, [x8, #8]
	str	d0, [x19, #24]
	ldr	w0, [x21]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ITER_OK,4,2                    ; @ITER_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempt to trim too many characters"

	.comm	_ITER_DONE,4,2                  ; @ITER_DONE
	.comm	_ITER_ERROR,4,2                 ; @ITER_ERROR
	.no_dead_strip	_prefix_ref_iterator_advance
.subsections_via_symbols
