	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jv_string_slice                ## -- Begin function jv_string_slice
	.p2align	4, 0x90
_jv_string_slice:                       ## @jv_string_slice
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movl	%esi, -52(%rbp)
	movl	%edx, -48(%rbp)
	movq	_JV_KIND_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_JVP_HAS_KIND
	movl	%eax, %edi
	callq	_assert
	movl	%ebx, %edi
	callq	_jv_string_value
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_string_length_bytes
	movl	%eax, %ebx
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_jvp_clamp_slice_params
	movl	-52(%rbp), %eax
	xorl	%r15d, %r15d
	movl	$0, %edi
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	-48(%rbp), %ecx
	movl	$0, %edi
	cmpl	%ecx, %eax
	jg	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	cmpl	%ebx, %ecx
	setle	%dil
LBB0_3:
	callq	_assert
	cmpl	$0, -52(%rbp)
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	jle	LBB0_4
## %bb.8:
	movslq	%ebx, %r13
	addq	%r12, %r13
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %r14
	movq	%r12, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_jvp_utf8_next
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$-1, -56(%rbp)
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	incl	%r15d
	cmpl	-52(%rbp), %r15d
	jl	LBB0_9
	jmp	LBB0_5
LBB0_4:
	movq	%r12, %rbx
LBB0_5:
	movq	%rbx, %rax
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.6:
	movq	%rbx, %rax
	cmpl	-48(%rbp), %r15d
	jge	LBB0_18
## %bb.7:
	movslq	-60(%rbp), %rax                 ## 4-byte Folded Reload
	addq	%rax, %r12
	leaq	-56(%rbp), %r14
	movq	%rbx, %rax
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_jvp_utf8_next
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$-1, -56(%rbp)
	je	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_16 Depth=1
	incl	%r15d
	cmpl	-48(%rbp), %r15d
	jl	LBB0_16
	jmp	LBB0_18
LBB0_12:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_jv_free
	leaq	L_.str(%rip), %rdi
	callq	_jv_string
	movl	%eax, %edi
	callq	_jv_invalid_with_msg
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_10:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_jv_free
	movl	$16, %edi
	callq	_jv_string_empty
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_17:
	movq	%r12, %rax
LBB0_18:
	subl	%ebx, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_jv_string_sized
	movl	%eax, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_jv_free
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JV_KIND_STRING,4,2             ## @JV_KIND_STRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid UTF-8 string"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jv_string_slice                ; -- Begin function jv_string_slice
	.p2align	2
_jv_string_slice:                       ; @jv_string_slice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	stp	w2, w1, [sp, #8]
Lloh0:
	adrp	x8, _JV_KIND_STRING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JV_KIND_STRING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_JVP_HAS_KIND
	bl	_assert
	mov	x0, x19
	bl	_jv_string_value
	mov	x20, x0
	mov	x0, x19
	bl	_jv_copy
	bl	_jv_string_length_bytes
	mov	x21, x0
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_jvp_clamp_slice_params
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_2
; %bb.1:
	ldr	w9, [sp, #8]
	cmp	w9, w21
	cset	w10, le
	cmp	w8, w9
	csel	w0, wzr, w10, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_assert
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	w24, #0
	add	x23, x20, w21, sxtw
	mov	x22, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #4
	mov	x0, x22
	mov	x1, x23
	bl	_jvp_utf8_next
	cbz	x0, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #4]
	cmn	w8, #1
	b.eq	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	add	w24, w24, #1
	ldr	w8, [sp, #12]
	cmp	w24, w8
	b.lt	LBB0_5
; %bb.8:
	mov	x0, x22
	cbnz	x22, LBB0_10
	b	LBB0_18
LBB0_9:
	mov	w24, #0
	mov	x22, x20
	mov	x0, x22
	cbz	x22, LBB0_18
LBB0_10:
	ldr	w8, [sp, #8]
	mov	x0, x22
	cmp	w24, w8
	b.ge	LBB0_18
; %bb.11:
	add	x20, x20, w21, sxtw
	mov	x0, x22
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #4
	mov	x1, x20
	bl	_jvp_utf8_next
	cbz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #4]
	cmn	w8, #1
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	ldr	w8, [sp, #8]
	cmp	w24, w8
	b.lt	LBB0_12
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_jv_free
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_jv_string
	bl	_jv_invalid_with_msg
	mov	x20, x0
	b	LBB0_19
LBB0_16:
	mov	x0, x19
	bl	_jv_free
	mov	w0, #16
	bl	_jv_string_empty
	mov	x20, x0
	b	LBB0_19
LBB0_17:
	mov	x0, x20
LBB0_18:
	sub	w1, w0, w22
	mov	x0, x22
	bl	_jv_string_sized
	mov	x20, x0
	mov	x0, x19
	bl	_jv_free
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_JV_KIND_STRING,4,2             ; @JV_KIND_STRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid UTF-8 string"

.subsections_via_symbols
