	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SlruInternalWritePage
_SlruInternalWritePage:                 ## @SlruInternalWritePage
	.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
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movslq	%esi, %rbx
	movq	(%r13), %rcx
	movq	8(%r13), %rax
	movl	(%rcx,%rbx,4), %r14d
	movq	(%rax,%rbx,8), %rdx
	movq	_SLRU_PAGE_WRITE_IN_PROGRESS@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_SimpleLruWaitIO
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rdx
	movq	(%r12), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rsi
	movq	%rdx, %rcx
	cmpl	%r14d, (%rsi,%rbx,4)
	je	LBB0_1
LBB0_3:
	movq	16(%r13), %rsi
	cmpl	$0, (%rsi,%rbx,4)
	je	LBB0_15
## %bb.4:
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	jne	LBB0_15
## %bb.5:
	movq	(%r13), %rdx
	cmpl	%r14d, (%rdx,%rbx,4)
	jne	LBB0_15
## %bb.6:
	movq	%rcx, (%rax,%rbx,8)
	movl	$0, (%rsi,%rbx,4)
	leaq	(,%rbx,4), %rax
	movq	24(%r13), %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	%rax, %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	32(%r13), %rdi
	callq	_LWLockRelease
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_SlruPhysicalWritePage
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testq	%r12, %r12
	je	LBB0_11
## %bb.7:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rcx
	cmpl	$0, (%r12)
	jle	LBB0_11
## %bb.9:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rcx), %rax
	movl	(%rax,%r12,4), %edi
	callq	_CloseTransientFile
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	incq	%r12
	movslq	(%rcx), %rax
	cmpq	%rax, %r12
	jl	LBB0_10
LBB0_11:
	movq	32(%r13), %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	(%r13), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax,%rbx,4)
	jne	LBB0_13
## %bb.12:
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	xorl	%edi, %edi
	movq	_SLRU_PAGE_WRITE_IN_PROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
LBB0_13:
	callq	_Assert
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.14:
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	24(%r13), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LWLockRelease                  ## TAILCALL
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	16(%r13), %rax
	movl	$1, (%rax,%rbx,4)
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	24(%r13), %rdi
	callq	_LWLockRelease
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SlruReportIOError              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.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
	.comm	_InvalidTransactionId,4,2       ## @InvalidTransactionId
	.no_dead_strip	_SlruInternalWritePage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SlruInternalWritePage
_SlruInternalWritePage:                 ; @SlruInternalWritePage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x23, [x0]
	sxtw	x24, w22
	ldp	x9, x8, [x23]
	ldr	w20, [x9, w1, sxtw #2]
	ldr	x10, [x8, w1, sxtw #3]
Lloh0:
	adrp	x25, _SLRU_PAGE_WRITE_IN_PROGRESS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SLRU_PAGE_WRITE_IN_PROGRESS@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x10, x9
	b.ne	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_SimpleLruWaitIO
	ldr	x8, [x23, #8]
	ldr	x10, [x8, x24, lsl #3]
	ldr	x9, [x25]
	cmp	x10, x9
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x23]
	ldr	w11, [x9, x24, lsl #2]
	mov	x9, x10
	cmp	w11, w20
	b.eq	LBB0_1
LBB0_3:
	ldr	x11, [x23, #16]
	ldr	w12, [x11, x24, lsl #2]
Lloh2:
	adrp	x26, _SLRU_PAGE_VALID@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SLRU_PAGE_VALID@GOTPAGEOFF]
	ldr	x13, [x26]
	cmp	w12, #0
	ccmp	x10, x13, #0, ne
	b.ne	LBB0_13
; %bb.4:
	ldr	x10, [x23]
	ldr	w10, [x10, x24, lsl #2]
	cmp	w10, w20
	b.ne	LBB0_13
; %bb.5:
	str	x9, [x8, x24, lsl #3]
	lsl	x27, x24, #2
	str	wzr, [x11, x27]
	ldr	x8, [x23, #24]
	add	x0, x8, x27
Lloh4:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x0, [x23, #32]
	bl	_LWLockRelease
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_SlruPhysicalWritePage
	mov	x22, x0
	cbz	x21, LBB0_10
; %bb.6:
	cbnz	w22, LBB0_10
; %bb.7:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x28, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x28, lsl #2]
	bl	_CloseTransientFile
	add	x28, x28, #1
	ldrsw	x8, [x21]
	cmp	x28, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	x0, [x23, #32]
Lloh7:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x8, [x23]
	ldr	w8, [x8, x24, lsl #2]
	cmp	w8, w20
	b.ne	LBB0_14
; %bb.11:
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x24, lsl #3]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	cbz	w22, LBB0_15
LBB0_12:
	ldr	x8, [x26]
	ldr	x9, [x23, #8]
	str	x8, [x9, x24, lsl #3]
	ldr	x8, [x23, #24]
	add	x0, x8, x24, lsl #2
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_LWLockRelease
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w0, #0
	bl	_Assert
	cbnz	w22, LBB0_12
LBB0_15:
	mov	w8, #1
	ldp	x10, x9, [x23, #8]
	str	w8, [x9, x27]
	ldr	x8, [x26]
	str	x8, [x10, x24, lsl #3]
	ldr	x8, [x23, #24]
	add	x0, x8, x27
	bl	_LWLockRelease
Lloh10:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh11:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_SlruReportIOError
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.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
	.comm	_InvalidTransactionId,4,2       ; @InvalidTransactionId
	.no_dead_strip	_SlruInternalWritePage
.subsections_via_symbols
