	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CalcScaleTexCoords          ## -- Begin function RB_CalcScaleTexCoords
	.p2align	4, 0x90
_RB_CalcScaleTexCoords:                 ## @RB_CalcScaleTexCoords
	.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), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.1:
	xorl	%r8d, %r8d
	movl	%eax, %r10d
	decl	%r10d
	je	LBB0_12
## %bb.2:
	leaq	8(%rdi), %rcx
	cmpq	%rsi, %rcx
	jbe	LBB0_4
## %bb.3:
	leaq	(%rsi,%r10,8), %rcx
	addq	$8, %rcx
	cmpq	%rdi, %rcx
	ja	LBB0_12
LBB0_4:
	incq	%r10
	movq	%r10, %r8
	andq	$-2, %r8
	leaq	-2(%r8), %rcx
	movq	%rcx, %r9
	shrq	%r9
	incq	%r9
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.6:
	movq	%r9, %rdx
	andq	$-2, %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	shufps	$0, %xmm1, %xmm0                ## xmm0 = xmm0[0,0],xmm1[0,0]
	shufps	$216, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,1,3]
	movups	(%rsi,%rcx,4), %xmm1
	mulps	%xmm0, %xmm1
	movups	16(%rsi,%rcx,4), %xmm0
	movups	%xmm1, (%rsi,%rcx,4)
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	shufps	$0, %xmm2, %xmm1                ## xmm1 = xmm1[0,0],xmm2[0,0]
	shufps	$216, %xmm1, %xmm1              ## xmm1 = xmm1[0,2,1,3]
	mulps	%xmm0, %xmm1
	movups	%xmm1, 16(%rsi,%rcx,4)
	addq	$8, %rcx
	addq	$-2, %rdx
	jne	LBB0_7
## %bb.8:
	testb	$1, %r9b
	je	LBB0_10
LBB0_9:
	movups	(%rsi,%rcx,4), %xmm0
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	shufps	$0, %xmm2, %xmm1                ## xmm1 = xmm1[0,0],xmm2[0,0]
	shufps	$216, %xmm1, %xmm1              ## xmm1 = xmm1[0,2,1,3]
	mulps	%xmm0, %xmm1
	movups	%xmm1, (%rsi,%rcx,4)
LBB0_10:
	cmpq	%r8, %r10
	je	LBB0_17
## %bb.11:
	leaq	(%rsi,%r8,8), %rsi
LBB0_12:
	movl	%eax, %edx
	subl	%r8d, %edx
	leal	1(%r8), %ecx
	testb	$1, %dl
	je	LBB0_14
## %bb.13:
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rsi), %xmm0
	movss	%xmm0, (%rsi)
	movss	4(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	4(%rsi), %xmm0
	movss	%xmm0, 4(%rsi)
	addq	$8, %rsi
	movl	%ecx, %r8d
LBB0_14:
	cmpl	%ecx, %eax
	je	LBB0_17
## %bb.15:
	subl	%r8d, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rsi,%rcx,8), %xmm0
	movss	%xmm0, (%rsi,%rcx,8)
	movss	4(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	4(%rsi,%rcx,8), %xmm0
	movss	%xmm0, 4(%rsi,%rcx,8)
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	8(%rsi,%rcx,8), %xmm0
	movss	%xmm0, 8(%rsi,%rcx,8)
	movss	4(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	12(%rsi,%rcx,8), %xmm0
	movss	%xmm0, 12(%rsi,%rcx,8)
	addq	$2, %rcx
	cmpl	%ecx, %eax
	jne	LBB0_16
LBB0_17:
	popq	%rbp
	retq
LBB0_5:
	xorl	%ecx, %ecx
	testb	$1, %r9b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,4,2                       ## @tess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CalcScaleTexCoords          ; -- Begin function RB_CalcScaleTexCoords
	.p2align	2
_RB_CalcScaleTexCoords:                 ; @RB_CalcScaleTexCoords
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _tess@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tess@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	subs	w9, w8, #1
	b.lt	LBB0_7
; %bb.1:
	cmp	w9, #7
	b.lo	LBB0_4
; %bb.2:
	add	x10, x0, #8
	cmp	x10, x1
	b.ls	LBB0_8
; %bb.3:
	add	x10, x1, w9, uxtw #3
	add	x10, x10, #8
	cmp	x10, x0
	b.ls	LBB0_8
LBB0_4:
	mov	w10, #0
	mov	x9, x1
LBB0_5:
	sub	w8, w8, w10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x0]
	ldp	s1, s2, [x9]
	fmul	s0, s0, s1
	str	s0, [x9]
	ldr	s0, [x0, #4]
	fmul	s0, s0, s2
	str	s0, [x9, #4]
	add	x9, x9, #8
	subs	w8, w8, #1
	b.ne	LBB0_6
LBB0_7:
	ret
LBB0_8:
	add	x11, x9, #1
	and	x10, x11, #0x1fffffff8
	add	x9, x1, x10, lsl #3
	add	x12, x1, #32
	mov	x13, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x14, x0
	ld1r.4s	{ v0 }, [x14], #4
	sub	x15, x12, #32
	ld2.4s	{ v1, v2 }, [x15]
	ld2.4s	{ v3, v4 }, [x12]
	fmul.4s	v5, v0, v1
	ldr	s7, [x14]
	fmul.4s	v6, v2, v7[0]
	fmul.4s	v0, v0, v3
	fmul.4s	v1, v4, v7[0]
	st2.4s	{ v5, v6 }, [x15]
	st2.4s	{ v0, v1 }, [x12]
	add	x12, x12, #64
	subs	x13, x13, #8
	b.ne	LBB0_9
; %bb.10:
	cmp	x11, x10
	b.ne	LBB0_5
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,4,2                       ; @tess
.subsections_via_symbols
