	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function walIndexClose
_walIndexClose:                         ## @walIndexClose
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_WAL_HEAPMEMORY_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	cmpl	$0, 8(%r14)
	jle	LBB0_4
## %bb.2:
	movq	16(%r14), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx,8), %rdi
	callq	_sqlite3_free
	movq	16(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	8(%r14), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_3
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	12(%r14), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sqlite3OsShmUnmap              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WAL_HEAPMEMORY_MODE,8,3        ## @WAL_HEAPMEMORY_MODE
	.no_dead_strip	_walIndexClose
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function walIndexClose
_walIndexClose:                         ; @walIndexClose
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _WAL_HEAPMEMORY_MODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WAL_HEAPMEMORY_MODE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, #0
	ldr	x8, [x19, #16]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x21, x20, #3
	ldr	x0, [x8, x21]
	bl	_sqlite3_free
	ldr	x8, [x19, #16]
	str	xzr, [x8, x21]
	add	x20, x20, #1
	ldrsw	x9, [x19, #8]
	cmp	x20, x9
	b.lt	LBB0_3
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x19, #12]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_sqlite3OsShmUnmap
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WAL_HEAPMEMORY_MODE,8,3        ; @WAL_HEAPMEMORY_MODE
	.no_dead_strip	_walIndexClose
.subsections_via_symbols
