	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CalcScrollTexCoords         ## -- Begin function RB_CalcScrollTexCoords
	.p2align	4, 0x90
_RB_CalcScrollTexCoords:                ## @RB_CalcScrollTexCoords
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_tess@GOTPCREL(%rip), %rcx
	movl	8(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movsd	(%rcx), %xmm2                   ## xmm2 = mem[0],zero
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	mulsd	%xmm2, %xmm0
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm2, %xmm1
	xorps	%xmm2, %xmm2
	roundsd	$9, %xmm0, %xmm2
	subsd	%xmm2, %xmm0
	xorps	%xmm2, %xmm2
	roundsd	$9, %xmm1, %xmm2
	subsd	%xmm2, %xmm1
	movl	%eax, %r9d
	decl	%r9d
	je	LBB0_2
## %bb.3:
	incq	%r9
	movq	%r9, %r8
	andq	$-2, %r8
	movddup	%xmm0, %xmm3                    ## xmm3 = xmm0[0,0]
	movddup	%xmm1, %xmm2                    ## xmm2 = xmm1[0,0]
	leaq	-2(%r8), %rcx
	movq	%rcx, %rdx
	shrq	%rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	movq	%rdx, %rcx
	andq	$-2, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rsi,%rdi,4), %xmm4
	movaps	%xmm4, %xmm5
	shufps	$232, %xmm4, %xmm5              ## xmm5 = xmm5[0,2],xmm4[2,3]
	cvtps2pd	%xmm5, %xmm5
	movups	16(%rsi,%rdi,4), %xmm6
	addpd	%xmm3, %xmm5
	cvtpd2ps	%xmm5, %xmm5
	shufps	$237, %xmm4, %xmm4              ## xmm4 = xmm4[1,3,2,3]
	cvtps2pd	%xmm4, %xmm4
	addpd	%xmm2, %xmm4
	cvtpd2ps	%xmm4, %xmm4
	unpcklps	%xmm4, %xmm5                    ## xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1]
	movaps	%xmm6, %xmm4
	shufps	$232, %xmm6, %xmm4              ## xmm4 = xmm4[0,2],xmm6[2,3]
	shufps	$237, %xmm6, %xmm6              ## xmm6 = xmm6[1,3,2,3]
	cvtps2pd	%xmm4, %xmm4
	addpd	%xmm3, %xmm4
	cvtpd2ps	%xmm4, %xmm4
	cvtps2pd	%xmm6, %xmm6
	movupd	%xmm5, (%rsi,%rdi,4)
	addpd	%xmm2, %xmm6
	cvtpd2ps	%xmm6, %xmm5
	unpcklps	%xmm5, %xmm4                    ## xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
	movupd	%xmm4, 16(%rsi,%rdi,4)
	addq	$8, %rdi
	addq	$-2, %rcx
	jne	LBB0_6
## %bb.7:
	testb	$1, %dl
	je	LBB0_9
LBB0_8:
	movups	(%rsi,%rdi,4), %xmm4
	movaps	%xmm4, %xmm5
	shufps	$232, %xmm4, %xmm5              ## xmm5 = xmm5[0,2],xmm4[2,3]
	cvtps2pd	%xmm5, %xmm5
	addpd	%xmm5, %xmm3
	cvtpd2ps	%xmm3, %xmm3
	shufps	$237, %xmm4, %xmm4              ## xmm4 = xmm4[1,3,2,3]
	cvtps2pd	%xmm4, %xmm4
	addpd	%xmm4, %xmm2
	cvtpd2ps	%xmm2, %xmm2
	unpcklps	%xmm2, %xmm3                    ## xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
	movupd	%xmm3, (%rsi,%rdi,4)
LBB0_9:
	cmpq	%r8, %r9
	je	LBB0_13
## %bb.10:
	leaq	(%rsi,%r8,8), %rsi
	jmp	LBB0_11
LBB0_2:
	xorl	%r8d, %r8d
LBB0_11:
	subl	%r8d, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rsi,%rcx,8), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movss	4(%rsi,%rcx,8), %xmm3           ## xmm3 = mem[0],zero,zero,zero
	cvtss2sd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	cvtss2sd	%xmm3, %xmm3
	addsd	%xmm1, %xmm3
	cvtsd2ss	%xmm3, %xmm3
	movss	%xmm2, (%rsi,%rcx,8)
	movss	%xmm3, 4(%rsi,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %eax
	jne	LBB0_12
LBB0_13:
	popq	%rbp
	retq
LBB0_4:
	xorl	%edi, %edi
	testb	$1, %dl
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,16,3                      ## @tess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CalcScrollTexCoords         ; -- Begin function RB_CalcScrollTexCoords
	.p2align	2
_RB_CalcScrollTexCoords:                ; @RB_CalcScrollTexCoords
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x10, _tess@GOTPAGE
Lloh1:
	ldr	x10, [x10, _tess@GOTPAGEOFF]
	ldr	w8, [x10, #8]
	subs	w9, w8, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	d0, [x10]
	ldp	s1, s2, [x0]
	fcvt	d1, s1
	fmul	d1, d0, d1
	fcvt	d2, s2
	fmul	d2, d0, d2
	frintm	d0, d1
	fsub	d0, d1, d0
	frintm	d1, d2
	fsub	d1, d2, d1
	cmp	w9, #3
	b.hs	LBB0_3
; %bb.2:
	mov	w10, #0
	mov	x9, x1
	b	LBB0_6
LBB0_3:
	add	x11, x9, #1
	and	x10, x11, #0x1fffffffc
	add	x9, x1, x10, lsl #3
	dup.2d	v2, v0[0]
	dup.2d	v3, v1[0]
	mov	x12, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ld2.4s	{ v4, v5 }, [x1]
	fcvtl	v6.2d, v4.2s
	fcvtl2	v7.2d, v4.4s
	fadd.2d	v7, v2, v7
	fadd.2d	v6, v2, v6
	fcvtn	v16.2s, v6.2d
	fcvtn2	v16.4s, v7.2d
	fcvtl	v6.2d, v5.2s
	fcvtl2	v4.2d, v5.4s
	fadd.2d	v4, v3, v4
	fadd.2d	v5, v3, v6
	fcvtn	v17.2s, v5.2d
	fcvtn2	v17.4s, v4.2d
	st2.4s	{ v16, v17 }, [x1], #32
	subs	x12, x12, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x10
	b.eq	LBB0_8
LBB0_6:
	sub	w8, w8, w10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	s2, s3, [x9]
	fcvt	d2, s2
	fadd	d2, d0, d2
	fcvt	s2, d2
	fcvt	d3, s3
	fadd	d3, d1, d3
	fcvt	s3, d3
	stp	s2, s3, [x9], #8
	subs	w8, w8, #1
	b.ne	LBB0_7
LBB0_8:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,16,3                      ; @tess
.subsections_via_symbols
