	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function Item_ListBox_ThumbPosition
LCPI0_0:
	.long	0xc0000000                      ## float -2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Item_ListBox_ThumbPosition
	.p2align	4, 0x90
_Item_ListBox_ThumbPosition:            ## @Item_ListBox_ThumbPosition
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	callq	_Item_ListBox_MaxScroll
	movq	_WINDOW_HORIZONTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.1:
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_2
## %bb.3:
	movss	4(%rbx), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax), %ecx
	cvtsi2ss	%ecx, %xmm2
	subss	%xmm2, %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2ss	%eax, %xmm2
	addss	LCPI0_0(%rip), %xmm1
	subss	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	jmp	LBB0_4
LBB0_5:
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_6
## %bb.7:
	movss	12(%rbx), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax), %ecx
	cvtsi2ss	%ecx, %xmm2
	subss	%xmm2, %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2ss	%eax, %xmm2
	addss	LCPI0_0(%rip), %xmm1
	subss	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	jmp	LBB0_8
LBB0_2:
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	mulss	(%r14), %xmm1
	addq	$8, %rbx
	jmp	LBB0_9
LBB0_6:
	movq	_SCROLLBAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	mulss	(%r14), %xmm1
	addq	$16, %rbx
LBB0_9:
	movl	(%rbx), %ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINDOW_HORIZONTAL,4,2          ## @WINDOW_HORIZONTAL
	.comm	_SCROLLBAR_SIZE,4,2             ## @SCROLLBAR_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Item_ListBox_ThumbPosition     ; -- Begin function Item_ListBox_ThumbPosition
	.p2align	2
_Item_ListBox_ThumbPosition:            ; @Item_ListBox_ThumbPosition
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	x20, [x0, #24]
	bl	_Item_ListBox_MaxScroll
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _WINDOW_HORIZONTAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINDOW_HORIZONTAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _SCROLLBAR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCROLLBAR_SIZE@GOTPAGEOFF]
	fcmp	s0, #0.0
	b.le	LBB0_5
; %bb.2:
	ldr	s1, [x19, #4]
	ldr	w8, [x8]
	lsl	w9, w8, #1
	scvtf	s2, w9
	fsub	s1, s1, s2
	fmov	s2, #-2.00000000
	fadd	s1, s1, s2
	scvtf	s2, w8
	fsub	s1, s1, s2
	fdiv	s0, s1, s0
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _SCROLLBAR_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCROLLBAR_SIZE@GOTPAGEOFF]
	fcmp	s0, #0.0
	b.le	LBB0_7
; %bb.4:
	ldr	s1, [x19, #12]
	ldr	w8, [x8]
	lsl	w9, w8, #1
	scvtf	s2, w9
	fsub	s1, s1, s2
	fmov	s2, #-2.00000000
	fadd	s1, s1, s2
	scvtf	s2, w8
	fsub	s1, s1, s2
	fdiv	s0, s1, s0
	b	LBB0_8
LBB0_5:
	ldr	w8, [x8]
	movi	d0, #0000000000000000
LBB0_6:
	ldr	s1, [x20]
	fmul	s0, s0, s1
	add	x9, x19, #8
	b	LBB0_9
LBB0_7:
	ldr	w8, [x8]
	movi	d0, #0000000000000000
LBB0_8:
	ldr	s1, [x20]
	fmul	s0, s0, s1
	add	x9, x19, #16
LBB0_9:
	ldr	w9, [x9]
	add	w8, w9, w8
	add	w8, w8, #1
	scvtf	s1, w8
	fadd	s0, s0, s1
	fcvtzs	w0, s0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_WINDOW_HORIZONTAL,4,2          ; @WINDOW_HORIZONTAL
	.comm	_SCROLLBAR_SIZE,4,2             ; @SCROLLBAR_SIZE
.subsections_via_symbols
