	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLBAR_GetButtonIndex
_TOOLBAR_GetButtonIndex:                ## @TOOLBAR_GetButtonIndex
	.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, %r14
	movq	%rdi, %rbx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	cmpq	%r14, (%rbx)
	movq	$-1, %rbx
	cmovgq	%r14, %rbx
	jmp	LBB0_8
LBB0_2:
	movq	(%rbx), %rax
	testq	%rax, %rax
	jle	LBB0_7
## %bb.3:
	movq	8(%rbx), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, (%rcx,%rbx,8)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_4
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	$-1, %rbx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_TRACE
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"command is really index command=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"command=%d index=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"no index found for command=%d\n"

	.no_dead_strip	_TOOLBAR_GetButtonIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLBAR_GetButtonIndex
_TOOLBAR_GetButtonIndex:                ; @TOOLBAR_GetButtonIndex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	cbz	x2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x8, [x21]
	cmp	x8, x19
	csinv	x20, x19, xzr, gt
	b	LBB0_8
LBB0_2:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x20, #0
	ldr	x9, [x21, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x20, lsl #3]
	cmp	x10, x19
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x8, x20
	b.ne	LBB0_4
LBB0_6:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	mov	x20, #-1
	b	LBB0_8
LBB0_7:
	str	x20, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_TRACE
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"command is really index command=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"command=%d index=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"no index found for command=%d\n"

	.no_dead_strip	_TOOLBAR_GetButtonIndex
.subsections_via_symbols
