	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phpdbg_btree_insert_or_update  ## -- Begin function phpdbg_btree_insert_or_update
	.p2align	4, 0x90
_phpdbg_btree_insert_or_update:         ## @phpdbg_btree_insert_or_update
	.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
	movl	%ecx, %r8d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rdi), %ebx
	leaq	16(%rdi), %r14
	decl	%ebx
	movl	%esi, %r13d
	shrl	$31, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %esi
	movl	%ebx, %ecx
	sarl	%cl, %esi
	leal	(%rsi,%r13), %ecx
	andl	$-2, %ecx
	subl	%ecx, %esi
	movslq	%esi, %r14
	shlq	$3, %r14
	addq	16(%rax), %r14
	addl	$-1, %ebx
	jb	LBB0_1
## %bb.3:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.10:
	movq	_PHPDBG_BTREE_UPDATE@GOTPCREL(%rip), %rcx
	testl	%r8d, (%rcx)
	jne	LBB0_9
	jmp	LBB0_11
LBB0_4:
	movl	$-1, %ebx
LBB0_5:
	movq	_PHPDBG_BTREE_INSERT@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_11
## %bb.6:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%rbx,2), %eax
	leal	48(,%rax,8), %edi
	movl	8(%r15), %esi
	callq	_pemalloc
	movq	%rax, (%r14)
	addq	$24, %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rax), %rdx
	movl	%r12d, %esi
	movl	%ebx, %ecx
	sarl	%cl, %esi
	leal	(%rsi,%r13), %ecx
	andl	$-2, %ecx
	xorl	%edi, %edi
	subl	%ecx, %esi
	sete	%dil
	movq	$0, (%rdx,%rdi,8)
	movq	(%r14), %rcx
	movq	16(%rcx), %rcx
	movslq	%esi, %rdx
	leaq	(%rcx,%rdx,8), %r14
	movq	%rax, (%rcx,%rdx,8)
	addq	$24, %rax
	addl	$-1, %ebx
	jb	LBB0_7
## %bb.8:
	incl	4(%r15)
	addq	$-24, %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_9:
	movl	%r12d, (%rax)
	movq	%rdx, 8(%rax)
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_FAILURE@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHPDBG_BTREE_INSERT,4,2        ## @PHPDBG_BTREE_INSERT
	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_PHPDBG_BTREE_UPDATE,4,2        ## @PHPDBG_BTREE_UPDATE
	.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_insert_or_update  ; -- Begin function phpdbg_btree_insert_or_update
	.p2align	2
_phpdbg_btree_insert_or_update:         ; @phpdbg_btree_insert_or_update
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x23, x0
	ldr	w8, [x23], #16
	sub	w22, w8, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x8, #16]
	asr	w9, w20, w22
	and	w10, w9, #0x1
	cmp	w9, #0
	cneg	w9, w10, lt
	add	x23, x8, w9, sxtw #3
	sub	w22, w22, #1
	cmn	w22, #1
	b.ne	LBB0_1
; %bb.3:
	ldr	x8, [x23]
	cbz	x8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x9, _PHPDBG_BTREE_UPDATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHPDBG_BTREE_UPDATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w3
	b.ne	LBB0_10
	b	LBB0_11
LBB0_5:
	mov	w22, #-1
LBB0_6:
Lloh3:
	adrp	x8, _PHPDBG_BTREE_INSERT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHPDBG_BTREE_INSERT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_11
; %bb.7:
	mov	w8, #24
	orr	w9, wzr, #0x30
	madd	w0, w22, w8, w9
	ldr	w1, [x21, #8]
	bl	_pemalloc
	str	x0, [x23]
	add	x8, x0, #24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x8, #-8]
	asr	w10, w20, w22
	and	w11, w10, #0x1
	cmp	w10, #0
	cneg	w10, w11, lt
	cmp	w10, #0
	cset	w11, eq
	str	xzr, [x9, w11, uxtw #3]
	ldr	x9, [x23]
	ldr	x9, [x9, #16]
	add	x23, x9, w10, sxtw #3
	str	x8, [x23]
	sub	w22, w22, #1
	add	x8, x8, #24
	cmn	w22, #1
	b.ne	LBB0_8
; %bb.9:
	ldr	w9, [x21, #4]
	add	w9, w9, #1
	str	w9, [x21, #4]
	sub	x8, x8, #24
LBB0_10:
	str	w20, [x8]
	str	x19, [x8, #8]
Lloh6:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x8, _FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PHPDBG_BTREE_INSERT,4,2        ; @PHPDBG_BTREE_INSERT
	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_PHPDBG_BTREE_UPDATE,4,2        ; @PHPDBG_BTREE_UPDATE
	.comm	_SUCCESS,4,2                    ; @SUCCESS
.subsections_via_symbols
