	.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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	_WAL_HEAPMEMORY_MODE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	cmpq	%rcx, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, 24(%r12)
	je	LBB0_6
LBB0_2:
	cmpl	$0, 8(%r12)
	jle	LBB0_6
## %bb.3:
	movq	16(%r12), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx,8), %rdi
	callq	_sqlite3_free
	movq	16(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	8(%r12), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_4
## %bb.5:
	movq	(%r12), %rax
	movq	(%r15), %rcx
LBB0_6:
	cmpq	%rcx, %rax
	jne	LBB0_8
## %bb.7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	12(%r12), %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _WAL_HEAPMEMORY_MODE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WAL_HEAPMEMORY_MODE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x10, [x20, #24]
	cbz	x10, LBB0_6
LBB0_2:
	ldr	w10, [x20, #8]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x22, #0
	ldr	x8, [x20, #16]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_sqlite3_free
	ldr	x8, [x20, #16]
	str	xzr, [x8, x23]
	add	x22, x22, #1
	ldrsw	x9, [x20, #8]
	cmp	x22, x9
	b.lt	LBB0_4
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x21]
LBB0_6:
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x20, #12]
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sqlite3OsShmUnmap
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WAL_HEAPMEMORY_MODE,8,3        ; @WAL_HEAPMEMORY_MODE
	.no_dead_strip	_walIndexClose
.subsections_via_symbols
