	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gistbuild                      ## -- Begin function gistbuild
	.p2align	4, 0x90
_gistbuild:                             ## @gistbuild
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)
	movq	%rdi, -64(%rbp)
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	(%rax), %rcx
	movq	_GIST_OPTION_BUFFERING_ON@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.2:
	movq	_GIST_BUFFERING_STATS@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_7:
	movq	_GIST_BUFFERING_AUTO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -112(%rbp)
	movq	_GIST_DEFAULT_FILLFACTOR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_GIST_OPTION_BUFFERING_OFF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.5:
	movq	_GIST_BUFFERING_DISABLED@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_6:
	movq	_GIST_BUFFERING_AUTO@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	(%rcx), %rcx
	movq	%rcx, -112(%rbp)
	addq	$8, %rax
LBB0_8:
	movq	_BLCKSZ@GOTPCREL(%rip), %rcx
	movl	$100, %edx
	subl	(%rax), %edx
	imull	(%rcx), %edx
	movslq	%edx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, -104(%rbp)
	movq	%r13, %rdi
	callq	_RelationGetNumberOfBlocks
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_elog
LBB0_10:
	movq	%r13, %rdi
	callq	_initGISTstate
	movq	%rax, %rbx
	movq	%rax, -88(%rbp)
	xorl	%eax, %eax
	callq	_createTempGistContext
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	callq	_gistNewBuffer
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_BufferGetBlockNumber
	movq	_GIST_ROOT_BLKNO@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	%ebx, %edi
	callq	_BufferGetPage
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	_F_LEAF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_GISTInitBuffer
	movl	%ebx, %edi
	callq	_MarkBufferDirty
	movq	_GistBuildLSN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_PageSetLSN
	movl	%ebx, %edi
	callq	_UnlockReleaseBuffer
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movq	$0, -96(%rbp)
	movq	$0, -72(%rbp)
	movq	_gistBuildCallback@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-112(%rbp), %rax
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	movl	$1, %r8d
	pushq	$0
	pushq	%rax
	callq	_table_index_build_scan
	addq	$16, %rsp
	movsd	%xmm0, -120(%rbp)               ## 8-byte Spill
	movq	-112(%rbp), %rax
	movq	_GIST_BUFFERING_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	_DEBUG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	leaq	-112(%rbp), %rdi
	callq	_gistEmptyAllBuffers
	movl	-80(%rbp), %edi
	callq	_gistFreeBuildBuffers
LBB0_12:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MemoryContextSwitchTo
	movq	-88(%rbp), %rax
	movl	(%rax), %edi
	callq	_MemoryContextDelete
	movq	-88(%rbp), %rdi
	callq	_freeGISTstate
	movq	%r13, %rdi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_RelationGetNumberOfBlocks
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	%rax, %rcx
	movl	$1, %r8d
	callq	_log_newpage_range
LBB0_14:
	movl	$16, %edi
	callq	_palloc
	movsd	-120(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rax)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	-96(%rbp), %xmm0
	movsd	%xmm0, 8(%rax)
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.comm	_GIST_OPTION_BUFFERING_ON,8,3   ## @GIST_OPTION_BUFFERING_ON
	.comm	_GIST_BUFFERING_STATS,8,3       ## @GIST_BUFFERING_STATS
	.comm	_GIST_OPTION_BUFFERING_OFF,8,3  ## @GIST_OPTION_BUFFERING_OFF
	.comm	_GIST_BUFFERING_DISABLED,8,3    ## @GIST_BUFFERING_DISABLED
	.comm	_GIST_BUFFERING_AUTO,8,3        ## @GIST_BUFFERING_AUTO
	.comm	_GIST_DEFAULT_FILLFACTOR,4,2    ## @GIST_DEFAULT_FILLFACTOR
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_GIST_ROOT_BLKNO,8,3            ## @GIST_ROOT_BLKNO
	.comm	_F_LEAF,4,2                     ## @F_LEAF
	.comm	_GistBuildLSN,4,2               ## @GistBuildLSN
	.comm	_gistBuildCallback,4,2          ## @gistBuildCallback
	.comm	_GIST_BUFFERING_ACTIVE,8,3      ## @GIST_BUFFERING_ACTIVE
	.comm	_DEBUG1,4,2                     ## @DEBUG1
L_.str.1:                               ## @.str.1
	.asciz	"all tuples processed, emptying buffers"

	.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	_gistbuild                      ; -- Begin function gistbuild
	.p2align	2
_gistbuild:                             ; @gistbuild
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _CurrentMemoryContext@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CurrentMemoryContext@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	stp	x0, x1, [sp, #64]
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _GIST_OPTION_BUFFERING_ON@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GIST_OPTION_BUFFERING_ON@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _GIST_BUFFERING_STATS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GIST_BUFFERING_STATS@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _GIST_BUFFERING_AUTO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GIST_BUFFERING_AUTO@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [sp, #16]
Lloh11:
	adrp	x8, _GIST_DEFAULT_FILLFACTOR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GIST_DEFAULT_FILLFACTOR@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh13:
	adrp	x10, _GIST_OPTION_BUFFERING_OFF@GOTPAGE
Lloh14:
	ldr	x10, [x10, _GIST_OPTION_BUFFERING_OFF@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.5:
Lloh16:
	adrp	x9, _GIST_BUFFERING_DISABLED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GIST_BUFFERING_DISABLED@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x9, _GIST_BUFFERING_AUTO@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GIST_BUFFERING_AUTO@GOTPAGEOFF]
LBB0_7:
	ldr	x9, [x9]
	str	x9, [sp, #16]
	add	x8, x8, #8
LBB0_8:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	mov	w10, #100
	sub	w8, w10, w8
	mul	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	str	w8, [sp, #24]
	mov	x0, x19
	bl	_RelationGetNumberOfBlocks
	cbz	x0, LBB0_10
; %bb.9:
Lloh23:
	adrp	x8, _ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_RelationGetRelationName
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_elog
LBB0_10:
	mov	x0, x19
	bl	_initGISTstate
	mov	x23, x0
	str	x0, [sp, #40]
	bl	_createTempGistContext
	str	w0, [x23]
	mov	x0, x19
	bl	_gistNewBuffer
	mov	x23, x0
	bl	_BufferGetBlockNumber
Lloh28:
	adrp	x8, _GIST_ROOT_BLKNO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GIST_ROOT_BLKNO@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	x0, x23
	bl	_BufferGetPage
	mov	x24, x0
	bl	_START_CRIT_SECTION
Lloh31:
	adrp	x8, _F_LEAF@GOTPAGE
Lloh32:
	ldr	x8, [x8, _F_LEAF@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_GISTInitBuffer
	mov	x0, x23
	bl	_MarkBufferDirty
Lloh34:
	adrp	x8, _GistBuildLSN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _GistBuildLSN@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_PageSetLSN
	mov	x0, x23
	bl	_UnlockReleaseBuffer
	bl	_END_CRIT_SECTION
	str	xzr, [sp, #32]
	str	xzr, [sp, #56]
Lloh37:
	adrp	x8, _gistBuildCallback@GOTPAGE
Lloh38:
	ldr	x8, [x8, _gistBuildCallback@GOTPAGEOFF]
Lloh39:
	ldr	w5, [x8]
	add	x6, sp, #16
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	w3, #1
	mov	w4, #1
	mov	x7, #0
	bl	_table_index_build_scan
	fmov	d8, d0
	ldr	x8, [sp, #16]
Lloh40:
	adrp	x9, _GIST_BUFFERING_ACTIVE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _GIST_BUFFERING_ACTIVE@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
Lloh43:
	adrp	x8, _DEBUG1@GOTPAGE
Lloh44:
	ldr	x8, [x8, _DEBUG1@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
Lloh46:
	adrp	x1, l_.str.1@PAGE
Lloh47:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
	add	x0, sp, #16
	bl	_gistEmptyAllBuffers
	ldr	w0, [sp, #48]
	bl	_gistFreeBuildBuffers
LBB0_12:
	mov	x0, x20
	bl	_MemoryContextSwitchTo
	ldr	x8, [sp, #40]
	ldr	w0, [x8]
	bl	_MemoryContextDelete
	ldr	x0, [sp, #40]
	bl	_freeGISTstate
	mov	x0, x19
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_14
; %bb.13:
Lloh48:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh50:
	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_14:
	mov	w0, #16
	bl	_palloc
	str	d8, [x0]
	ldr	d0, [sp, #32]
	scvtf	d0, d0
	str	d0, [x0, #8]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.comm	_GIST_OPTION_BUFFERING_ON,8,3   ; @GIST_OPTION_BUFFERING_ON
	.comm	_GIST_BUFFERING_STATS,8,3       ; @GIST_BUFFERING_STATS
	.comm	_GIST_OPTION_BUFFERING_OFF,8,3  ; @GIST_OPTION_BUFFERING_OFF
	.comm	_GIST_BUFFERING_DISABLED,8,3    ; @GIST_BUFFERING_DISABLED
	.comm	_GIST_BUFFERING_AUTO,8,3        ; @GIST_BUFFERING_AUTO
	.comm	_GIST_DEFAULT_FILLFACTOR,4,2    ; @GIST_DEFAULT_FILLFACTOR
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_GIST_ROOT_BLKNO,8,3            ; @GIST_ROOT_BLKNO
	.comm	_F_LEAF,4,2                     ; @F_LEAF
	.comm	_GistBuildLSN,4,2               ; @GistBuildLSN
	.comm	_gistBuildCallback,4,2          ; @gistBuildCallback
	.comm	_GIST_BUFFERING_ACTIVE,8,3      ; @GIST_BUFFERING_ACTIVE
	.comm	_DEBUG1,4,2                     ; @DEBUG1
l_.str.1:                               ; @.str.1
	.asciz	"all tuples processed, emptying buffers"

	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
.subsections_via_symbols
