	.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	4(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movss	(%rcx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	mulss	4(%rdi), %xmm0
	roundss	$9, %xmm1, %xmm2
	subss	%xmm2, %xmm1
	xorps	%xmm2, %xmm2
	roundss	$9, %xmm0, %xmm2
	subss	%xmm2, %xmm0
	movl	%eax, %r9d
	decl	%r9d
	je	LBB0_2
## %bb.3:
	incq	%r9
	movq	%r9, %r8
	andq	$-2, %r8
	movsldup	%xmm1, %xmm2                    ## xmm2 = xmm1[0,0,2,2]
	movsldup	%xmm0, %xmm3                    ## xmm3 = xmm0[0,0,2,2]
	unpcklps	%xmm3, %xmm2                    ## xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
	leaq	-2(%r8), %rcx
	movq	%rcx, %rdx
	shrq	%rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	movq	%rdx, %rdi
	andq	$-2, %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rsi,%rcx,4), %xmm3
	movups	16(%rsi,%rcx,4), %xmm4
	addps	%xmm2, %xmm3
	movups	%xmm3, (%rsi,%rcx,4)
	addps	%xmm2, %xmm4
	movups	%xmm4, 16(%rsi,%rcx,4)
	addq	$8, %rcx
	addq	$-2, %rdi
	jne	LBB0_6
## %bb.7:
	testb	$1, %dl
	je	LBB0_9
LBB0_8:
	movups	(%rsi,%rcx,4), %xmm3
	addps	%xmm3, %xmm2
	movups	%xmm2, (%rsi,%rcx,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
	addss	%xmm1, %xmm2
	movss	%xmm2, (%rsi,%rcx,8)
	movss	4(%rsi,%rcx,8), %xmm2           ## xmm2 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm2
	movss	%xmm2, 4(%rsi,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %eax
	jne	LBB0_12
LBB0_13:
	popq	%rbp
	retq
LBB0_4:
	xorl	%ecx, %ecx
	testb	$1, %dl
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,8,2                       ## @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, #4]
	subs	w9, w8, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	s0, [x10]
	ldp	s1, s2, [x0]
	fmul	s1, s0, s1
	fmul	s2, s0, s2
	frintm	s0, s1
	fsub	s0, s1, s0
	frintm	s1, s2
	fsub	s1, s2, s1
	cmp	w9, #7
	b.hs	LBB0_3
; %bb.2:
	mov	w10, #0
	mov	x9, x1
	b	LBB0_6
LBB0_3:
	add	x11, x9, #1
	and	x10, x11, #0x1fffffff8
	add	x9, x1, x10, lsl #3
	dup.4s	v2, v0[0]
	dup.4s	v3, v1[0]
	add	x12, x1, #32
	mov	x13, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x14, x12, #32
	ld2.4s	{ v4, v5 }, [x14]
	ld2.4s	{ v6, v7 }, [x12]
	fadd.4s	v16, v2, v4
	fadd.4s	v17, v3, v5
	fadd.4s	v4, v2, v6
	fadd.4s	v5, v3, v7
	st2.4s	{ v16, v17 }, [x14]
	st2.4s	{ v4, v5 }, [x12]
	add	x12, x12, #64
	subs	x13, x13, #8
	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]
	fadd	s2, s0, s2
	fadd	s3, s1, s3
	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,8,2                       ; @tess
.subsections_via_symbols
