	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function RB_CalcModulateColorsByFog
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_RB_CalcModulateColorsByFog
	.p2align	4, 0x90
_RB_CalcModulateColorsByFog:            ## @RB_CalcModulateColorsByFog
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_SHADER_MAX_VERTEXES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r14, %rdi
	callq	_RB_CalcFogTexCoords
	movq	_tess@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r14,%rbx,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	4(%r14,%rbx,8), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	callq	_R_FogFactor
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movzbl	(%r12,%rbx,4), %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %eax
	movb	%al, (%r12,%rbx,4)
	movzbl	1(%r12,%rbx,4), %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %eax
	movb	%al, 1(%r12,%rbx,4)
	movzbl	2(%r12,%rbx,4), %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %eax
	movb	%al, 2(%r12,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SHADER_MAX_VERTEXES,4,2        ## @SHADER_MAX_VERTEXES
	.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_CalcModulateColorsByFog     ; -- Begin function RB_CalcModulateColorsByFog
	.p2align	2
_RB_CalcModulateColorsByFog:            ; @RB_CalcModulateColorsByFog
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset b8, -56
	.cfi_offset b9, -64
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _SHADER_MAX_VERTEXES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SHADER_MAX_VERTEXES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x0, x20
	bl	_RB_CalcFogTexCoords
Lloh8:
	adrp	x21, _tess@GOTPAGE
Lloh9:
	ldr	x21, [x21, _tess@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
	add	x20, x20, #4
	fmov	d8, #1.00000000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	s0, s1, [x20, #-4]
	bl	_R_FogFactor
	fsub	d0, d8, d0
	fcvt	s0, d0
	ldr	b1, [x19]
	ucvtf	s1, s1
	fmul	s1, s1, s0
	fcvtzs	w8, s1
	strb	w8, [x19]
	ldr	b1, [x19, #1]
	ucvtf	s1, s1
	fmul	s1, s0, s1
	fcvtzs	w8, s1
	strb	w8, [x19, #1]
	ldr	b1, [x19, #2]
	ucvtf	s1, s1
	fmul	s0, s0, s1
	fcvtzs	w8, s0
	strb	w8, [x19, #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	add	x20, x20, #8
	add	x19, x19, #4
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SHADER_MAX_VERTEXES,4,2        ; @SHADER_MAX_VERTEXES
	.comm	_tess,4,2                       ; @tess
.subsections_via_symbols
