	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_finish_speculative        ## -- Begin function heap_finish_speculative
	.p2align	4, 0x90
_heap_finish_speculative:               ## @heap_finish_speculative
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_ItemPointerGetBlockNumber
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ReadBuffer
	movl	%eax, %r14d
	movq	_BUFFER_LOCK_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movl	%r14d, %edi
	callq	_BufferGetPage
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_ItemPointerGetOffsetNumber
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_PageGetMaxOffsetNumber
	cmpq	%r12, %rax
	jge	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_PageGetItemId
	movq	%rax, %rbx
LBB0_3:
	movq	%r15, %rdi
	callq	_PageGetMaxOffsetNumber
	cmpq	%r12, %rax
	jl	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_ItemIdIsNormal
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_PageGetItem
	movq	%rax, %rbx
	movq	_MaxOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SpecTokenOffsetNumber@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_StaticAssertStmt
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	%rbx, %rdi
	callq	_HeapTupleHeaderIsSpeculative
	movl	%eax, %edi
	callq	_Assert
	movl	%r14d, %edi
	callq	_MarkBufferDirty
	movl	(%r13), %eax
	movl	%eax, (%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_ItemPointerGetOffsetNumber
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	movq	_XLOG_INCLUDE_ORIGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XLogSetRecordFlags
	movq	_SizeOfHeapConfirm@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_XLogRegisterData
	movq	_REGBUF_STANDARD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%r14d, %esi
	callq	_XLogRegisterBuffer
	movq	_RM_HEAP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_HEAP_CONFIRM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_PageSetLSN
LBB0_8:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ## @BUFFER_LOCK_EXCLUSIVE
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid lp"

	.comm	_MaxOffsetNumber,8,3            ## @MaxOffsetNumber
	.comm	_SpecTokenOffsetNumber,8,3      ## @SpecTokenOffsetNumber
L_.str.1:                               ## @.str.1
	.asciz	"invalid speculative token constant"

	.comm	_XLOG_INCLUDE_ORIGIN,4,2        ## @XLOG_INCLUDE_ORIGIN
	.comm	_SizeOfHeapConfirm,4,2          ## @SizeOfHeapConfirm
	.comm	_REGBUF_STANDARD,4,2            ## @REGBUF_STANDARD
	.comm	_RM_HEAP_ID,4,2                 ## @RM_HEAP_ID
	.comm	_XLOG_HEAP_CONFIRM,4,2          ## @XLOG_HEAP_CONFIRM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_finish_speculative        ; -- Begin function heap_finish_speculative
	.p2align	2
_heap_finish_speculative:               ; @heap_finish_speculative
	.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	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_ItemPointerGetBlockNumber
	mov	x1, x0
	mov	x0, x22
	bl	_ReadBuffer
	mov	x19, x0
Lloh0:
	adrp	x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LockBuffer
	mov	x0, x19
	bl	_BufferGetPage
	mov	x20, x0
	mov	x0, x21
	bl	_ItemPointerGetOffsetNumber
	mov	x24, x0
	mov	x0, x20
	bl	_PageGetMaxOffsetNumber
	cmp	x0, x24
	b.ge	LBB0_2
; %bb.1:
	mov	x23, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	mov	x1, x24
	bl	_PageGetItemId
	mov	x23, x0
LBB0_3:
	mov	x0, x20
	bl	_PageGetMaxOffsetNumber
	cmp	x0, x24
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_ItemIdIsNormal
	cbnz	w0, LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_6:
	mov	x0, x20
	mov	x1, x23
	bl	_PageGetItem
	mov	x23, x0
Lloh8:
	adrp	x8, _MaxOffsetNumber@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MaxOffsetNumber@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _SpecTokenOffsetNumber@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SpecTokenOffsetNumber@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_StaticAssertStmt
	bl	_START_CRIT_SECTION
	mov	x0, x23
	bl	_HeapTupleHeaderIsSpeculative
	bl	_Assert
	mov	x0, x19
	bl	_MarkBufferDirty
	ldr	w8, [x21]
	str	w8, [x23]
	mov	x0, x22
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_ItemPointerGetOffsetNumber
	str	x0, [sp, #8]
	bl	_XLogBeginInsert
Lloh16:
	adrp	x8, _XLOG_INCLUDE_ORIGIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XLOG_INCLUDE_ORIGIN@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_XLogSetRecordFlags
Lloh19:
	adrp	x8, _SizeOfHeapConfirm@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SizeOfHeapConfirm@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_XLogRegisterData
Lloh22:
	adrp	x8, _REGBUF_STANDARD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REGBUF_STANDARD@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x19
	bl	_XLogRegisterBuffer
Lloh25:
	adrp	x8, _RM_HEAP_ID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RM_HEAP_ID@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _XLOG_HEAP_CONFIRM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _XLOG_HEAP_CONFIRM@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x1, x0
	mov	x0, x20
	bl	_PageSetLSN
LBB0_8:
	bl	_END_CRIT_SECTION
	mov	x0, x19
	bl	_UnlockReleaseBuffer
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ; @BUFFER_LOCK_EXCLUSIVE
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid lp"

	.comm	_MaxOffsetNumber,8,3            ; @MaxOffsetNumber
	.comm	_SpecTokenOffsetNumber,8,3      ; @SpecTokenOffsetNumber
l_.str.1:                               ; @.str.1
	.asciz	"invalid speculative token constant"

	.comm	_XLOG_INCLUDE_ORIGIN,4,2        ; @XLOG_INCLUDE_ORIGIN
	.comm	_SizeOfHeapConfirm,4,2          ; @SizeOfHeapConfirm
	.comm	_REGBUF_STANDARD,4,2            ; @REGBUF_STANDARD
	.comm	_RM_HEAP_ID,4,2                 ; @RM_HEAP_ID
	.comm	_XLOG_HEAP_CONFIRM,4,2          ; @XLOG_HEAP_CONFIRM
.subsections_via_symbols
