	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pager_wait_on_lock
_pager_wait_on_lock:                    ## @pager_wait_on_lock
	.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, %r15
	movl	(%rdi), %eax
	movl	$1, %edi
	cmpl	%esi, %eax
	jge	LBB0_4
## %bb.1:
	movq	_NO_LOCK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	movq	_SHARED_LOCK@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_4
LBB0_3:
	movq	_RESERVED_LOCK@GOTPCREL(%rip), %rcx
	xorl	(%rcx), %eax
	movq	_EXCLUSIVE_LOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %ecx
	xorl	%edi, %edi
	orl	%eax, %ecx
	sete	%dil
LBB0_4:
	callq	_assert
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_pagerLockDb
	movl	%eax, %ebx
	cmpl	(%r12), %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r15), %edi
	callq	*8(%r15)
	testq	%rax, %rax
	jne	LBB0_5
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NO_LOCK,4,2                    ## @NO_LOCK
	.comm	_SHARED_LOCK,4,2                ## @SHARED_LOCK
	.comm	_RESERVED_LOCK,4,2              ## @RESERVED_LOCK
	.comm	_EXCLUSIVE_LOCK,4,2             ## @EXCLUSIVE_LOCK
	.comm	_SQLITE_BUSY,4,2                ## @SQLITE_BUSY
	.no_dead_strip	_pager_wait_on_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pager_wait_on_lock
_pager_wait_on_lock:                    ; @pager_wait_on_lock
	.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, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w1
	b.ge	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _NO_LOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NO_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SHARED_LOCK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SHARED_LOCK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w10, w19, #0, eq
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x9, _RESERVED_LOCK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RESERVED_LOCK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh9:
	adrp	x8, _EXCLUSIVE_LOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXCLUSIVE_LOCK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ccmp	w8, w19, #0, eq
	cset	w0, eq
	b	LBB0_4
LBB0_3:
	mov	w0, #1
LBB0_4:
	bl	_assert
Lloh12:
	adrp	x22, _SQLITE_BUSY@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SQLITE_BUSY@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_pagerLockDb
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x20, #4]
	blr	x8
	cbnz	x0, LBB0_5
LBB0_7:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NO_LOCK,4,2                    ; @NO_LOCK
	.comm	_SHARED_LOCK,4,2                ; @SHARED_LOCK
	.comm	_RESERVED_LOCK,4,2              ; @RESERVED_LOCK
	.comm	_EXCLUSIVE_LOCK,4,2             ; @EXCLUSIVE_LOCK
	.comm	_SQLITE_BUSY,4,2                ; @SQLITE_BUSY
	.no_dead_strip	_pager_wait_on_lock
.subsections_via_symbols
