	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_page_prune                ## -- Begin function heap_page_prune
	.p2align	4, 0x90
_heap_page_prune:                       ## @heap_page_prune
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%ecx, %r15d
	movl	%esi, %r13d
	movl	%edi, %r14d
	movl	%esi, %edi
	callq	_BufferGetPage
	movq	%rax, %rbx
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	movl	(%r12), %eax
	movl	%eax, -68(%rbp)
	movl	$0, -72(%rbp)
	movq	$0, -80(%rbp)
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%rbx, %rdi
	callq	_PageGetMaxOffsetNumber
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movslq	-80(%rbp), %rdx
	movl	-76(%rbp), %r8d
	movl	-72(%rbp), %eax
	testq	%rdx, %rdx
	jg	LBB0_3
## %bb.1:
	testl	%r8d, %r8d
	jg	LBB0_3
## %bb.2:
	testl	%eax, %eax
	jg	LBB0_3
## %bb.5:
	movq	-88(%rbp), %rax
	cmpq	%rax, (%rbx)
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_PageIsFull
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	-88(%rbp), %rax
LBB0_8:
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_PageClearFull
	movl	%r13d, %edi
	movl	$1, %esi
	callq	_MarkBufferDirtyHint
	jmp	LBB0_9
LBB0_3:
	cltq
	movl	-56(%rbp), %esi
	movl	-64(%rbp), %r9d
	movl	-60(%rbp), %ecx
	subq	$8, %rsp
	movl	%r13d, %edi
	pushq	%rax
	callq	_heap_page_prune_execute
	addq	$16, %rsp
	movq	-88(%rbp), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_PageClearFull
	movl	%r13d, %edi
	callq	_MarkBufferDirty
	movl	%r14d, %edi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movl	-56(%rbp), %edx
	movslq	-80(%rbp), %rcx
	movl	-60(%rbp), %r8d
	movl	-64(%rbp), %r10d
	movslq	-72(%rbp), %rbx
	movl	-76(%rbp), %r9d
	movl	-68(%rbp), %eax
	subq	$8, %rsp
	movl	%r14d, %edi
	movl	%r13d, %esi
	pushq	%rax
	pushq	%rbx
	pushq	%r10
	callq	_log_heap_clean
	addq	$32, %rsp
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_BufferGetPage
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_PageSetLSN
LBB0_9:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.10:
	movl	-76(%rbp), %esi
	testl	%esi, %esi
	jns	LBB0_12
## %bb.11:
	negl	%esi
	movl	%r14d, %edi
	callq	_pgstat_update_heap_dead_tuples
LBB0_12:
	movl	-68(%rbp), %eax
	movl	%eax, (%r12)
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidTransactionId,8,3       ## @InvalidTransactionId
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_page_prune                ; -- Begin function heap_page_prune
	.p2align	2
_heap_page_prune:                       ; @heap_page_prune
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x4
	mov	x21, x3
	mov	x22, x1
	mov	x20, x0
	mov	x0, x1
	bl	_BufferGetPage
	mov	x23, x0
Lloh0:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, xzr, [sp, #16]
	ldr	w8, [x19]
	stp	wzr, w8, [sp, #32]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x0, x23
	bl	_PageGetMaxOffsetNumber
	bl	_START_CRIT_SECTION
	ldp	w2, w4, [sp, #24]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	ldr	w8, [sp, #32]
	cmp	w2, #0
	b.gt	LBB0_7
; %bb.1:
	cmp	w4, #0
	b.gt	LBB0_7
; %bb.2:
	cmp	w8, #1
	b.ge	LBB0_7
; %bb.3:
	ldr	x9, [x23]
	ldr	x8, [sp, #16]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x23
	bl	_PageIsFull
	cbz	x0, LBB0_9
; %bb.5:
	ldr	x8, [sp, #16]
LBB0_6:
	str	x8, [x23]
	mov	x0, x23
	bl	_PageClearFull
	mov	x0, x22
	mov	w1, #1
	bl	_MarkBufferDirtyHint
	b	LBB0_9
LBB0_7:
	sxtw	x6, w8
	ldp	w3, w1, [sp, #44]
	ldr	w5, [sp, #40]
	mov	x0, x22
	bl	_heap_page_prune_execute
	ldr	x8, [sp, #16]
	str	x8, [x23]
	mov	x0, x23
	bl	_PageClearFull
	mov	x0, x22
	bl	_MarkBufferDirty
	mov	x0, x20
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_9
; %bb.8:
	ldp	w4, w2, [sp, #44]
	ldp	w3, w5, [sp, #24]
                                        ; kill: def $w3 killed $w3 def $x3
	sxtw	x3, w3
	ldp	w8, w6, [sp, #36]
	ldrsw	x7, [sp, #32]
	str	w8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_log_heap_clean
	mov	x23, x0
	mov	x0, x22
	bl	_BufferGetPage
	mov	x1, x23
	bl	_PageSetLSN
LBB0_9:
	bl	_END_CRIT_SECTION
	cbz	w21, LBB0_12
; %bb.10:
	ldr	w8, [sp, #28]
	tbz	w8, #31, LBB0_12
; %bb.11:
	neg	w1, w8
	mov	x0, x20
	bl	_pgstat_update_heap_dead_tuples
LBB0_12:
	ldr	w8, [sp, #36]
	str	w8, [x19]
	mov	w0, #0
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidTransactionId,8,3       ; @InvalidTransactionId
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
.subsections_via_symbols
