	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bt_index_check_internal
_bt_index_check_internal:               ## @bt_index_check_internal
	.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
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rdi, %r15
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ShareLock@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_IndexGetRelation
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_OidIsValid
	testq	%rax, %rax
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	je	LBB0_4
## %bb.5:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_table_open
	movq	%rax, %rbx
	movq	%r15, %rdi
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	callq	_index_open
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.7:
	movq	%rbx, %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_IndexGetRelation
	cmpq	%rax, %r12
	movl	$0, %r12d
	movq	%rbx, %r15
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jne	LBB0_8
	jmp	LBB0_9
LBB0_4:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_index_open
	movq	%rax, %r14
	movb	$1, %r12b
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_6:
	movb	$1, %r12b
	xorl	%r15d, %r15d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_UNDEFINED_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r14, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	movq	%r14, %rdi
	callq	_btree_index_checkable
	movq	%r14, %rdi
	callq	_btree_index_mainfork_expected
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	callq	_RelationOpenSmgr
	movl	(%r14), %edi
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smgrexists
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INDEX_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r14, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_12:
	movq	%r14, %rdi
	callq	__bt_heapkeyspace
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	callq	_bt_check_every_level
LBB0_13:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_index_close
	testb	%r12b, %r12b
	je	LBB0_15
## %bb.14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r15, %rdi
	movl	%r13d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_table_close                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ShareLock,4,2                  ## @ShareLock
	.comm	_AccessShareLock,4,2            ## @AccessShareLock
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_UNDEFINED_TABLE,4,2    ## @ERRCODE_UNDEFINED_TABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open parent table of index %s"

	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_ERRCODE_INDEX_CORRUPTED,4,2    ## @ERRCODE_INDEX_CORRUPTED
L_.str.1:                               ## @.str.1
	.asciz	"index \"%s\" lacks a main relation fork"

	.no_dead_strip	_bt_index_check_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt_index_check_internal
_bt_index_check_internal:               ; @bt_index_check_internal
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x25, x0
Lloh0:
	adrp	x8, _AccessShareLock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AccessShareLock@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ShareLock@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ShareLock@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x8, x9, eq
	ldr	w19, [x8]
	mov	w1, #1
	bl	_IndexGetRelation
	mov	x26, x0
	bl	_OidIsValid
Lloh4:
	adrp	x28, _ERROR@GOTPAGE
Lloh5:
	ldr	x28, [x28, _ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x26
	mov	x1, x19
	bl	_table_open
	mov	x23, x0
	mov	x0, x25
	mov	x1, x19
	bl	_index_open
	mov	x24, x0
	cbz	x23, LBB0_4
; %bb.2:
	mov	x0, x25
	mov	w1, #0
	bl	_IndexGetRelation
	mov	w27, #0
	cmp	x26, x0
	b.ne	LBB0_5
	b	LBB0_6
LBB0_3:
	mov	x0, x25
	mov	x1, x19
	bl	_index_open
	mov	x24, x0
	mov	x23, #0
LBB0_4:
	mov	w27, #1
LBB0_5:
	ldr	w25, [x28]
Lloh6:
	adrp	x8, _ERRCODE_UNDEFINED_TABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERRCODE_UNDEFINED_TABLE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x24
	bl	_RelationGetRelationName
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
LBB0_6:
	mov	x0, x24
	bl	_btree_index_checkable
	mov	x0, x24
	bl	_btree_index_mainfork_expected
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x24
	bl	_RelationOpenSmgr
	ldr	w0, [x24]
Lloh11:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_smgrexists
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	w25, [x28]
Lloh14:
	adrp	x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x24
	bl	_RelationGetRelationName
	mov	x1, x0
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
LBB0_9:
	mov	x0, x24
	bl	__bt_heapkeyspace
	mov	x2, x0
	mov	x0, x24
	mov	x1, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	bl	_bt_check_every_level
LBB0_10:
	mov	x0, x24
	mov	x1, x19
	bl	_index_close
	tbz	w27, #0, LBB0_12
; %bb.11:
	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
LBB0_12:
	mov	x0, x23
	mov	x1, x19
	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
	b	_table_close
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ShareLock,4,2                  ; @ShareLock
	.comm	_AccessShareLock,4,2            ; @AccessShareLock
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_UNDEFINED_TABLE,4,2    ; @ERRCODE_UNDEFINED_TABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open parent table of index %s"

	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_ERRCODE_INDEX_CORRUPTED,4,2    ; @ERRCODE_INDEX_CORRUPTED
l_.str.1:                               ; @.str.1
	.asciz	"index \"%s\" lacks a main relation fork"

	.no_dead_strip	_bt_index_check_internal
.subsections_via_symbols
