	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TREEVIEW_RemoveItem
_TREEVIEW_RemoveItem:                   ## @TREEVIEW_RemoveItem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_TREEVIEW_ItemName
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_TRACE
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TREEVIEW_RemoveAllChildren
LBB0_2:
	movq	_TVN_DELETEITEMW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TVC_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_TVIF_HANDLE@GOTPCREL(%rip), %rax
	movq	_TVIF_PARAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %r8
	xorl	%r9d, %r9d
	callq	_TREEVIEW_SendTreeviewNotify
	movq	%rbx, %rdi
	callq	_TREEVIEW_UnlinkItem
	decl	(%r14)
	movq	(%rbx), %rdi
	movq	_LPSTR_TEXTCALLBACKW@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_4
## %bb.3:
	callq	_heap_free
LBB0_4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_TREEVIEW_FreeItem              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, (%s)\n"

	.comm	_TVN_DELETEITEMW,4,2            ## @TVN_DELETEITEMW
	.comm	_TVC_UNKNOWN,4,2                ## @TVC_UNKNOWN
	.comm	_TVIF_HANDLE,4,2                ## @TVIF_HANDLE
	.comm	_TVIF_PARAM,4,2                 ## @TVIF_PARAM
	.comm	_LPSTR_TEXTCALLBACKW,8,3        ## @LPSTR_TEXTCALLBACKW
	.no_dead_strip	_TREEVIEW_RemoveItem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TREEVIEW_RemoveItem
_TREEVIEW_RemoveItem:                   ; @TREEVIEW_RemoveItem
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_TREEVIEW_ItemName
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_TREEVIEW_RemoveAllChildren
LBB0_2:
Lloh2:
	adrp	x8, _TVN_DELETEITEMW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TVN_DELETEITEMW@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _TVC_UNKNOWN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TVC_UNKNOWN@GOTPAGEOFF]
Lloh7:
	adrp	x9, _TVIF_HANDLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TVIF_HANDLE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _TVIF_PARAM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TVIF_PARAM@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x20
	mov	x4, x19
	mov	w5, #0
	bl	_TREEVIEW_SendTreeviewNotify
	mov	x0, x19
	bl	_TREEVIEW_UnlinkItem
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	ldr	x0, [x19]
Lloh14:
	adrp	x8, _LPSTR_TEXTCALLBACKW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LPSTR_TEXTCALLBACKW@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	bl	_heap_free
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_TREEVIEW_FreeItem
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, (%s)\n"

	.comm	_TVN_DELETEITEMW,4,2            ; @TVN_DELETEITEMW
	.comm	_TVC_UNKNOWN,4,2                ; @TVC_UNKNOWN
	.comm	_TVIF_HANDLE,4,2                ; @TVIF_HANDLE
	.comm	_TVIF_PARAM,4,2                 ; @TVIF_PARAM
	.comm	_LPSTR_TEXTCALLBACKW,8,3        ; @LPSTR_TEXTCALLBACKW
	.no_dead_strip	_TREEVIEW_RemoveItem
.subsections_via_symbols
