	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function codeApplyAffinity
_codeApplyAffinity:                     ## @codeApplyAffinity
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.1:
	movq	%rcx, %r13
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	8(%r15), %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	movq	_SQLITE_AFF_NONE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	%r12, %rdi
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.2:
	leal	-1(%rbx), %ecx
	leaq	(%rcx,%r13), %r12
	incq	%r12
	leal	(%rbx,%r14), %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	%al, (%r13)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rbx), %ecx
	incl	%r14d
	incq	%r13
	cmpl	$1, %ebx
	movl	%ecx, %ebx
	jg	LBB0_3
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	%r13, %r12
	movl	%r14d, %edx
LBB0_7:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %ebx
	jl	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	-1(%rbx), %rcx
	cmpb	%al, -1(%r12,%rbx)
	movq	%rcx, %rbx
	je	LBB0_8
## %bb.10:
	incl	%ecx
	movl	%ecx, %ebx
	jmp	LBB0_11
LBB0_14:
	movq	(%r15), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
LBB0_12:
	cmpl	$1, %ebx
	jne	LBB0_13
LBB0_11:
	movq	_OP_Affinity@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, %r14
	movl	%ebx, %ecx
	movl	%edx, %r13d
	callq	_sqlite3VdbeAddOp2
	movq	%r14, %rdi
	movl	$-1, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_sqlite3VdbeChangeP4
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3ExprCacheAffinityChange ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_AFF_NONE,1,0            ## @SQLITE_AFF_NONE
	.comm	_OP_Affinity,4,2                ## @OP_Affinity
	.no_dead_strip	_codeApplyAffinity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function codeApplyAffinity
_codeApplyAffinity:                     ; @codeApplyAffinity
	.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	x19, x0
	cbz	x3, LBB0_11
; %bb.1:
	mov	x25, x3
	mov	x23, x2
	mov	x24, x1
	ldr	x20, [x19, #8]
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x8, _SQLITE_AFF_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_AFF_NONE@GOTPAGEOFF]
	ldrb	w8, [x8]
	subs	w9, w23, #1
	b.lt	LBB0_6
; %bb.2:
	add	x9, x9, x25
	add	x22, x9, #1
	add	w21, w23, w24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x25]
	cmp	w9, w8
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	add	x25, x25, #1
	subs	w23, w23, #1
	b.gt	LBB0_3
; %bb.5:
	mov	w23, #0
	b	LBB0_7
LBB0_6:
	mov	x22, x25
	mov	x21, x24
LBB0_7:
	mov	w23, w23
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, #2
	b.lt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x9, x23, #1
	add	x10, x22, x23
	ldurb	w10, [x10, #-1]
	mov	x23, x9
	cmp	w10, w8
	b.eq	LBB0_8
; %bb.10:
	add	w23, w9, #1
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19]
	ldr	w0, [x8]
	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	_assert
LBB0_12:
	cmp	w23, #1
	b.ne	LBB0_14
LBB0_13:
Lloh2:
	adrp	x8, _OP_Affinity@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OP_Affinity@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x23
	bl	_sqlite3VdbeAddOp2
	mov	x0, x20
	mov	w1, #-1
	mov	x2, x22
	mov	x3, x23
	bl	_sqlite3VdbeChangeP4
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	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	_sqlite3ExprCacheAffinityChange
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_AFF_NONE,1,0            ; @SQLITE_AFF_NONE
	.comm	_OP_Affinity,4,2                ; @OP_Affinity
	.no_dead_strip	_codeApplyAffinity
.subsections_via_symbols
