	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageAddItemExtended            ## -- Begin function PageAddItemExtended
	.p2align	4, 0x90
_PageAddItemExtended:                   ## @PageAddItemExtended
	.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
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_SizeOfPageHeaderData@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_4
## %bb.1:
	movslq	4(%r14), %rcx
	cmpl	%ecx, %eax
	jle	LBB0_2
LBB0_4:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	%ebx, %r13d
	movl	(%rax), %ebx
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	(%r14), %esi
	movslq	4(%r14), %rdx
	movq	8(%r14), %rcx
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%r13d, %ebx
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movq	%r14, %rdi
	callq	_PageGetMaxOffsetNumber
	movl	%eax, %edi
	callq	_OffsetNumberNext
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_OffsetNumberIsValid
	testq	%rax, %rax
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_12
## %bb.6:
	movq	_PAI_OVERWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	sete	%cl
	cmpq	%r12, %r13
	setg	%r15b
	andb	%cl, %r15b
	testl	%ebx, %eax
	je	LBB0_26
## %bb.7:
	cmpq	%r12, %r13
	jle	LBB0_26
## %bb.8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_PageGetItemId
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_ItemIdIsUsed
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_ItemIdHasStorage
	testq	%rax, %rax
	je	LBB0_25
LBB0_10:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
	jmp	LBB0_29
LBB0_12:
	movq	%r14, %rdi
	callq	_PageHasFreeLinePointers
	testq	%rax, %rax
	je	LBB0_13
## %bb.17:
	movl	$1, %r12d
	cmpq	$2, %r13
	jl	LBB0_24
## %bb.18:
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	$1, %r12d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r12
	cmpq	%r12, %r13
	je	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_PageGetItemId
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ItemIdIsUsed
	testq	%rax, %rax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %rdi
	callq	_ItemIdHasStorage
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:
	xorl	%r15d, %r15d
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
LBB0_26:
	cmpq	%r12, %r13
	jl	LBB0_27
	jmp	LBB0_14
LBB0_2:
	movq	8(%r14), %rax
	cmpq	%rcx, %rax
	jl	LBB0_4
## %bb.3:
	movq	_BLCKSZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_5
	jmp	LBB0_4
LBB0_13:
	xorl	%r15d, %r15d
	movq	%r13, %r12
	jmp	LBB0_14
LBB0_23:
	movq	%r13, %r12
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
LBB0_24:
	movq	%r14, %rdi
	callq	_PageClearHasFreeLinePointers
LBB0_25:
	xorl	%r15d, %r15d
	cmpq	%r12, %r13
	jge	LBB0_14
LBB0_27:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_elog
	jmp	LBB0_29
LBB0_14:
	movq	_PAI_IS_HEAP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_28
## %bb.15:
	movq	_MaxHeapTuplesPerPage@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jle	LBB0_28
## %bb.16:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_elog
	jmp	LBB0_29
LBB0_28:
	movl	(%r14), %ebx
	leal	4(%rbx), %eax
	subq	%r12, %r13
	cmovel	%eax, %ebx
	testb	%r15b, %r15b
	cmovnel	%eax, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_MAXALIGN
	movslq	4(%r14), %rcx
	cltq
	subq	%rax, %rcx
	cmpl	%ecx, %ebx
	jle	LBB0_30
LBB0_29:
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_33:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_PageGetItemId
	testb	%r15b, %r15b
	je	LBB0_32
## %bb.31:
	movq	%rax, %rdi
	incq	%rdi
	shlq	$2, %r13
	movq	%rax, %rsi
	movq	%r13, %rdx
	movq	%rax, %r15
	callq	_memmove
	movq	%r15, %rax
LBB0_32:
	movq	%rax, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_ItemIdSetNormal
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	callq	_VALGRIND_CHECK_MEM_IS_DEFINED
	movq	%r13, %rdi
	addq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
	movl	%ebx, (%r14)
	movl	%r13d, 4(%r14)
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_SizeOfPageHeaderData,4,2       ## @SizeOfPageHeaderData
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_PANIC,4,2                      ## @PANIC
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ## @ERRCODE_DATA_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"corrupted page pointers: lower = %u, upper = %u, special = %u"

	.comm	_PAI_OVERWRITE,4,2              ## @PAI_OVERWRITE
	.comm	_WARNING,4,2                    ## @WARNING
L_.str.1:                               ## @.str.1
	.asciz	"will not overwrite a used ItemId"

	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
L_.str.2:                               ## @.str.2
	.asciz	"specified item offset is too large"

	.comm	_PAI_IS_HEAP,4,2                ## @PAI_IS_HEAP
	.comm	_MaxHeapTuplesPerPage,8,3       ## @MaxHeapTuplesPerPage
L_.str.3:                               ## @.str.3
	.asciz	"can't put more than MaxHeapTuplesPerPage items in a heap page"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageAddItemExtended            ; -- Begin function PageAddItemExtended
	.p2align	2
_PageAddItemExtended:                   ; @PageAddItemExtended
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x23, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _SizeOfPageHeaderData@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SizeOfPageHeaderData@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_3
; %bb.1:
	ldrsw	x9, [x20, #4]
	cmp	w8, w9
	b.gt	LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x10, _BLCKSZ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BLCKSZ@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _PANIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_errcode
	ldp	w1, w2, [x20]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	ldr	x3, [x20, #8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
LBB0_4:
	mov	x0, x20
	bl	_PageGetMaxOffsetNumber
	bl	_OffsetNumberNext
	mov	x24, x0
	mov	x0, x19
	bl	_OffsetNumberIsValid
	cbz	x0, LBB0_7
; %bb.5:
Lloh14:
	adrp	x8, _PAI_OVERWRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAI_OVERWRITE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ands	w10, w8, w23
	cset	w8, eq
	cmp	x24, x19
	cset	w9, gt
	cmp	w10, #0
	ccmp	x24, x19, #4, ne
	b.gt	LBB0_12
; %bb.6:
	and	w25, w8, w9
	cmp	x24, x19
	b.lt	LBB0_19
	b	LBB0_20
LBB0_7:
	mov	x0, x20
	bl	_PageHasFreeLinePointers
	cbz	x0, LBB0_15
; %bb.8:
	mov	w19, #1
	cmp	x24, #2
	b.ge	LBB0_10
	b	LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x19, x19, #1
	cmp	x24, x19
	b.eq	LBB0_16
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_PageGetItemId
	mov	x25, x0
	bl	_ItemIdIsUsed
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x25
	bl	_ItemIdHasStorage
	cbnz	x0, LBB0_9
	b	LBB0_18
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_PageGetItemId
	mov	x25, x0
	bl	_ItemIdIsUsed
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x0, x25
	bl	_ItemIdHasStorage
	cbz	x0, LBB0_18
LBB0_14:
Lloh17:
	adrp	x8, _WARNING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_15:
	mov	w25, #0
	mov	x19, x24
	b	LBB0_20
LBB0_16:
	mov	x19, x24
LBB0_17:
	mov	x0, x20
	bl	_PageClearHasFreeLinePointers
LBB0_18:
	mov	w25, #0
	cmp	x24, x19
	b.ge	LBB0_20
LBB0_19:
Lloh22:
	adrp	x8, _WARNING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_20:
Lloh27:
	adrp	x8, _PAI_IS_HEAP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PAI_IS_HEAP@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	and	w8, w8, w23
Lloh30:
	adrp	x9, _MaxHeapTuplesPerPage@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MaxHeapTuplesPerPage@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x19, x9, #4, ne
	b.gt	LBB0_25
; %bb.21:
	subs	x27, x24, x19
	cset	w8, eq
	orr	w8, w25, w8
	ldr	w9, [x20]
	add	w10, w9, #4
	cmp	w8, #0
	csel	w26, w10, w9, ne
	mov	x0, x21
	bl	_MAXALIGN
	ldrsw	x8, [x20, #4]
	sub	x23, x8, w0, sxtw
	cmp	w26, w23
	b.gt	LBB0_27
; %bb.22:
	mov	x0, x20
	mov	x1, x19
	bl	_PageGetItemId
	mov	x24, x0
	cbz	w25, LBB0_24
; %bb.23:
	add	x0, x24, #1
	lsl	x2, x27, #2
	mov	x1, x24
	bl	_memmove
LBB0_24:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	bl	_ItemIdSetNormal
	mov	x0, x22
	mov	x1, x21
	bl	_VALGRIND_CHECK_MEM_IS_DEFINED
	add	x0, x20, x23
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	stp	w26, w23, [x20]
	b	LBB0_28
LBB0_25:
Lloh33:
	adrp	x8, _WARNING@GOTPAGE
Lloh34:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_26:
	bl	_elog
LBB0_27:
Lloh38:
	adrp	x8, _InvalidOffsetNumber@GOTPAGE
Lloh39:
	ldr	x8, [x8, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh40:
	ldr	x19, [x8]
LBB0_28:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_SizeOfPageHeaderData,4,2       ; @SizeOfPageHeaderData
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_PANIC,4,2                      ; @PANIC
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ; @ERRCODE_DATA_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"corrupted page pointers: lower = %u, upper = %u, special = %u"

	.comm	_PAI_OVERWRITE,4,2              ; @PAI_OVERWRITE
	.comm	_WARNING,4,2                    ; @WARNING
l_.str.1:                               ; @.str.1
	.asciz	"will not overwrite a used ItemId"

	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
l_.str.2:                               ; @.str.2
	.asciz	"specified item offset is too large"

	.comm	_PAI_IS_HEAP,4,2                ; @PAI_IS_HEAP
	.comm	_MaxHeapTuplesPerPage,8,3       ; @MaxHeapTuplesPerPage
l_.str.3:                               ; @.str.3
	.asciz	"can't put more than MaxHeapTuplesPerPage items in a heap page"

.subsections_via_symbols
