	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function assemblePage
_assemblePage:                          ## @assemblePage
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	48(%rdi), %rax
	movq	56(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movslq	(%rdi), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r13d
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_assert
	movq	48(%rbx), %rax
	movl	4(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	xorl	%r14d, %r14d
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.1:
	movq	48(%rbx), %rdi
	callq	_MX_CELL
	cmpl	%r15d, %eax
	jl	LBB0_3
## %bb.2:
	movq	48(%rbx), %rdi
	callq	_MX_CELL
	xorl	%r14d, %r14d
	cmpl	$10922, %eax                    ## imm = 0x2AAA
	setl	%r14b
LBB0_3:
	movl	%r14d, %edi
	callq	_assert
	movl	40(%rbx), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	addq	$20, %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_get2byteNotZero
	xorl	%edi, %edi
	cmpl	%r13d, %eax
	sete	%dil
	callq	_assert
	leal	(%r15,%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.4:
	movq	%r12, %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	incq	%rbx
	leaq	(%rax,%rcx,4), %r14
	addq	$-8, %r14
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %r12d
	movq	(%rdx,%r12,8), %r15
	subl	%r15d, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_put2byte
	movslq	%r13d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax,%r12,8), %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	decq	%rbx
	addq	$-8, %r14
	cmpq	$1, %rbx
	ja	LBB0_5
LBB0_6:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	addq	$12, %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_put2byte
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_put2byte
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	subl	%eax, %r13d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addl	%r13d, 24(%rcx)
	movslq	%ebx, %rax
	movq	%rax, 16(%rcx)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_assemblePage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function assemblePage
_assemblePage:                          ; @assemblePage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w23, [x0]
	ldp	x8, x28, [x0, #48]
	ldr	w24, [x8]
	ldr	x8, [x0, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #4]
	bl	_sqlite3_mutex_held
	bl	_assert
	tbnz	w20, #31, LBB0_2
; %bb.1:
	ldr	x0, [x19, #48]
	bl	_MX_CELL
	cmp	w0, w20
	b.ge	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19, #48]
	bl	_MX_CELL
	mov	w8, #10922
	cmp	w0, w8
	cset	w0, lt
LBB0_4:
	bl	_assert
	ldr	w0, [x19, #40]
	bl	_sqlite3PagerIswriteable
	bl	_assert
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	add	w8, w23, #5
	add	x25, x28, w8, sxtw #2
	mov	x0, x25
	bl	_get2byteNotZero
	cmp	w0, w24
	cset	w0, eq
	bl	_assert
	lsl	w10, w20, #1
	cmp	w20, #1
	stp	w23, w24, [sp, #24]             ; 8-byte Folded Spill
	str	x25, [sp, #16]                  ; 8-byte Folded Spill
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
	b.lt	LBB0_7
; %bb.5:
	ldr	x8, [x19, #32]
	mov	w9, w20
	add	x27, x9, #1
	add	x8, x8, w10, sxtw #2
	sub	x25, x8, #8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w27, #2
	lsl	x23, x8, #3
	ldr	x26, [x21, x23]
	sub	w24, w24, w26
	mov	x0, x25
	mov	x1, x24
	bl	_put2byte
	ldr	x1, [x22, x23]
	add	x0, x28, w24, sxtw #2
	mov	x2, x26
	bl	_memcpy
	sub	x27, x27, #1
	sub	x25, x25, #8
	cmp	x27, #1
	b.hi	LBB0_6
LBB0_7:
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	add	w8, w8, #3
	add	x0, x28, w8, sxtw #2
	mov	x1, x20
	bl	_put2byte
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x24
	bl	_put2byte
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, w9
	sub	w8, w24, w8
	ldr	w9, [x19, #24]
	add	w8, w8, w9
	str	w8, [x19, #24]
	sxtw	x8, w20
	str	x8, [x19, #16]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_assemblePage
.subsections_via_symbols
