	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Item_ListBox_ThumbDrawPosition ## -- Begin function Item_ListBox_ThumbDrawPosition
	.p2align	4, 0x90
_Item_ListBox_ThumbDrawPosition:        ## @Item_ListBox_ThumbDrawPosition
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_itemCapture@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_1
LBB0_8:
	popq	%rbp
	jmp	_Item_ListBox_ThumbPosition     ## TAILCALL
LBB0_1:
	movq	_WINDOW_HORIZONTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.2:
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	movl	4(%rdi), %r8d
	addl	%ecx, %r8d
	leal	(%rdx,%r8), %esi
	incl	%esi
	cmpl	%esi, %eax
	jl	LBB0_4
## %bb.3:
	addl	%edx, %edx
	notl	%edx
	addl	%r8d, %edx
	addl	8(%rdi), %edx
	cmpl	%edx, %eax
	jle	LBB0_7
LBB0_4:
	popq	%rbp
	jmp	_Item_ListBox_ThumbPosition     ## TAILCALL
LBB0_5:
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax), %eax
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	movl	12(%rdi), %r8d
	addl	%ecx, %r8d
	leal	(%rdx,%r8), %esi
	incl	%esi
	cmpl	%esi, %eax
	jl	LBB0_8
## %bb.6:
	addl	%edx, %edx
	notl	%edx
	addl	%r8d, %edx
	addl	16(%rdi), %edx
	cmpl	%edx, %eax
	jg	LBB0_8
LBB0_7:
	subl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_itemCapture,8,3                ## @itemCapture
	.comm	_WINDOW_HORIZONTAL,4,2          ## @WINDOW_HORIZONTAL
	.comm	_SCROLLBAR_SIZE,4,2             ## @SCROLLBAR_SIZE
	.comm	_DC,8,3                         ## @DC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Item_ListBox_ThumbDrawPosition ; -- Begin function Item_ListBox_ThumbDrawPosition
	.p2align	2
_Item_ListBox_ThumbDrawPosition:        ; @Item_ListBox_ThumbDrawPosition
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _itemCapture@GOTPAGE
Lloh1:
	ldr	x8, [x8, _itemCapture@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_2
LBB0_1:
	b	_Item_ListBox_ThumbPosition
LBB0_2:
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _WINDOW_HORIZONTAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINDOW_HORIZONTAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldr	w11, [x0, #4]
Lloh6:
	adrp	x8, _SCROLLBAR_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCROLLBAR_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
Lloh9:
	adrp	x8, _DC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w10, #0
	cinc	w9, w10, lt
	asr	w9, w9, #1
	add	w11, w9, w11
	add	w12, w11, w10
	add	w12, w12, #1
	cmp	w8, w12
	b.lt	LBB0_5
; %bb.4:
	ldr	w12, [x0, #8]
	mov	w13, #-1
	eor	w10, w13, w10, lsl #1
	add	w10, w10, w11
	add	w10, w10, w12
	cmp	w8, w10
	b.le	LBB0_8
LBB0_5:
	b	_Item_ListBox_ThumbPosition
LBB0_6:
	ldr	w11, [x0, #12]
Lloh12:
	adrp	x8, _SCROLLBAR_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SCROLLBAR_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x8]
Lloh15:
	adrp	x8, _DC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DC@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	w8, [x8, #4]
	cmp	w10, #0
	cinc	w9, w10, lt
	asr	w9, w9, #1
	add	w11, w9, w11
	add	w12, w11, w10
	add	w12, w12, #1
	cmp	w8, w12
	b.lt	LBB0_1
; %bb.7:
	ldr	w12, [x0, #16]
	mov	w13, #-1
	eor	w10, w13, w10, lsl #1
	add	w10, w10, w11
	add	w10, w10, w12
	cmp	w8, w10
	b.gt	LBB0_1
LBB0_8:
	sub	w0, w8, w9
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_itemCapture,8,3                ; @itemCapture
	.comm	_WINDOW_HORIZONTAL,4,2          ; @WINDOW_HORIZONTAL
	.comm	_SCROLLBAR_SIZE,4,2             ; @SCROLLBAR_SIZE
	.comm	_DC,8,3                         ; @DC
.subsections_via_symbols
