	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function substrFunc
_substrFunc:                            ## @substrFunc
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %eax
	andl	$-2, %eax
	xorl	%edi, %edi
	cmpl	$2, %eax
	sete	%dil
	callq	_assert
	movq	8(%r14), %rdi
	callq	_sqlite3_value_type
	movq	_SQLITE_NULL@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_1
LBB0_32:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$3, %r15d
	jne	LBB0_3
## %bb.2:
	movq	16(%r14), %rdi
	callq	_sqlite3_value_type
	cmpl	(%rbx), %eax
	je	LBB0_32
LBB0_3:
	movq	(%r14), %rdi
	callq	_sqlite3_value_type
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	callq	_sqlite3_value_int
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SQLITE_BLOB@GOTPCREL(%rip), %rax
	movq	(%r14), %rdi
	cmpl	(%rax), %ebx
	jne	LBB0_6
## %bb.4:
	callq	_sqlite3_value_bytes
	movl	%eax, %r12d
	movq	(%r14), %rdi
	callq	_sqlite3_value_blob
	testq	%rax, %rax
	je	LBB0_32
## %bb.5:
	movq	%rax, %r13
	movq	(%r14), %rdi
	callq	_sqlite3_value_bytes
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	sete	%dil
	callq	_assert
	jmp	LBB0_11
LBB0_6:
	callq	_sqlite3_value_text
	testq	%rax, %rax
	je	LBB0_32
## %bb.7:
	movq	%rax, %r13
	xorl	%r12d, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jns	LBB0_11
## %bb.8:
	cmpb	$0, (%r13)
	je	LBB0_11
## %bb.9:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_SQLITE_SKIP_UTF8
	incl	%r12d
	cmpb	$0, (%r13)
	jne	LBB0_10
LBB0_11:
	cmpl	$3, %r15d
	jne	LBB0_13
## %bb.12:
	movq	16(%r14), %rdi
	callq	_sqlite3_value_int
	testl	%eax, %eax
	setns	%dl
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	jmp	LBB0_14
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_sqlite3_context_db_handle
	movq	(%rax), %rax
	movq	_SQLITE_LIMIT_LENGTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movb	$1, %dl
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	js	LBB0_15
## %bb.17:
	je	LBB0_19
## %bb.18:
	decl	%eax
	jmp	LBB0_20
LBB0_15:
	addl	%r12d, %eax
	jns	LBB0_20
## %bb.16:
	addl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	cmovlel	%eax, %ecx
	jmp	LBB0_20
LBB0_19:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setg	%al
	subl	%eax, %ecx
	xorl	%eax, %eax
LBB0_20:
	movl	%eax, %ebx
	subl	%ecx, %ebx
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	cmovlel	%r14d, %ebx
	movl	%ecx, %r15d
	cmovsl	%eax, %r15d
	testb	%dl, %dl
	cmovnel	%eax, %ebx
	cmovnel	%ecx, %r15d
	movl	%r15d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movq	_SQLITE_BLOB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_21
## %bb.31:
	movl	%r12d, %eax
	subl	%ebx, %eax
	testl	%eax, %eax
	cmovgl	%eax, %r14d
	leal	(%r15,%rbx), %eax
	cmpl	%r12d, %eax
	cmovlel	%r15d, %r14d
	movl	%ebx, %eax
	addq	%rax, %r13
	movq	_SQLITE_TRANSIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3_result_blob64          ## TAILCALL
LBB0_21:
	movb	(%r13), %al
	testb	%al, %al
	je	LBB0_25
## %bb.22:
	testl	%ebx, %ebx
	je	LBB0_25
## %bb.23:
	decl	%ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_SQLITE_SKIP_UTF8
	movzbl	(%r13), %eax
	addl	$-1, %ebx
	setb	%cl
	testb	%al, %al
	je	LBB0_25
## %bb.33:                              ##   in Loop: Header=BB0_24 Depth=1
	testb	%cl, %cl
	jne	LBB0_24
LBB0_25:
	testb	%al, %al
	je	LBB0_30
## %bb.26:
	testl	%r15d, %r15d
	je	LBB0_30
## %bb.27:
	decl	%r15d
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_SQLITE_SKIP_UTF8
	addl	$-1, %r15d
	setb	%al
	cmpb	$0, (%r13)
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	testb	%al, %al
	jne	LBB0_28
LBB0_30:
	movq	_SQLITE_TRANSIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SQLITE_UTF8@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3_result_text64          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_NULL,4,2                ## @SQLITE_NULL
	.comm	_SQLITE_BLOB,4,2                ## @SQLITE_BLOB
	.comm	_SQLITE_LIMIT_LENGTH,8,3        ## @SQLITE_LIMIT_LENGTH
	.comm	_SQLITE_TRANSIENT,4,2           ## @SQLITE_TRANSIENT
	.comm	_SQLITE_UTF8,4,2                ## @SQLITE_UTF8
	.no_dead_strip	_substrFunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function substrFunc
_substrFunc:                            ; @substrFunc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	and	w8, w1, #0xfffffffe
	cmp	w8, #2
	cset	w0, eq
	bl	_assert
	ldr	x0, [x23, #8]
	bl	_sqlite3_value_type
Lloh0:
	adrp	x20, _SQLITE_NULL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SQLITE_NULL@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_2
LBB0_1:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	cmp	w24, #3
	b.ne	LBB0_4
; %bb.3:
	ldr	x0, [x23, #16]
	bl	_sqlite3_value_type
	ldr	w8, [x20]
	cmp	w0, w8
	b.eq	LBB0_1
LBB0_4:
	ldr	x0, [x23]
	bl	_sqlite3_value_type
	mov	x21, x0
	ldr	x0, [x23, #8]
	bl	_sqlite3_value_int
	mov	x25, x0
Lloh2:
	adrp	x26, _SQLITE_BLOB@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SQLITE_BLOB@GOTPAGEOFF]
	ldr	w8, [x26]
	ldr	x0, [x23]
	cmp	w21, w8
	b.ne	LBB0_10
; %bb.5:
	bl	_sqlite3_value_bytes
	mov	x22, x0
	ldr	x0, [x23]
	bl	_sqlite3_value_blob
	cbz	x0, LBB0_1
; %bb.6:
	mov	x20, x0
	ldr	x0, [x23]
	bl	_sqlite3_value_bytes
	cmp	w22, w0
	cset	w0, eq
	bl	_assert
	cmp	w24, #3
	b.eq	LBB0_17
LBB0_7:
	mov	x0, x19
	bl	_sqlite3_context_db_handle
	ldr	x8, [x0]
Lloh4:
	adrp	x9, _SQLITE_LIMIT_LENGTH@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SQLITE_LIMIT_LENGTH@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
	mov	w8, #1
	tbz	w25, #31, LBB0_18
LBB0_8:
	adds	w10, w22, w25
	b.pl	LBB0_19
; %bb.9:
	add	w9, w9, w10
	mov	w10, #0
	cmp	w9, #0
	csel	w9, w9, wzr, gt
	b	LBB0_19
LBB0_10:
	bl	_sqlite3_value_text
	cbz	x0, LBB0_1
; %bb.11:
	mov	x20, x0
	tbnz	w25, #31, LBB0_13
LBB0_12:
	mov	w22, #0
	cmp	w24, #3
	b.ne	LBB0_7
	b	LBB0_17
LBB0_13:
	ldrb	w8, [x20]
	cbz	w8, LBB0_12
; %bb.14:
	mov	w22, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_SQLITE_SKIP_UTF8
	add	w22, w22, #1
	ldrb	w8, [x20]
	cbnz	w8, LBB0_15
; %bb.16:
	cmp	w24, #3
	b.ne	LBB0_7
LBB0_17:
	ldr	x0, [x23, #16]
	bl	_sqlite3_value_int
	mvn	w8, w0
	lsr	w8, w8, #31
	cmp	w0, #0
	cneg	w9, w0, mi
	tbnz	w25, #31, LBB0_8
LBB0_18:
	cmp	w9, #0
	cset	w10, gt
	sub	w11, w9, w10
	sub	w10, w25, #1
	cmp	w25, #0
	csel	w10, wzr, w10, eq
	csel	w9, w11, w9, eq
LBB0_19:
	sub	w11, w10, w9
	cmp	w11, #0
	csel	w11, w11, wzr, gt
	csel	w12, w10, w9, lt
	cmp	w8, #0
	csel	w24, w10, w11, ne
	csel	w23, w9, w12, ne
	mvn	w8, w23
	lsr	w0, w8, #31
	bl	_assert
	ldr	w8, [x26]
	cmp	w21, w8
	b.ne	LBB0_21
; %bb.20:
	sub	w8, w22, w24
	cmp	w8, #0
	csel	w8, w8, wzr, gt
	add	w9, w23, w24
	cmp	w9, w22
	csel	w2, w8, w23, gt
Lloh7:
	adrp	x8, _SQLITE_TRANSIENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SQLITE_TRANSIENT@GOTPAGEOFF]
	add	x1, x20, w24, uxtw
Lloh9:
	ldr	w3, [x8]
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sqlite3_result_blob64
LBB0_21:
	ldrb	w8, [x20]
	cbz	w8, LBB0_26
; %bb.22:
	cbz	w24, LBB0_26
; %bb.23:
	sub	w21, w24, #1
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_SQLITE_SKIP_UTF8
	ldrb	w8, [x20]
	subs	w21, w21, #1
	cset	w9, hs
	cbz	w8, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	tbnz	w9, #0, LBB0_24
LBB0_26:
	cmp	w8, #0
	ccmp	w23, #0, #4, ne
	b.eq	LBB0_30
; %bb.27:
	sub	w21, w23, #1
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_SQLITE_SKIP_UTF8
	ldrb	w9, [x20]
	subs	w21, w21, #1
	cset	w8, hs
	cbz	w9, LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	tbnz	w8, #0, LBB0_28
LBB0_30:
Lloh10:
	adrp	x8, _SQLITE_TRANSIENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SQLITE_TRANSIENT@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x8, _SQLITE_UTF8@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SQLITE_UTF8@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sqlite3_result_text64
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_NULL,4,2                ; @SQLITE_NULL
	.comm	_SQLITE_BLOB,4,2                ; @SQLITE_BLOB
	.comm	_SQLITE_LIMIT_LENGTH,8,3        ; @SQLITE_LIMIT_LENGTH
	.comm	_SQLITE_TRANSIENT,4,2           ; @SQLITE_TRANSIENT
	.comm	_SQLITE_UTF8,4,2                ; @SQLITE_UTF8
	.no_dead_strip	_substrFunc
.subsections_via_symbols
