	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_search                     ## -- Begin function _bt_search
	.p2align	4, 0x90
__bt_search:                            ## @_bt_search
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	_BT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %esi
	callq	__bt_getroot
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_BufferIsValid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	xorl	%r8d, %r8d
	movq	_BT_WRITE@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	xorl	%ecx, %ecx
	cmpl	%r15d, (%rbx)
	sete	%cl
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %r9d
	callq	__bt_moveright
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_BufferGetPage
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_PageGetSpecialPointer
	movl	%r15d, %r14d
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_P_ISLEAF
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	__bt_binsrch
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_PageGetItemId
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	callq	_BTreeInnerTupleGetDownLink
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	callq	_BufferGetBlockNumber
	movq	%rbx, %r12
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_palloc
	movl	%r14d, %esi
	movq	%rax, %r14
	movl	%ebx, 12(%rax)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r14)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movl	(%r15), %eax
	xorl	$1, %eax
	movq	_BT_WRITE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%ecx, %edx
	xorl	%esi, %edx
	movl	%esi, %r15d
	orl	%eax, %edx
	cmovel	%ecx, %r13d
	movl	(%r12), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	callq	__bt_relandgetbuf
	movl	%eax, %edx
	movl	%eax, (%r12)
	movq	%r14, %r8
	jmp	LBB0_3
LBB0_5:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	cmpl	%r14d, (%rbx)
	jne	LBB0_8
## %bb.6:
	movq	_BT_READ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_LockBuffer
	movl	(%rbx), %edx
	movl	(%r14), %r9d
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %ecx
	movq	%r15, %r8
	callq	__bt_moveright
	movl	%eax, (%rbx)
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
LBB0_8:
	movq	%r15, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_READ,4,2                    ## @BT_READ
	.comm	_BT_WRITE,4,2                   ## @BT_WRITE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_search                     ; -- Begin function _bt_search
	.p2align	2
__bt_search:                            ; @_bt_search
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w4, [sp, #8]                    ; 4-byte Folded Spill
	mov	x24, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _BT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	mov	x1, x3
	bl	__bt_getroot
	str	w0, [x19]
	bl	_BufferIsValid
	mov	x23, #0
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w2, [x19]
Lloh3:
	adrp	x21, _BT_WRITE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BT_WRITE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cmp	w8, w24
	cset	w3, eq
	mov	x0, x22
	mov	x1, x20
	mov	x4, x23
	mov	x5, x25
	ldr	w6, [sp, #8]                    ; 4-byte Folded Reload
	bl	__bt_moveright
	str	w0, [x19]
	bl	_BufferGetPage
	mov	x27, x0
	bl	_PageGetSpecialPointer
	mov	x26, x0
	bl	_P_ISLEAF
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x19]
	mov	x0, x22
	mov	x1, x20
	bl	__bt_binsrch
	mov	x28, x0
	mov	x0, x27
	mov	x1, x28
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x27
	bl	_PageGetItem
	bl	_BTreeInnerTupleGetDownLink
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	ldr	w0, [x19]
	bl	_BufferGetBlockNumber
	mov	x27, x19
	mov	x19, x25
	mov	x25, x21
	mov	x21, x22
	mov	x22, x24
	mov	x24, x20
	mov	x20, x0
	mov	w0, #4
	bl	_palloc
	mov	x8, x23
	mov	x23, x0
	stp	w28, w20, [x0, #8]
	mov	x20, x24
	mov	x24, x22
	mov	x22, x21
	mov	x21, x25
	mov	x25, x19
	mov	x19, x27
	str	x8, [x0]
	ldr	w8, [x26]
	ldr	w9, [x21]
	cmp	w9, w24
	ccmp	w8, #1, #0, eq
	csel	w25, w9, w25, eq
	ldr	w1, [x27]
	mov	x0, x22
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	mov	x3, x25
	bl	__bt_relandgetbuf
	mov	x2, x0
	str	w0, [x27]
	b	LBB0_2
LBB0_4:
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _BT_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BT_READ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w24
	ccmp	w25, w9, #0, eq
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_LockBuffer
	ldr	w0, [x19]
	ldr	w1, [x21]
	bl	_LockBuffer
	ldr	w2, [x19]
	ldr	w5, [x21]
	mov	x0, x22
	mov	x1, x20
	mov	w3, #1
	mov	x4, x23
	ldr	w6, [sp, #8]                    ; 4-byte Folded Reload
	bl	__bt_moveright
	str	w0, [x19]
LBB0_6:
	mov	x0, x23
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_READ,4,2                    ; @BT_READ
	.comm	_BT_WRITE,4,2                   ; @BT_WRITE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
.subsections_via_symbols
