	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_vacuum_needs_cleanup
__bt_vacuum_needs_cleanup:              ## @_bt_vacuum_needs_cleanup
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	movq	_BTREE_METAPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	__bt_getbuf
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_BTPageGetMeta
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_BTREE_NOVAC_VERSION@GOTPCREL(%rip), %rcx
	movl	$1, %r12d
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.1:
	movl	12(%rbx), %edi
	callq	_TransactionIdIsValid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	12(%rbx), %edi
	movq	_RecentGlobalXmin@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TransactionIdPrecedes
	testq	%rax, %rax
	jne	LBB0_10
LBB0_3:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jns	LBB0_6
LBB0_5:
	movq	_vacuum_cleanup_index_scale_factor@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.7:
	movl	8(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_9
## %bb.8:
	movl	(%r15), %eax
	subl	%esi, %eax
	cltd
	idivl	%esi
	xorl	%r12d, %r12d
	cmpl	%ecx, %eax
	jl	LBB0_10
LBB0_9:
	movl	$1, %r12d
LBB0_10:
	movq	8(%r15), %rdi
	movl	%r14d, %esi
	callq	__bt_relbuf
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTREE_METAPAGE,4,2             ## @BTREE_METAPAGE
	.comm	_BT_READ,4,2                    ## @BT_READ
	.comm	_BTREE_NOVAC_VERSION,8,3        ## @BTREE_NOVAC_VERSION
	.comm	_RecentGlobalXmin,4,2           ## @RecentGlobalXmin
	.comm	_vacuum_cleanup_index_scale_factor,4,2 ## @vacuum_cleanup_index_scale_factor
	.no_dead_strip	__bt_vacuum_needs_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_vacuum_needs_cleanup
__bt_vacuum_needs_cleanup:              ; @_bt_vacuum_needs_cleanup
	.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, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _BTREE_METAPAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTREE_METAPAGE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	__bt_getbuf
	mov	x20, x0
	bl	_BufferGetPage
	bl	_BTPageGetMeta
	ldr	x8, [x0]
Lloh6:
	adrp	x9, _BTREE_NOVAC_VERSION@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTREE_NOVAC_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_9
; %bb.1:
	mov	x21, x0
	ldr	w0, [x0, #12]
	bl	_TransactionIdIsValid
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x21, #12]
Lloh9:
	adrp	x8, _RecentGlobalXmin@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RecentGlobalXmin@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_TransactionIdPrecedes
	cbnz	x0, LBB0_9
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x8]
	tbz	x8, #63, LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _vacuum_cleanup_index_scale_factor@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vacuum_cleanup_index_scale_factor@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_6:
	ldr	w9, [x21, #8]
	cmp	w8, #1
	ccmp	w9, #1, #8, ge
	b.lt	LBB0_9
; %bb.7:
	ldr	w10, [x19]
	sub	w10, w10, w9
	sdiv	w9, w10, w9
	cmp	w9, w8
	b.ge	LBB0_9
; %bb.8:
	mov	w21, #0
	b	LBB0_10
LBB0_9:
	mov	w21, #1
LBB0_10:
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	__bt_relbuf
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BTREE_METAPAGE,4,2             ; @BTREE_METAPAGE
	.comm	_BT_READ,4,2                    ; @BT_READ
	.comm	_BTREE_NOVAC_VERSION,8,3        ; @BTREE_NOVAC_VERSION
	.comm	_RecentGlobalXmin,4,2           ; @RecentGlobalXmin
	.comm	_vacuum_cleanup_index_scale_factor,4,2 ; @vacuum_cleanup_index_scale_factor
	.no_dead_strip	__bt_vacuum_needs_cleanup
.subsections_via_symbols
