	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLBAR_GetCheckedGroupButtonIndex
_TOOLBAR_GetCheckedGroupButtonIndex:    ## @TOOLBAR_GetCheckedGroupButtonIndex
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	js	LBB0_3
## %bb.1:
	movl	%esi, %eax
	movslq	(%rdi), %r8
	cmpl	%esi, %r8d
	jge	LBB0_4
LBB0_3:
	movl	$-1, %eax
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rdi), %rdx
	movl	%eax, %esi
	movl	(%rdx,%rsi,8), %ecx
	movq	_BTNS_CHECKGROUP@GOTPCREL(%rip), %rdi
	notl	%ecx
	testl	%ecx, (%rdi)
	jne	LBB0_6
## %bb.5:
	movq	_TBSTATE_CHECKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	testl	%r9d, 4(%rdx,%rsi,8)
	jne	LBB0_16
	jmp	LBB0_7
LBB0_6:
	movq	_TBSTATE_CHECKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
LBB0_7:
	movq	_BTNS_GROUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testl	%esi, %esi
	jle	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-8(%rdx,%rsi,8), %ecx
	notl	%ecx
	testl	%ecx, %edi
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	leaq	-1(%rsi), %rcx
	testl	%r9d, -4(%rdx,%rsi,8)
	movq	%rcx, %rsi
	je	LBB0_8
## %bb.11:
	movl	%ecx, %eax
	popq	%rbp
	retq
LBB0_12:
	movslq	%eax, %rcx
	incq	%rcx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r8, %rcx
	jge	LBB0_3
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rdx,%rcx,8), %esi
	notl	%esi
	testl	%esi, %edi
	jne	LBB0_3
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%eax
	leaq	1(%rcx), %rsi
	testl	%r9d, 4(%rdx,%rcx,8)
	movq	%rsi, %rcx
	je	LBB0_13
LBB0_16:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTNS_CHECKGROUP,4,2            ## @BTNS_CHECKGROUP
	.comm	_TBSTATE_CHECKED,4,2            ## @TBSTATE_CHECKED
	.comm	_BTNS_GROUP,4,2                 ## @BTNS_GROUP
	.no_dead_strip	_TOOLBAR_GetCheckedGroupButtonIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLBAR_GetCheckedGroupButtonIndex
_TOOLBAR_GetCheckedGroupButtonIndex:    ; @TOOLBAR_GetCheckedGroupButtonIndex
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldrsw	x8, [x0]
	cmp	w8, w1
	b.ge	LBB0_3
LBB0_2:
	mov	w0, #-1
	ret
LBB0_3:
	ldr	x11, [x0, #8]
	mov	w12, w1
	lsl	x9, x12, #3
	ldr	w9, [x11, x9]
Lloh0:
	adrp	x10, _BTNS_CHECKGROUP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _BTNS_CHECKGROUP@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	bics	wzr, w10, w9
	b.ne	LBB0_6
; %bb.4:
	add	x9, x11, x12, lsl #3
	ldr	w10, [x9, #4]
Lloh3:
	adrp	x9, _TBSTATE_CHECKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TBSTATE_CHECKED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w10
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x1
	ret
LBB0_6:
Lloh6:
	adrp	x9, _TBSTATE_CHECKED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TBSTATE_CHECKED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
LBB0_7:
Lloh9:
	adrp	x10, _BTNS_GROUP@GOTPAGE
Lloh10:
	ldr	x10, [x10, _BTNS_GROUP@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	x12, x11, x12, lsl #3
	sub	x12, x12, #4
	mov	x0, x1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	subs	w0, w0, #1
	b.lt	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldur	w13, [x12, #-4]
	bics	wzr, w10, w13
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w13, [x12], #-8
	and	w13, w9, w13
	cbz	w13, LBB0_8
	b	LBB0_15
LBB0_11:
	sxtw	x12, w1
	add	x12, x12, #1
	add	x11, x11, x12, lsl #3
	add	x11, x11, #4
	mov	x0, x1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	x12, x8
	b.ge	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldur	w13, [x11, #-4]
	bics	wzr, w10, w13
	b.ne	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w13, [x11], #8
	add	w0, w0, #1
	add	x12, x12, #1
	tst	w9, w13
	b.eq	LBB0_12
LBB0_15:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BTNS_CHECKGROUP,4,2            ; @BTNS_CHECKGROUP
	.comm	_TBSTATE_CHECKED,4,2            ; @TBSTATE_CHECKED
	.comm	_BTNS_GROUP,4,2                 ; @BTNS_GROUP
	.no_dead_strip	_TOOLBAR_GetCheckedGroupButtonIndex
.subsections_via_symbols
