	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_next                       ## -- Begin function _bt_next
	.p2align	4, 0x90
__bt_next:                              ## @_bt_next
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movslq	20(%rdi), %rbx
	movl	%esi, %edi
	callq	_ScanDirectionIsForward
	movq	8(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rbx)
	cmpq	16(%rbx), %rcx
	jl	LBB0_6
	jmp	LBB0_2
LBB0_4:
	leaq	-1(%rcx), %rax
	movq	%rax, 8(%rbx)
	cmpq	24(%rbx), %rcx
	jg	LBB0_6
LBB0_2:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	__bt_steppage
	testl	%eax, %eax
	je	LBB0_3
LBB0_6:
	movq	8(%rbx), %rcx
	movq	32(%rbx), %rdx
	shlq	$4, %rcx
	movl	8(%rdx,%rcx), %eax
	movl	%eax, 16(%r15)
	movl	$1, %eax
	cmpq	$0, 8(%r15)
	je	LBB0_8
## %bb.7:
	movq	(%rdx,%rcx), %rcx
	addq	(%rbx), %rcx
	movq	%rcx, (%r15)
	jmp	LBB0_8
LBB0_3:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_next                       ; -- Begin function _bt_next
	.p2align	2
__bt_next:                              ; @_bt_next
	.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, #20]
	mov	x0, x1
	bl	_ScanDirectionIsForward
	ldr	x8, [x21, #8]
	cbz	x0, LBB0_2
; %bb.1:
	add	x9, x8, #1
	str	x9, [x21, #8]
	ldr	x9, [x21, #16]
	cmp	x8, x9
	b.ge	LBB0_3
	b	LBB0_4
LBB0_2:
	sub	x9, x8, #1
	str	x9, [x21, #8]
	ldr	x9, [x21, #24]
	cmp	x8, x9
	b.gt	LBB0_4
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	__bt_steppage
	cbz	w0, LBB0_7
LBB0_4:
	ldr	x8, [x21, #32]
	ldr	x9, [x21, #8]
	add	x10, x8, x9, lsl #4
	ldr	w10, [x10, #8]
	str	w10, [x19, #16]
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_6
; %bb.5:
	ldr	x10, [x21]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	add	x8, x8, x10
	str	x8, [x19]
LBB0_6:
	mov	w0, #1
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
