	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_createPostingTree              ## -- Begin function createPostingTree
	.p2align	4, 0x90
_createPostingTree:                     ## @createPostingTree
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	%edi, %r14d
	movq	_BLCKSZ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_palloc
	movq	%rax, %r12
	movq	_GIN_DATA@GOTPCREL(%rip), %rax
	movq	_GIN_LEAF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_GIN_COMPRESSED@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_GinInitPage
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_GinPageGetOpaque
	movl	%ebx, (%rax)
	movq	%r12, %rdi
	callq	_GinDataLeafPageGetPostingList
	testl	%r13d, %r13d
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	%rax, %r15
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movl	%r13d, -76(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %rax
	movq	%rcx, %rbx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movl	%r13d, %esi
	subl	%eax, %esi
	movq	_GinPostingListSegmentMaxSize@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	callq	_ginCompressPostingList
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_SizeOfGinPostingList
	movq	%rbx, %rcx
	movl	%r13d, %edx
	movl	%eax, %r13d
	addl	%r13d, %ebx
	movq	_GinDataPageMaxDataSize@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movslq	%r13d, %rax
	addq	%rax, %r15
	addl	-80(%rbp), %r12d
	movq	%r14, %rdi
	callq	_pfree
	movl	%ebx, %ecx
	movl	-76(%rbp), %r13d                ## 4-byte Reload
	cmpl	%r13d, %r12d
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_4:
	movl	%ecx, %ebx
	movl	%edx, %r13d
LBB0_6:
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_GinDataPageSetDataSize
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_GinNewBuffer
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_BufferGetPage
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_BufferGetBlockNumber
	movl	%eax, %r12d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_BufferGetBlockNumber
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %edx
	callq	_PredicateLockPageSplit
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_PageRestoreTempPage
	movl	%ebx, %edi
	callq	_MarkBufferDirty
	movl	%r14d, %edi
	callq	_RelationNeedsWAL
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	jne	LBB0_9
## %bb.7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	%ebx, %r14d
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, -64(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-64(%rbp), %rdi
	movl	$4, %esi
	callq	_XLogRegisterData
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_GinDataLeafPageGetPostingList
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	%r14d, %ebx
	callq	_XLogRegisterData
	movq	_REGBUF_WILL_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%r14d, %esi
	callq	_XLogRegisterBuffer
	movq	_RM_GIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_GIN_CREATE_PTREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_PageSetLSN
LBB0_9:
	movl	%ebx, %edi
	callq	_UnlockReleaseBuffer
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	testq	%r12, %r12
	je	LBB0_11
## %bb.10:
	incl	(%r12)
LBB0_11:
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_elog
	cmpl	%r13d, %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jge	LBB0_13
## %bb.12:
	movslq	%ebx, %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdx
	subl	%ebx, %r13d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movl	%r13d, %ecx
	movq	%r12, %r8
	callq	_ginInsertItemPointers
LBB0_13:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_GIN_DATA,4,2                   ## @GIN_DATA
	.comm	_GIN_LEAF,4,2                   ## @GIN_LEAF
	.comm	_GIN_COMPRESSED,4,2             ## @GIN_COMPRESSED
	.comm	_InvalidBlockNumber,4,2         ## @InvalidBlockNumber
	.comm	_GinPostingListSegmentMaxSize,4,2 ## @GinPostingListSegmentMaxSize
	.comm	_GinDataPageMaxDataSize,4,2     ## @GinDataPageMaxDataSize
	.comm	_REGBUF_WILL_INIT,4,2           ## @REGBUF_WILL_INIT
	.comm	_RM_GIN_ID,4,2                  ## @RM_GIN_ID
	.comm	_XLOG_GIN_CREATE_PTREE,4,2      ## @XLOG_GIN_CREATE_PTREE
	.comm	_DEBUG2,4,2                     ## @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"created GIN posting tree with %d items"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_createPostingTree              ; -- Begin function createPostingTree
	.p2align	2
_createPostingTree:                     ; @createPostingTree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x26, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x19, _BLCKSZ@GOTPAGE
Lloh1:
	ldr	x19, [x19, _BLCKSZ@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_palloc
	mov	x24, x0
Lloh2:
	adrp	x8, _GIN_DATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GIN_DATA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _GIN_LEAF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GIN_LEAF@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _GIN_COMPRESSED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GIN_COMPRESSED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w2, [x19]
	bl	_GinInitPage
Lloh11:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh12:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	mov	x0, x24
	bl	_GinPageGetOpaque
	str	w19, [x0]
	mov	x0, x24
	bl	_GinDataLeafPageGetPostingList
	cmp	w21, #1
	str	x20, [sp, #32]                  ; 8-byte Folded Spill
	str	w23, [sp, #28]                  ; 4-byte Folded Spill
	str	x24, [sp, #16]                  ; 8-byte Folded Spill
	str	w26, [sp, #12]                  ; 4-byte Folded Spill
	b.lt	LBB0_4
; %bb.1:
	mov	x25, x0
	mov	w23, #0
	mov	w27, #0
Lloh14:
	adrp	x20, _GinPostingListSegmentMaxSize@GOTPAGE
Lloh15:
	ldr	x20, [x20, _GinPostingListSegmentMaxSize@GOTPAGEOFF]
Lloh16:
	adrp	x19, _GinDataPageMaxDataSize@GOTPAGE
Lloh17:
	ldr	x19, [x19, _GinDataPageMaxDataSize@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x22, w23, sxtw #2
	sub	w1, w21, w23
	ldr	w2, [x20]
	add	x3, sp, #44
	bl	_ginCompressPostingList
	mov	x26, x0
	bl	_SizeOfGinPostingList
	ldr	w8, [x19]
	add	w24, w0, w27
	cmp	w24, w8
	b.gt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x0
	mov	x0, x25
	mov	x1, x26
	mov	x2, x28
	bl	_memcpy
	add	x25, x25, w28, sxtw
	ldr	w8, [sp, #44]
	add	w23, w8, w23
	mov	x0, x26
	bl	_pfree
	mov	x27, x24
	cmp	w23, w21
	b.lt	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w24, #0
	mov	w23, #0
	b	LBB0_6
LBB0_5:
	mov	x24, x27
LBB0_6:
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x19
	mov	x1, x24
	bl	_GinDataPageSetDataSize
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
	mov	x0, x20
	bl	_GinNewBuffer
	mov	x28, x0
	bl	_BufferGetPage
	mov	x25, x0
	mov	x0, x28
	bl	_BufferGetBlockNumber
	mov	x26, x0
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_BufferGetBlockNumber
	mov	x1, x0
	mov	x0, x20
	mov	x2, x26
	bl	_PredicateLockPageSplit
	bl	_START_CRIT_SECTION
	mov	x0, x19
	mov	x1, x25
	bl	_PageRestoreTempPage
	mov	x0, x28
	bl	_MarkBufferDirty
	mov	x0, x20
	bl	_RelationNeedsWAL
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	cbnz	x19, LBB0_9
; %bb.7:
	cbz	x0, LBB0_9
; %bb.8:
	str	w24, [sp, #40]
	bl	_XLogBeginInsert
	add	x0, sp, #40
	mov	w1, #4
	bl	_XLogRegisterData
	mov	x0, x25
	bl	_GinDataLeafPageGetPostingList
	mov	x1, x24
	bl	_XLogRegisterData
Lloh18:
	adrp	x8, _REGBUF_WILL_INIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REGBUF_WILL_INIT@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x28
	bl	_XLogRegisterBuffer
Lloh21:
	adrp	x8, _RM_GIN_ID@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RM_GIN_ID@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _XLOG_GIN_CREATE_PTREE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XLOG_GIN_CREATE_PTREE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x1, x0
	mov	x0, x25
	bl	_PageSetLSN
LBB0_9:
	mov	x0, x28
	bl	_UnlockReleaseBuffer
	bl	_END_CRIT_SECTION
	cbz	x19, LBB0_11
; %bb.10:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_11:
Lloh27:
	adrp	x8, _DEBUG2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DEBUG2@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_elog
	cmp	w23, w21
	b.ge	LBB0_13
; %bb.12:
	add	x2, x22, w23, sxtw #2
	sub	w3, w21, w23
	mov	x0, x20
	mov	x1, x26
	mov	x4, x19
	bl	_ginInsertItemPointers
LBB0_13:
	mov	x0, x26
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_GIN_DATA,4,2                   ; @GIN_DATA
	.comm	_GIN_LEAF,4,2                   ; @GIN_LEAF
	.comm	_GIN_COMPRESSED,4,2             ; @GIN_COMPRESSED
	.comm	_InvalidBlockNumber,4,2         ; @InvalidBlockNumber
	.comm	_GinPostingListSegmentMaxSize,4,2 ; @GinPostingListSegmentMaxSize
	.comm	_GinDataPageMaxDataSize,4,2     ; @GinDataPageMaxDataSize
	.comm	_REGBUF_WILL_INIT,4,2           ; @REGBUF_WILL_INIT
	.comm	_RM_GIN_ID,4,2                  ; @RM_GIN_ID
	.comm	_XLOG_GIN_CREATE_PTREE,4,2      ; @XLOG_GIN_CREATE_PTREE
	.comm	_DEBUG2,4,2                     ; @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"created GIN posting tree with %d items"

.subsections_via_symbols
