	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TRACKBAR_CalcChannel
_TRACKBAR_CalcChannel:                  ## @TRACKBAR_CalcChannel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	leaq	-40(%rbp), %rsi
	callq	_GetClientRect
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	leal	3(%rdx), %esi
	testl	%edx, %edx
	cmovnsl	%edx, %esi
	sarl	$2, %esi
	movq	_TBS_ENABLESELRANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%ecx, %edi
	leal	(%rsi,%rsi,2), %eax
	movl	$4, %r8d
	cmovnel	%eax, %r8d
	addl	$3, %esi
	movq	_TBS_VERT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.1:
	movslq	%esi, %rax
	movq	-40(%rbp), %rsi
	addq	%rax, %rsi
	movq	%rsi, 16(%rbx)
	movq	-32(%rbp), %rsi
	subq	%rax, %rsi
	movq	%rsi, 24(%rbx)
	movq	-16(%rbp), %rsi
	testl	%ecx, %edi
	je	LBB0_3
## %bb.2:
	subl	%r8d, %edx
	movl	%edx, %eax
	addl	$2, %eax
	shrl	$31, %eax
	leal	(%rdx,%rax), %edi
	addl	$2, %edi
	sarl	%edi
	jmp	LBB0_4
LBB0_10:
	movslq	%esi, %rax
	movq	-16(%rbp), %rsi
	addq	%rax, %rsi
	movq	%rsi, 40(%rbx)
	movq	-24(%rbp), %rsi
	subq	%rax, %rsi
	movq	%rsi, 32(%rbx)
	movq	-40(%rbp), %rsi
	testl	%ecx, %edi
	je	LBB0_12
## %bb.11:
	subl	%r8d, %edx
	movl	%edx, %eax
	addl	$2, %eax
	shrl	$31, %eax
	leal	(%rdx,%rax), %edi
	addl	$2, %edi
	sarl	%edi
	jmp	LBB0_13
LBB0_3:
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	decl	%edi
LBB0_4:
	movslq	%edi, %rax
	addq	%rax, %rsi
	movq	%rsi, 40(%rbx)
	movq	_TBS_BOTH@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_TBS_NOTICKS@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	leaq	1(,%rdx,8), %rcx
	jmp	LBB0_8
LBB0_6:
	movq	_TBS_TOP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_TBS_NOTICKS@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	leaq	2(,%rdx,8), %rcx
LBB0_8:
	addq	%rcx, %rsi
	movq	%rsi, 40(%rbx)
LBB0_9:
	movslq	%r8d, %rax
	addq	%rsi, %rax
	movq	%rax, 32(%rbx)
	jmp	LBB0_19
LBB0_12:
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	decl	%edi
LBB0_13:
	movslq	%edi, %rax
	addq	%rax, %rsi
	movq	%rsi, 16(%rbx)
	movq	_TBS_BOTH@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_TBS_NOTICKS@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	leaq	1(,%rdx,8), %rcx
	jmp	LBB0_17
LBB0_15:
	movq	_TBS_TOP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_18
## %bb.16:
	movq	_TBS_NOTICKS@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	leaq	2(,%rdx,8), %rcx
LBB0_17:
	addq	%rcx, %rsi
	movq	%rsi, 16(%rbx)
LBB0_18:
	movslq	%r8d, %rax
	addq	%rsi, %rax
	movq	%rax, 24(%rbx)
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TBS_ENABLESELRANGE,4,2         ## @TBS_ENABLESELRANGE
	.comm	_TBS_VERT,4,2                   ## @TBS_VERT
	.comm	_TBS_BOTH,4,2                   ## @TBS_BOTH
	.comm	_TBS_NOTICKS,4,2                ## @TBS_NOTICKS
	.comm	_TBS_TOP,4,2                    ## @TBS_TOP
	.no_dead_strip	_TRACKBAR_CalcChannel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TRACKBAR_CalcChannel
_TRACKBAR_CalcChannel:                  ; @TRACKBAR_CalcChannel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	ldr	w0, [x0, #8]
	mov	x1, sp
	bl	_GetClientRect
	ldp	w11, w9, [x19]
	add	w8, w11, #3
	cmp	w11, #0
	csel	w8, w8, w11, lt
	asr	w8, w8, #2
	add	w12, w8, #3
Lloh0:
	adrp	x10, _TBS_ENABLESELRANGE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _TBS_ENABLESELRANGE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ands	w10, w10, w9
	add	w8, w8, w8, lsl #1
	mov	w13, #4
	csel	w8, w13, w8, eq
Lloh3:
	adrp	x13, _TBS_VERT@GOTPAGE
Lloh4:
	ldr	x13, [x13, _TBS_VERT@GOTPAGEOFF]
Lloh5:
	ldr	w13, [x13]
	tst	w13, w9
	b.eq	LBB0_3
; %bb.1:
	sxtw	x12, w12
	ldp	x13, x14, [sp]
	add	x13, x13, x12
	sub	x12, x14, x12
	stp	x13, x12, [x19, #16]
	ldr	x12, [sp, #24]
	cmp	w11, #0
	cinc	w13, w11, lt
	asr	w13, w13, #1
	sub	w13, w13, #1
	sub	w11, w11, w8
	add	w14, w11, #2
	add	w11, w11, #3
	cmp	w14, #0
	csel	w11, w11, w14, lt
	asr	w11, w11, #1
	cmp	w10, #0
	csel	w10, w13, w11, eq
	add	x10, x12, w10, sxtw
	str	x10, [x19, #40]
Lloh6:
	adrp	x11, _TBS_BOTH@GOTPAGE
Lloh7:
	ldr	x11, [x11, _TBS_BOTH@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_5
; %bb.2:
Lloh9:
	adrp	x11, _TBS_NOTICKS@GOTPAGE
Lloh10:
	ldr	x11, [x11, _TBS_NOTICKS@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w9
	mov	w9, #9
	csinc	x9, x9, xzr, eq
	b	LBB0_7
LBB0_3:
	ldp	x14, x13, [sp, #16]
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	sxtw	x12, w12
	add	x13, x13, x12
	ldr	x15, [sp]
	sub	x12, x14, x12
	stp	x12, x13, [x19, #32]
	cmp	w11, #0
	cinc	w12, w11, lt
	asr	w12, w12, #1
	sub	w12, w12, #1
	sub	w11, w11, w8
	add	w13, w11, #2
	add	w11, w11, #3
	cmp	w13, #0
	csel	w11, w11, w13, lt
	asr	w11, w11, #1
	cmp	w10, #0
	csel	w10, w12, w11, eq
	add	x10, x15, w10, sxtw
	str	x10, [x19, #16]
Lloh12:
	adrp	x11, _TBS_BOTH@GOTPAGE
Lloh13:
	ldr	x11, [x11, _TBS_BOTH@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_9
; %bb.4:
Lloh15:
	adrp	x11, _TBS_NOTICKS@GOTPAGE
Lloh16:
	ldr	x11, [x11, _TBS_NOTICKS@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	tst	w11, w9
	mov	w9, #9
	csinc	x9, x9, xzr, eq
	b	LBB0_11
LBB0_5:
Lloh18:
	adrp	x11, _TBS_TOP@GOTPAGE
Lloh19:
	ldr	x11, [x11, _TBS_TOP@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_8
; %bb.6:
Lloh21:
	adrp	x11, _TBS_NOTICKS@GOTPAGE
Lloh22:
	ldr	x11, [x11, _TBS_NOTICKS@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	tst	w11, w9
	mov	w9, #2
	mov	w11, #10
	csel	x9, x11, x9, eq
LBB0_7:
	add	x10, x10, x9
	str	x10, [x19, #40]
LBB0_8:
	add	x8, x10, w8, sxtw
	str	x8, [x19, #32]
	b	LBB0_13
LBB0_9:
Lloh24:
	adrp	x11, _TBS_TOP@GOTPAGE
Lloh25:
	ldr	x11, [x11, _TBS_TOP@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_12
; %bb.10:
Lloh27:
	adrp	x11, _TBS_NOTICKS@GOTPAGE
Lloh28:
	ldr	x11, [x11, _TBS_NOTICKS@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	tst	w11, w9
	mov	w9, #2
	mov	w11, #10
	csel	x9, x11, x9, eq
LBB0_11:
	add	x10, x10, x9
	str	x10, [x19, #16]
LBB0_12:
	add	x8, x10, w8, sxtw
	str	x8, [x19, #24]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_TBS_ENABLESELRANGE,4,2         ; @TBS_ENABLESELRANGE
	.comm	_TBS_VERT,4,2                   ; @TBS_VERT
	.comm	_TBS_BOTH,4,2                   ; @TBS_BOTH
	.comm	_TBS_NOTICKS,4,2                ; @TBS_NOTICKS
	.comm	_TBS_TOP,4,2                    ; @TBS_TOP
	.no_dead_strip	_TRACKBAR_CalcChannel
.subsections_via_symbols
