	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gistNewBuffer                  ## -- Begin function gistNewBuffer
	.p2align	4, 0x90
_gistNewBuffer:                         ## @gistNewBuffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_GetFreeIndexPage
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_1
LBB0_10:
	movl	%r14d, %edi
	callq	_RELATION_IS_LOCAL
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_ExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockRelationForExtension
LBB0_12:
	movq	_P_NEW@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_ReadBuffer
	movl	%eax, %r15d
	movq	_GIST_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.13:
	movq	_ExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_UnlockRelationForExtension
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	callq	_ReleaseBuffer
	movl	%r14d, %edi
	callq	_GetFreeIndexPage
	movq	%rax, %rbx
	cmpq	(%r13), %rax
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_ReadBuffer
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_ConditionalLockBuffer
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	callq	_BufferGetPage
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_gistcheckpage
	movl	%r12d, %edi
	callq	_gistPageRecyclable
	testq	%rax, %rax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GIST_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	jmp	LBB0_9
LBB0_5:
	xorl	%eax, %eax
	callq	_XLogStandbyInfoActive
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	movl	%r14d, %edi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	%r12d, %edi
	callq	_GistPageGetDeleteXid
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_gistXLogPageReuse
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_GIST_UNLOCK,4,2                ## @GIST_UNLOCK
	.comm	_ExclusiveLock,4,2              ## @ExclusiveLock
	.comm	_P_NEW,8,3                      ## @P_NEW
	.comm	_GIST_EXCLUSIVE,4,2             ## @GIST_EXCLUSIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gistNewBuffer                  ; -- Begin function gistNewBuffer
	.p2align	2
_gistNewBuffer:                         ; @gistNewBuffer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_GetFreeIndexPage
Lloh0:
	adrp	x23, _InvalidBlockNumber@GOTPAGE
Lloh1:
	ldr	x23, [x23, _InvalidBlockNumber@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_1:
	mov	x0, x19
	bl	_RELATION_IS_LOCAL
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _ExclusiveLock@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ExclusiveLock@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LockRelationForExtension
LBB0_3:
Lloh5:
	adrp	x8, _P_NEW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _P_NEW@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_ReadBuffer
	mov	x20, x0
Lloh8:
	adrp	x8, _GIST_EXCLUSIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GIST_EXCLUSIVE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_LockBuffer
	cbnz	w21, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _ExclusiveLock@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ExclusiveLock@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_UnlockRelationForExtension
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x21, x0
Lloh14:
	adrp	x24, _GIST_UNLOCK@GOTPAGE
Lloh15:
	ldr	x24, [x24, _GIST_UNLOCK@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_ReleaseBuffer
	mov	x0, x19
	bl	_GetFreeIndexPage
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ReadBuffer
	mov	x20, x0
	bl	_ConditionalLockBuffer
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_BufferGetPage
	mov	x22, x0
	bl	_PageIsNew
	cbnz	x0, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_gistcheckpage
	mov	x0, x22
	bl	_gistPageRecyclable
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_LockBuffer
	b	LBB0_7
LBB0_12:
	bl	_XLogStandbyInfoActive
	cbz	x0, LBB0_5
; %bb.13:
	mov	x0, x19
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_5
; %bb.14:
	mov	x0, x22
	bl	_GistPageGetDeleteXid
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_gistXLogPageReuse
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_GIST_UNLOCK,4,2                ; @GIST_UNLOCK
	.comm	_ExclusiveLock,4,2              ; @ExclusiveLock
	.comm	_P_NEW,8,3                      ; @P_NEW
	.comm	_GIST_EXCLUSIVE,4,2             ; @GIST_EXCLUSIVE
.subsections_via_symbols
