	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gistgettuple                   ## -- Begin function gistgettuple
	.p2align	4, 0x90
_gistgettuple:                          ## @gistgettuple
	.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	%rdi, %r14
	movslq	44(%rdi), %r15
	movq	_ForwardScanDirection@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_2:
	cmpl	$0, 56(%r15)
	je	LBB0_34
## %bb.3:
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.4:
	movl	40(%r14), %edi
	callq	_pgstat_count_index_scan
	movq	$0, (%r15)
	movl	$0, 8(%r15)
	movq	$0, 16(%r14)
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_MemoryContextReset
LBB0_6:
	movq	_GIST_ROOT_BLKNO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_gistScanPage
LBB0_7:
	cmpq	$0, (%r14)
	jle	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_getNextNearest
	jmp	LBB0_35
LBB0_10:
	movl	4(%r15), %eax
	movl	8(%r15), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_20
LBB0_11:
	cmpq	$0, 8(%r14)
	je	LBB0_17
## %bb.12:
	testl	%eax, %eax
	jle	LBB0_17
## %bb.13:
	cmpq	$0, 32(%r15)
	jne	LBB0_15
## %bb.14:
	movq	40(%r15), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %ebx
	movq	_MaxIndexTuplesPerPage@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_palloc
	movq	%rax, 32(%r15)
	movl	%ebx, %edi
	callq	_MemoryContextSwitchTo
LBB0_15:
	movslq	12(%r15), %rax
	movq	_MaxIndexTuplesPerPage@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_17
## %bb.16:
	movslq	4(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	24(%r15), %rdx
	movq	32(%r15), %rsi
	movl	-24(%rdx,%rcx,8), %ecx
	leal	1(%rax), %edx
	movl	%edx, 12(%r15)
	movl	%ecx, (%rsi,%rax,4)
LBB0_17:
	movq	24(%r15), %rcx
	movslq	4(%r15), %rax
	leaq	(%rax,%rax,2), %rdx
	movl	20(%rcx,%rdx,8), %esi
	movl	%esi, 36(%r14)
	movl	16(%rcx,%rdx,8), %esi
	movl	%esi, 32(%r14)
	cmpq	$0, 24(%r14)
	je	LBB0_19
## %bb.18:
	movq	8(%rcx,%rdx,8), %rcx
	movq	%rcx, 16(%r14)
LBB0_19:
	incl	%eax
	movl	%eax, 4(%r15)
	movl	$1, %eax
	jmp	LBB0_35
LBB0_20:
	movq	_MaxIndexTuplesPerPage@GOTPCREL(%rip), %r12
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %r13
LBB0_21:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
	cmpq	$0, 8(%r14)
	je	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	testl	%eax, %eax
	jle	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpl	%ecx, %eax
	jne	LBB0_28
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpq	$0, 32(%r15)
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	40(%r15), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %ebx
	movl	(%r12), %edi
	shll	$2, %edi
	callq	_palloc
	movq	%rax, 32(%r15)
	movl	%ebx, %edi
	callq	_MemoryContextSwitchTo
LBB0_26:                                ##   in Loop: Header=BB0_21 Depth=1
	movslq	12(%r15), %rax
	cmpl	(%r12), %eax
	jge	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_21 Depth=1
	movslq	4(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	24(%r15), %rdx
	movq	32(%r15), %rsi
	movl	-24(%rdx,%rcx,8), %ecx
	leal	1(%rax), %edx
	movl	%edx, 12(%r15)
	movl	%ecx, (%rsi,%rax,4)
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_21 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r15), %eax
	cmpl	(%r13), %eax
	je	LBB0_31
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=2
	cmpl	$0, 12(%r15)
	jle	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_28 Depth=2
	movq	%r14, %rdi
	callq	_gistkillitems
LBB0_31:                                ##   in Loop: Header=BB0_28 Depth=2
	movq	%r15, %rdi
	callq	_getNextGISTSearchItem
	testq	%rax, %rax
	je	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_28 Depth=2
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movl	8(%rbx), %eax
	movl	%eax, 16(%r15)
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_gistScanPage
	movq	%rbx, %rdi
	callq	_pfree
	movl	8(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.33:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	4(%r15), %eax
	cmpl	%ecx, %eax
	jge	LBB0_21
	jmp	LBB0_11
LBB0_34:
	xorl	%eax, %eax
LBB0_35:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ForwardScanDirection,8,3       ## @ForwardScanDirection
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GiST only supports forward scan direction"

	.comm	_GIST_ROOT_BLKNO,4,2            ## @GIST_ROOT_BLKNO
	.comm	_MaxIndexTuplesPerPage,4,2      ## @MaxIndexTuplesPerPage
	.comm	_InvalidBlockNumber,4,2         ## @InvalidBlockNumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gistgettuple                   ; -- Begin function gistgettuple
	.p2align	2
_gistgettuple:                          ; @gistgettuple
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	ldrsw	x19, [x0, #44]
Lloh0:
	adrp	x8, _ForwardScanDirection@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ForwardScanDirection@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
	ldr	w8, [x19, #56]
	cbz	w8, LBB0_9
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.4:
	ldr	w0, [x20, #40]
	bl	_pgstat_count_index_scan
	str	wzr, [x19, #8]
	str	xzr, [x19]
	str	xzr, [x20, #16]
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_MemoryContextReset
LBB0_6:
Lloh8:
	adrp	x8, _GIST_ROOT_BLKNO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GIST_ROOT_BLKNO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	mov	x8, sp
	add	x0, x8, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x1, sp
	mov	x0, x20
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_gistScanPage
LBB0_7:
	ldr	x8, [x20]
	cmp	x8, #0
	b.le	LBB0_10
; %bb.8:
	mov	x0, x20
	bl	_getNextNearest
	b	LBB0_20
LBB0_9:
	mov	w0, #0
	b	LBB0_20
LBB0_10:
	ldp	w8, w9, [x19, #4]
	cmp	w8, w9
	b.ge	LBB0_21
LBB0_11:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_17
; %bb.12:
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_15
; %bb.14:
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x21, x0
Lloh11:
	adrp	x8, _MaxIndexTuplesPerPage@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MaxIndexTuplesPerPage@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	w0, w8, #2
	bl	_palloc
	str	x0, [x19, #32]
	mov	x0, x21
	bl	_MemoryContextSwitchTo
LBB0_15:
	ldrsw	x8, [x19, #12]
Lloh14:
	adrp	x9, _MaxIndexTuplesPerPage@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MaxIndexTuplesPerPage@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_17
; %bb.16:
	ldrsw	x9, [x19, #4]
	mov	w10, #24
	ldp	x11, x12, [x19, #24]
	madd	x9, x9, x10, x11
	ldur	w9, [x9, #-24]
	add	w10, w8, #1
	str	w10, [x19, #12]
	str	w9, [x12, x8, lsl #2]
LBB0_17:
	ldr	x9, [x19, #24]
	ldrsw	x8, [x19, #4]
	mov	w10, #24
	madd	x10, x8, x10, x9
	ldr	d0, [x10, #16]
	str	d0, [x20, #32]
	ldr	x10, [x20, #24]
	cbz	x10, LBB0_19
; %bb.18:
	mov	w10, #24
	madd	x9, x8, x10, x9
	ldr	x9, [x9, #8]
	str	x9, [x20, #16]
LBB0_19:
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	w0, #1
LBB0_20:
	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
	add	sp, sp, #80
	ret
LBB0_21:
Lloh17:
	adrp	x22, _InvalidBlockNumber@GOTPAGE
Lloh18:
	ldr	x22, [x22, _InvalidBlockNumber@GOTPAGEOFF]
Lloh19:
	adrp	x23, _MaxIndexTuplesPerPage@GOTPAGE
Lloh20:
	ldr	x23, [x23, _MaxIndexTuplesPerPage@GOTPAGEOFF]
	mov	w24, #24
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_27 Depth 2
	ldr	x10, [x20, #8]
	cmp	x10, #0
	ccmp	w8, #1, #8, ne
	ccmp	w8, w9, #0, ge
	b.ne	LBB0_27
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x21, x0
	ldr	w8, [x23]
	lsl	w0, w8, #2
	bl	_palloc
	str	x0, [x19, #32]
	mov	x0, x21
	bl	_MemoryContextSwitchTo
LBB0_25:                                ;   in Loop: Header=BB0_22 Depth=1
	ldrsw	x8, [x19, #12]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ge	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	ldrsw	x9, [x19, #4]
	ldp	x10, x11, [x19, #24]
	madd	x9, x9, x24, x10
	ldur	w9, [x9, #-24]
	add	w10, w8, #1
	str	w10, [x19, #12]
	str	w9, [x11, x8, lsl #2]
LBB0_27:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x19, #16]
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=2
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=2
	mov	x0, x20
	bl	_gistkillitems
LBB0_30:                                ;   in Loop: Header=BB0_27 Depth=2
	mov	x0, x19
	bl	_getNextGISTSearchItem
	cbz	x0, LBB0_20
; %bb.31:                               ;   in Loop: Header=BB0_27 Depth=2
	mov	x21, x0
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w8, [x21, #8]
	str	w8, [x19, #16]
	ldr	x2, [x21]
	mov	x0, x20
	mov	x1, x21
	mov	x3, #0
	mov	x4, #0
	bl	_gistScanPage
	mov	x0, x21
	bl	_pfree
	ldr	w9, [x19, #8]
	cbz	w9, LBB0_27
; %bb.32:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [x19, #4]
	cmp	w8, w9
	b.ge	LBB0_22
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ForwardScanDirection,8,3       ; @ForwardScanDirection
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GiST only supports forward scan direction"

	.comm	_GIST_ROOT_BLKNO,4,2            ; @GIST_ROOT_BLKNO
	.comm	_MaxIndexTuplesPerPage,4,2      ; @MaxIndexTuplesPerPage
	.comm	_InvalidBlockNumber,4,2         ; @InvalidBlockNumber
.subsections_via_symbols
