	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btreeComputeFreeSpace
_btreeComputeFreeSpace:                 ## @btreeComputeFreeSpace
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	xorl	%edi, %edi
	cmpq	$0, 40(%r13)
	setne	%dil
	callq	_assert
	movq	40(%r13), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	callq	_assert
	movq	40(%r13), %rax
	movl	12(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	(%r13), %rbx
	movl	48(%r13), %edi
	callq	_sqlite3PagerPagenumber
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	movl	48(%r13), %edi
	callq	_sqlite3PagerGetExtra
	xorl	%edi, %edi
	cmpq	%r13, %rax
	sete	%dil
	callq	_assert
	movq	8(%r13), %rbx
	movl	48(%r13), %edi
	callq	_sqlite3PagerGetData
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$1, 16(%r13)
	sete	%dil
	callq	_assert
	movl	32(%r13), %edi
	shrl	$31, %edi
	callq	_assert
	movq	8(%r13), %r12
	movq	40(%r13), %rax
	movl	8(%rax), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movslq	20(%r13), %r14
	leaq	(%r12,%r14,4), %rdi
	addq	$20, %rdi
	callq	_get2byteNotZero
	movl	%eax, %r15d
	movl	24(%r13), %eax
	addl	%r14d, %eax
	movl	28(%r13), %ecx
	leal	(%rax,%rcx,2), %eax
	addl	$8, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%r14,4), %rdi
	addq	$4, %rdi
	callq	_get2byte
	addl	28(%r12,%r14,4), %r15d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %ebx
	jl	LBB0_6
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	$-4, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	-68(%rbp), %ebx                 ## 4-byte Folded Reload
	jg	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %r13d
	movslq	%ebx, %r14
	leaq	(%r12,%r14,4), %rdi
	callq	_get2byte
	movl	%eax, %ebx
	leaq	(%r12,%r14,4), %rdi
	addq	$8, %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %r15d
	leal	(%rax,%r13), %ecx
	addl	$3, %ecx
	cmpl	%ecx, %ebx
	jg	LBB0_4
## %bb.9:
	testl	%ebx, %ebx
	jle	LBB0_10
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_11:
	cmpl	-64(%rbp), %r15d                ## 4-byte Folded Reload
	jg	LBB0_6
## %bb.12:
	subl	%eax, %r15d
	jl	LBB0_6
## %bb.13:
	movl	%r15d, 32(%r13)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	addl	%r13d, %eax
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jbe	LBB0_11
LBB0_6:
	movq	%r13, %rdi
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SQLITE_CORRUPT_PAGE            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_btreeComputeFreeSpace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btreeComputeFreeSpace
_btreeComputeFreeSpace:                 ; @btreeComputeFreeSpace
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #40]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #40]
	ldr	w0, [x8, #12]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	x20, [x19]
	ldr	w0, [x19, #48]
	bl	_sqlite3PagerPagenumber
	cmp	x20, x0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #48]
	bl	_sqlite3PagerGetExtra
	cmp	x0, x19
	cset	w0, eq
	bl	_assert
	ldr	x20, [x19, #8]
	ldr	w0, [x19, #48]
	bl	_sqlite3PagerGetData
	cmp	x20, x0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #16]
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #32]
	lsr	w0, w8, #31
	bl	_assert
	ldr	x8, [x19, #40]
	ldr	w23, [x8, #8]
	ldr	w22, [x19, #20]
	ldr	x25, [x19, #8]
	add	w8, w22, #5
	add	x0, x25, w8, sxtw #2
	bl	_get2byteNotZero
	mov	x21, x0
	ldp	w8, w9, [x19, #24]
	add	w8, w22, w8
	add	w8, w8, w9, lsl #1
	add	w24, w8, #8
	add	w8, w22, #1
	add	x0, x25, w8, sxtw #2
	bl	_get2byte
	add	w8, w22, #7
	ldr	w8, [x25, w8, sxtw #2]
	add	w26, w8, w21
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x0
	cmp	w0, w24
	b.lt	LBB0_10
; %bb.2:
	sub	w27, w23, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, w27
	b.gt	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x25, w20, sxtw #2
	mov	x0, x22
	bl	_get2byte
	mov	x21, x0
	add	x0, x22, #8
	bl	_get2byte
	add	w26, w0, w26
	add	w8, w0, w20
	add	w9, w8, #3
	mov	x20, x21
	cmp	w21, w9
	b.gt	LBB0_3
; %bb.5:
	cmp	w21, #1
	b.ge	LBB0_10
; %bb.6:
	cmp	w8, w23
	b.hi	LBB0_10
LBB0_7:
	cmp	w26, w23
	b.gt	LBB0_10
; %bb.8:
	subs	w8, w26, w24
	b.lt	LBB0_10
; %bb.9:
	str	w8, [x19, #32]
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_SQLITE_CORRUPT_PAGE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_btreeComputeFreeSpace
.subsections_via_symbols
