	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function String_slice
_String_slice:                          ## @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
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_get_string_val
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_26
## %bb.1:
	movq	-48(%rbp), %rdi
	callq	_jsstr_length
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.2:
	movl	(%r14), %esi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	callq	_to_integer
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_5
LBB0_3:
	movq	-48(%rbp), %rdi
	callq	_jsstr_release
	jmp	LBB0_26
LBB0_4:
	xorl	%esi, %esi
	jmp	LBB0_17
LBB0_5:
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	callq	_is_int32
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	cvttsd2si	%xmm0, %eax
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	movl	%eax, %esi
	jmp	LBB0_11
LBB0_8:
	xorl	%esi, %esi
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	movq	%r14, %rax
	jbe	LBB0_12
## %bb.9:
	movl	%ebx, %esi
	jmp	LBB0_12
LBB0_10:
	addl	%ebx, %eax
	xorl	%esi, %esi
	testl	%eax, %eax
	cmovgl	%eax, %esi
LBB0_11:
	movq	%r14, %rax
LBB0_12:
	cmpl	$2, %r12d
	jb	LBB0_17
## %bb.13:
	movl	%esi, %r14d
	movl	4(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	callq	_to_integer
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_3
## %bb.14:
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	callq	_is_int32
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	testq	%rax, %rax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_18
## %bb.15:
	cvttsd2si	%xmm0, %eax
	testl	%eax, %eax
	js	LBB0_19
## %bb.16:
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	jmp	LBB0_20
LBB0_17:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_23
LBB0_21:
	cmpl	%esi, %ebx
	cmovlel	%esi, %ebx
	movq	-48(%rbp), %rdi
	subl	%esi, %ebx
	movl	%ebx, %edx
	callq	_jsstr_substr
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	%rax, %rdi
	callq	_jsval_string
	movl	%eax, (%r13)
LBB0_23:
	movq	-48(%rbp), %rdi
	callq	_jsstr_release
	movq	_S_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_24:
	movq	-48(%rbp), %rdi
	callq	_jsstr_release
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	xorl	%eax, %eax
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	cmoval	%eax, %ebx
	jmp	LBB0_20
LBB0_19:
	addl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	cmovlel	%eax, %ebx
LBB0_20:
	movl	%r14d, %esi
	testq	%r13, %r13
	jne	LBB0_21
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_String_slice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function String_slice
_String_slice:                          ; @String_slice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x22, x4
	mov	x24, x3
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_get_string_val
	mov	x25, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_jsstr_length
	mov	x20, x0
	cbz	w24, LBB0_4
; %bb.2:
	ldr	w1, [x22]
	mov	x2, sp
	mov	x0, x21
	bl	_to_integer
	mov	x25, x0
	bl	_FAILED
	cbz	x0, LBB0_5
LBB0_3:
	ldr	x0, [sp, #8]
	bl	_jsstr_release
	b	LBB0_18
LBB0_4:
	mov	w23, #0
	b	LBB0_12
LBB0_5:
	ldr	d0, [sp]
	bl	_is_int32
	ldr	d0, [sp]
	fcmp	d0, #0.0
	csel	w8, wzr, w20, le
	fcvtzs	w9, d0
	cmp	w20, w9
	csel	w10, w20, w9, lt
	add	w11, w20, w9
	cmp	w11, #0
	csel	w11, w11, wzr, gt
	tst	w9, #0x80000000
	csel	w9, w10, w11, eq
	cmp	x0, #0
	csel	w23, w8, w9, eq
	cmp	w24, #2
	b.lo	LBB0_12
; %bb.6:
	ldr	w1, [x22, #4]
	mov	x2, sp
	mov	x0, x21
	bl	_to_integer
	mov	x25, x0
	bl	_FAILED
	cbnz	x0, LBB0_3
; %bb.7:
	ldr	d0, [sp]
	bl	_is_int32
	ldr	d0, [sp]
	cbz	x0, LBB0_10
; %bb.8:
	fcvtzs	w8, d0
	tbnz	w8, #31, LBB0_11
; %bb.9:
	cmp	w20, w8
	csel	w20, w20, w8, lt
	b	LBB0_12
LBB0_10:
	fcmp	d0, #0.0
	csel	w20, wzr, w20, mi
	b	LBB0_12
LBB0_11:
	add	w8, w20, w8
	cmp	w8, #0
	csel	w20, w8, wzr, gt
LBB0_12:
	cbz	x19, LBB0_15
; %bb.13:
	cmp	w20, w23
	csel	w8, w20, w23, gt
	ldr	x0, [sp, #8]
	sub	w2, w8, w23
	mov	x1, x23
	bl	_jsstr_substr
	cbz	x0, LBB0_16
; %bb.14:
	bl	_jsval_string
	str	w0, [x19]
LBB0_15:
	ldr	x0, [sp, #8]
	bl	_jsstr_release
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
	ldr	x0, [sp, #8]
	bl	_jsstr_release
Lloh4:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_17:
	ldr	w25, [x8]
LBB0_18:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_String_slice
.subsections_via_symbols
