	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phpdbg_btree_find_closest      ## -- Begin function phpdbg_btree_find_closest
	.p2align	4, 0x90
_phpdbg_btree_find_closest:             ## @phpdbg_btree_find_closest
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_7
## %bb.1:
	movl	%esi, %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ebx
	movl	$-1, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	je	LBB0_11
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	callq	_CHOOSE_BRANCH
	movl	%r15d, %ebx
	testl	%r15d, %r15d
	je	LBB0_19
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rbx), %r15d
	btl	%r15d, %r12d
	movq	(%r14), %rax
	jae	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 4(%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, (%rax)
	cmovnel	%r15d, %r13d
	movl	$1, %edi
	jmp	LBB0_3
LBB0_8:
	xorl	%edi, %edi
	callq	_CHOOSE_BRANCH
	cmpl	$1, %ebx
	je	LBB0_19
## %bb.9:
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_CHOOSE_BRANCH
	incl	%r15d
	cmpl	%r15d, %ebx
	jne	LBB0_10
	jmp	LBB0_19
LBB0_11:
	cmpl	$-1, %r13d
	je	LBB0_7
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	movl	(%rax), %r15d
	leal	-1(%r15), %ebx
	addl	$-2, %r15d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r14), %rax
	cmpl	$0, 4(%rax)
	setne	%al
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=1
	movzbl	%al, %edi
	callq	_CHOOSE_BRANCH
	decl	%ebx
	cmpl	%r13d, %ebx
	jle	LBB0_17
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %eax
	movl	%ebx, %ecx
	sarl	%cl, %eax
	andl	$-2147483647, %eax              ## imm = 0x80000001
	cmpl	$1, %eax
	je	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_7:
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_17:
	cmpl	%r15d, %r13d
	cmovll	%r13d, %r15d
	xorl	%edi, %edi
	callq	_CHOOSE_BRANCH
	testl	%r15d, %r15d
	je	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_CHOOSE_BRANCH
	decl	%r15d
	jne	LBB0_18
LBB0_19:
	addq	$8, %r14
LBB0_20:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_phpdbg_btree_find_closest      ; -- Begin function phpdbg_btree_find_closest
	.p2align	2
_phpdbg_btree_find_closest:             ; @phpdbg_btree_find_closest
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_17
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w23, [x0]
	mov	w22, #-1
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	cmp	w8, #0
	csel	w22, w22, w24, eq
	mov	w0, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_CHOOSE_BRANCH
	mov	x23, x24
	cbz	w24, LBB0_20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w24, w23, #1
	ldr	x8, [x21]
	lsr	w9, w19, w24
	tbnz	w9, #0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #0
	b	LBB0_4
LBB0_8:
	mov	w0, #0
	bl	_CHOOSE_BRANCH
	cmp	w23, #1
	b.eq	LBB0_20
; %bb.9:
	mov	w19, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	bl	_CHOOSE_BRANCH
	add	w19, w19, #1
	cmp	w23, w19
	b.ne	LBB0_10
	b	LBB0_20
LBB0_11:
	cmn	w22, #1
	b.eq	LBB0_17
; %bb.12:
	ldr	x21, [x20, #8]
	ldr	w8, [x20]
	sub	w23, w8, #1
	sub	w20, w8, #2
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x21]
	ldr	w8, [x8, #4]
	cmp	w8, #0
	cset	w0, ne
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	bl	_CHOOSE_BRANCH
	sub	w23, w23, #1
	cmp	w23, w22
	b.le	LBB0_18
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	asr	w8, w19, w23
	and	w8, w8, #0x80000001
	cmp	w8, #1
	b.eq	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w0, #0
	b	LBB0_14
LBB0_17:
	mov	x0, #0
	b	LBB0_21
LBB0_18:
	cmp	w22, w20
	csel	w19, w22, w20, lt
	mov	w0, #0
	bl	_CHOOSE_BRANCH
	cbz	w19, LBB0_20
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	sub	w19, w19, #1
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	bl	_CHOOSE_BRANCH
	cbnz	w19, LBB0_19
LBB0_20:
	add	x0, x21, #8
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
