	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Scroll_ListBox_ThumbFunc
_Scroll_ListBox_ThumbFunc:              ## @Scroll_ListBox_ThumbFunc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	48(%rdi), %rdi
	movq	24(%rdi), %rcx
	movq	_WINDOW_HORIZONTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DC@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	testl	%eax, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	(%rsi), %rax
	cmpq	(%r13), %rax
	je	LBB0_16
## %bb.2:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rdi), %eax
	movl	16(%rdi), %ebx
	leal	(%rax,%r12), %r15d
	incl	%r15d
	callq	_Item_ListBox_MaxScroll
	movl	%eax, %r9d
	movq	(%r14), %rsi
	movq	(%rsi), %r8
	movslq	%r15d, %rax
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	negl	%edi
	movslq	%edi, %rdi
	movq	%r8, %rcx
	subq	%rax, %rcx
	addq	%rdi, %rcx
	movslq	%r9d, %rax
	imulq	%rcx, %rax
	addl	%r12d, %r12d
	subl	%r12d, %ebx
	subl	%edx, %ebx
	addl	$-2, %ebx
	movslq	%ebx, %rdi
	movq	%rax, %rcx
	orq	%rdi, %rcx
	shrq	$32, %rcx
	je	LBB0_3
## %bb.4:
	cqto
	idivq	%rdi
	jmp	LBB0_5
LBB0_6:
	movq	8(%rsi), %rax
	cmpq	8(%r13), %rax
	je	LBB0_11
## %bb.7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%rdi), %eax
	movl	12(%rdi), %r12d
	leal	(%rbx,%rax), %r15d
	incl	%r15d
	callq	_Item_ListBox_MaxScroll
	movl	%eax, %r9d
	movq	(%r14), %rsi
	movq	8(%rsi), %r8
	movslq	%r15d, %rax
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %edx
	shrl	$31, %edx
	addl	%edi, %edx
	sarl	%edx
	negl	%edx
	movslq	%edx, %rdx
	movq	%r8, %rcx
	subq	%rax, %rcx
	addq	%rdx, %rcx
	movslq	%r9d, %rax
	imulq	%rcx, %rax
	addl	%ebx, %ebx
	subl	%ebx, %r12d
	subl	%edi, %r12d
	addl	$-2, %r12d
	movslq	%r12d, %rbx
	movq	%rax, %rcx
	orq	%rbx, %rcx
	shrq	$32, %rcx
	je	LBB0_8
## %bb.9:
	cqto
	idivq	%rbx
	jmp	LBB0_10
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	cmpl	%eax, %r9d
	cmovgel	%eax, %r9d
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovnsl	%r9d, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	%r8, (%r13)
	jmp	LBB0_11
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:
	cmpl	%eax, %r9d
	cmovgel	%eax, %r9d
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovnsl	%r9d, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	%r8, 8(%r13)
LBB0_11:
	movq	16(%rsi), %rax
	cmpq	16(%r13), %rax
	jle	LBB0_13
## %bb.12:
	movq	48(%r13), %rdi
	movl	40(%r13), %esi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_Item_ListBox_HandleKey
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	24(%r13), %rcx
	addq	%rax, %rcx
	movq	%rcx, 16(%r13)
LBB0_13:
	cmpq	32(%r13), %rax
	jle	LBB0_16
## %bb.14:
	movq	_SCROLL_TIME_ADJUST@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 32(%r13)
	movq	24(%r13), %rax
	movq	_SCROLL_TIME_FLOOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_16
## %bb.15:
	movq	_SCROLL_TIME_ADJUSTOFFSET@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, 24(%r13)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINDOW_HORIZONTAL,4,2          ## @WINDOW_HORIZONTAL
	.comm	_DC,8,3                         ## @DC
	.comm	_SCROLLBAR_SIZE,4,2             ## @SCROLLBAR_SIZE
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_SCROLL_TIME_ADJUST,8,3         ## @SCROLL_TIME_ADJUST
	.comm	_SCROLL_TIME_FLOOR,8,3          ## @SCROLL_TIME_FLOOR
	.comm	_SCROLL_TIME_ADJUSTOFFSET,8,3   ## @SCROLL_TIME_ADJUSTOFFSET
	.no_dead_strip	_Scroll_ListBox_ThumbFunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Scroll_ListBox_ThumbFunc
_Scroll_ListBox_ThumbFunc:              ; @Scroll_ListBox_ThumbFunc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x0, [x0, #48]
	ldr	x21, [x0, #24]
Lloh0:
	adrp	x8, _WINDOW_HORIZONTAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINDOW_HORIZONTAL@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh2:
	ldr	w10, [x8]
Lloh3:
	adrp	x20, _DC@GOTPAGE
Lloh4:
	ldr	x20, [x20, _DC@GOTPAGEOFF]
	ldr	x8, [x20]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x8]
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.2:
	ldr	w8, [x0, #4]
Lloh5:
	adrp	x22, _SCROLLBAR_SIZE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SCROLLBAR_SIZE@GOTPAGEOFF]
	ldr	w23, [x22]
	add	w8, w8, w23
	add	w24, w8, #1
	ldr	w25, [x0, #16]
	bl	_Item_ListBox_MaxScroll
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20]
	ldr	x9, [x8]
	ldr	w10, [x22]
	cmp	w10, #0
	cinc	w11, w10, lt
	neg	w11, w11, asr #1
	sub	x12, x9, w24, sxtw
	add	x11, x12, w11, sxtw
	sxtw	x12, w0
	mul	x11, x11, x12
	sub	w12, w25, w23, lsl #1
	sub	w10, w12, w10
	sub	w10, w10, #2
	sxtw	x10, w10
	sdiv	x10, x11, x10
	cmp	w0, w10
	csel	w11, w0, w10, lt
	cmp	w10, #0
	csel	w10, wzr, w11, lt
	str	w10, [x21]
	str	x9, [x19]
	b	LBB0_5
LBB0_3:
	ldr	x9, [x8, #8]
	ldr	x10, [x19, #8]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.4:
Lloh7:
	adrp	x22, _SCROLLBAR_SIZE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SCROLLBAR_SIZE@GOTPAGEOFF]
	ldr	w23, [x22]
	ldp	w8, w24, [x0, #8]
	add	w8, w23, w8
	add	w25, w8, #1
	bl	_Item_ListBox_MaxScroll
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	ldr	w10, [x22]
	cmp	w10, #0
	cinc	w11, w10, lt
	neg	w11, w11, asr #1
	sub	x12, x9, w25, sxtw
	add	x11, x12, w11, sxtw
	sxtw	x12, w0
	mul	x11, x11, x12
	sub	w12, w24, w23, lsl #1
	sub	w10, w12, w10
	sub	w10, w10, #2
	sxtw	x10, w10
	sdiv	x10, x11, x10
	cmp	w0, w10
	csel	w11, w0, w10, lt
	cmp	w10, #0
	csel	w10, wzr, w11, lt
	str	w10, [x21]
	str	x9, [x19, #8]
LBB0_5:
	ldr	x8, [x8, #16]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.6:
	ldr	x0, [x19, #48]
	ldr	w1, [x19, #40]
Lloh9:
	adrp	x8, _qtrue@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _qfalse@GOTPAGE
Lloh13:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	bl	_Item_ListBox_HandleKey
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	x9, [x19, #24]
	add	x9, x9, x8
	str	x9, [x19, #16]
LBB0_7:
	ldr	x9, [x19, #32]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.8:
Lloh15:
	adrp	x9, _SCROLL_TIME_ADJUST@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SCROLL_TIME_ADJUST@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19, #32]
	ldr	x8, [x19, #24]
Lloh18:
	adrp	x9, _SCROLL_TIME_FLOOR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SCROLL_TIME_FLOOR@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.9:
Lloh21:
	adrp	x9, _SCROLL_TIME_ADJUSTOFFSET@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SCROLL_TIME_ADJUSTOFFSET@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x19, #24]
LBB0_10:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_WINDOW_HORIZONTAL,4,2          ; @WINDOW_HORIZONTAL
	.comm	_DC,8,3                         ; @DC
	.comm	_SCROLLBAR_SIZE,4,2             ; @SCROLLBAR_SIZE
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_SCROLL_TIME_ADJUST,8,3         ; @SCROLL_TIME_ADJUST
	.comm	_SCROLL_TIME_FLOOR,8,3          ; @SCROLL_TIME_FLOOR
	.comm	_SCROLL_TIME_ADJUSTOFFSET,8,3   ; @SCROLL_TIME_ADJUSTOFFSET
	.no_dead_strip	_Scroll_ListBox_ThumbFunc
.subsections_via_symbols
