	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptrmapPut
_ptrmapPut:                             ## @ptrmapPut
	.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
	cmpl	$0, (%r8)
	jne	LBB0_1
## %bb.2:
	movq	%r8, %r12
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_PENDING_BYTE_PAGE
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_PTRMAP_ISPAGE
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movl	(%rbx), %edi
	callq	_assert
	testq	%r13, %r13
	je	LBB0_7
## %bb.3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_PTRMAP_PAGENO
	movq	%rax, %r14
	movl	16(%rbx), %edi
	leaq	-48(%rbp), %rdx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_sqlite3PagerGet
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.4:
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerGetExtra
	cmpb	$0, (%rax)
	je	LBB0_9
LBB0_5:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
LBB0_6:
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerUnref
	jmp	LBB0_1
LBB0_7:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movl	%eax, (%r12)
LBB0_1:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_PTRMAP_PTROFFSET
	testl	%eax, %eax
	js	LBB0_5
## %bb.10:
	movl	%eax, %r14d
	movl	8(%rbx), %eax
	addl	$-5, %eax
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	setle	%dil
	callq	_assert
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerGetData
	movq	%rax, %r13
	movl	%r14d, %ebx
	cmpq	%r15, (%rax,%rbx,8)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_12
## %bb.11:
	leaq	8(,%rbx,8), %rdi
	addq	%r13, %rdi
	callq	_get4byte
	cmpq	%r14, %rax
	je	LBB0_6
LBB0_12:
	movq	%r14, %rdi
	callq	_TRACE
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerWrite
	movl	%eax, (%r12)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.13:
	movq	%r15, (%r13,%rbx,8)
	leaq	8(,%rbx,8), %rdi
	addq	%r13, %rdi
	movq	%r14, %rsi
	callq	_put4byte
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_ptrmapPut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptrmapPut
_ptrmapPut:                             ; @ptrmapPut
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x4]
	cbz	w8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	mov	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	ldr	w0, [x0, #20]
	bl	_sqlite3_mutex_held
	bl	_assert
	mov	x0, x22
	bl	_PENDING_BYTE_PAGE
	mov	x1, x0
	mov	x0, x22
	bl	_PTRMAP_ISPAGE
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x22]
	bl	_assert
	cbz	x23, LBB0_7
; %bb.3:
	mov	x0, x22
	mov	x1, x23
	bl	_PTRMAP_PAGENO
	mov	x24, x0
	ldr	w0, [x22, #16]
	add	x2, sp, #8
	mov	x1, x24
	mov	w3, #0
	bl	_sqlite3PagerGet
Lloh0:
	adrp	x25, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.4:
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerGetExtra
	ldrb	w8, [x0]
	cbz	w8, LBB0_9
LBB0_5:
Lloh2:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerUnref
	b	LBB0_1
LBB0_7:
Lloh5:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_1
LBB0_8:
	str	w0, [x20]
	b	LBB0_1
LBB0_9:
	mov	x0, x24
	mov	x1, x23
	bl	_PTRMAP_PTROFFSET
	tbnz	w0, #31, LBB0_5
; %bb.10:
	mov	x23, x0
	ldr	w8, [x22, #8]
	sub	w8, w8, #5
	cmp	w0, w8
	cset	w0, le
	bl	_assert
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerGetData
	mov	x22, x0
	ldr	x8, [x0, w23, uxtw #3]
	cmp	x8, x21
	b.ne	LBB0_12
; %bb.11:
	add	w8, w23, #1
	add	x0, x22, w8, uxtw #3
	bl	_get4byte
	cmp	x0, x19
	b.eq	LBB0_6
LBB0_12:
	mov	x0, x19
	bl	_TRACE
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerWrite
	str	w0, [x20]
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.13:
	mov	w8, w23
	str	x21, [x22, x8, lsl #3]
	add	w8, w23, #1
	add	x0, x22, w8, uxtw #3
	mov	x1, x19
	bl	_put4byte
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_ptrmapPut
.subsections_via_symbols
