	.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_RenderFlare
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
LCPI0_3:
	.long	0x41000000                      ## float 8
	.space	4
	.space	4
	.space	4
LCPI0_4:
	.space	4
	.long	0x44200000                      ## float 640
	.space	4
	.space	4
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0xbf800000                      ## float -1
LCPI0_2:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_RB_RenderFlare
	.p2align	4, 0x90
_RB_RenderFlare:                        ## @RB_RenderFlare
	.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	$64, %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)
	movl	l___const.RB_RenderFlare.fogFactors+8(%rip), %eax
	movl	%eax, -48(%rbp)
	movq	_backEnd@GOTPCREL(%rip), %rax
	incl	4(%rax)
	movq	l___const.RB_RenderFlare.fogFactors(%rip), %rcx
	movq	%rcx, -56(%rbp)
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm0, %xmm1
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	cmpltss	%xmm0, %xmm3
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	andps	%xmm3, %xmm0
	andnps	%xmm1, %xmm3
	orps	%xmm0, %xmm3
	movq	_r_flareSize@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movaps	LCPI0_3(%rip), %xmm0            ## xmm0 = <8.0E+0,u,u,u>
	insertps	$16, (%rcx), %xmm0              ## xmm0 = xmm0[0],mem[0],xmm0[2,3]
	movaps	LCPI0_4(%rip), %xmm1            ## xmm1 = <u,6.4E+2,u,u>
	blendps	$1, %xmm3, %xmm1                ## xmm1 = xmm3[0],xmm1[1,2,3]
	divps	%xmm1, %xmm0
	movshdup	%xmm0, %xmm1                    ## xmm1 = xmm0[1,1,3,3]
	addss	%xmm0, %xmm1
	mulss	(%rax), %xmm1
	movaps	%xmm1, -80(%rbp)                ## 16-byte Spill
	movq	_flareCoeff@GOTPCREL(%rip), %r14
	movss	(%r14), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jb	LBB0_2
## %bb.1:
	sqrtss	%xmm0, %xmm0
	jmp	LBB0_3
LBB0_2:
	movaps	%xmm3, -96(%rbp)                ## 16-byte Spill
	callq	_sqrt
	movaps	-96(%rbp), %xmm3                ## 16-byte Reload
LBB0_3:
	movaps	-80(%rbp), %xmm2                ## 16-byte Reload
	mulss	%xmm2, %xmm0
	addss	%xmm3, %xmm0
	movss	(%r14), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm1
	mulss	%xmm2, %xmm1
	mulss	%xmm0, %xmm0
	divss	%xmm0, %xmm1
	movl	36(%r12), %edi
	mulss	4(%r12), %xmm1
	movaps	%xmm1, %xmm0
	callq	_VectorScale
	movq	_tr@GOTPCREL(%rip), %r14
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	8(%r12), %rcx
	testq	%rcx, %rcx
	jle	LBB0_9
## %bb.5:
	cmpq	(%rax), %rcx
	jge	LBB0_9
## %bb.6:
	movq	_tess@GOTPCREL(%rip), %r15
	movl	$1, (%r15)
	movl	32(%r12), %edi
	movq	48(%r15), %rax
	movq	(%rax), %rsi
	callq	_VectorCopy
	movq	8(%r12), %rax
	movq	%rax, 8(%r15)
	leaq	-56(%rbp), %rdi
	callq	_RB_CalcModulateColorsByFog
	cmpl	$0, -56(%rbp)
	jne	LBB0_9
## %bb.7:
	cmpl	$0, -52(%rbp)
	jne	LBB0_9
## %bb.8:
	cmpl	$0, -48(%rbp)
	je	LBB0_10
LBB0_9:
	movl	(%r14), %edi
	movq	8(%r12), %rsi
	callq	_RB_BeginSurface
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%r12), %xmm0
	movaps	-80(%rbp), %xmm1                ## 16-byte Reload
	subss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rcx
	movq	_tess@GOTPCREL(%rip), %rax
	movq	48(%rax), %r8
	movslq	(%rax), %rdx
	movq	(%r8,%rdx,8), %rdi
	movq	%rcx, (%rdi)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	16(%r12), %xmm0
	subss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rcx
	movq	%rcx, 8(%rdi)
	movq	16(%rax), %rcx
	movq	(%rcx,%rdx,8), %rdx
	movq	(%rdx), %rdx
	movl	$0, (%rdx)
	movslq	(%rax), %rdi
	movq	(%rcx,%rdi,8), %rdx
	movq	(%rdx), %rdx
	movl	$0, 4(%rdx)
	movq	24(%rax), %rdx
	movq	(%rdx,%rdi,8), %rdi
	movl	$0, (%rdi)
	movslq	(%rax), %rdi
	movq	(%rdx,%rdi,8), %rsi
	movq	$0, 4(%rsi)
	movl	$255, 12(%rsi)
	leaq	1(%rdi), %rsi
	movl	%esi, (%rax)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%r12), %xmm0
	subss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rsi
	movq	8(%r8,%rdi,8), %rbx
	movq	%rsi, (%rbx)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	16(%r12), %xmm0
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rsi
	movq	%rsi, 8(%rbx)
	movq	8(%rcx,%rdi,8), %rsi
	movq	(%rsi), %rsi
	movl	$0, (%rsi)
	movslq	(%rax), %rsi
	movq	(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	$1, 4(%rdi)
	movq	(%rdx,%rsi,8), %rsi
	movl	$0, (%rsi)
	movslq	(%rax), %rsi
	movq	(%rdx,%rsi,8), %rdi
	movq	$0, 4(%rdi)
	movl	$255, 12(%rdi)
	leaq	1(%rsi), %rdi
	movl	%edi, (%rax)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%r12), %xmm0
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rdi
	movq	8(%r8,%rsi,8), %rbx
	movq	%rdi, (%rbx)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	16(%r12), %xmm0
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rdi
	movq	%rdi, 8(%rbx)
	movq	8(%rcx,%rsi,8), %rsi
	movq	(%rsi), %rsi
	movl	$1, (%rsi)
	movslq	(%rax), %rsi
	movq	(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	$1, 4(%rdi)
	movq	(%rdx,%rsi,8), %rsi
	movl	$0, (%rsi)
	movslq	(%rax), %rsi
	movq	(%rdx,%rsi,8), %rdi
	movq	$0, 4(%rdi)
	movl	$255, 12(%rdi)
	leaq	1(%rsi), %rdi
	movl	%edi, (%rax)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%r12), %xmm0
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rdi
	movq	8(%r8,%rsi,8), %rbx
	movq	%rdi, (%rbx)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	16(%r12), %xmm0
	subss	%xmm1, %xmm0
	cvttss2si	%xmm0, %rdi
	movq	%rdi, 8(%rbx)
	movq	8(%rcx,%rsi,8), %rsi
	movq	(%rsi), %rsi
	movl	$1, (%rsi)
	movslq	(%rax), %rsi
	movq	(%rcx,%rsi,8), %rcx
	movq	(%rcx), %rcx
	movl	$0, 4(%rcx)
	movq	(%rdx,%rsi,8), %rcx
	movl	$0, (%rcx)
	movslq	(%rax), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movq	$0, 4(%rdx)
	movl	$255, 12(%rdx)
	leal	1(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	32(%rax), %rcx
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$0, (%rcx,%rdx,4)
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$1, (%rcx,%rdx,4)
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$2, (%rcx,%rdx,4)
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$0, (%rcx,%rdx,4)
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$2, (%rcx,%rdx,4)
	movslq	40(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 40(%rax)
	movl	$3, (%rcx,%rdx,4)
	xorl	%eax, %eax
	callq	_RB_EndSurface
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.RB_RenderFlare.fogFactors
l___const.RB_RenderFlare.fogFactors:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

	.comm	_backEnd,8,2                    ## @backEnd
	.comm	_r_flareSize,8,3                ## @r_flareSize
	.comm	_flareCoeff,4,2                 ## @flareCoeff
	.comm	_tr,16,3                        ## @tr
	.comm	_tess,56,3                      ## @tess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_RenderFlare                 ; -- Begin function RB_RenderFlare
	.p2align	2
_RB_RenderFlare:                        ; @RB_RenderFlare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, l___const.RB_RenderFlare.fogFactors@PAGE
Lloh4:
	add	x8, x8, l___const.RB_RenderFlare.fogFactors@PAGEOFF
	ldr	w9, [x8, #8]
	str	w9, [sp, #16]
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh5:
	adrp	x8, _backEnd@GOTPAGE
Lloh6:
	ldr	x8, [x8, _backEnd@GOTPAGEOFF]
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
	ldr	s0, [x0]
	fneg	s1, s0
	fmov	s2, #-1.00000000
	fcmp	s0, s2
	fmov	s0, #1.00000000
	fcsel	s2, s0, s1, gt
	ldr	s0, [x8]
Lloh7:
	adrp	x8, _r_flareSize@GOTPAGE
Lloh8:
	ldr	x8, [x8, _r_flareSize@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	s1, [x8]
	mov	w8, #1142947840
	fmov	s3, w8
	fdiv	s1, s1, s3
	fmov	s3, #8.00000000
	fdiv	s3, s3, s2
	fadd	s1, s3, s1
	fmul	s8, s0, s1
Lloh10:
	adrp	x20, _flareCoeff@GOTPAGE
Lloh11:
	ldr	x20, [x20, _flareCoeff@GOTPAGEOFF]
	ldr	s1, [x20]
	fsqrt	s0, s1
	fcmp	s0, s0
	b.vs	LBB0_10
LBB0_1:
	fmadd	s0, s8, s0, s2
	ldr	s1, [x20]
	fmul	s1, s1, s8
	fmul	s1, s8, s1
	fmul	s0, s0, s0
	fdiv	s0, s1, s0
	ldr	w0, [x19, #36]
	ldr	s1, [x19, #4]
	fmul	s0, s1, s0
	bl	_VectorScale
Lloh12:
	adrp	x21, _tr@GOTPAGE
Lloh13:
	ldr	x21, [x21, _tr@GOTPAGEOFF]
	ldr	x8, [x21, #8]
Lloh14:
	adrp	x20, _tess@GOTPAGE
Lloh15:
	ldr	x20, [x20, _tess@GOTPAGEOFF]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	x9, [x19, #8]
	cmp	x9, #1
	b.lt	LBB0_7
; %bb.3:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ge	LBB0_7
; %bb.4:
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x19, #32]
	ldr	x8, [x20, #48]
	ldr	x1, [x8]
	bl	_VectorCopy
	ldr	x8, [x19, #8]
	str	x8, [x20, #8]
	add	x0, sp, #8
	bl	_RB_CalcModulateColorsByFog
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_7
; %bb.6:
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_8
LBB0_7:
	ldr	w0, [x21]
	ldr	x1, [x19, #8]
	bl	_RB_BeginSurface
	ldr	x8, [x19, #24]
	scvtf	s0, x8
	fsub	s0, s0, s8
	fcvtzs	x8, s0
	ldr	x9, [x20, #48]
	ldrsw	x10, [x20]
	lsl	x10, x10, #3
	ldr	x11, [x9, x10]
	str	x8, [x11]
	ldr	x8, [x19, #16]
	scvtf	s0, x8
	fsub	s0, s0, s8
	fcvtzs	x8, s0
	str	x8, [x11, #8]
	ldr	x8, [x20, #16]
	ldr	x10, [x8, x10]
	ldr	x10, [x10]
	str	wzr, [x10]
	ldrsw	x10, [x20]
	lsl	x11, x10, #3
	ldr	x10, [x8, x11]
	ldr	x10, [x10]
	str	wzr, [x10, #4]
	ldr	x10, [x20, #24]
	ldr	x11, [x10, x11]
	str	wzr, [x11]
	ldrsw	x12, [x20]
	ldr	x13, [x10, x12, lsl #3]
	movi.2d	v0, #0000000000000000
	stur	d0, [x13, #4]
	mov	w11, #255
	str	w11, [x13, #12]
	add	x12, x12, #1
	str	w12, [x20]
	ldr	x13, [x19, #24]
	scvtf	s1, x13
	fsub	s1, s1, s8
	fcvtzs	x13, s1
	lsl	x12, x12, #3
	ldr	x14, [x9, x12]
	str	x13, [x14]
	ldr	x13, [x19, #16]
	scvtf	s1, x13
	fadd	s1, s8, s1
	fcvtzs	x13, s1
	str	x13, [x14, #8]
	ldr	x12, [x8, x12]
	ldr	x12, [x12]
	str	wzr, [x12]
	ldrsw	x12, [x20]
	lsl	x13, x12, #3
	ldr	x12, [x8, x13]
	ldr	x14, [x12]
	mov	w12, #1
	str	w12, [x14, #4]
	ldr	x13, [x10, x13]
	str	wzr, [x13]
	ldrsw	x13, [x20]
	ldr	x14, [x10, x13, lsl #3]
	stur	d0, [x14, #4]
	str	w11, [x14, #12]
	add	x13, x13, #1
	str	w13, [x20]
	ldr	x14, [x19, #24]
	scvtf	s1, x14
	fadd	s1, s8, s1
	fcvtzs	x14, s1
	lsl	x13, x13, #3
	ldr	x15, [x9, x13]
	str	x14, [x15]
	ldr	x14, [x19, #16]
	scvtf	s1, x14
	fadd	s1, s8, s1
	fcvtzs	x14, s1
	str	x14, [x15, #8]
	ldr	x13, [x8, x13]
	ldr	x13, [x13]
	str	w12, [x13]
	ldrsw	x13, [x20]
	lsl	x13, x13, #3
	ldr	x14, [x8, x13]
	ldr	x14, [x14]
	str	w12, [x14, #4]
	ldr	x13, [x10, x13]
	str	wzr, [x13]
	ldrsw	x13, [x20]
	ldr	x14, [x10, x13, lsl #3]
	stur	d0, [x14, #4]
	str	w11, [x14, #12]
	add	x13, x13, #1
	str	w13, [x20]
	ldr	x14, [x19, #24]
	scvtf	s1, x14
	fadd	s1, s8, s1
	fcvtzs	x14, s1
	lsl	x13, x13, #3
	ldr	x9, [x9, x13]
	str	x14, [x9]
	ldr	x14, [x19, #16]
	scvtf	s1, x14
	fsub	s1, s1, s8
	fcvtzs	x14, s1
	str	x14, [x9, #8]
	ldr	x9, [x8, x13]
	ldr	x9, [x9]
	str	w12, [x9]
	ldrsw	x9, [x20]
	lsl	x9, x9, #3
	ldr	x8, [x8, x9]
	ldr	x8, [x8]
	str	wzr, [x8, #4]
	ldr	x8, [x10, x9]
	str	wzr, [x8]
	ldrsw	x8, [x20]
	ldr	x9, [x10, x8, lsl #3]
	stur	d0, [x9, #4]
	str	w11, [x9, #12]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #32]
	ldrsw	x9, [x20, #40]
	add	w10, w9, #1
	str	w10, [x20, #40]
	str	wzr, [x8, x9, lsl #2]
	ldrsw	x9, [x20, #40]
	add	w10, w9, #1
	str	w10, [x20, #40]
	str	w12, [x8, x9, lsl #2]
	ldrsw	x9, [x20, #40]
	add	w10, w9, #1
	str	w10, [x20, #40]
	mov	w10, #2
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x20, #40]
	add	w11, w9, #1
	str	w11, [x20, #40]
	str	wzr, [x8, x9, lsl #2]
	ldrsw	x9, [x20, #40]
	add	w11, w9, #1
	str	w11, [x20, #40]
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x20, #40]
	add	w10, w9, #1
	str	w10, [x20, #40]
	mov	w10, #3
	str	w10, [x8, x9, lsl #2]
	bl	_RB_EndSurface
LBB0_8:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	fmov	s0, s1
	str	s2, [sp, #4]                    ; 4-byte Folded Spill
	bl	_sqrt
	ldr	s2, [sp, #4]                    ; 4-byte Folded Reload
	b	LBB0_1
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.RB_RenderFlare.fogFactors
l___const.RB_RenderFlare.fogFactors:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

	.comm	_backEnd,8,2                    ; @backEnd
	.comm	_r_flareSize,8,3                ; @r_flareSize
	.comm	_flareCoeff,4,2                 ; @flareCoeff
	.comm	_tr,16,3                        ; @tr
	.comm	_tess,56,3                      ; @tess
.subsections_via_symbols
