	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLBAR_Cust_RemoveButton
_TOOLBAR_Cust_RemoveButton:             ## @TOOLBAR_Cust_RemoveButton
	.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	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_IDC_TOOLBARBTN_LBOX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_GetDlgItem
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_TRACE
	movq	_LB_GETITEMDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movq	%rax, %r12
	movl	(%r15), %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_TOOLBAR_IsButtonRemovable
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_LB_DELETESTRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movq	_LB_SETCURSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	4(%r15), %edi
	movq	_TB_DELETEBUTTON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movq	_BTNS_SEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	callq	_Free
	jmp	LBB0_4
LBB0_2:
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_TOOLBAR_Cust_InsertAvailButton
LBB0_4:
	movl	(%r15), %esi
	movq	_TBN_TOOLBARCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	callq	_TOOLBAR_SendNotify
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDC_TOOLBARBTN_LBOX,4,2        ## @IDC_TOOLBARBTN_LBOX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Remove: index %d\n"

	.comm	_LB_GETITEMDATA,4,2             ## @LB_GETITEMDATA
	.comm	_LB_DELETESTRING,4,2            ## @LB_DELETESTRING
	.comm	_LB_SETCURSEL,4,2               ## @LB_SETCURSEL
	.comm	_TB_DELETEBUTTON,4,2            ## @TB_DELETEBUTTON
	.comm	_BTNS_SEP,4,2                   ## @BTNS_SEP
	.comm	_TBN_TOOLBARCHANGE,4,2          ## @TBN_TOOLBARCHANGE
	.no_dead_strip	_TOOLBAR_Cust_RemoveButton
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLBAR_Cust_RemoveButton
_TOOLBAR_Cust_RemoveButton:             ; @TOOLBAR_Cust_RemoveButton
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _IDC_TOOLBARBTN_LBOX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDC_TOOLBARBTN_LBOX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_GetDlgItem
	mov	x23, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_TRACE
Lloh5:
	adrp	x8, _LB_GETITEMDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LB_GETITEMDATA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
	mov	x22, x0
	ldr	w0, [x19]
	mov	x1, x21
	mov	x2, x22
	bl	_TOOLBAR_IsButtonRemovable
	cbz	x0, LBB0_5
; %bb.1:
Lloh8:
	adrp	x8, _LB_DELETESTRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LB_DELETESTRING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
Lloh11:
	adrp	x8, _LB_SETCURSEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LB_SETCURSEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _TB_DELETEBUTTON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TB_DELETEBUTTON@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
	ldr	w8, [x22]
Lloh17:
	adrp	x9, _BTNS_SEP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BTNS_SEP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_Free
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	mov	x1, x22
	bl	_TOOLBAR_Cust_InsertAvailButton
LBB0_4:
	ldr	w1, [x19]
Lloh20:
	adrp	x8, _TBN_TOOLBARCHANGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TBN_TOOLBARCHANGE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_TOOLBAR_SendNotify
LBB0_5:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IDC_TOOLBARBTN_LBOX,4,2        ; @IDC_TOOLBARBTN_LBOX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Remove: index %d\n"

	.comm	_LB_GETITEMDATA,4,2             ; @LB_GETITEMDATA
	.comm	_LB_DELETESTRING,4,2            ; @LB_DELETESTRING
	.comm	_LB_SETCURSEL,4,2               ; @LB_SETCURSEL
	.comm	_TB_DELETEBUTTON,4,2            ; @TB_DELETEBUTTON
	.comm	_BTNS_SEP,4,2                   ; @BTNS_SEP
	.comm	_TBN_TOOLBARCHANGE,4,2          ; @TBN_TOOLBARCHANGE
	.no_dead_strip	_TOOLBAR_Cust_RemoveButton
.subsections_via_symbols
