	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TREEVIEW_DeleteItem
_TREEVIEW_DeleteItem:                   ## @TREEVIEW_DeleteItem
	.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, %r12
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r13
	movq	_TVI_ROOT@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_FALSE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TREEVIEW_ValidItem
	testq	%rax, %rax
	je	LBB0_39
## %bb.3:
	movq	%r13, %rdi
	callq	_TREEVIEW_ItemName
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_TRACE
	movq	8(%r13), %rbx
	movq	%r13, %rdi
	callq	_ISVISIBLE
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TREEVIEW_GetPrevListItem
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_TRACE
	movq	8(%r12), %r14
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r12, %rdi
	callq	_TREEVIEW_RemoveTree
	xorl	%r15d, %r15d
	jmp	LBB0_26
LBB0_6:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_7:
	movq	32(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.8:
	cmpq	%r13, %rsi
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_TREEVIEW_IsChildOf
	testq	%rax, %rax
	je	LBB0_15
LBB0_10:
	movq	24(%r13), %r14
	testq	%r14, %r14
	jne	LBB0_13
## %bb.11:
	movq	8(%r13), %r14
	cmpq	8(%r12), %r14
	jne	LBB0_13
## %bb.12:
	movq	16(%r13), %r14
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_16
LBB0_15:
	xorl	%r14d, %r14d
LBB0_16:
	movq	40(%r12), %r15
	cmpq	%r13, %r15
	jne	LBB0_21
## %bb.17:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %r15
	testq	%r15, %r15
	jne	LBB0_20
## %bb.18:
	movq	16(%r13), %r15
	testq	%r15, %r15
	jne	LBB0_20
## %bb.19:
	movq	8(%r13), %rax
	xorl	%r15d, %r15d
	cmpq	8(%r12), %rax
	cmovneq	%rax, %r15
LBB0_20:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_TREEVIEW_SetFirstVisible
LBB0_21:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TREEVIEW_RemoveItem
	testq	%r14, %r14
	je	LBB0_25
## %bb.22:
	cmpq	$0, 32(%r12)
	jne	LBB0_25
## %bb.23:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_TREEVIEW_ValidItem
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	_TVGN_CARET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TVC_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_TREEVIEW_DoSelectItem
LBB0_25:
	movq	%rbx, %r14
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_26:
	movq	24(%r12), %rsi
	movq	%r12, %rdi
	callq	_TREEVIEW_ValidItem
	testq	%rax, %rax
	jne	LBB0_28
## %bb.27:
	movq	$0, 24(%r12)
LBB0_28:
	movq	16(%r12), %rsi
	movq	%r12, %rdi
	callq	_TREEVIEW_ValidItem
	testq	%rax, %rax
	jne	LBB0_30
## %bb.29:
	movq	$0, 16(%r12)
LBB0_30:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_TREEVIEW_ValidItem
	testq	%rax, %rax
	jne	LBB0_32
## %bb.31:
	movq	8(%r12), %rax
	movq	(%rax), %r15
LBB0_32:
	movq	%r12, %rdi
	callq	_TREEVIEW_VerifyTree
	testq	%rbx, %rbx
	je	LBB0_36
## %bb.33:
	movq	_TRUE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_TREEVIEW_SetFirstVisible
	cmpl	$0, (%r12)
	je	LBB0_39
## %bb.34:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TREEVIEW_RecalculateVisibleOrder
	movq	%r12, %rdi
	callq	_TREEVIEW_UpdateScrollBars
	xorl	%r14d, %r14d
LBB0_35:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_TREEVIEW_Invalidate
	movq	_TRUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_39
LBB0_36:
	movq	_TRUE@GOTPCREL(%rip), %rbx
	cmpl	$0, (%r12)
	je	LBB0_39
## %bb.37:
	movq	%r14, %rdi
	callq	_ISVISIBLE
	testq	%rax, %rax
	je	LBB0_39
## %bb.38:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_TREEVIEW_HasChildren
	testl	%eax, %eax
	je	LBB0_35
LBB0_39:
	movq	(%rbx), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_TVI_ROOT,8,3                   ## @TVI_ROOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TVI_ROOT\n"

	.comm	_TRUE,8,3                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"%p (%s)\n"

L_.str.2:                               ## @.str.2
	.asciz	"newSelection = %p\n"

	.comm	_TVGN_CARET,4,2                 ## @TVGN_CARET
	.comm	_TVC_UNKNOWN,4,2                ## @TVC_UNKNOWN
	.no_dead_strip	_TREEVIEW_DeleteItem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TREEVIEW_DeleteItem
_TREEVIEW_DeleteItem:                   ; @TREEVIEW_DeleteItem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x26, _TRUE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TRUE@GOTPAGEOFF]
	cbz	x1, LBB0_5
; %bb.1:
	mov	x23, x1
Lloh2:
	adrp	x8, _TVI_ROOT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TVI_ROOT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x1
	b.eq	LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	x21, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_TREEVIEW_ValidItem
	cbz	x0, LBB0_20
; %bb.3:
	mov	x0, x23
	bl	_TREEVIEW_ItemName
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x20, [x23, #8]
	mov	x0, x23
	bl	_ISVISIBLE
	cbz	x0, LBB0_22
; %bb.4:
	mov	x0, x19
	mov	x1, x23
	bl	_TREEVIEW_GetPrevListItem
	mov	x22, x0
	ldr	x21, [x26]
	ldr	x1, [x19, #32]
	cbnz	x1, LBB0_23
	b	LBB0_29
LBB0_5:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	x20, [x19, #8]
	ldr	x21, [x26]
	mov	x0, x19
	bl	_TREEVIEW_RemoveTree
	mov	x22, #0
	mov	x24, #0
LBB0_6:
	ldr	x1, [x19, #24]
	mov	x0, x19
	bl	_TREEVIEW_ValidItem
	cbnz	x0, LBB0_8
; %bb.7:
	str	xzr, [x19, #24]
LBB0_8:
	ldr	x1, [x19, #16]
	mov	x0, x19
	bl	_TREEVIEW_ValidItem
	cbnz	x0, LBB0_10
; %bb.9:
	str	xzr, [x19, #16]
LBB0_10:
	mov	x0, x19
	mov	x1, x24
	bl	_TREEVIEW_ValidItem
	cbnz	x0, LBB0_12
; %bb.11:
	ldr	x8, [x19, #8]
	ldr	x24, [x8]
LBB0_12:
	mov	x0, x19
	bl	_TREEVIEW_VerifyTree
	cbz	x21, LBB0_16
; %bb.13:
	ldr	x2, [x26]
	mov	x0, x19
	mov	x1, x24
	bl	_TREEVIEW_SetFirstVisible
	ldr	w8, [x19]
	cbz	w8, LBB0_21
; %bb.14:
	mov	x0, x19
	mov	x1, x22
	bl	_TREEVIEW_RecalculateVisibleOrder
	mov	x0, x19
	bl	_TREEVIEW_UpdateScrollBars
	mov	x20, #0
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_TREEVIEW_Invalidate
	b	LBB0_19
LBB0_16:
	ldr	w8, [x19]
	cbz	w8, LBB0_19
; %bb.17:
	mov	x0, x20
	bl	_ISVISIBLE
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	x1, x20
	bl	_TREEVIEW_HasChildren
	cbz	w0, LBB0_15
LBB0_19:
Lloh12:
	adrp	x26, _TRUE@GOTPAGE
Lloh13:
	ldr	x26, [x26, _TRUE@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh14:
	adrp	x26, _FALSE@GOTPAGE
Lloh15:
	ldr	x26, [x26, _FALSE@GOTPAGEOFF]
LBB0_21:
	ldr	x0, [x26]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_22:
	mov	x22, #0
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_29
LBB0_23:
	cmp	x1, x23
	b.eq	LBB0_25
; %bb.24:
	mov	x0, x23
	bl	_TREEVIEW_IsChildOf
	cbz	x0, LBB0_29
LBB0_25:
	ldr	x25, [x23, #24]
	cbnz	x25, LBB0_28
; %bb.26:
	ldr	x25, [x23, #8]
	ldr	x8, [x19, #8]
	cmp	x25, x8
	b.ne	LBB0_28
; %bb.27:
	ldr	x25, [x23, #16]
LBB0_28:
	str	x25, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	b	LBB0_30
LBB0_29:
	mov	x25, #0
LBB0_30:
	ldr	x24, [x19, #40]
	cmp	x24, x23
	b.ne	LBB0_35
; %bb.31:
	ldr	x21, [x26]
	ldr	x24, [x23, #24]
	cbnz	x24, LBB0_34
; %bb.32:
	ldr	x24, [x23, #16]
	cbnz	x24, LBB0_34
; %bb.33:
	ldr	x8, [x23, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	csel	x24, xzr, x8, eq
LBB0_34:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x21
	bl	_TREEVIEW_SetFirstVisible
LBB0_35:
	mov	x0, x19
	mov	x1, x23
	bl	_TREEVIEW_RemoveItem
	cbz	x25, LBB0_6
; %bb.36:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_6
; %bb.37:
	mov	x0, x19
	mov	x1, x25
	bl	_TREEVIEW_ValidItem
	cbz	x0, LBB0_6
; %bb.38:
Lloh18:
	adrp	x8, _TVGN_CARET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TVGN_CARET@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _TVC_UNKNOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TVC_UNKNOWN@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, x25
	bl	_TREEVIEW_DoSelectItem
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_TVI_ROOT,8,3                   ; @TVI_ROOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TVI_ROOT\n"

	.comm	_TRUE,8,3                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"%p (%s)\n"

l_.str.2:                               ; @.str.2
	.asciz	"newSelection = %p\n"

	.comm	_TVGN_CARET,4,2                 ; @TVGN_CARET
	.comm	_TVC_UNKNOWN,4,2                ; @TVC_UNKNOWN
	.no_dead_strip	_TREEVIEW_DeleteItem
.subsections_via_symbols
