	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btreeOverwriteContent
_btreeOverwriteContent:                 ## @btreeOverwriteContent
	.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
	movl	%ecx, %r13d
	movq	%rsi, %r14
	movl	(%rdx), %ecx
	movl	%ecx, %r12d
	subl	%r13d, %r12d
	jle	LBB0_1
## %bb.7:
	movq	%rdx, %r15
	cmpl	%r8d, %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jge	LBB0_8
## %bb.9:
	movl	%r12d, %eax
	leaq	(%r14,%rax,8), %rsi
	subl	%r12d, %r8d
	movq	%r15, %rdx
	callq	_btreeOverwriteContent
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_1:
	testl	%r8d, %r8d
	jle	LBB0_13
## %bb.2:
	movl	%r8d, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %r14
	decq	%rbx
	jne	LBB0_3
	jmp	LBB0_13
LBB0_8:
	movl	%r8d, %r12d
LBB0_10:
	movslq	%r13d, %rbx
	shlq	$3, %rbx
	movq	8(%r15), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_memcmp
	testq	%rax, %rax
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_13
## %bb.11:
	movl	(%rax), %edi
	callq	_sqlite3PagerWrite
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	addq	8(%r15), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memmove
	jmp	LBB0_13
LBB0_5:
	movl	(%rdi), %edi
	callq	_sqlite3PagerWrite
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
LBB0_13:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_btreeOverwriteContent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btreeOverwriteContent
_btreeOverwriteContent:                 ; @btreeOverwriteContent
	.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
	mov	x23, x4
	mov	x22, x3
	mov	x19, x1
	mov	x20, x0
	ldr	w3, [x2]
	sub	w24, w3, w22
	cmp	w24, #0
	b.le	LBB0_7
; %bb.1:
	mov	x21, x2
	cmp	w24, w23
	b.ge	LBB0_4
; %bb.2:
	add	x1, x19, w24, uxtw #3
	sub	w4, w23, w24
	mov	x0, x20
	mov	x2, x21
	bl	_btreeOverwriteContent
	cbnz	w0, LBB0_14
; %bb.3:
	mov	x23, x24
LBB0_4:
	ldr	x8, [x21, #8]
	add	x1, x8, w22, sxtw #3
	mov	x0, x19
	mov	x2, x23
	bl	_memcmp
	cbz	x0, LBB0_13
; %bb.5:
	ldr	w0, [x20]
	bl	_sqlite3PagerWrite
	cbnz	w0, LBB0_14
; %bb.6:
	sxtw	x8, w22
	ldr	x9, [x21, #8]
	add	x1, x9, x8, lsl #3
	mov	x0, x19
	mov	x2, x23
	bl	_memmove
	b	LBB0_13
LBB0_7:
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.8:
	mov	w21, w23
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	cbnz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x19, x19, #8
	subs	x21, x21, #1
	b.ne	LBB0_9
	b	LBB0_13
LBB0_11:
	ldr	w0, [x20]
	bl	_sqlite3PagerWrite
	cbnz	w0, LBB0_14
; %bb.12:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x21
	bl	_memset
LBB0_13:
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_btreeOverwriteContent
.subsections_via_symbols
