	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruReadPage              ## -- Begin function SimpleLruReadPage
	.p2align	4, 0x90
_SimpleLruReadPage:                     ## @SimpleLruReadPage
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	(%rdi), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_SimpleLruWaitIO
	movq	%r13, %rdi
	movl	%r12d, %esi
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	callq	_SlruSelectLRUPage
	movl	%eax, %ebx
	movq	(%r14), %rax
	movslq	%ebx, %r15
	cmpl	%r12d, (%rax,%r15,4)
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	_SLRU_PAGE_EMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_SLRU_PAGE_READ_IN_PROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_SLRU_PAGE_WRITE_IN_PROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
	jmp	LBB0_18
LBB0_7:
	movq	8(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	_SLRU_PAGE_EMPTY@GOTPCREL(%rip), %rcx
	movl	$1, %edi
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	16(%r14), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax,%r15,4)
	sete	%dil
LBB0_10:
	callq	_Assert
	movq	(%r14), %rax
	leaq	(,%r15,4), %rdx
	movl	%r12d, (%rax,%r15,4)
	movq	_SLRU_PAGE_READ_IN_PROGRESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	16(%r14), %rax
	movl	$0, (%rax,%r15,4)
	movq	24(%r14), %rdi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	addq	%rdx, %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	32(%r14), %rdi
	callq	_LWLockRelease
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_SlruPhysicalReadPage
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_SimpleLruZeroLSNs
	movq	32(%r14), %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpl	%r12d, (%rax,%r15,4)
	jne	LBB0_13
## %bb.11:
	movq	8(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	_SLRU_PAGE_READ_IN_PROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	16(%r14), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax,%r15,4)
	sete	%dil
LBB0_13:
	callq	_Assert
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_14
## %bb.15:
	movq	_SLRU_PAGE_EMPTY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rax
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%r15,8)
	addq	24(%r14), %rdi
	callq	_LWLockRelease
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_SlruReportIOError
LBB0_18:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SlruRecentlyUsed
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SLRU_PAGE_EMPTY,8,3            ## @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_READ_IN_PROGRESS,8,3 ## @SLRU_PAGE_READ_IN_PROGRESS
	.comm	_SLRU_PAGE_WRITE_IN_PROGRESS,8,3 ## @SLRU_PAGE_WRITE_IN_PROGRESS
	.comm	_SLRU_PAGE_VALID,8,3            ## @SLRU_PAGE_VALID
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruReadPage              ; -- Begin function SimpleLruReadPage
	.p2align	2
_SimpleLruReadPage:                     ; @SimpleLruReadPage
	.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
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x19, [x0]
	bl	_SlruSelectLRUPage
	mov	x20, x0
	ldr	x8, [x19]
	mov	x9, x0
	ldr	w8, [x8, w0, sxtw #2]
	sxtw	x26, w9
Lloh0:
	adrp	x25, _SLRU_PAGE_EMPTY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SLRU_PAGE_EMPTY@GOTPAGEOFF]
Lloh2:
	adrp	x27, _SLRU_PAGE_READ_IN_PROGRESS@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SLRU_PAGE_READ_IN_PROGRESS@GOTPAGEOFF]
	cmp	w8, w22
	b.ne	LBB0_7
; %bb.1:
Lloh4:
	adrp	x28, _SLRU_PAGE_WRITE_IN_PROGRESS@GOTPAGE
Lloh5:
	ldr	x28, [x28, _SLRU_PAGE_WRITE_IN_PROGRESS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	mov	x1, x20
	bl	_SimpleLruWaitIO
	mov	x0, x23
	mov	x1, x22
	bl	_SlruSelectLRUPage
	mov	x20, x0
	ldr	x8, [x19]
	sxtw	x26, w20
	ldr	w8, [x8, w0, sxtw #2]
	cmp	w8, w22
	b.ne	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w24, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_2
	b	LBB0_18
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x9, [x25]
Lloh6:
	adrp	x10, _SLRU_PAGE_VALID@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SLRU_PAGE_VALID@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #1
	b	LBB0_12
LBB0_9:
	ldr	x9, [x10]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x26, lsl #2]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	bl	_Assert
	lsl	x21, x26, #2
	ldp	x8, x9, [x19]
	str	w22, [x8, x21]
	ldr	x8, [x27]
	str	x8, [x9, x26, lsl #3]
	ldp	x8, x9, [x19, #16]
	str	wzr, [x8, x21]
	add	x0, x9, x21
Lloh8:
	adrp	x28, _LW_EXCLUSIVE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _LW_EXCLUSIVE@GOTPAGEOFF]
	ldr	w1, [x28]
	bl	_LWLockAcquire
	ldr	x0, [x19, #32]
	bl	_LWLockRelease
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_SlruPhysicalReadPage
	mov	x24, x0
	mov	x0, x23
	mov	x1, x20
	bl	_SimpleLruZeroLSNs
	ldr	x0, [x19, #32]
	ldr	w1, [x28]
	bl	_LWLockAcquire
	mov	w0, #0
	ldr	x8, [x19]
	ldr	w8, [x8, x21]
	cmp	w8, w22
	b.ne	LBB0_16
; %bb.13:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x26, lsl #2]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	bl	_Assert
	cmp	w24, #0
Lloh10:
	adrp	x8, _SLRU_PAGE_VALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SLRU_PAGE_VALID@GOTPAGEOFF]
	csel	x8, x25, x8, eq
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	str	x8, [x9, x26, lsl #3]
	ldr	x8, [x19, #24]
	add	x0, x8, x26, lsl #2
	bl	_LWLockRelease
	cbnz	w24, LBB0_18
; %bb.17:
	mov	x0, x23
	mov	x1, x22
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_SlruReportIOError
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_SlruRecentlyUsed
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SLRU_PAGE_EMPTY,8,3            ; @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_READ_IN_PROGRESS,8,3 ; @SLRU_PAGE_READ_IN_PROGRESS
	.comm	_SLRU_PAGE_WRITE_IN_PROGRESS,8,3 ; @SLRU_PAGE_WRITE_IN_PROGRESS
	.comm	_SLRU_PAGE_VALID,8,3            ; @SLRU_PAGE_VALID
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
.subsections_via_symbols
