	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_uppershutdown
__bt_uppershutdown:                     ## @_bt_uppershutdown
	.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	%rdi, %r12
	movq	_P_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_BTP_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movl	32(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rdi
	callq	__bt_slideleft
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	%r12, %rdi
	callq	__bt_blwritepage
	movq	$0, (%rbx)
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %r13d
	movq	(%rbx), %rdi
	callq	_PageGetSpecialPointer
	movq	%rax, %r14
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rdi
	movl	(%r12), %esi
	callq	_BTreeTupleGetNAtts
	movq	%rax, %r15
	movl	(%r12), %edi
	callq	_IndexRelationGetNumberOfKeyAttributes
	cmpq	%rax, %r15
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rdi
	movl	(%r12), %esi
	callq	_BTreeTupleGetNAtts
	movb	$1, %cl
	testq	%rax, %rax
	jg	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_P_LEFTMOST
	testq	%rax, %rax
	setne	%cl
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%cl, %edi
	callq	_Assert
	movq	16(%rbx), %rdi
	movl	(%r12), %esi
	callq	_BTreeTupleGetNAtts
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_P_LEFTMOST
	testq	%rax, %rax
	sete	%al
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movb	$1, %al
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %edi
	callq	_Assert
	movq	16(%rbx), %rdi
	movl	%r13d, %esi
	callq	_BTreeInnerTupleSetDownLink
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rsi
	movq	%r12, %rdi
	callq	__bt_buildadd
	movq	16(%rbx), %rdi
	callq	_pfree
	movq	$0, 16(%rbx)
	jmp	LBB0_12
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_13:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_palloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	__bt_initmetapage
	movq	_BTREE_METAPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__bt_blwritepage                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_P_NONE,4,2                     ## @P_NONE
	.comm	_BTP_ROOT,4,2                   ## @BTP_ROOT
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_BTREE_METAPAGE,4,2             ## @BTREE_METAPAGE
	.no_dead_strip	__bt_uppershutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_uppershutdown
__bt_uppershutdown:                     ; @_bt_uppershutdown
	.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	x19, x0
Lloh0:
	adrp	x8, _P_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _P_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cbz	x1, LBB0_13
; %bb.1:
	mov	x22, x1
	mov	w21, #0
Lloh3:
	adrp	x26, _BTP_ROOT@GOTPAGE
Lloh4:
	ldr	x26, [x26, _BTP_ROOT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x24]
	ldr	w21, [x22, #32]
	mov	x20, x23
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x22]
	bl	__bt_slideleft
	ldr	x1, [x22]
	ldr	w2, [x22, #8]
	mov	x0, x19
	bl	__bt_blwritepage
	str	xzr, [x22]
	ldr	x22, [x22, #24]
	cbz	x22, LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x22, #8]
	ldr	x0, [x22]
	bl	_PageGetSpecialPointer
	mov	x24, x0
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x22, #16]
	ldr	w1, [x19]
	bl	_BTreeTupleGetNAtts
	mov	x25, x0
	ldr	w0, [x19]
	bl	_IndexRelationGetNumberOfKeyAttributes
	cmp	x25, x0
	b.gt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x22, #16]
	ldr	w1, [x19]
	bl	_BTreeTupleGetNAtts
	cmp	x0, #0
	b.le	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_P_LEFTMOST
	cmp	x0, #0
	cset	w0, ne
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_Assert
	ldr	x0, [x22, #16]
	ldr	w1, [x19]
	bl	_BTreeTupleGetNAtts
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_P_LEFTMOST
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_Assert
	ldr	x0, [x22, #16]
	mov	x1, x23
	bl	_BTreeInnerTupleSetDownLink
	ldp	x2, x1, [x22, #16]
	mov	x0, x19
	bl	__bt_buildadd
	ldr	x0, [x22, #16]
	bl	_pfree
	str	xzr, [x22, #16]
	b	LBB0_3
LBB0_13:
	mov	w21, #0
LBB0_14:
Lloh5:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_palloc
	mov	x22, x0
	mov	x1, x20
	mov	x2, x21
	bl	__bt_initmetapage
Lloh8:
	adrp	x8, _BTREE_METAPAGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTREE_METAPAGE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	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
	b	__bt_blwritepage
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_P_NONE,4,2                     ; @P_NONE
	.comm	_BTP_ROOT,4,2                   ; @BTP_ROOT
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_BTREE_METAPAGE,4,2             ; @BTREE_METAPAGE
	.no_dead_strip	__bt_uppershutdown
.subsections_via_symbols
