	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heapgetpage                    ## -- Begin function heapgetpage
	.p2align	4, 0x90
_heapgetpage:                           ## @heapgetpage
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	%edi, %r13
	xorl	%edi, %edi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	cmpq	%rsi, (%r13)
	setg	%dil
	callq	_Assert
	movl	40(%r13), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	40(%r13), %edi
	callq	_ReleaseBuffer
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
LBB0_2:
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	28(%r13), %edi
	movl	56(%r13), %r8d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_ReadBufferExtended
	movl	%eax, %r15d
	movl	%eax, 40(%r13)
	movq	%rbx, 48(%r13)
	movq	_SO_ALLOW_PAGEMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r13)
	je	LBB0_15
## %bb.3:
	movq	32(%r13), %r14
	movl	28(%r13), %edi
	movl	%r15d, %esi
	callq	_heap_page_prune_opt
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	movl	%r15d, %edi
	callq	_BufferGetPage
	movq	%rax, %r12
	movl	28(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_TestForOldSnapshot
	movq	%r12, %rdi
	callq	_PageGetMaxOffsetNumber
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_PageIsAllVisible
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	cmpl	$0, (%r14)
	sete	%al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
LBB0_4:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_6:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_PageGetItemId
	cmpl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	jle	LBB0_7
LBB0_14:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	movq	_MaxHeapTuplesPerPage@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	(%rax), %ebx
	setle	%dil
	callq	_Assert
	movl	%ebx, 16(%r13)
LBB0_15:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %r12d
	incl	-48(%rbp)                       ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	28(%r13), %esi
	movl	$1, %edi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_CheckForSerializableConflictOut
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movslq	%edx, %rcx
	incl	%edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, (%rax,%rcx,4)
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r14d
	incl	%r12d
	cmpl	%r14d, -48(%rbp)                ## 4-byte Folded Reload
	je	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_ItemIdIsNormal
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	28(%r13), %edi
	callq	_RelationGetRelid
	movl	%eax, -88(%rbp)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_PageGetItem
	movq	%rax, -96(%rbp)
	movl	%r12d, %edi
	callq	_ItemIdGetLength
	movl	%eax, -100(%rbp)
	leaq	-104(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_ItemPointerSet
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_HeapTupleSatisfiesVisibility
	movl	%eax, %r15d
	movl	28(%r13), %esi
	movl	%eax, %edi
	movq	%rbx, %rdx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_CheckForSerializableConflictOut
	testl	%r15d, %r15d
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBuffer,4,2              ## @InvalidBuffer
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ## @RBM_NORMAL
	.comm	_SO_ALLOW_PAGEMODE,4,2          ## @SO_ALLOW_PAGEMODE
	.comm	_BUFFER_LOCK_SHARE,4,2          ## @BUFFER_LOCK_SHARE
	.comm	_FirstOffsetNumber,4,2          ## @FirstOffsetNumber
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.comm	_MaxHeapTuplesPerPage,4,2       ## @MaxHeapTuplesPerPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heapgetpage                    ; -- Begin function heapgetpage
	.p2align	2
_heapgetpage:                           ; @heapgetpage
	.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
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x26, w0
	ldr	x8, [x26]
	str	x1, [sp]                        ; 8-byte Folded Spill
	cmp	x8, x1
	cset	w0, gt
	bl	_Assert
	ldr	w0, [x26, #40]
	bl	_BufferIsValid
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x26, #40]
	bl	_ReleaseBuffer
Lloh0:
	adrp	x8, _InvalidBuffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidBuffer@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x26, #40]
LBB0_2:
	bl	_CHECK_FOR_INTERRUPTS
Lloh3:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
	ldr	w0, [x26, #28]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RBM_NORMAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RBM_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	ldr	w4, [x26, #56]
	ldr	x19, [sp]                       ; 8-byte Folded Reload
	mov	x2, x19
	bl	_ReadBufferExtended
	str	w0, [x26, #40]
	str	x19, [x26, #48]
	ldr	w8, [x26, #24]
Lloh9:
	adrp	x9, _SO_ALLOW_PAGEMODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SO_ALLOW_PAGEMODE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
	mov	x20, x0
	ldr	x21, [x26, #32]
	ldr	w0, [x26, #28]
	mov	x1, x20
	bl	_heap_page_prune_opt
Lloh12:
	adrp	x8, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_LockBuffer
	mov	x0, x20
	bl	_BufferGetPage
	mov	x22, x0
	ldr	w1, [x26, #28]
	mov	x0, x21
	mov	x2, x22
	bl	_TestForOldSnapshot
	mov	x0, x22
	bl	_PageGetMaxOffsetNumber
	mov	x25, x0
	mov	x0, x22
	bl	_PageIsAllVisible
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w28, eq
	b	LBB0_6
LBB0_5:
	mov	w28, #0
LBB0_6:
Lloh15:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_PageGetItemId
	cmp	w23, w25
	b.le	LBB0_10
; %bb.7:
	mov	w27, #0
LBB0_8:
Lloh18:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_LockBuffer
Lloh21:
	adrp	x8, _MaxHeapTuplesPerPage@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MaxHeapTuplesPerPage@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w27, w8
	cset	w0, le
	bl	_Assert
	str	w27, [x26, #16]
LBB0_9:
	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
LBB0_10:
	mov	x24, x0
	mov	w27, #0
	add	w19, w25, #1
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w1, [x26, #28]
	add	x2, sp, #8
	mov	w0, #1
	mov	x3, x20
	mov	x4, x21
	bl	_CheckForSerializableConflictOut
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x26, #8]
	str	w23, [x8, w27, sxtw #2]
	add	w27, w27, #1
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w23, w23, #1
	add	w24, w24, #1
	cmp	w19, w23
	b.eq	LBB0_8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_ItemIdIsNormal
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x26, #28]
	bl	_RelationGetRelid
	str	w0, [sp, #24]
	mov	x0, x22
	mov	x1, x24
	bl	_PageGetItem
	str	x0, [sp, #16]
	mov	x0, x24
	bl	_ItemIdGetLength
	str	w0, [sp, #12]
	add	x0, sp, #8
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	mov	x2, x23
	bl	_ItemPointerSet
	cbnz	w28, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x20
	bl	_HeapTupleSatisfiesVisibility
	mov	x25, x0
	ldr	w1, [x26, #28]
	add	x2, sp, #8
	mov	x3, x20
	mov	x4, x21
	bl	_CheckForSerializableConflictOut
	cbnz	w25, LBB0_12
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBuffer,4,2              ; @InvalidBuffer
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ; @RBM_NORMAL
	.comm	_SO_ALLOW_PAGEMODE,4,2          ; @SO_ALLOW_PAGEMODE
	.comm	_BUFFER_LOCK_SHARE,4,2          ; @BUFFER_LOCK_SHARE
	.comm	_FirstOffsetNumber,4,2          ; @FirstOffsetNumber
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.comm	_MaxHeapTuplesPerPage,4,2       ; @MaxHeapTuplesPerPage
.subsections_via_symbols
