	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phpdbg_btree_delete            ## -- Begin function phpdbg_btree_delete
	.p2align	4, 0x90
_phpdbg_btree_delete:                   ## @phpdbg_btree_delete
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	movq	_FAILURE@GOTPCREL(%rip), %r8
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.1:
	leaq	8(%r15), %r14
	movl	(%r15), %ecx
	decl	%ecx
	movl	$-1, %r12d
	xorl	%r13d, %r13d
	movl	%esi, %r9d
	shrl	$31, %r9d
	movq	%rdi, %rbx
                                        ## implicit-def: $r10d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%esi, %edx
	sarl	%cl, %edx
	leal	(%rdx,%r9), %ebx
	andl	$-2, %ebx
	subl	%ebx, %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rbx
	decl	%ecx
	testq	%rbx, %rbx
	je	LBB0_20
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, %ecx
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%esi, %r10d
	sarl	%cl, %r10d
	leal	(%r10,%r9), %edx
	andl	$-2, %edx
	subl	%edx, %r10d
	movl	%ecx, %r12d
	movq	%rbx, %r13
	jmp	LBB0_5
LBB0_7:
	decl	16(%r15)
	cmpl	$-1, %r12d
	je	LBB0_8
## %bb.9:
	movq	(%r13), %rax
	movslq	%r10d, %rdx
	movq	(%rax,%rdx,8), %rbx
	leaq	8(%r13), %rcx
	cmpq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.17:
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_pefree
LBB0_18:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	shlq	$3, %r14
	addq	(%r13), %r14
	jmp	LBB0_19
LBB0_8:
	movl	4(%r15), %esi
	callq	_pefree
LBB0_19:
	movq	$0, (%r14)
	movq	_SUCCESS@GOTPCREL(%rip), %r8
LBB0_20:
	movl	(%r8), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	testl	%r10d, %r10d
	movl	$0, %ecx
	sete	%cl
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %r14
	leal	8(,%r12,8), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	(%r13), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rdi
	movl	4(%r15), %esi
	callq	_pefree
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%r13), %rax
	movq	%rbx, (%rax,%rcx,8)
	testl	%r12d, %r12d
	je	LBB0_18
## %bb.11:
	movq	(%r13), %rax
	movq	(%rax,%rcx,8), %rcx
	movslq	%r12d, %rdx
	testb	$1, %r12b
	jne	LBB0_13
## %bb.12:
	movq	%rdx, %rax
	jmp	LBB0_14
LBB0_13:
	leaq	8(,%rdx,8), %rsi
	addq	%r13, %rsi
	leaq	-1(%rdx), %rax
	movl	$1, %edi
	subq	%rdx, %rdi
	movq	(%rcx), %rcx
	leaq	(%rsi,%rdi,8), %rsi
	addq	$8, %r14
	xorl	%edi, %edi
	cmpq	%r14, 8(%rcx)
	sete	%dil
	movq	%rsi, (%rcx,%rdi,8)
	movq	%rsi, %rcx
LBB0_14:
	cmpl	$1, %r12d
	je	LBB0_18
## %bb.15:
	leaq	(,%rax,8), %rsi
	movq	%r13, %rdi
	subq	%rsi, %rdi
	leaq	(%rdi,%rdx,8), %r8
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r8,%rsi), %rdi
	addq	$16, %rdi
	movq	(%rcx), %rcx
	leaq	(%r14,%rsi), %rbx
	addq	$8, %rbx
	xorl	%edx, %edx
	cmpq	8(%rcx), %rbx
	sete	%dl
	movq	%rdi, (%rcx,%rdx,8)
	leaq	(%r8,%rsi), %rcx
	addq	$24, %rcx
	movq	16(%r8,%rsi), %rdx
	leaq	(%r14,%rsi), %rdi
	addq	$16, %rdi
	xorl	%ebx, %ebx
	cmpq	8(%rdx), %rdi
	sete	%bl
	movq	%rcx, (%rdx,%rbx,8)
	addq	$16, %rsi
	addl	$-2, %eax
	jne	LBB0_16
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_SUCCESS,4,2                    ## @SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phpdbg_btree_delete            ; -- Begin function phpdbg_btree_delete
	.p2align	2
_phpdbg_btree_delete:                   ; @phpdbg_btree_delete
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	mov	x20, x0
	ldr	x0, [x20, #8]!
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, #0
	ldr	w8, [x19]
	sub	w10, w8, #1
	mov	w23, #-1
Lloh0:
	adrp	x9, _FAILURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FAILURE@GOTPAGEOFF]
	mov	x11, x0
                                        ; implicit-def: $w8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	and	w11, w13, #0x1
	cmp	w13, #0
	cneg	w11, w11, lt
	ldr	x11, [x12, w11, sxtw #3]
	sub	w10, w10, #1
	cbz	x11, LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmn	w10, #1
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x11]
	ldr	x14, [x12]
	asr	w13, w1, w10
	cbz	x14, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x14, [x12, #8]
	and	w15, w13, #0x1
	cmp	w13, #0
	cneg	w15, w15, lt
	cmp	x14, #0
	csel	x22, x22, x11, eq
	csel	w23, w23, w10, eq
	csel	w8, w8, w15, eq
	b	LBB0_2
LBB0_6:
Lloh2:
	adrp	x9, _FAILURE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FAILURE@GOTPAGEOFF]
	b	LBB0_16
LBB0_7:
	ldr	w9, [x19, #16]
	sub	w9, w9, #1
	str	w9, [x19, #16]
	cmn	w23, #1
	b.eq	LBB0_10
; %bb.8:
	mov	x10, x22
	ldr	x9, [x10], #8
	sxtw	x24, w8
	ldr	x20, [x9, w8, sxtw #3]
	cmp	x20, x10
	b.eq	LBB0_11
; %bb.9:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_pefree
	b	LBB0_14
LBB0_10:
	ldr	w1, [x19, #4]
	bl	_pefree
	b	LBB0_15
LBB0_11:
	cmp	w8, #0
	cset	w25, eq
	lsl	x26, x25, #3
	ldr	x21, [x9, x26]
	lsl	w8, w23, #3
	add	w2, w8, #8
	mov	x0, x20
	mov	x1, x21
	bl	_memcpy
	ldr	x8, [x22]
	ldr	x0, [x8, x26]
	ldr	w1, [x19, #4]
	bl	_pefree
	ldr	x8, [x22]
	str	x20, [x8, x26]
	cbz	w23, LBB0_14
; %bb.12:
	mov	x10, x22
	ldr	x8, [x10], #16
	ldr	x9, [x8, x25, lsl #3]
	add	x8, x21, #8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x9]
	ldr	x11, [x9, #8]
	cmp	x8, x11
	cset	w11, eq
	str	x10, [x9, w11, uxtw #3]
	mov	x9, x10
	add	x10, x10, #8
	add	x8, x8, #8
	subs	w23, w23, #1
	b.ne	LBB0_13
LBB0_14:
	ldr	x8, [x22]
	add	x20, x8, x24, lsl #3
LBB0_15:
	str	xzr, [x20]
Lloh4:
	adrp	x9, _SUCCESS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SUCCESS@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x9]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_SUCCESS,4,2                    ; @SUCCESS
.subsections_via_symbols
