	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TAB_SetCurSel
_TAB_SetCurSel:                         ## @TAB_SetCurSel
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_TRACE
	movl	$-1, %eax
	cmpq	%r15, 16(%rbx)
	jle	LBB0_9
## %bb.1:
	cmpq	%r15, %r14
	je	LBB0_8
## %bb.2:
	cmpq	$-1, %r14
	je	LBB0_4
## %bb.3:
	movq	_TCIS_BUTTONPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	notl	%r12d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAB_GetItem
	andl	%r12d, (%rax)
LBB0_4:
	testq	%r15, %r15
	js	LBB0_6
## %bb.5:
	movq	_TCIS_BUTTONPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TAB_GetItem
	orl	%r12d, (%rax)
	movq	%r15, (%rbx)
	jmp	LBB0_7
LBB0_6:
	movq	$-1, (%rbx)
	movl	$-1, %r15d
LBB0_7:
	movl	%r15d, 8(%rbx)
	movq	%rbx, %rdi
	callq	_TAB_EnsureSelectionVisible
	movq	%rbx, %rdi
	callq	_TAB_InvalidateTabArea
LBB0_8:
	movl	%r14d, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p %d)\n"

	.comm	_TCIS_BUTTONPRESSED,4,2         ## @TCIS_BUTTONPRESSED
	.no_dead_strip	_TAB_SetCurSel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TAB_SetCurSel
_TAB_SetCurSel:                         ; @TAB_SetCurSel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_TRACE
	ldr	x8, [x20, #16]
	cmp	x8, x21
	b.le	LBB0_6
; %bb.1:
	cmp	x19, x21
	b.eq	LBB0_9
; %bb.2:
Lloh2:
	adrp	x22, _TCIS_BUTTONPRESSED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TCIS_BUTTONPRESSED@GOTPAGEOFF]
	cmn	x19, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w23, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_TAB_GetItem
	ldr	w8, [x0]
	bic	w8, w8, w23
	str	w8, [x0]
LBB0_4:
	tbnz	x21, #63, LBB0_7
; %bb.5:
	ldr	w22, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_TAB_GetItem
	ldr	w8, [x0]
	orr	w8, w8, w22
	str	w8, [x0]
	str	x21, [x20]
	b	LBB0_8
LBB0_6:
	mov	w19, #-1
	b	LBB0_9
LBB0_7:
	mov	x8, #-1
	str	x8, [x20]
	mov	w21, #-1
LBB0_8:
	str	w21, [x20, #8]
	mov	x0, x20
	bl	_TAB_EnsureSelectionVisible
	mov	x0, x20
	bl	_TAB_InvalidateTabArea
LBB0_9:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p %d)\n"

	.comm	_TCIS_BUTTONPRESSED,4,2         ; @TCIS_BUTTONPRESSED
	.no_dead_strip	_TAB_SetCurSel
.subsections_via_symbols
