	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_readnextpage
__bt_readnextpage:                      ## @_bt_readnextpage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	%rsi, -48(%rbp)
	movslq	16(%rdi), %r12
	movl	12(%rdi), %r15d
	movl	%edx, %edi
	callq	_ScanDirectionIsForward
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	_P_NONE@GOTPCREL(%rip), %r14
	cmpq	%rbx, (%r14)
	jne	LBB0_4
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)
	movq	(%r12), %rsi
	movl	%r15d, %edi
	callq	__bt_relbuf
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax
	cmpq	(%r14), %rax
	je	LBB0_17
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 20(%r12)
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	-48(%rbp), %rsi
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	__bt_getbuf
	movq	%rax, (%r12)
	movq	%rax, %rdi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	8(%r13), %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_TestForOldSnapshot
	movl	%ebx, %edi
	callq	_PageGetSpecialPointer
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_P_IGNORE
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	__bt_parallel_release
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rsi
	movl	8(%r13), %edx
	movl	%r15d, %edi
	callq	_PredicateLockPage
	movq	%rbx, %rdi
	callq	_P_FIRSTDATAKEY
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	__bt_readpage
	testq	%rax, %rax
	jne	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rsi
	movl	%r15d, %edi
	callq	__bt_relbuf
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	callq	__bt_parallel_seize
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_18
LBB0_11:
	cmpq	%rbx, 8(%r12)
	je	LBB0_13
## %bb.12:
	movq	16(%r12), %rax
	movq	%rax, 16(%rsp)
	movups	(%r12), %xmm0
	movups	%xmm0, (%rsp)
	callq	_BTScanPosUnpinIfPinned
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r12)
LBB0_13:
	movq	16(%r12), %rax
	movq	%rax, 16(%rsp)
	movups	(%r12), %xmm0
	movups	%xmm0, (%rsp)
	callq	_BTScanPosIsPinned
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	(%r12), %rdi
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	jmp	LBB0_21
LBB0_15:
	movq	8(%r12), %rsi
	jmp	LBB0_20
LBB0_17:
	movq	%r13, %rdi
	callq	__bt_parallel_done
LBB0_18:
	movq	16(%r12), %rax
	movq	%rax, 16(%rsp)
	movups	(%r12), %xmm0
	movups	%xmm0, (%rsp)
	callq	_BTScanPosInvalidate
	xorl	%eax, %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	__bt_getbuf
	movq	%rax, (%r12)
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 16(%r12)
	je	LBB0_30
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	(%r12), %rsi
	movl	8(%r13), %edx
	movl	%r15d, %edi
	callq	__bt_walk_left
	movq	%rax, (%r12)
	movq	_InvalidBuffer@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%rax, %rdi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	8(%r13), %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_TestForOldSnapshot
	movl	%ebx, %edi
	callq	_PageGetSpecialPointer
	movq	%rax, %rdi
	callq	_P_IGNORE
	testl	%eax, %eax
	je	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_21
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	(%r12), %rdi
	callq	_BufferGetBlockNumber
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	__bt_parallel_release
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	(%r12), %rdi
	callq	_BufferGetBlockNumber
	movl	8(%r13), %edx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_PredicateLockPage
	movl	%ebx, %edi
	callq	_PageGetMaxOffsetNumber
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	__bt_readpage
	testq	%rax, %rax
	jne	LBB0_16
LBB0_27:                                ##   in Loop: Header=BB0_21 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_21
## %bb.28:
	movq	(%r12), %rsi
	movl	%r15d, %edi
	callq	__bt_relbuf
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	callq	__bt_parallel_seize
	testl	%eax, %eax
	je	LBB0_18
## %bb.29:
	movq	-48(%rbp), %rsi
	jmp	LBB0_20
LBB0_30:
	movq	(%r12), %rsi
	movl	%r15d, %edi
	callq	__bt_relbuf
	jmp	LBB0_17
LBB0_16:
	movl	$1, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_P_NONE,8,3                     ## @P_NONE
	.comm	_BT_READ,4,2                    ## @BT_READ
	.comm	_InvalidBuffer,8,3              ## @InvalidBuffer
	.no_dead_strip	__bt_readnextpage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_readnextpage
__bt_readnextpage:                      ; @_bt_readnextpage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
	str	x1, [sp, #24]
	ldp	w21, w23, [x0, #12]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	mov	x0, x2
	bl	_ScanDirectionIsForward
	cbz	x0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x24, _P_NONE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _P_NONE@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x22
	b.eq	LBB0_28
; %bb.2:
Lloh2:
	adrp	x25, _BT_READ@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BT_READ@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22]
	str	x8, [sp, #24]
	ldr	x1, [x23]
	mov	x0, x21
	bl	__bt_relbuf
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_28
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23, #20]
	cbz	w8, LBB0_28
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	x1, [sp, #24]
	ldr	w2, [x25]
	mov	x0, x21
	bl	__bt_getbuf
	str	x0, [x23]
	bl	_BufferGetPage
	mov	x22, x0
	ldr	w0, [x19, #8]
	mov	x1, x21
	mov	x2, x22
	bl	_TestForOldSnapshot
	mov	x0, x22
	bl	_PageGetSpecialPointer
	mov	x22, x0
	bl	_P_IGNORE
	cbz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x22]
	mov	x0, x19
	bl	__bt_parallel_release
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [sp, #24]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_PredicateLockPage
	mov	x0, x22
	bl	_P_FIRSTDATAKEY
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	__bt_readpage
	cbnz	x0, LBB0_31
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x23]
	mov	x0, x21
	bl	__bt_relbuf
	add	x1, sp, #24
	mov	x0, x19
	bl	__bt_parallel_seize
	cbnz	w0, LBB0_4
	b	LBB0_29
LBB0_12:
	ldr	x8, [x23, #8]
	cmp	x8, x22
	b.eq	LBB0_14
; %bb.13:
	ldr	q0, [x23]
	ldr	x8, [x23, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, sp
	bl	_BTScanPosUnpinIfPinned
	str	x22, [x23, #8]
LBB0_14:
	ldr	q0, [x23]
	ldr	x8, [x23, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, sp
	bl	_BTScanPosIsPinned
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x0, [x23]
Lloh4:
	adrp	x8, _BT_READ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BT_READ@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_LockBuffer
	ldr	w8, [x23, #16]
	cbnz	w8, LBB0_17
	b	LBB0_27
LBB0_16:
	ldr	x1, [x23, #8]
Lloh7:
	adrp	x8, _BT_READ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BT_READ@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x21
	bl	__bt_getbuf
	str	x0, [x23]
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_27
LBB0_17:
Lloh10:
	adrp	x24, _InvalidBuffer@GOTPAGE
Lloh11:
	ldr	x24, [x24, _InvalidBuffer@GOTPAGEOFF]
Lloh12:
	adrp	x25, _BT_READ@GOTPAGE
Lloh13:
	ldr	x25, [x25, _BT_READ@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x1, [sp, #24]
	ldr	w2, [x25]
	mov	x0, x21
	bl	__bt_getbuf
	str	x0, [x23]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_27
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x23]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	__bt_walk_left
	str	x0, [x23]
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_28
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_BufferGetPage
	mov	x22, x0
	ldr	w0, [x19, #8]
	mov	x1, x21
	mov	x2, x22
	bl	_TestForOldSnapshot
	mov	x0, x22
	bl	_PageGetSpecialPointer
	bl	_P_IGNORE
	cbz	w0, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_19
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x0, [x23]
	bl	_BufferGetBlockNumber
	mov	x1, x0
	mov	x0, x19
	bl	__bt_parallel_release
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x0, [x23]
	bl	_BufferGetBlockNumber
	mov	x1, x0
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_PredicateLockPage
	mov	x0, x22
	bl	_PageGetMaxOffsetNumber
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	__bt_readpage
	cbnz	x0, LBB0_31
LBB0_25:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_19
; %bb.26:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x1, [x23]
	mov	x0, x21
	bl	__bt_relbuf
	add	x1, sp, #24
	mov	x0, x19
	bl	__bt_parallel_seize
	cbnz	w0, LBB0_18
	b	LBB0_29
LBB0_27:
	ldr	x1, [x23]
	mov	x0, x21
	bl	__bt_relbuf
LBB0_28:
	mov	x0, x19
	bl	__bt_parallel_done
LBB0_29:
	ldr	q0, [x23]
	ldr	x8, [x23, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
	mov	x0, sp
	bl	_BTScanPosInvalidate
	mov	w0, #0
LBB0_30:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_31:
	mov	w0, #1
	b	LBB0_30
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_P_NONE,8,3                     ; @P_NONE
	.comm	_BT_READ,4,2                    ; @BT_READ
	.comm	_InvalidBuffer,8,3              ; @InvalidBuffer
	.no_dead_strip	__bt_readnextpage
.subsections_via_symbols
