	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function RB_CalcTurbulentTexCoords
LCPI0_0:
	.quad	0x3f80000000000000              ## double 0.0078125
	.quad	0x3f80000000000000              ## double 0.0078125
LCPI0_1:
	.quad	0x3fc0000000000000              ## double 0.125
	.quad	0x3fc0000000000000              ## double 0.125
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_RB_CalcTurbulentTexCoords
	.p2align	4, 0x90
_RB_CalcTurbulentTexCoords:             ## @RB_CalcTurbulentTexCoords
	.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	4(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_3
## %bb.1:
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	4(%rdi), %xmm0
	addss	(%rdi), %xmm0
	movq	_tr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%rax), %r10
	cvtss2sd	%xmm0, %xmm2
	movq	_FUNCTABLE_SIZE@GOTPCREL(%rip), %r9
	movq	_FUNCTABLE_MASK@GOTPCREL(%rip), %rax
	movd	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$80, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,1,1]
	movddup	(%r9), %xmm1                    ## xmm1 = mem[0,0]
	movddup	%xmm2, %xmm2                    ## xmm2 = xmm2[0,0]
	xorl	%eax, %eax
	movapd	LCPI0_0(%rip), %xmm3            ## xmm3 = [7.8125E-3,7.8125E-3]
	movapd	LCPI0_1(%rip), %xmm4            ## xmm4 = [1.25E-1,1.25E-1]
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r10,%rax,8), %rdx
	movsd	(%rdx), %xmm5                   ## xmm5 = mem[0],zero
	addsd	16(%rdx), %xmm5
	movhpd	8(%rdx), %xmm5                  ## xmm5 = xmm5[0],mem[0]
	mulpd	%xmm3, %xmm5
	mulpd	%xmm4, %xmm5
	addpd	%xmm2, %xmm5
	mulpd	%xmm1, %xmm5
	cvttpd2dq	%xmm5, %xmm5
	andpd	%xmm0, %xmm5
	movd	%xmm5, %edx
	movslq	%edx, %rdx
	movss	(%rcx,%rdx,4), %xmm6            ## xmm6 = mem[0],zero,zero,zero
	mulss	8(%rdi), %xmm6
	addss	(%rsi,%rax,8), %xmm6
	movss	%xmm6, (%rsi,%rax,8)
	pextrd	$1, %xmm5, %edx
	movslq	%edx, %rdx
	movss	(%rcx,%rdx,4), %xmm5            ## xmm5 = mem[0],zero,zero,zero
	mulss	8(%rdi), %xmm5
	addss	4(%rsi,%rax,8), %xmm5
	movss	%xmm5, 4(%rsi,%rax,8)
	incq	%rax
	cmpq	%rax, %r8
	jne	LBB0_2
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,16,3                      ## @tess
	.comm	_tr,8,3                         ## @tr
	.comm	_FUNCTABLE_SIZE,8,3             ## @FUNCTABLE_SIZE
	.comm	_FUNCTABLE_MASK,4,2             ## @FUNCTABLE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CalcTurbulentTexCoords      ; -- Begin function RB_CalcTurbulentTexCoords
	.p2align	2
_RB_CalcTurbulentTexCoords:             ; @RB_CalcTurbulentTexCoords
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x10, _tess@GOTPAGE
Lloh1:
	ldr	x10, [x10, _tess@GOTPAGEOFF]
	ldr	w8, [x10, #4]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	s0, [x10]
	ldp	s2, s1, [x0]
Lloh2:
	adrp	x9, _tr@GOTPAGE
Lloh3:
	ldr	x9, [x9, _tr@GOTPAGEOFF]
	fmadd	s0, s0, s1, s2
Lloh4:
	ldr	x9, [x9]
	ldr	x10, [x10, #8]
	fcvt	d0, s0
Lloh5:
	adrp	x11, _FUNCTABLE_SIZE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _FUNCTABLE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	d1, [x11]
Lloh8:
	adrp	x11, _FUNCTABLE_MASK@GOTPAGE
Lloh9:
	ldr	x11, [x11, _FUNCTABLE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	mov	x12, #4575657221408423936
	fmov	d2, #0.12500000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x10], #8
	ldp	d5, d3, [x13, #8]
	ldr	d4, [x13]
	fadd	d3, d4, d3
	fmov	d4, x12
	fmul	d3, d3, d4
	fmadd	d3, d3, d2, d0
	fmul	d3, d1, d3
	fcvtzs	w13, d3
	and	w13, w11, w13
	ldr	s3, [x9, w13, sxtw #2]
	ldp	s6, s7, [x1]
	ldr	s16, [x0, #8]
	fmadd	s3, s3, s16, s6
	str	s3, [x1]
	fmul	d3, d5, d4
	fmadd	d3, d3, d2, d0
	fmul	d3, d1, d3
	fcvtzs	w13, d3
	and	w13, w11, w13
	ldr	s3, [x9, w13, sxtw #2]
	ldr	s4, [x0, #8]
	fmadd	s3, s3, s4, s7
	str	s3, [x1, #4]
	add	x1, x1, #8
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_3:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,16,3                      ; @tess
	.comm	_tr,8,3                         ; @tr
	.comm	_FUNCTABLE_SIZE,8,3             ; @FUNCTABLE_SIZE
	.comm	_FUNCTABLE_MASK,4,2             ; @FUNCTABLE_MASK
.subsections_via_symbols
