	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_getrootheight              ## -- Begin function _bt_getrootheight
	.p2align	4, 0x90
__bt_getrootheight:                     ## @_bt_getrootheight
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %r12
	movq	_BTREE_METAPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	__bt_getbuf
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	__bt_getmeta
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_P_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	__bt_relbuf
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movl	8(%r12), %edi
	movl	$40, %esi
	callq	_MemoryContextAlloc
	movq	%rax, (%r12)
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	$40, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	__bt_relbuf
	movq	(%r12), %rbx
LBB0_4:
	movq	8(%rbx), %rax
	movq	_BTREE_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	16(%rbx), %rax
	movq	_BTREE_MIN_VERSION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_Assert
	movq	16(%rbx), %rax
	movq	_BTREE_VERSION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setle	%dil
	callq	_Assert
	movq	24(%rbx), %rax
	movq	_P_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_Assert
	movl	32(%rbx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTREE_METAPAGE,4,2             ## @BTREE_METAPAGE
	.comm	_BT_READ,4,2                    ## @BT_READ
	.comm	_P_NONE,8,3                     ## @P_NONE
	.comm	_BTREE_MAGIC,8,3                ## @BTREE_MAGIC
	.comm	_BTREE_MIN_VERSION,8,3          ## @BTREE_MIN_VERSION
	.comm	_BTREE_VERSION,8,3              ## @BTREE_VERSION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_getrootheight              ; -- Begin function _bt_getrootheight
	.p2align	2
__bt_getrootheight:                     ; @_bt_getrootheight
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
Lloh0:
	adrp	x22, _P_NONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _P_NONE@GOTPAGEOFF]
	cbnz	x20, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _BTREE_METAPAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTREE_METAPAGE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _BT_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_READ@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	__bt_getbuf
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	__bt_getmeta
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	__bt_relbuf
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	w1, #40
	bl	_MemoryContextAlloc
	str	x0, [x19]
	mov	x1, x21
	mov	w2, #40
	bl	_memcpy
	mov	x0, x19
	mov	x1, x20
	bl	__bt_relbuf
	ldr	x20, [x19]
LBB0_4:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _BTREE_MAGIC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BTREE_MAGIC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x20, #16]
Lloh11:
	adrp	x9, _BTREE_MIN_VERSION@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BTREE_MIN_VERSION@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ge
	bl	_Assert
	ldr	x8, [x20, #16]
Lloh14:
	adrp	x9, _BTREE_VERSION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BTREE_VERSION@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, le
	bl	_Assert
	ldr	x8, [x20, #24]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, ne
	bl	_Assert
	ldr	w0, [x20, #32]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BTREE_METAPAGE,4,2             ; @BTREE_METAPAGE
	.comm	_BT_READ,4,2                    ; @BT_READ
	.comm	_P_NONE,8,3                     ; @P_NONE
	.comm	_BTREE_MAGIC,8,3                ; @BTREE_MAGIC
	.comm	_BTREE_MIN_VERSION,8,3          ; @BTREE_MIN_VERSION
	.comm	_BTREE_VERSION,8,3              ; @BTREE_VERSION
.subsections_via_symbols
