	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spgRedoAddNode
_spgRedoAddNode:                        ## @spgRedoAddNode
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %r14d
	callq	_XLogRecGetData
	movq	%rax, %r13
	leaq	48(%rax), %r12
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	40(%r13), %esi
	leaq	-64(%rbp), %rdi
	callq	_fillFakeState
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_XLogRecHasBlockRef
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	leaq	-68(%rbp), %r8
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_XLogRecGetBlockTag
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_XLogRecGetBlockTag
	cmpq	$0, 32(%r13)
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_XLogInitBufferForRedo
	movl	%eax, -44(%rbp)
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_SpGistInitBuffer
	jmp	LBB0_7
LBB0_1:
	xorl	%edi, %edi
	cmpl	$-1, (%r13)
	sete	%dil
	callq	_Assert
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.2:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_PageIndexTupleDelete
	movl	-56(%rbp), %edx
	movq	8(%r13), %rcx
	movl	%ebx, %edi
	movl	%r12d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	cmpq	8(%r13), %rax
	je	LBB0_26
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-56(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_26
LBB0_6:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_7:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	-56(%rbp), %edx
	movl	16(%r13), %ecx
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_addOrReplaceTuple
	cmpl	$1, (%r13)
	jne	LBB0_9
## %bb.8:
	movl	24(%r13), %esi
	movl	%ebx, %edi
	callq	_PageGetItemId
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movl	16(%r13), %ecx
	movl	20(%r13), %esi
	movl	-48(%rbp), %edx
	movq	%rax, %rdi
	callq	_spgUpdateNodeLink
LBB0_9:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
LBB0_10:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_12:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_21
## %bb.13:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %r12d
	cmpq	$0, -64(%rbp)
	je	LBB0_15
## %bb.14:
	movq	_SPGIST_PLACEHOLDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_16
LBB0_15:
	movq	_SPGIST_REDIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx
	movl	16(%r13), %ecx
LBB0_16:
	leaq	-64(%rbp), %rdi
	callq	_spgFormDeadTuple
	movq	%rax, %rbx
	movq	8(%r13), %rsi
	movl	%r12d, %edi
	callq	_PageIndexTupleDelete
	movl	(%rbx), %edx
	movq	8(%r13), %rcx
	movl	%r12d, %edi
	movl	%ebx, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	cmpq	8(%r13), %rax
	je	LBB0_18
## %bb.17:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_18:
	xorl	%ebx, %ebx
	cmpq	$0, -64(%rbp)
	setne	%bl
	movl	%r12d, %edi
	callq	_SpGistPageGetOpaque
	incl	(%rax,%rbx,4)
	cmpl	$0, (%r13)
	jne	LBB0_20
## %bb.19:
	movl	24(%r13), %esi
	movl	%r12d, %edi
	callq	_PageGetItemId
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movl	16(%r13), %ecx
	movl	20(%r13), %esi
	movl	-48(%rbp), %edx
	movq	%rax, %rdi
	callq	_spgUpdateNodeLink
LBB0_20:
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rbx
LBB0_21:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_23:
	cmpl	$2, (%r13)
	jne	LBB0_29
## %bb.24:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_XLogReadBufferForRedo
	cmpq	(%rbx), %rax
	jne	LBB0_27
## %bb.25:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	24(%r13), %esi
	movl	%eax, %edi
	callq	_PageGetItemId
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movl	16(%r13), %ecx
	movl	20(%r13), %esi
	movl	-48(%rbp), %edx
	movq	%rax, %rdi
	callq	_spgUpdateNodeLink
LBB0_26:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
LBB0_27:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_29:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to add item of size %u to SPGiST index page"

	.comm	_SPGIST_PLACEHOLDER,4,2         ## @SPGIST_PLACEHOLDER
	.comm	_InvalidBlockNumber,4,2         ## @InvalidBlockNumber
	.comm	_InvalidOffsetNumber,4,2        ## @InvalidOffsetNumber
	.comm	_SPGIST_REDIRECT,4,2            ## @SPGIST_REDIRECT
	.no_dead_strip	_spgRedoAddNode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spgRedoAddNode
_spgRedoAddNode:                        ; @spgRedoAddNode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x0
	ldr	w19, [x0]
	bl	_XLogRecGetData
	mov	x20, x0
	add	x22, x0, #48
	add	x0, sp, #24
	mov	x1, x22
	mov	w2, #4
	bl	_memcpy
	ldr	w1, [x20, #40]
	add	x0, sp, #16
	bl	_fillFakeState
	mov	x0, x21
	mov	w1, #1
	bl	_XLogRecHasBlockRef
	cbz	w0, LBB0_3
; %bb.1:
	add	x4, sp, #8
	mov	x0, x21
	mov	w1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_XLogRecGetBlockTag
	add	x4, sp, #4
	mov	x0, x21
	mov	w1, #1
	mov	x2, #0
	mov	x3, #0
	bl	_XLogRecGetBlockTag
	ldr	x8, [x20, #32]
Lloh0:
	adrp	x24, _BLK_NEEDS_REDO@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BLK_NEEDS_REDO@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x0, x21
	mov	w1, #1
	bl	_XLogInitBufferForRedo
	str	w0, [sp, #12]
	mov	w1, #0
	bl	_SpGistInitBuffer
	b	LBB0_7
LBB0_3:
	ldr	w8, [x20]
	cmn	w8, #1
	cset	w0, eq
	bl	_Assert
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_XLogReadBufferForRedo
Lloh2:
	adrp	x8, _BLK_NEEDS_REDO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BLK_NEEDS_REDO@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.4:
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x21, x0
	ldr	x1, [x20, #8]
	bl	_PageIndexTupleDelete
	ldr	w2, [sp, #24]
	ldr	x3, [x20, #8]
	mov	x0, x21
	mov	x1, x22
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.eq	LBB0_26
; %bb.5:
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [sp, #24]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_26
LBB0_6:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #1
	bl	_XLogReadBufferForRedo
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_7:
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x23, x0
	ldr	w2, [sp, #24]
	ldr	w3, [x20, #16]
	mov	x1, x22
	bl	_addOrReplaceTuple
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
	ldr	w1, [x20, #24]
	mov	x0, x23
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x23
	bl	_PageGetItem
	ldr	w2, [sp, #4]
	ldp	w3, w1, [x20, #16]
	bl	_spgUpdateNodeLink
LBB0_9:
	mov	x0, x23
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_10:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_12:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_XLogReadBufferForRedo
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.13:
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x22, x0
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_15
; %bb.14:
Lloh10:
	adrp	x8, _SPGIST_PLACEHOLDER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPGIST_PLACEHOLDER@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh14:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _InvalidOffsetNumber@GOTPAGE
Lloh17:
	ldr	x8, [x8, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	b	LBB0_16
LBB0_15:
Lloh19:
	adrp	x8, _SPGIST_REDIRECT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPGIST_REDIRECT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [sp, #4]
	ldr	w3, [x20, #16]
LBB0_16:
	add	x0, sp, #16
	bl	_spgFormDeadTuple
	mov	x23, x0
	ldr	x1, [x20, #8]
	mov	x0, x22
	bl	_PageIndexTupleDelete
	ldr	w2, [x23]
	ldr	x3, [x20, #8]
	mov	x0, x22
	mov	x1, x23
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.eq	LBB0_18
; %bb.17:
Lloh22:
	adrp	x8, _ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w2, [x23]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_18:
	ldr	x8, [sp, #16]
	cmp	x8, #0
	cset	w23, ne
	mov	x0, x22
	bl	_SpGistPageGetOpaque
	lsl	x8, x23, #2
	ldr	w9, [x0, x8]
	add	w9, w9, #1
	str	w9, [x0, x8]
	ldr	w8, [x20]
	cbnz	w8, LBB0_20
; %bb.19:
	ldr	w1, [x20, #24]
	mov	x0, x22
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItem
	ldr	w2, [sp, #4]
	ldp	w3, w1, [x20, #16]
	bl	_spgUpdateNodeLink
LBB0_20:
	mov	x0, x22
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_21:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_23
; %bb.22:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_23:
	ldr	w8, [x20]
	cmp	w8, #2
	b.ne	LBB0_29
; %bb.24:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #2
	bl	_XLogReadBufferForRedo
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.25:
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x21, x0
	ldr	w1, [x20, #24]
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x21
	bl	_PageGetItem
	ldr	w2, [sp, #4]
	ldp	w3, w1, [x20, #16]
	bl	_spgUpdateNodeLink
LBB0_26:
	mov	x0, x21
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_27:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_29
; %bb.28:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_29:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to add item of size %u to SPGiST index page"

	.comm	_SPGIST_PLACEHOLDER,4,2         ; @SPGIST_PLACEHOLDER
	.comm	_InvalidBlockNumber,4,2         ; @InvalidBlockNumber
	.comm	_InvalidOffsetNumber,4,2        ; @InvalidOffsetNumber
	.comm	_SPGIST_REDIRECT,4,2            ; @SPGIST_REDIRECT
	.no_dead_strip	_spgRedoAddNode
.subsections_via_symbols
