	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spgbuild                       ## -- Begin function spgbuild
	.p2align	4, 0x90
_spgbuild:                              ## @spgbuild
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %edi
	callq	_RelationGetNumberOfBlocks
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_elog
LBB0_2:
	movl	%ebx, %edi
	callq	_SpGistNewBuffer
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_SpGistNewBuffer
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_SpGistNewBuffer
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_BufferGetBlockNumber
	movq	_SPGIST_METAPAGE_BLKNO@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	%r13d, %edi
	callq	_BufferGetBlockNumber
	movq	_SPGIST_ROOT_BLKNO@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	%r14d, %edi
	callq	_BufferGetBlockNumber
	movq	_SPGIST_NULL_BLKNO@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movl	%r12d, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_SpGistInitMetapage
	movl	%r12d, %edi
	callq	_MarkBufferDirty
	movq	_SPGIST_LEAF@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%r13d, %edi
	callq	_SpGistInitBuffer
	movl	%r13d, %edi
	callq	_MarkBufferDirty
	movq	_SPGIST_NULLS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movl	%r14d, %edi
	callq	_SpGistInitBuffer
	movl	%r14d, %edi
	callq	_MarkBufferDirty
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	%r12d, %edi
	callq	_UnlockReleaseBuffer
	movl	%r13d, %edi
	callq	_UnlockReleaseBuffer
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
	leaq	-60(%rbp), %rdi
	movl	%ebx, %esi
	callq	_initSpGistState
	movl	$1, -60(%rbp)
	movq	$0, -72(%rbp)
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ALLOCSET_DEFAULT_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_AllocSetContextCreate
	movl	%eax, -64(%rbp)
	movq	_spgistBuildCallback@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-72(%rbp), %rax
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	movl	$1, %r8d
	pushq	$0
	pushq	%rax
	callq	_table_index_build_scan
	addq	$16, %rsp
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movl	-64(%rbp), %edi
	callq	_MemoryContextDelete
	movl	%ebx, %edi
	callq	_SpGistUpdateMetaPage
	movl	%ebx, %edi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_RelationGetNumberOfBlocks
	movl	%ebx, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	%rax, %rcx
	movl	$1, %r8d
	callq	_log_newpage_range
LBB0_4:
	movl	$16, %edi
	callq	_palloc0
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rax)
	movq	-72(%rbp), %rcx
	movq	%rcx, 8(%rax)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_SPGIST_METAPAGE_BLKNO,8,3      ## @SPGIST_METAPAGE_BLKNO
	.comm	_SPGIST_ROOT_BLKNO,8,3          ## @SPGIST_ROOT_BLKNO
	.comm	_SPGIST_NULL_BLKNO,8,3          ## @SPGIST_NULL_BLKNO
	.comm	_SPGIST_LEAF,4,2                ## @SPGIST_LEAF
	.comm	_SPGIST_NULLS,4,2               ## @SPGIST_NULLS
	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
L_.str.1:                               ## @.str.1
	.asciz	"SP-GiST build temporary context"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ## @ALLOCSET_DEFAULT_SIZES
	.comm	_spgistBuildCallback,4,2        ## @spgistBuildCallback
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spgbuild                       ; -- Begin function spgbuild
	.p2align	2
_spgbuild:                              ; @spgbuild
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_RelationGetNumberOfBlocks
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_RelationGetRelationName
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_elog
LBB0_2:
	mov	x0, x19
	bl	_SpGistNewBuffer
	mov	x22, x0
	mov	x0, x19
	bl	_SpGistNewBuffer
	mov	x23, x0
	mov	x0, x19
	bl	_SpGistNewBuffer
	mov	x24, x0
	mov	x0, x22
	bl	_BufferGetBlockNumber
Lloh5:
	adrp	x8, _SPGIST_METAPAGE_BLKNO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPGIST_METAPAGE_BLKNO@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	x0, x23
	bl	_BufferGetBlockNumber
Lloh8:
	adrp	x8, _SPGIST_ROOT_BLKNO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPGIST_ROOT_BLKNO@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	x0, x24
	bl	_BufferGetBlockNumber
Lloh11:
	adrp	x8, _SPGIST_NULL_BLKNO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SPGIST_NULL_BLKNO@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	bl	_START_CRIT_SECTION
	mov	x0, x22
	bl	_BufferGetPage
	bl	_SpGistInitMetapage
	mov	x0, x22
	bl	_MarkBufferDirty
Lloh14:
	adrp	x25, _SPGIST_LEAF@GOTPAGE
Lloh15:
	ldr	x25, [x25, _SPGIST_LEAF@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x23
	bl	_SpGistInitBuffer
	mov	x0, x23
	bl	_MarkBufferDirty
	ldr	w8, [x25]
Lloh16:
	adrp	x9, _SPGIST_NULLS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SPGIST_NULLS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x24
	bl	_SpGistInitBuffer
	mov	x0, x24
	bl	_MarkBufferDirty
	bl	_END_CRIT_SECTION
	mov	x0, x22
	bl	_UnlockReleaseBuffer
	mov	x0, x23
	bl	_UnlockReleaseBuffer
	mov	x0, x24
	bl	_UnlockReleaseBuffer
	mov	x8, sp
	add	x0, x8, #12
	mov	x1, x19
	bl	_initSpGistState
	mov	w8, #1
	str	w8, [sp, #12]
	str	xzr, [sp]
Lloh19:
	adrp	x8, _CurrentMemoryContext@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CurrentMemoryContext@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_AllocSetContextCreate
	str	w0, [sp, #8]
Lloh27:
	adrp	x8, _spgistBuildCallback@GOTPAGE
Lloh28:
	ldr	x8, [x8, _spgistBuildCallback@GOTPAGEOFF]
Lloh29:
	ldr	w5, [x8]
	mov	x6, sp
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	w3, #1
	mov	w4, #1
	mov	x7, #0
	bl	_table_index_build_scan
	fmov	d8, d0
	ldr	w0, [sp, #8]
	bl	_MemoryContextDelete
	mov	x0, x19
	bl	_SpGistUpdateMetaPage
	mov	x0, x19
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_4
; %bb.3:
Lloh30:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh32:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_RelationGetNumberOfBlocks
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w4, #1
	bl	_log_newpage_range
LBB0_4:
	mov	w0, #16
	bl	_palloc0
	str	d8, [x0]
	ldr	x8, [sp]
	str	x8, [x0, #8]
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_SPGIST_METAPAGE_BLKNO,8,3      ; @SPGIST_METAPAGE_BLKNO
	.comm	_SPGIST_ROOT_BLKNO,8,3          ; @SPGIST_ROOT_BLKNO
	.comm	_SPGIST_NULL_BLKNO,8,3          ; @SPGIST_NULL_BLKNO
	.comm	_SPGIST_LEAF,4,2                ; @SPGIST_LEAF
	.comm	_SPGIST_NULLS,4,2               ; @SPGIST_NULLS
	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
l_.str.1:                               ; @.str.1
	.asciz	"SP-GiST build temporary context"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ; @ALLOCSET_DEFAULT_SIZES
	.comm	_spgistBuildCallback,4,2        ; @spgistBuildCallback
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
.subsections_via_symbols
