	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heapam_scan_sample_next_tuple
_heapam_scan_sample_next_tuple:         ## @heapam_scan_sample_next_tuple
	.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	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	movl	24(%rdi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_SO_ALLOW_PAGEMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ecx, %edi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %eax
	jne	LBB0_2
## %bb.1:
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_LockBuffer
	movl	(%r13), %edi
LBB0_2:
	callq	_BufferGetPage
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_PageIsAllVisible
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%r13), %rax
	cmpl	$0, (%rax)
	sete	%al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_3:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	movq	%r14, %rdi
	callq	_PageGetMaxOffsetNumber
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_OffsetNumberIsValid
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	leaq	8(%r13), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %esi
	movq	%r13, %rdi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	callq	_SampleHeapTupleVisible
	movl	%eax, %ebx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_18
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_OffsetNumberIsValid
	testq	%rax, %rax
	je	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_PageGetItemId
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ItemIdIsNormal
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_PageGetItem
	movq	%rax, 8(%r15)
	movl	%ebx, %edi
	callq	_ItemIdGetLength
	movl	%eax, 4(%r15)
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_ItemPointerSet
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_9
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, %ebx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_18
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %ecx
	movl	4(%r13), %esi
	movq	8(%r13), %r8
	movl	%ebx, %edi
	movq	%r15, %rdx
	callq	_CheckForSerializableConflictOut
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.17:
	movl	(%r13), %edi
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
LBB0_18:
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_ExecStoreBufferHeapTuple
	movl	4(%r13), %edi
	callq	_pgstat_count_heap_getnext
	movl	$1, %eax
	jmp	LBB0_19
LBB0_12:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_14
## %bb.13:
	movl	(%r13), %edi
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
LBB0_14:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ExecClearTuple
	xorl	%eax, %eax
LBB0_19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SO_ALLOW_PAGEMODE,4,2          ## @SO_ALLOW_PAGEMODE
	.comm	_BUFFER_LOCK_SHARE,4,2          ## @BUFFER_LOCK_SHARE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_heapam_scan_sample_next_tuple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heapam_scan_sample_next_tuple
_heapam_scan_sample_next_tuple:         ; @heapam_scan_sample_next_tuple
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	x2, [sp]                        ; 8-byte Folded Spill
	mov	x21, x1
	mov	x20, x0
	ldr	x28, [x1]
	ldr	w22, [x0, #24]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _SO_ALLOW_PAGEMODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SO_ALLOW_PAGEMODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ands	w8, w8, w0
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_LockBuffer
	ldr	w0, [x20]
LBB0_2:
	bl	_BufferGetPage
	mov	x23, x0
	bl	_PageIsAllVisible
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w19, eq
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
	mov	x0, x23
	bl	_PageGetMaxOffsetNumber
	mov	x24, x0
	bl	_CHECK_FOR_INTERRUPTS
	ldr	x8, [x28]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	blr	x8
	mov	x26, x0
	bl	_OffsetNumberIsValid
	cbz	x0, LBB0_17
; %bb.6:
	add	x25, x20, #8
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [x20]
	mov	x0, x20
	mov	x2, x25
	mov	x3, x26
	bl	_SampleHeapTupleVisible
	mov	x26, x0
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_10 Depth=1
	cbnz	w26, LBB0_16
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	x8, [x28]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	blr	x8
	mov	x26, x0
	bl	_OffsetNumberIsValid
	cbz	x0, LBB0_17
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x26
	bl	_PageGetItemId
	mov	x27, x0
	bl	_ItemIdIsNormal
	cbz	w0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x23
	mov	x1, x27
	bl	_PageGetItem
	str	x0, [x25, #8]
	mov	x0, x27
	bl	_ItemIdGetLength
	str	w0, [x25, #4]
	mov	x0, x25
	mov	x1, x22
	mov	x2, x26
	bl	_ItemPointerSet
	tbz	w19, #0, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w26, #1
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ldp	w3, w1, [x20]
	ldr	x4, [x20, #8]
	mov	x0, x26
	mov	x2, x25
	bl	_CheckForSerializableConflictOut
	cbz	w26, LBB0_9
; %bb.15:
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_LockBuffer
LBB0_16:
	ldr	w2, [x20]
	mov	x0, x25
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	bl	_ExecStoreBufferHeapTuple
	ldr	w0, [x20, #4]
	bl	_pgstat_count_heap_getnext
	mov	w0, #1
	b	LBB0_20
LBB0_17:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_19
; %bb.18:
	ldr	w0, [x20]
Lloh9:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_LockBuffer
LBB0_19:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_ExecClearTuple
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SO_ALLOW_PAGEMODE,4,2          ; @SO_ALLOW_PAGEMODE
	.comm	_BUFFER_LOCK_SHARE,4,2          ; @BUFFER_LOCK_SHARE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_heapam_scan_sample_next_tuple
.subsections_via_symbols
