	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btrescan                       ## -- Begin function btrescan
	.p2align	4, 0x90
_btrescan:                              ## @btrescan
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movslq	16(%rdi), %rbx
	movl	56(%rbx), %edi
	callq	_BTScanPosIsValid
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpq	$0, (%rbx)
	jle	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	__bt_killitems
LBB0_3:
	movl	56(%rbx), %edi
	callq	_BTScanPosUnpinIfPinned
	movl	56(%rbx), %edi
	callq	_BTScanPosInvalidate
LBB0_4:
	movl	$-1, 8(%rbx)
	movq	$0, 48(%rbx)
	movl	40(%rbx), %edi
	callq	_BTScanPosUnpinIfPinned
	movl	40(%rbx), %edi
	callq	_BTScanPosInvalidate
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
LBB0_7:
	testl	%r14d, %r14d
	je	LBB0_10
LBB0_8:
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.9:
	movl	4(%r15), %edi
	shll	$2, %edx
	movl	%r14d, %esi
	callq	_memmove
	jmp	LBB0_10
LBB0_6:
	movq	_BLCKSZ@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	addl	%edi, %edi
	callq	_palloc
	movq	%rax, 16(%rbx)
	movslq	(%r12), %rcx
	addq	%rax, %rcx
	movq	%rcx, 24(%rbx)
	testl	%r14d, %r14d
	jne	LBB0_8
LBB0_10:
	movq	$0, 32(%rbx)
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__bt_preprocess_array_keys      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btrescan                       ; -- Begin function btrescan
	.p2align	2
_btrescan:                              ; @btrescan
	.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
	mov	x20, x1
	mov	x19, x0
	ldrsw	x21, [x0, #16]
	ldr	w0, [x21, #56]
	bl	_BTScanPosIsValid
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	__bt_killitems
LBB0_3:
	ldr	w0, [x21, #56]
	bl	_BTScanPosUnpinIfPinned
	ldr	w0, [x21, #56]
	bl	_BTScanPosInvalidate
LBB0_4:
	mov	w8, #-1
	str	w8, [x21, #8]
	str	xzr, [x21, #48]
	ldr	w0, [x21, #40]
	bl	_BTScanPosUnpinIfPinned
	ldr	w0, [x21, #40]
	bl	_BTScanPosInvalidate
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_9
LBB0_6:
	cbz	w20, LBB0_10
LBB0_7:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	ldr	w0, [x19, #4]
	lsl	w2, w8, #2
	mov	x1, x20
	bl	_memmove
	b	LBB0_10
LBB0_9:
Lloh0:
	adrp	x22, _BLCKSZ@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BLCKSZ@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w0, w8, #1
	bl	_palloc
	ldrsw	x8, [x22]
	add	x8, x0, x8
	stp	x0, x8, [x21, #16]
	cbnz	w20, LBB0_7
LBB0_10:
	str	xzr, [x21, #32]
	mov	x0, x19
	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
	b	__bt_preprocess_array_keys
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
.subsections_via_symbols
