	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addLeafTuple
_addLeafTuple:                          ## @addLeafTuple
	.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	%r8, %rbx
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, %r12
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	%r9d, -92(%rbp)
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, -88(%rbp)
	movq	%rax, -80(%rbp)
	movq	%rax, -72(%rbp)
	movq	$0, -64(%rbp)
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	(%r13), %rax
	cmpq	(%r14), %rax
	je	LBB0_3
## %bb.1:
	movl	20(%r13), %edi
	callq	_SpGistBlockIsRoot
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%r14), %rax
LBB0_3:
	movq	%rax, 16(%r15)
	movl	16(%r13), %esi
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_SpGistPageAddNewItem
	movq	%rax, (%r13)
	movq	%rax, -88(%rbp)
	movq	8(%rbx), %rcx
	movq	_InvalidBuffer@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_13
## %bb.4:
	movq	(%rbx), %rcx
	movq	%rcx, -72(%rbp)
	movq	24(%rbx), %rcx
	movq	%rcx, -64(%rbp)
	movl	20(%r13), %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movq	%rax, %rcx
	callq	_saveNodeLink
	jmp	LBB0_13
LBB0_5:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	16(%r13), %r14d
	movq	(%r13), %rsi
	movl	%r14d, %edi
	callq	_PageGetItemId
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	8(%rax), %rdx
	movq	_SPGIST_LIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_7
## %bb.6:
	movq	16(%rax), %rax
	movq	%rax, 16(%r15)
	movl	16(%r13), %esi
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_SpGistPageAddNewItem
	movq	%rax, %rbx
	movl	16(%r13), %r14d
	movq	(%r13), %rsi
	movl	%r14d, %edi
	callq	_PageGetItemId
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rbx, 16(%rax)
	movq	%rbx, -88(%rbp)
	movq	(%r13), %rax
	movq	%rax, -80(%rbp)
	jmp	LBB0_12
LBB0_7:
	movq	_SPGIST_DEAD@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_11
## %bb.8:
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, 16(%r15)
	movl	16(%r13), %edi
	movq	(%r13), %rsi
	callq	_PageIndexTupleDelete
	movl	16(%r13), %edi
	movl	(%r15), %edx
	movq	(%r13), %rcx
	movl	%r15d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	cmpq	(%r13), %rax
	je	LBB0_10
## %bb.9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_elog
	movq	(%r13), %rax
LBB0_10:
	movq	%rax, -88(%rbp)
	movq	%rax, -80(%rbp)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_elog
LBB0_12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %r14
LBB0_13:
	movq	8(%r13), %rdi
	callq	_MarkBufferDirty
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_21
## %bb.14:
	cmpl	$0, (%r12)
	jne	LBB0_21
## %bb.15:
	movq	%r14, %r12
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-96(%rbp), %rdi
	movl	$40, %esi
	callq	_XLogRegisterData
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_XLogRegisterData
	movq	_REGBUF_STANDARD@GOTPCREL(%rip), %r14
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_17
## %bb.16:
	movq	_REGBUF_WILL_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_17:
	orl	(%r14), %edx
	movq	8(%r13), %rsi
	xorl	%edi, %edi
	callq	_XLogRegisterBuffer
	movq	-72(%rbp), %rax
	cmpq	(%r12), %rax
	je	LBB0_19
## %bb.18:
	movq	8(%rbx), %rsi
	movl	(%r14), %edx
	movl	$1, %edi
	callq	_XLogRegisterBuffer
LBB0_19:
	movq	_RM_SPGIST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_SPGIST_ADD_LEAF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movl	%eax, %r15d
	movl	16(%r13), %edi
	movl	%eax, %esi
	callq	_PageSetLSN
	movq	-72(%rbp), %rax
	cmpq	(%r12), %rax
	je	LBB0_21
## %bb.20:
	movl	16(%rbx), %edi
	movl	%r15d, %esi
	callq	_PageSetLSN
LBB0_21:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_InvalidBuffer,8,3              ## @InvalidBuffer
	.comm	_SPGIST_LIVE,8,3                ## @SPGIST_LIVE
	.comm	_SPGIST_DEAD,8,3                ## @SPGIST_DEAD
	.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"

L_.str.1:                               ## @.str.1
	.asciz	"unexpected SPGiST tuple state: %d"

	.comm	_REGBUF_STANDARD,4,2            ## @REGBUF_STANDARD
	.comm	_REGBUF_WILL_INIT,4,2           ## @REGBUF_WILL_INIT
	.comm	_RM_SPGIST_ID,4,2               ## @RM_SPGIST_ID
	.comm	_XLOG_SPGIST_ADD_LEAF,4,2       ## @XLOG_SPGIST_ADD_LEAF
	.no_dead_strip	_addLeafTuple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addLeafTuple
_addLeafTuple:                          ; @addLeafTuple
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x26, _InvalidOffsetNumber@GOTPAGE
Lloh1:
	ldr	x26, [x26, _InvalidOffsetNumber@GOTPAGEOFF]
	stp	w6, w5, [sp, #8]
	ldr	x8, [x26]
	stp	x8, x8, [sp, #16]
	stp	x8, xzr, [sp, #32]
	bl	_START_CRIT_SECTION
	ldr	x8, [x20]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x20, #20]
	bl	_SpGistBlockIsRoot
	cbz	x0, LBB0_12
; %bb.2:
	ldr	x8, [x26]
LBB0_3:
	str	x8, [x21, #16]
	ldr	w1, [x20, #16]
	ldr	w3, [x21]
	mov	x0, x22
	mov	x2, x21
	mov	x4, #0
	mov	w5, #0
	bl	_SpGistPageAddNewItem
	str	x0, [x20]
	str	x0, [sp, #16]
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _InvalidBuffer@GOTPAGE
Lloh3:
	ldr	x9, [x9, _InvalidBuffer@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	mov	x3, x0
	ldr	x8, [x19]
	ldr	x9, [x19, #24]
	stp	x8, x9, [sp, #32]
	ldr	w2, [x20, #20]
	mov	x0, x23
	mov	x1, x19
	bl	_saveNodeLink
LBB0_5:
	ldr	x0, [x20, #8]
	bl	_MarkBufferDirty
	mov	x0, x23
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_11
; %bb.6:
	ldr	w8, [x22]
	cbnz	w8, LBB0_11
; %bb.7:
	bl	_XLogBeginInsert
	add	x0, sp, #8
	mov	w1, #40
	bl	_XLogRegisterData
	ldr	w1, [x21]
	mov	x0, x21
	bl	_XLogRegisterData
Lloh5:
	adrp	x21, _REGBUF_STANDARD@GOTPAGE
Lloh6:
	ldr	x21, [x21, _REGBUF_STANDARD@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _REGBUF_WILL_INIT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _REGBUF_WILL_INIT@GOTPAGEOFF]
	ldr	w10, [sp, #8]
Lloh9:
	ldr	w9, [x9]
	cmp	w10, #0
	csel	w9, wzr, w9, eq
	orr	w2, w9, w8
	ldr	x1, [x20, #8]
	mov	w0, #0
	bl	_XLogRegisterBuffer
	ldr	x8, [sp, #32]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
	ldr	x1, [x19, #8]
	ldr	w2, [x21]
	mov	w0, #1
	bl	_XLogRegisterBuffer
LBB0_9:
Lloh10:
	adrp	x8, _RM_SPGIST_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RM_SPGIST_ID@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _XLOG_SPGIST_ADD_LEAF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XLOG_SPGIST_ADD_LEAF@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x21, x0
	ldr	w0, [x20, #16]
	mov	x1, x21
	bl	_PageSetLSN
	ldr	x8, [sp, #32]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_PageSetLSN
LBB0_11:
	bl	_END_CRIT_SECTION
	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
	add	sp, sp, #128
	ret
LBB0_12:
	ldr	w24, [x20, #16]
	ldr	x1, [x20]
	mov	x0, x24
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x24
	bl	_PageGetItem
	ldr	x2, [x0, #8]
Lloh16:
	adrp	x8, _SPGIST_LIVE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPGIST_LIVE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x0, #16]
	str	x8, [x21, #16]
	ldr	w1, [x20, #16]
	ldr	w3, [x21]
	mov	x0, x22
	mov	x2, x21
	mov	x4, #0
	mov	w5, #0
	bl	_SpGistPageAddNewItem
	mov	x24, x0
	ldr	w25, [x20, #16]
	ldr	x1, [x20]
	mov	x0, x25
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x25
	bl	_PageGetItem
	str	x24, [x0, #16]
	ldr	x8, [x20]
	stp	x24, x8, [sp, #16]
	b	LBB0_5
LBB0_14:
Lloh19:
	adrp	x8, _SPGIST_DEAD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPGIST_DEAD@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_18
; %bb.15:
	ldr	x8, [x26]
	str	x8, [x21, #16]
	ldr	w0, [x20, #16]
	ldr	x1, [x20]
	bl	_PageIndexTupleDelete
	ldr	w0, [x20, #16]
	ldr	w2, [x21]
	ldr	x3, [x20]
	mov	x1, x21
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:
Lloh22:
	adrp	x8, _ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w2, [x21]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	ldr	x0, [x20]
LBB0_17:
	stp	x0, x0, [sp, #16]
	b	LBB0_5
LBB0_18:
Lloh27:
	adrp	x8, _ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_elog
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_InvalidBuffer,8,3              ; @InvalidBuffer
	.comm	_SPGIST_LIVE,8,3                ; @SPGIST_LIVE
	.comm	_SPGIST_DEAD,8,3                ; @SPGIST_DEAD
	.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"

l_.str.1:                               ; @.str.1
	.asciz	"unexpected SPGiST tuple state: %d"

	.comm	_REGBUF_STANDARD,4,2            ; @REGBUF_STANDARD
	.comm	_REGBUF_WILL_INIT,4,2           ; @REGBUF_WILL_INIT
	.comm	_RM_SPGIST_ID,4,2               ; @RM_SPGIST_ID
	.comm	_XLOG_SPGIST_ADD_LEAF,4,2       ; @XLOG_SPGIST_ADD_LEAF
	.no_dead_strip	_addLeafTuple
.subsections_via_symbols
