	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_systable_beginscan_ordered     ## -- Begin function systable_beginscan_ordered
	.p2align	4, 0x90
_systable_beginscan_ordered:            ## @systable_beginscan_ordered
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_RelationGetRelid
	movl	%eax, %edi
	callq	_ReindexIsProcessingIndex
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_elog
LBB0_2:
	movq	_IgnoreSystemIndexes@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_elog
LBB0_4:
	movl	$4, %edi
	callq	_palloc
	movq	%rax, %r12
	movq	%r13, 40(%rax)
	movq	%rbx, 32(%rax)
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_table_slot_create
	movl	%eax, 24(%r12)
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_RelationGetRelid
	movl	%eax, %edi
	callq	_GetCatalogSnapshot
	movl	%eax, %edi
	callq	_RegisterSnapshot
	movq	%rax, %r14
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_6:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, 16(%r12)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_16
## %bb.7:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	cmpq	%r12, %r13
	je	LBB0_16
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	%rbx, %rdi
	callq	_IndexRelationGetNumberOfAttributes
	movl	$0, %r14d
	testl	%eax, %eax
	jle	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%r13,4), %eax
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	cmpl	(%rcx,%r14,4), %eax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	incq	%r14
	movq	%rbx, %rdi
	callq	_IndexRelationGetNumberOfAttributes
	cltq
	cmpq	%rax, %r14
	jl	LBB0_10
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	leal	1(%r14), %eax
	movl	%eax, (%r15,%r13,4)
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_IndexRelationGetNumberOfAttributes
	cmpl	%eax, %r14d
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	jmp	LBB0_15
LBB0_16:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_index_beginscan
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_index_rescan
	movq	$0, (%rbx)
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot do ordered scan on index \"%s\", because it is being reindexed"

	.comm	_IgnoreSystemIndexes,8,3        ## @IgnoreSystemIndexes
	.comm	_WARNING,4,2                    ## @WARNING
L_.str.1:                               ## @.str.1
	.asciz	"using index \"%s\" despite IgnoreSystemIndexes"

L_.str.2:                               ## @.str.2
	.asciz	"column is not in index"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_systable_beginscan_ordered     ; -- Begin function systable_beginscan_ordered
	.p2align	2
_systable_beginscan_ordered:            ; @systable_beginscan_ordered
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_RelationGetRelid
	bl	_ReindexIsProcessingIndex
Lloh0:
	adrp	x26, _ERROR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w24, [x26]
	mov	x0, x21
	bl	_RelationGetRelationName
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_elog
LBB0_2:
Lloh4:
	adrp	x8, _IgnoreSystemIndexes@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IgnoreSystemIndexes@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _WARNING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh9:
	ldr	w24, [x8]
	mov	x0, x21
	bl	_RelationGetRelationName
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_elog
LBB0_4:
	mov	w0, #4
	bl	_palloc
	mov	x24, x0
	stp	x21, x22, [x0, #32]
	mov	x0, x22
	mov	x1, #0
	bl	_table_slot_create
	mov	x8, x0
	mov	x0, #0
	str	w8, [x24, #24]
	cbnz	x23, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_RelationGetRelid
	bl	_GetCatalogSnapshot
	bl	_RegisterSnapshot
	mov	x23, x0
LBB0_6:
	str	x23, [sp, #8]                   ; 8-byte Folded Spill
	str	x0, [x24, #16]
	cmp	w19, #1
	b.lt	LBB0_17
; %bb.7:
	mov	x27, #0
	mov	w28, w19
Lloh12:
	adrp	x25, l_.str.2@PAGE
Lloh13:
	add	x25, x25, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #1
	cmp	x27, x28
	b.eq	LBB0_17
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x21
	bl	_IndexRelationGetNumberOfAttributes
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, #0
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x20, x27, lsl #2]
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldr	w9, [x9, x23, lsl #2]
	cmp	w8, w9
	b.eq	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x23, x23, #1
	mov	x0, x21
	bl	_IndexRelationGetNumberOfAttributes
	cmp	x23, w0, sxtw
	b.lt	LBB0_11
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w23, #0
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	add	w8, w23, #1
	str	w8, [x20, x27, lsl #2]
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	bl	_IndexRelationGetNumberOfAttributes
	cmp	w23, w0
	b.ne	LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x26]
	mov	x1, x25
	bl	_elog
	b	LBB0_8
LBB0_17:
	mov	x0, x22
	mov	x1, x21
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	mov	x3, x19
	mov	w4, #0
	bl	_index_beginscan
	str	w0, [x24, #8]
	mov	x1, x20
	mov	x2, x19
	mov	x3, #0
	mov	w4, #0
	bl	_index_rescan
	str	xzr, [x24]
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot do ordered scan on index \"%s\", because it is being reindexed"

	.comm	_IgnoreSystemIndexes,8,3        ; @IgnoreSystemIndexes
	.comm	_WARNING,4,2                    ; @WARNING
l_.str.1:                               ; @.str.1
	.asciz	"using index \"%s\" despite IgnoreSystemIndexes"

l_.str.2:                               ; @.str.2
	.asciz	"column is not in index"

.subsections_via_symbols
