	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLBAR_GetBitmapIndex
_TOOLBAR_GetBitmapIndex:                ## @TOOLBAR_GetBitmapIndex
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %rbx
	movq	_I_IMAGECALLBACK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_4
## %bb.1:
	movq	%rsi, %r15
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	12(%r15), %eax
	movl	%eax, -32(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -36(%rbp)
	movq	_TBNF_IMAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$-1, -44(%rbp)
	leaq	-40(%rbp), %rdi
	movq	_TBN_GETDISPINFOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_TOOLBAR_SendNotify
	movl	-48(%rbp), %edx
	movq	_TBNF_DI_SETITEM@GOTPCREL(%rip), %rax
	movslq	-44(%rbp), %rbx
	testl	%edx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, (%r15)
LBB0_3:
	movl	(%r14), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
LBB0_4:
	movq	_I_IMAGENONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_GETIBITMAP
	movq	%rax, %rbx
LBB0_6:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I_IMAGECALLBACK,8,3            ## @I_IMAGECALLBACK
	.comm	_TBNF_IMAGE,4,2                 ## @TBNF_IMAGE
	.comm	_TBN_GETDISPINFOW,4,2           ## @TBN_GETDISPINFOW
	.comm	_TBNF_DI_SETITEM,4,2            ## @TBNF_DI_SETITEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TBN_GETDISPINFO returned bitmap id %d, mask=%08x, nNumBitmaps=%d\n"

	.comm	_I_IMAGENONE,8,3                ## @I_IMAGENONE
	.no_dead_strip	_TOOLBAR_GetBitmapIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLBAR_GetBitmapIndex
_TOOLBAR_GetBitmapIndex:                ; @TOOLBAR_GetBitmapIndex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x8, _I_IMAGECALLBACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I_IMAGECALLBACK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x1
	add	x21, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	d0, [x20, #8]
	stur	d0, [sp, #20]
Lloh3:
	adrp	x8, _TBNF_IMAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TBNF_IMAGE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #-1
	stp	w8, w9, [sp, #8]
	add	x0, x21, #8
Lloh6:
	adrp	x8, _TBN_GETDISPINFOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TBN_GETDISPINFOW@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_TOOLBAR_SendNotify
Lloh9:
	adrp	x8, _TBNF_DI_SETITEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TBNF_DI_SETITEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldp	w2, w21, [sp, #8]
                                        ; kill: def $w21 killed $w21 def $x21
	sxtw	x21, w21
	tst	w8, w2
	b.eq	LBB0_3
; %bb.2:
	str	x21, [x20]
LBB0_3:
	ldr	w3, [x19]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_TRACE
LBB0_4:
Lloh14:
	adrp	x8, _I_IMAGENONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I_IMAGENONE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_GETIBITMAP
	mov	x21, x0
LBB0_6:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I_IMAGECALLBACK,8,3            ; @I_IMAGECALLBACK
	.comm	_TBNF_IMAGE,4,2                 ; @TBNF_IMAGE
	.comm	_TBN_GETDISPINFOW,4,2           ; @TBN_GETDISPINFOW
	.comm	_TBNF_DI_SETITEM,4,2            ; @TBNF_DI_SETITEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TBN_GETDISPINFO returned bitmap id %d, mask=%08x, nNumBitmaps=%d\n"

	.comm	_I_IMAGENONE,8,3                ; @I_IMAGENONE
	.no_dead_strip	_TOOLBAR_GetBitmapIndex
.subsections_via_symbols
