	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gistFindCorrectParent
_gistFindCorrectParent:                 ## @gistFindCorrectParent
	.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
	movq	%rsi, %r15
	movl	%edi, %r14d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_5 Depth 3
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rbx
	movq	32(%r15), %r13
	movq	24(%r13), %rsi
	movl	%r14d, %edi
	callq	_gistcheckpage
	movq	24(%r13), %rdi
	callq	_BufferGetPage
	movq	%rax, %rdi
	movq	%rax, 40(%r13)
	movq	(%r15), %rax
	cmpq	(%rbx), %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r13), %rbx
	callq	_PageGetLSN
	cmpq	%rax, %rbx
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	40(%r13), %rdi
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_5 Depth 3
	callq	_PageGetMaxOffsetNumber
	movq	%rax, %r12
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	%r12, %rbx
	jg	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	40(%r13), %rdi
	movq	%rbx, %rsi
	callq	_PageGetItemId
	movq	40(%r13), %rdi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	16(%r15), %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=3
	movq	%rbx, %rdi
	callq	_OffsetNumberNext
	movq	%rax, %rbx
	cmpq	%r12, %rax
	jle	LBB0_5
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	40(%r13), %rdi
	callq	_GistPageGetOpaque
	movq	(%rax), %rax
	movq	%rax, 16(%r13)
	movq	24(%r13), %rdi
	callq	_UnlockReleaseBuffer
	movq	16(%r13), %rsi
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%r14d, %edi
	callq	_ReadBuffer
	movq	%rax, 24(%r13)
	movq	_GIST_EXCLUSIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_LockBuffer
	movq	24(%r13), %rsi
	movl	%r14d, %edi
	callq	_gistcheckpage
	movq	24(%r13), %rdi
	callq	_BufferGetPage
	movq	%rax, %rdi
	movq	%rax, 40(%r13)
	jmp	LBB0_4
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	32(%r15), %rax
	movq	32(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%rbx), %rdi
	callq	_ReleaseBuffer
	movq	32(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r15), %rsi
	movl	%r14d, %edi
	movq	%r15, %rdx
	callq	_gistFindPath
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rbx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	_ReadBuffer
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_BufferGetPage
	movq	%rax, 40(%rbx)
	movq	32(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, 32(%r15)
	movq	24(%r12), %rdi
	movq	_GIST_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	jmp	LBB0_1
LBB0_6:
	movq	%rbx, (%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_GIST_EXCLUSIVE,4,2             ## @GIST_EXCLUSIVE
	.no_dead_strip	_gistFindCorrectParent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gistFindCorrectParent
_gistFindCorrectParent:                 ; @gistFindCorrectParent
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _InvalidOffsetNumber@GOTPAGE
Lloh1:
	ldr	x23, [x23, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh2:
	adrp	x24, _FirstOffsetNumber@GOTPAGE
Lloh3:
	ldr	x24, [x24, _FirstOffsetNumber@GOTPAGEOFF]
Lloh4:
	adrp	x25, _InvalidBlockNumber@GOTPAGE
Lloh5:
	ldr	x25, [x25, _InvalidBlockNumber@GOTPAGEOFF]
Lloh6:
	adrp	x26, _GIST_EXCLUSIVE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _GIST_EXCLUSIVE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;     Child Loop BB0_11 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x27, [x19, #32]
	ldr	x1, [x27, #24]
	mov	x0, x20
	bl	_gistcheckpage
	ldr	x0, [x27, #24]
	bl	_BufferGetPage
	str	x0, [x27, #40]
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x21, [x27, #8]
	bl	_PageGetLSN
	cmp	x21, x0
	b.eq	LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x27, #40]
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
	bl	_PageGetMaxOffsetNumber
	ldr	x22, [x24]
	cmp	x22, x0
	b.gt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x21, x0
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x0, [x27, #40]
	mov	x1, x22
	bl	_PageGetItemId
	mov	x1, x0
	ldr	x0, [x27, #40]
	bl	_PageGetItem
	bl	_ItemPointerGetBlockNumber
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.eq	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=3
	mov	x0, x22
	bl	_OffsetNumberNext
	mov	x22, x0
	cmp	x0, x21
	b.le	LBB0_6
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=2
	ldr	x0, [x27, #40]
	bl	_GistPageGetOpaque
	ldr	x8, [x0]
	str	x8, [x27, #16]
	ldr	x0, [x27, #24]
	bl	_UnlockReleaseBuffer
	ldr	x1, [x27, #16]
	ldr	x8, [x25]
	cmp	x1, x8
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x0, x20
	bl	_ReadBuffer
	str	x0, [x27, #24]
	ldr	w1, [x26]
	bl	_LockBuffer
	ldr	x1, [x27, #24]
	mov	x0, x20
	bl	_gistcheckpage
	ldr	x0, [x27, #24]
	bl	_BufferGetPage
	str	x0, [x27, #40]
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #32]
	ldr	x21, [x8, #32]
	cbz	x21, LBB0_12
LBB0_11:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x21, #24]
	bl	_ReleaseBuffer
	ldr	x21, [x21, #32]
	cbnz	x21, LBB0_11
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x1, [x19, #16]
	mov	x0, x20
	mov	x2, x19
	bl	_gistFindPath
	mov	x21, x0
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x21
LBB0_14:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x22, #16]
	mov	x0, x20
	bl	_ReadBuffer
	str	x0, [x22, #24]
	bl	_BufferGetPage
	str	x0, [x22, #40]
	ldr	x22, [x22, #32]
	cbnz	x22, LBB0_14
LBB0_15:                                ;   in Loop: Header=BB0_1 Depth=1
	str	x21, [x19, #32]
	ldr	x0, [x21, #24]
	ldr	w1, [x26]
	bl	_LockBuffer
	b	LBB0_1
LBB0_16:
	str	x22, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_GIST_EXCLUSIVE,4,2             ; @GIST_EXCLUSIVE
	.no_dead_strip	_gistFindCorrectParent
.subsections_via_symbols
