	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruTruncate              ## -- Begin function SimpleLruTruncate
	.p2align	4, 0x90
_SimpleLruTruncate:                     ## @SimpleLruTruncate
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	16(%rdi), %r12
	movq	_SLRU_PAGES_PER_SEGMENT@GOTPCREL(%rip), %rcx
	movl	%esi, %eax
	cltd
	idivl	(%rcx)
	subl	%edx, %r15d
	movl	%r15d, -44(%rbp)
	movl	16(%r12), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movl	40(%r12), %edi
	movl	%r15d, %esi
	callq	*(%r14)
	testq	%rax, %rax
	je	LBB0_1
LBB0_14:
	movl	16(%r12), %edi
	callq	_LWLockRelease
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ereport                        ## TAILCALL
LBB0_1:
	movq	_SLRU_PAGE_EMPTY@GOTPCREL(%rip), %r13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, (%r12)
	jle	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	(%r13), %rax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	32(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r15d, %esi
	callq	*(%r14)
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	_SLRU_PAGE_VALID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	24(%r12), %rcx
	cmpl	$0, (%rcx,%rbx,4)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r13), %rcx
	movq	%rcx, (%rax,%rbx,8)
	jmp	LBB0_9
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SimpleLruWaitIO
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_SlruInternalWritePage
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	40(%r12), %edi
	movl	%r15d, %esi
	callq	*(%r14)
	testq	%rax, %rax
	je	LBB0_2
	jmp	LBB0_14
LBB0_10:
	movl	16(%r12), %edi
	callq	_LWLockRelease
	movq	_SlruScanDirCbDeleteCutoff@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_SlruScanDirectory
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SLRU_PAGES_PER_SEGMENT,4,2     ## @SLRU_PAGES_PER_SEGMENT
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not truncate directory \"%s\": apparent wraparound"

	.comm	_SLRU_PAGE_EMPTY,8,3            ## @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_VALID,8,3            ## @SLRU_PAGE_VALID
	.comm	_SlruScanDirCbDeleteCutoff,4,2  ## @SlruScanDirCbDeleteCutoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleLruTruncate              ; -- Begin function SimpleLruTruncate
	.p2align	2
_SimpleLruTruncate:                     ; @SimpleLruTruncate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x22, [x0, #16]
Lloh0:
	adrp	x8, _SLRU_PAGES_PER_SEGMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SLRU_PAGES_PER_SEGMENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w9, w1, w8
	mul	w20, w9, w8
	str	w20, [sp, #12]
	ldr	w0, [x22, #16]
Lloh3:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x8, [x19]
	ldr	w0, [x22, #40]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_2
LBB0_1:
	ldr	w0, [x22, #16]
	bl	_LWLockRelease
Lloh6:
	adrp	x8, _LOG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_ereport
LBB0_2:
Lloh11:
	adrp	x23, _SLRU_PAGE_EMPTY@GOTPAGE
Lloh12:
	ldr	x23, [x23, _SLRU_PAGE_EMPTY@GOTPAGEOFF]
Lloh13:
	adrp	x24, _SLRU_PAGE_VALID@GOTPAGE
Lloh14:
	ldr	x24, [x24, _SLRU_PAGE_VALID@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.ge	LBB0_14
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19]
	ldr	x9, [x22, #32]
	ldr	w0, [x9, x21, lsl #2]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x22, #8]
	ldr	x9, [x8, x21, lsl #3]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x9, [x22, #24]
	ldr	w9, [x9, x21, lsl #2]
	cbnz	w9, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x9, [x23]
	str	x9, [x8, x21, lsl #3]
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_SimpleLruWaitIO
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_SlruInternalWritePage
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	w0, [x22, #40]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_3
	b	LBB0_1
LBB0_14:
	ldr	w0, [x22, #16]
	bl	_LWLockRelease
Lloh15:
	adrp	x8, _SlruScanDirCbDeleteCutoff@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SlruScanDirCbDeleteCutoff@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_SlruScanDirectory
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SLRU_PAGES_PER_SEGMENT,4,2     ; @SLRU_PAGES_PER_SEGMENT
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not truncate directory \"%s\": apparent wraparound"

	.comm	_SLRU_PAGE_EMPTY,8,3            ; @SLRU_PAGE_EMPTY
	.comm	_SLRU_PAGE_VALID,8,3            ; @SLRU_PAGE_VALID
	.comm	_SlruScanDirCbDeleteCutoff,4,2  ; @SlruScanDirCbDeleteCutoff
.subsections_via_symbols
