	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_page_prune_opt            ## -- Begin function heap_page_prune_opt
	.p2align	4, 0x90
_heap_page_prune_opt:                   ## @heap_page_prune_opt
	.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, %ebx
	movl	%edi, %r14d
	movl	%esi, %edi
	callq	_BufferGetPage
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_RecoveryInProgress
	testq	%rax, %rax
	je	LBB0_1
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r14d, %edi
	callq	_IsCatalogRelation
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	_RelationIsAccessibleInLogicalDecoding
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_RecentGlobalXmin@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %edi
	callq	_TransactionIdIsValid
	movl	%eax, %edi
	callq	_Assert
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_PageIsPrunable
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	movq	_HEAP_DEFAULT_FILLFACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_RelationGetTargetPageFreeSpace
	movq	_BLCKSZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rsi         ## imm = 0x66666667
	movq	%rsi, %rcx
	shrq	$63, %rcx
	sarq	$34, %rsi
	addl	%ecx, %esi
	movq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_Max
	movq	%rax, %r13
	movl	%r15d, %edi
	callq	_PageIsFull
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %edi
	callq	_PageGetHeapFreeSpace
	cmpq	%r13, %rax
	jge	LBB0_13
LBB0_8:
	movl	%ebx, %edi
	callq	_ConditionalLockBufferForCleanup
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	%r15d, %edi
	callq	_PageIsFull
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movl	%r15d, %edi
	callq	_PageGetHeapFreeSpace
	cmpq	%r13, %rax
	jge	LBB0_12
LBB0_11:
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %r8
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_heap_page_prune
LBB0_12:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_LockBuffer
	jmp	LBB0_13
LBB0_4:
	movq	_RecentGlobalDataXmin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_TransactionIdLimitedForOldSnapshots
	movl	%eax, %r12d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_RecentGlobalXmin,4,2           ## @RecentGlobalXmin
	.comm	_RecentGlobalDataXmin,4,2       ## @RecentGlobalDataXmin
	.comm	_HEAP_DEFAULT_FILLFACTOR,4,2    ## @HEAP_DEFAULT_FILLFACTOR
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_InvalidTransactionId,4,2       ## @InvalidTransactionId
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_page_prune_opt            ; -- Begin function heap_page_prune_opt
	.p2align	2
_heap_page_prune_opt:                   ; @heap_page_prune_opt
	.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, x1
	mov	x20, x0
	mov	x0, x1
	bl	_BufferGetPage
	mov	x21, x0
	bl	_RecoveryInProgress
	cbz	x0, LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x0, x20
	bl	_IsCatalogRelation
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_RelationIsAccessibleInLogicalDecoding
	cbz	x0, LBB0_13
LBB0_4:
Lloh0:
	adrp	x8, _RecentGlobalXmin@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RecentGlobalXmin@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
LBB0_5:
	mov	x0, x22
	bl	_TransactionIdIsValid
	bl	_Assert
	mov	x0, x21
	mov	x1, x22
	bl	_PageIsPrunable
	cbz	w0, LBB0_1
; %bb.6:
Lloh3:
	adrp	x8, _HEAP_DEFAULT_FILLFACTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HEAP_DEFAULT_FILLFACTOR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_RelationGetTargetPageFreeSpace
Lloh6:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
	bl	_Max
	mov	x23, x0
	mov	x0, x21
	bl	_PageIsFull
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_PageGetHeapFreeSpace
	cmp	x0, x23
	b.ge	LBB0_1
LBB0_8:
	mov	x0, x19
	bl	_ConditionalLockBufferForCleanup
	cbz	w0, LBB0_1
; %bb.9:
	mov	x0, x21
	bl	_PageIsFull
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_PageGetHeapFreeSpace
	cmp	x0, x23
	b.ge	LBB0_12
LBB0_11:
Lloh9:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh10:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	add	x4, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	w3, #1
	bl	_heap_page_prune
LBB0_12:
Lloh12:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LockBuffer
	b	LBB0_1
LBB0_13:
Lloh15:
	adrp	x8, _RecentGlobalDataXmin@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RecentGlobalDataXmin@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_TransactionIdLimitedForOldSnapshots
	mov	x22, x0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RecentGlobalXmin,4,2           ; @RecentGlobalXmin
	.comm	_RecentGlobalDataXmin,4,2       ; @RecentGlobalDataXmin
	.comm	_HEAP_DEFAULT_FILLFACTOR,4,2    ; @HEAP_DEFAULT_FILLFACTOR
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_InvalidTransactionId,4,2       ; @InvalidTransactionId
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
.subsections_via_symbols
