	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_db_cacheflush          ## -- Begin function sqlite3_db_cacheflush
	.p2align	4, 0x90
_sqlite3_db_cacheflush:                 ## @sqlite3_db_cacheflush
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r15d
	movl	4(%rdi), %edi
	callq	_sqlite3_mutex_enter
	movq	%r14, %rdi
	callq	_sqlite3BtreeEnterAll
	xorl	%r12d, %r12d
	cmpl	(%rbx), %r15d
	jne	LBB0_12
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%edx, %r12d
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %r13d
	incq	%rbx
	movl	%ecx, %r15d
	cmpl	%ecx, %r13d
	jne	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %r13
	testq	%r13, %r13
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_sqlite3BtreeIsInTrans
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_sqlite3BtreePager
	movq	%rax, %rdi
	callq	_sqlite3PagerFlush
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$1, %edx
	movl	%ecx, %r15d
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	je	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %edx
	movl	%eax, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_3
LBB0_12:
	movl	%r15d, %r13d
LBB0_13:
	movq	%r14, %rdi
	callq	_sqlite3BtreeLeaveAll
	movl	4(%r14), %edi
	callq	_sqlite3_mutex_leave
	movl	%r13d, %eax
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.14:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	cmovnel	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_BUSY,4,2                ## @SQLITE_BUSY
	.comm	_SQLITE_MISUSE_BKPT,4,2         ## @SQLITE_MISUSE_BKPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_db_cacheflush          ; -- Begin function sqlite3_db_cacheflush
	.p2align	2
_sqlite3_db_cacheflush:                 ; @sqlite3_db_cacheflush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SQLITE_OK@GOTPAGEOFF]
	ldr	w20, [x21]
	ldr	w0, [x0, #4]
	bl	_sqlite3_mutex_enter
	mov	x0, x19
	bl	_sqlite3BtreeEnterAll
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _SQLITE_BUSY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SQLITE_BUSY@GOTPAGEOFF]
	cmp	w20, w8
	b.ne	LBB0_9
; %bb.1:
	mov	x24, #0
	mov	w23, #0
	mov	x25, x20
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x25
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x25
	add	x24, x24, #1
	mov	x25, x8
	cmp	w20, w8
	b.ne	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.ge	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x20, [x8, x24, lsl #3]
	cbz	x20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_sqlite3BtreeIsInTrans
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_sqlite3BtreePager
	bl	_sqlite3PagerFlush
	ldr	w9, [x22]
	ldr	w8, [x21]
	cmp	w0, w9
	csel	w25, w8, w0, eq
	csinc	w23, w23, wzr, ne
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	b	LBB0_3
LBB0_9:
	mov	w23, #0
	b	LBB0_11
LBB0_10:
	mov	x20, x25
LBB0_11:
	mov	x0, x19
	bl	_sqlite3BtreeLeaveAll
	ldr	w0, [x19, #4]
	bl	_sqlite3_mutex_leave
	ldr	w8, [x21]
	cmp	w23, #0
	ccmp	w20, w8, #0, ne
	ldr	w8, [x22]
	csel	w0, w8, w20, eq
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_BUSY,4,2                ; @SQLITE_BUSY
	.comm	_SQLITE_MISUSE_BKPT,4,2         ; @SQLITE_MISUSE_BKPT
.subsections_via_symbols
