	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function freeSpace
_freeSpace:                             ## @freeSpace
	.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
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setne	%dil
	callq	_assert
	movl	32(%rbx), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	movq	_CORRUPT_DB@GOTPCREL(%rip), %r15
	movb	$1, %al
	cmpq	$0, (%r15)
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %eax
	movl	12(%rbx), %ecx
	addl	%ecx, %eax
	addl	$6, %eax
	cmpl	%r12d, %eax
	setle	%al
LBB0_2:
	leal	(%r12,%r13), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movzbl	%al, %edi
	callq	_assert
	movl	$1, %edi
	cmpq	$0, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	24(%rbx), %rax
	xorl	%edi, %edi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rax), %ecx
	setle	%dil
LBB0_4:
	callq	_assert
	movq	24(%rbx), %rax
	movl	8(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$4, %r13d
	setge	%dil
	callq	_assert
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	addl	$-4, %eax
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	setge	%dil
	callq	_assert
	movslq	8(%rbx), %rdx
	leaq	1(%rdx), %r15
	cmpb	$0, 2(%rdx,%r14)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.5:
	cmpb	$0, (%r14,%r15)
	je	LBB0_6
LBB0_7:
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movslq	%ebx, %r15
	leaq	(%r14,%r15), %rdi
	callq	_get2byte
	movl	%eax, %ebx
	cmpl	%r12d, %eax
	jge	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leal	4(%r13), %eax
	cmpl	%eax, %ebx
	jge	LBB0_8
## %bb.10:
	testl	%ebx, %ebx
	jne	LBB0_11
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	24(%rdi), %rax
	movl	(%rax), %eax
	addl	$-4, %eax
	cmpl	%eax, %ebx
	jg	LBB0_12
## %bb.14:
	cmpl	%r13d, %ebx
	setg	%al
	testl	%ebx, %ebx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%esi, %esi
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.16:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leal	3(%rcx), %eax
	cmpl	%ebx, %eax
	jl	LBB0_17
## %bb.18:
	movl	%ebx, %eax
	subl	%ecx, %eax
	jl	LBB0_11
## %bb.19:
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	(%rax,%r14), %rdi
	addq	$2, %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	24(%rdi), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_12
## %bb.20:
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $eax killed $eax killed $rax
	subl	%r12d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	addq	%r14, %rdi
	callq	_get2byte
	movl	%eax, %ebx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	cmpl	-72(%rbp), %r13d                ## 4-byte Folded Reload
	jg	LBB0_23
LBB0_22:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r13, %rcx
	movl	%r15d, %r13d
	movl	%ecx, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_29
LBB0_15:
	xorl	%ebx, %ebx
LBB0_17:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpl	-72(%rbp), %r13d                ## 4-byte Folded Reload
	jle	LBB0_22
LBB0_23:
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	leaq	(%r15,%r14), %rdi
	addq	$2, %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %ecx
	addl	$3, %ecx
	cmpl	%r12d, %ecx
	jge	LBB0_25
## %bb.24:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_27
LBB0_25:
	addl	%r13d, %eax
	cmpl	%r12d, %eax
	jg	LBB0_11
## %bb.26:
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	addl	%r12d, %esi
	subl	%eax, %esi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	subl	%r13d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %r12d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
LBB0_27:
	movzbl	7(%rdx,%r14), %eax
	cmpl	%eax, %esi
	jg	LBB0_11
## %bb.28:
	subb	%sil, %al
	movb	%al, 7(%r14,%rdx)
LBB0_29:
	leaq	(%rdx,%r14), %rdi
	addq	$5, %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_get2byte
	cmpl	%eax, %r12d
	jle	LBB0_30
## %bb.33:
	movslq	%r13d, %rdi
	addq	%r14, %rdi
	movl	%r12d, %esi
	jmp	LBB0_34
LBB0_30:
	jl	LBB0_11
## %bb.31:
	cmpl	%r15d, %r13d
	jne	LBB0_11
## %bb.32:
	movslq	%r15d, %rdi
	addq	%r14, %rdi
	movl	%ebx, %esi
	callq	_put2byte
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
LBB0_34:
	callq	_put2byte
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	24(%r13), %rax
	movq	_BTS_FAST_SECURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movslq	%r12d, %r15
	testl	%ecx, 4(%rax)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_36
## %bb.35:
	leaq	(%r14,%r15), %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
LBB0_36:
	leaq	(%r14,%r15), %rdi
	movl	%ebx, %esi
	callq	_put2byte
	leaq	(%r15,%r14), %rdi
	addq	$2, %rdi
	movl	%r12d, %esi
	callq	_put2byte
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, 16(%r13)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SQLITE_CORRUPT_PAGE            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.comm	_BTS_FAST_SECURE,4,2            ## @BTS_FAST_SECURE
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_freeSpace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function freeSpace
_freeSpace:                             ; @freeSpace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x26, [x0]
	ldr	x8, [x0, #24]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	w0, [x19, #32]
	bl	_sqlite3PagerIswriteable
	bl	_assert
Lloh0:
	adrp	x23, _CORRUPT_DB@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CORRUPT_DB@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldp	w8, w9, [x19, #8]
	add	w8, w8, w9
	add	w8, w8, #6
	cmp	w8, w21
	cset	w0, le
LBB0_3:
	add	w22, w20, w21
	bl	_assert
	ldr	x8, [x23]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w0, #1
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	cmp	w22, w8
	cset	w0, le
LBB0_6:
	bl	_assert
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #8]
	bl	_sqlite3_mutex_held
	bl	_assert
	cmp	w20, #3
	cset	w0, gt
	bl	_assert
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	sub	w8, w8, #4
	cmp	w8, w21
	cset	w0, ge
	bl	_assert
	ldrsw	x25, [x19, #8]
	add	x27, x25, #1
	add	x8, x25, x26
	ldrb	w8, [x8, #2]
	cbnz	w8, LBB0_8
; %bb.7:
	ldrb	w8, [x26, x27]
	cbz	w8, LBB0_18
LBB0_8:
	mov	x23, x27
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x28, x23
	sxtw	x24, w28
	add	x0, x26, x24
	bl	_get2byte
	mov	x23, x0
	cmp	w0, w21
	b.ge	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w8, w28, #4
	cmp	w23, w8
	b.ge	LBB0_9
; %bb.11:
	cbnz	w23, LBB0_35
LBB0_12:
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	sub	w8, w8, #4
	cmp	w23, w8
	b.gt	LBB0_35
; %bb.13:
	cmp	w23, w28
	ccmp	w23, #0, #4, le
	cset	w0, eq
	bl	_assert
	cbz	w23, LBB0_15
; %bb.14:
	add	w8, w22, #3
	cmp	w8, w23
	b.ge	LBB0_19
LBB0_15:
	mov	w10, #0
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w28, w27
	b.le	LBB0_22
LBB0_16:
	str	w10, [sp, #8]                   ; 4-byte Folded Spill
	add	x8, x24, x26
	add	x0, x8, #2
	bl	_get2byte
	add	w8, w0, w28
	add	w9, w8, #3
	cmp	w9, w21
	b.ge	LBB0_23
; %bb.17:
	ldp	w10, w24, [sp, #8]              ; 8-byte Folded Reload
	b	LBB0_25
LBB0_18:
	mov	w23, #0
	mov	x28, x27
	mov	x24, x20
	b	LBB0_27
LBB0_19:
	subs	w8, w23, w22
	b.lt	LBB0_35
; %bb.20:
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	sxtw	x8, w23
	str	x8, [sp]                        ; 8-byte Folded Spill
	add	x8, x8, x26
	add	x0, x8, #2
	bl	_get2byte
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	add	w22, w0, w23
	cmp	w22, w8
	b.gt	LBB0_35
; %bb.21:
	sub	w8, w22, w21
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x0, x26, x8
	bl	_get2byte
	mov	x23, x0
	ldr	w10, [sp, #8]                   ; 4-byte Folded Reload
	cmp	w28, w27
	b.gt	LBB0_16
LBB0_22:
	ldr	w24, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_25
LBB0_23:
	cmp	w8, w21
	b.gt	LBB0_35
; %bb.24:
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	add	w9, w9, w21
	sub	w10, w9, w8
	sub	w24, w22, w28
	mov	x21, x28
LBB0_25:
	add	x8, x25, #7
	ldrb	w9, [x26, x8]
	cmp	w10, w9
	b.gt	LBB0_35
; %bb.26:
	sub	w9, w9, w10
	strb	w9, [x26, x8]
LBB0_27:
	add	w8, w25, #5
	add	x25, x26, w8, sxtw
	mov	x0, x25
	bl	_get2byte
	cmp	w21, w0
	b.le	LBB0_29
; %bb.28:
	add	x0, x26, w28, sxtw
	mov	x1, x21
	b	LBB0_32
LBB0_29:
	b.lt	LBB0_35
; %bb.30:
	cmp	w28, w27
	b.ne	LBB0_35
; %bb.31:
	add	x0, x26, w27, sxtw
	mov	x1, x23
	bl	_put2byte
	mov	x0, x25
	mov	x1, x22
LBB0_32:
	bl	_put2byte
	ldr	x8, [x19, #24]
	ldr	w8, [x8, #4]
Lloh2:
	adrp	x9, _BTS_FAST_SECURE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BTS_FAST_SECURE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	sxtw	x21, w21
	tst	w9, w8
	b.eq	LBB0_34
; %bb.33:
	add	x0, x26, x21
	mov	w1, #0
	mov	x2, x24
	bl	_memset
LBB0_34:
	add	x21, x26, x21
	mov	x0, x21
	mov	x1, x23
	bl	_put2byte
	add	x0, x21, #2
	mov	x1, x24
	bl	_put2byte
	ldr	w8, [x19, #16]
	add	w8, w8, w20
	str	w8, [x19, #16]
Lloh5:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_35:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_SQLITE_CORRUPT_PAGE
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.comm	_BTS_FAST_SECURE,4,2            ; @BTS_FAST_SECURE
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_freeSpace
.subsections_via_symbols
