	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function text_position_next
_text_position_next:                    ## @text_position_next
	.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
	movl	(%rdi), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	addq	%rax, %rdi
	jmp	LBB0_4
LBB0_3:
	movq	16(%rbx), %rdi
LBB0_4:
	movq	%rbx, %rsi
	callq	_text_position_next_internal
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %r15
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	cmpq	$0, 40(%rbx)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%edi, %edi
	cmpq	%r15, 24(%rbx)
	setbe	%dil
	callq	_Assert
	movq	24(%rbx), %rdi
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r15, %rdi
	jae	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	callq	_pg_mblen
	movslq	%eax, %rdi
	addq	24(%rbx), %rdi
	movq	%rdi, 24(%rbx)
	incl	32(%rbx)
	cmpq	%r15, %rdi
	jbe	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rsi
	callq	_text_position_next_internal
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_12
LBB0_11:
	movq	%r15, 8(%rbx)
	movl	$1, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_text_position_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function text_position_next
_text_position_next:                    ; @text_position_next
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_4
; %bb.2:
	add	x0, x9, x8
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_13
LBB0_4:
	ldr	x0, [x19, #16]
LBB0_5:
	mov	x1, x19
	bl	_text_position_next_internal
	cbz	x0, LBB0_13
; %bb.6:
	mov	x20, x0
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #24]
	cmp	x8, x20
	cset	w0, ls
	bl	_Assert
	ldr	x0, [x19, #24]
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x0, x20
	b.hs	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	bl	_pg_mblen
	ldr	x8, [x19, #24]
	add	x0, x8, w0, sxtw
	str	x0, [x19, #24]
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	cmp	x0, x20
	b.ls	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x19
	bl	_text_position_next_internal
	mov	x20, x0
	mov	w0, #0
	cbnz	x20, LBB0_7
	b	LBB0_13
LBB0_12:
	str	x20, [x19, #8]
	mov	w0, #1
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_text_position_next
.subsections_via_symbols
