	.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
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.1:
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	8(%rdi), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	movq	_SQLITE_AFF_NONE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_SQLITE_AFF_BLOB@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpb	(%r13), %al
	setl	%dil
	callq	_assert
	movb	(%r13), %al
	testl	%r15d, %r15d
	jle	LBB0_2
## %bb.3:
	leal	-1(%r15), %ecx
	leaq	(%rcx,%rbx), %r9
	incq	%r9
	leal	(%r15,%r12), %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	%al, (%rbx)
	jg	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	-1(%r15), %ecx
	incl	%r12d
	incq	%rbx
	cmpl	$1, %r15d
	movl	%ecx, %r15d
	jg	LBB0_4
## %bb.6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_2:
	movq	%rbx, %r9
	movl	%r12d, %edx
LBB0_7:
	movl	%r15d, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %ecx
	jl	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	-1(%rcx), %rsi
	cmpb	%al, -1(%r9,%rcx)
	movq	%rsi, %rcx
	jle	LBB0_8
## %bb.10:
	incl	%esi
	movl	%esi, %ecx
	jmp	LBB0_12
LBB0_14:
	movq	(%rdi), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
LBB0_11:
	cmpl	$1, %ecx
	jne	LBB0_13
LBB0_12:
	movq	_OP_Affinity@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, (%rsp)
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%r8d, %r8d
	callq	_sqlite3VdbeAddOp4
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	_SQLITE_AFF_BLOB,1,0            ## @SQLITE_AFF_BLOB
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x3, LBB0_11
; %bb.1:
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x0, #8]
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x8, _SQLITE_AFF_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_AFF_NONE@GOTPAGEOFF]
Lloh2:
	ldrsb	w8, [x8]
Lloh3:
	adrp	x23, _SQLITE_AFF_BLOB@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SQLITE_AFF_BLOB@GOTPAGEOFF]
	ldrsb	w9, [x23]
	cmp	w8, w9
	cset	w0, lt
	bl	_assert
	ldrsb	w8, [x23]
	subs	w9, w20, #1
	b.lt	LBB0_6
; %bb.2:
	add	x9, x9, x22
	add	x5, x9, #1
	add	w2, w20, w21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w9, [x22]
	cmp	w9, w8
	b.gt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	add	x22, x22, #1
	subs	w20, w20, #1
	b.gt	LBB0_3
; %bb.5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	mov	x5, x22
	mov	x2, x21
LBB0_7:
	mov	w3, w20
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w3, #2
	b.lt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x9, x3, #1
	add	x10, x5, x3
	ldursb	w10, [x10, #-1]
	mov	x3, x9
	cmp	w10, w8
	b.le	LBB0_8
; %bb.10:
	add	w3, w9, #1
	b	LBB0_13
LBB0_11:
	ldr	x8, [x0]
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_assert
LBB0_12:
	cmp	w3, #1
	b.ne	LBB0_14
LBB0_13:
Lloh5:
	adrp	x8, _OP_Affinity@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OP_Affinity@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	x6, x3
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sqlite3VdbeAddOp4
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_AFF_NONE,1,0            ; @SQLITE_AFF_NONE
	.comm	_SQLITE_AFF_BLOB,1,0            ; @SQLITE_AFF_BLOB
	.comm	_OP_Affinity,4,2                ; @OP_Affinity
	.no_dead_strip	_codeApplyAffinity
.subsections_via_symbols
