	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gistBufferingFindCorrectParent
_gistBufferingFindCorrectParent:        ## @gistBufferingFindCorrectParent
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	testl	%edx, %edx
	jle	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_gistGetParent
	movq	%rax, %r14
	jmp	LBB0_4
LBB0_2:
	movq	(%rbx), %r14
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_elog
	movq	(%rbx), %r14
LBB0_4:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_ReadBuffer
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_BufferGetPage
	movl	%eax, %r15d
	movq	_GIST_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_LockBuffer
	movl	(%r13), %edi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_gistcheckpage
	movl	%r15d, %edi
	callq	_PageGetMaxOffsetNumber
	movq	%rax, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	%rax, %r14
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_10
## %bb.5:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.6:
	movq	(%r14), %rsi
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_10
## %bb.7:
	cmpq	%r13, %rsi
	jg	LBB0_10
## %bb.8:
	movl	%r15d, %edi
	callq	_PageGetItemId
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movslq	%eax, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	%r12, %rax
	je	LBB0_15
LBB0_10:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	%r13, %rbx
	jg	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_PageGetItemId
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movslq	%eax, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	%r12, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	callq	_OffsetNumberNext
	movq	%rax, %rbx
	cmpq	%r13, %rax
	jle	LBB0_11
LBB0_13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	callq	_elog
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_14:
	movq	%rbx, (%r14)
LBB0_15:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no parent buffer provided of child %d"

	.comm	_GIST_EXCLUSIVE,4,2             ## @GIST_EXCLUSIVE
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
L_.str.1:                               ## @.str.1
	.asciz	"failed to re-find parent for block %u"

	.comm	_InvalidBuffer,4,2              ## @InvalidBuffer
	.no_dead_strip	_gistBufferingFindCorrectParent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gistBufferingFindCorrectParent
_gistBufferingFindCorrectParent:        ; @gistBufferingFindCorrectParent
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x4
	mov	x24, x3
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x26, _InvalidBlockNumber@GOTPAGE
Lloh1:
	ldr	x26, [x26, _InvalidBlockNumber@GOTPAGEOFF]
	cmp	w2, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x23
	mov	x1, x19
	bl	_gistGetParent
	mov	x25, x0
	b	LBB0_4
LBB0_2:
	ldr	x25, [x24]
	ldr	x8, [x26]
	cmp	x25, x8
	b.ne	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elog
	ldr	x25, [x24]
LBB0_4:
	ldr	w0, [x23]
	mov	x1, x25
	bl	_ReadBuffer
	mov	x21, x0
	bl	_BufferGetPage
	mov	x22, x0
Lloh7:
	adrp	x8, _GIST_EXCLUSIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GIST_EXCLUSIVE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_LockBuffer
	ldr	w0, [x23]
	mov	x1, x21
	bl	_gistcheckpage
	mov	x0, x22
	bl	_PageGetMaxOffsetNumber
	mov	x23, x0
	ldr	x8, [x24]
	cmp	x25, x8
	b.ne	LBB0_8
; %bb.5:
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.6:
	ldr	x1, [x20]
Lloh10:
	adrp	x8, _InvalidOffsetNumber@GOTPAGE
Lloh11:
	ldr	x8, [x8, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x1, x8
	ccmp	x1, x23, #0, ne
	b.gt	LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItem
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_ItemPointerGetBlockNumber
	cmp	x0, x19
	b.eq	LBB0_13
LBB0_8:
Lloh13:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh15:
	ldr	x24, [x8]
	cmp	x24, x23
	b.gt	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItem
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_ItemPointerGetBlockNumber
	cmp	x0, x19
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x24
	bl	_OffsetNumberNext
	mov	x24, x0
	cmp	x0, x23
	b.le	LBB0_9
LBB0_11:
Lloh16:
	adrp	x8, _ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_elog
Lloh21:
	adrp	x8, _InvalidBuffer@GOTPAGE
Lloh22:
	ldr	x8, [x8, _InvalidBuffer@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
	b	LBB0_13
LBB0_12:
	str	x24, [x20]
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no parent buffer provided of child %d"

	.comm	_GIST_EXCLUSIVE,4,2             ; @GIST_EXCLUSIVE
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
l_.str.1:                               ; @.str.1
	.asciz	"failed to re-find parent for block %u"

	.comm	_InvalidBuffer,4,2              ; @InvalidBuffer
	.no_dead_strip	_gistBufferingFindCorrectParent
.subsections_via_symbols
