	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruFlush                 ## -- Begin function SimpleLruFlush
	.p2align	4, 0x90
_SimpleLruFlush:                        ## @SimpleLruFlush
	.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	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r13
	movl	$0, -64(%rbp)
	movl	16(%r13), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %r12
	jmp	LBB0_2
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r13), %rax
	cmpl	$0, (%rax,%rbx,4)
	sete	%al
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %edi
	callq	_Assert
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_SlruInternalWritePage
	movb	$1, %al
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	_SLRU_PAGE_EMPTY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_8:
	movl	16(%r13), %edi
	callq	_LWLockRelease
	cmpl	$0, -64(%rbp)
	jle	LBB0_18
## %bb.9:
	movl	$1, %r15d
	movq	_SLRU_PAGES_PER_SEGMENT@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r12
	movslq	-64(%rbp), %rax
	cmpq	%rax, %r12
	jge	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	_WAIT_EVENT_SLRU_FLUSH_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgstat_report_wait_start
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rax
	movl	(%rax,%r12,4), %edi
	callq	_pg_fsync
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_SLRU_FSYNC_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_slru_errcause@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_slru_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rax
	movl	(%r13), %ebx
	imull	(%rax,%r12,4), %ebx
	xorl	%r15d, %r15d
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_pgstat_report_wait_end
	movq	-48(%rbp), %rax
	movl	(%rax,%r12,4), %edi
	callq	_CloseTransientFile
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_SLRU_CLOSE_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_slru_errcause@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_slru_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rax
	movl	(%r13), %ebx
	imull	(%rax,%r12,4), %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_16:
	testl	%r15d, %r15d
	jne	LBB0_18
## %bb.17:
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SlruReportIOError
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_SLRU_PAGE_EMPTY,8,3            ## @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_VALID,8,3            ## @SLRU_PAGE_VALID
	.comm	_WAIT_EVENT_SLRU_FLUSH_SYNC,4,2 ## @WAIT_EVENT_SLRU_FLUSH_SYNC
	.comm	_SLRU_FSYNC_FAILED,4,2          ## @SLRU_FSYNC_FAILED
	.comm	_slru_errcause,4,2              ## @slru_errcause
	.comm	_errno,4,2                      ## @errno
	.comm	_slru_errno,4,2                 ## @slru_errno
	.comm	_SLRU_PAGES_PER_SEGMENT,4,2     ## @SLRU_PAGES_PER_SEGMENT
	.comm	_SLRU_CLOSE_FAILED,4,2          ## @SLRU_CLOSE_FAILED
	.comm	_InvalidTransactionId,4,2       ## @InvalidTransactionId
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruFlush                 ; -- Begin function SimpleLruFlush
	.p2align	2
_SimpleLruFlush:                        ; @SimpleLruFlush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	str	wzr, [sp, #8]
	ldr	w0, [x22, #16]
Lloh0:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x21, #0
Lloh3:
	adrp	x23, _SLRU_PAGE_EMPTY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SLRU_PAGE_EMPTY@GOTPAGEOFF]
Lloh5:
	adrp	x24, _SLRU_PAGE_VALID@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SLRU_PAGE_VALID@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_Assert
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_SlruInternalWritePage
	cbnz	w20, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #24]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #0
	b	LBB0_3
LBB0_9:
	ldr	w0, [x22, #16]
	bl	_LWLockRelease
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.10:
	mov	x21, #0
	mov	w20, #0
	mov	w22, #1
Lloh7:
	adrp	x23, _WAIT_EVENT_SLRU_FLUSH_SYNC@GOTPAGE
Lloh8:
	ldr	x23, [x23, _WAIT_EVENT_SLRU_FLUSH_SYNC@GOTPAGEOFF]
Lloh9:
	adrp	x24, _SLRU_CLOSE_FAILED@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SLRU_CLOSE_FAILED@GOTPAGEOFF]
Lloh11:
	adrp	x25, _slru_errcause@GOTPAGE
Lloh12:
	ldr	x25, [x25, _slru_errcause@GOTPAGEOFF]
Lloh13:
	adrp	x26, _errno@GOTPAGE
Lloh14:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
Lloh15:
	adrp	x27, _slru_errno@GOTPAGE
Lloh16:
	ldr	x27, [x27, _slru_errno@GOTPAGEOFF]
Lloh17:
	adrp	x28, _SLRU_PAGES_PER_SEGMENT@GOTPAGE
Lloh18:
	ldr	x28, [x28, _SLRU_PAGES_PER_SEGMENT@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [sp, #8]
	cmp	x21, x8
	b.ge	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_pgstat_report_wait_start
	ldr	x8, [x19]
	cbz	x8, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #24]
	ldr	w0, [x8, x21, lsl #2]
	bl	_pg_fsync
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w22, #0
Lloh19:
	adrp	x8, _SLRU_FSYNC_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SLRU_FSYNC_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x25]
	ldr	w8, [x26]
	str	w8, [x27]
	ldr	x8, [sp, #16]
	ldr	w8, [x8, x21, lsl #2]
	ldr	w9, [x28]
	mul	w20, w9, w8
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_pgstat_report_wait_end
	ldr	x8, [sp, #24]
	ldr	w0, [x8, x21, lsl #2]
	bl	_CloseTransientFile
	cbz	x0, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w22, #0
	ldr	w8, [x24]
	str	w8, [x25]
	ldr	w8, [x26]
	str	w8, [x27]
	ldr	x8, [sp, #16]
	ldr	w8, [x8, x21, lsl #2]
	ldr	w9, [x28]
	mul	w20, w9, w8
	b	LBB0_11
LBB0_17:
	cbnz	w22, LBB0_19
; %bb.18:
Lloh22:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh23:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_SlruReportIOError
LBB0_19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_SLRU_PAGE_EMPTY,8,3            ; @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_VALID,8,3            ; @SLRU_PAGE_VALID
	.comm	_WAIT_EVENT_SLRU_FLUSH_SYNC,4,2 ; @WAIT_EVENT_SLRU_FLUSH_SYNC
	.comm	_SLRU_FSYNC_FAILED,4,2          ; @SLRU_FSYNC_FAILED
	.comm	_slru_errcause,4,2              ; @slru_errcause
	.comm	_errno,4,2                      ; @errno
	.comm	_slru_errno,4,2                 ; @slru_errno
	.comm	_SLRU_PAGES_PER_SEGMENT,4,2     ; @SLRU_PAGES_PER_SEGMENT
	.comm	_SLRU_CLOSE_FAILED,4,2          ; @SLRU_CLOSE_FAILED
	.comm	_InvalidTransactionId,4,2       ; @InvalidTransactionId
.subsections_via_symbols
