	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function CG_ParticleSparks
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CG_ParticleSparks
	.p2align	4, 0x90
_CG_ParticleSparks:                     ## @CG_ParticleSparks
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_free_particles@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	movq	112(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	_active_particles@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 112(%rbx)
	movq	%rbx, (%rax)
	movq	_cg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 104(%rbx)
	movslq	%edx, %rcx
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, 96(%rbx)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movslq	%edx, %rcx
	addq	%rax, %rcx
	movq	%rcx, 88(%rbx)
	movq	_EMISIVEFADE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movl	$1053609165, (%rbx)             ## imm = 0x3ECCCCCD
	movq	$0, 72(%rbx)
	movss	%xmm0, -24(%rbp)                ## 4-byte Spill
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [5.0E-1,5.0E-1]
	movups	%xmm0, 8(%rbx)
	movups	%xmm0, 24(%rbx)
	movq	_cgs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_P_SMOKE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	40(%rbx), %rsi
	movss	%xmm2, -28(%rbp)                ## 4-byte Spill
	movss	%xmm1, -20(%rbp)                ## 4-byte Spill
	callq	_VectorCopy
	xorl	%eax, %eax
	callq	_crandom
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	40(%rbx), %rax
	mulss	-24(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	(%rax), %xmm0
	movss	%xmm0, (%rax)
	xorl	%eax, %eax
	callq	_crandom
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	40(%rbx), %rax
	mulss	-20(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	4(%rax), %xmm0
	movss	%xmm0, 4(%rax)
	movq	48(%rbx), %rax
	movdqu	(%r14), %xmm0
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	movq	%xmm0, (%rax)
	movl	16(%r14), %ecx
	movl	%ecx, 8(%rax)
	movq	56(%rbx), %rax
	movl	$0, 8(%rax)
	movq	$0, (%rax)
	xorl	%eax, %eax
	callq	_crandom
	shll	$2, %eax
	movq	48(%rbx), %rcx
	addl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_crandom
	shll	$2, %eax
	movq	48(%rbx), %rcx
	addl	%eax, 4(%rcx)
	xorl	%eax, %eax
	callq	_crandom
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	addl	$20, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	48(%rbx), %rax
	cvtsi2ssl	8(%rax), %xmm1
	mulss	-28(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %ecx
	movl	%ecx, 8(%rax)
	xorl	%eax, %eax
	callq	_crandom
	shll	$2, %eax
	movq	56(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_crandom
	shll	$2, %eax
	movq	56(%rbx), %rcx
	movl	%eax, 4(%rcx)
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_free_particles,8,3             ## @free_particles
	.comm	_active_particles,8,3           ## @active_particles
	.comm	_cg,8,3                         ## @cg
	.comm	_EMISIVEFADE,4,2                ## @EMISIVEFADE
	.comm	_cgs,4,2                        ## @cgs
	.comm	_P_SMOKE,4,2                    ## @P_SMOKE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_ParticleSparks              ; -- Begin function CG_ParticleSparks
	.p2align	2
_CG_ParticleSparks:                     ; @CG_ParticleSparks
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	.cfi_offset b10, -56
	.cfi_offset b11, -64
Lloh0:
	adrp	x8, _free_particles@GOTPAGE
Lloh1:
	ldr	x8, [x8, _free_particles@GOTPAGEOFF]
	ldr	x20, [x8]
	cbz	x20, LBB0_2
; %bb.1:
	fmov	s8, s2
	fmov	s9, s1
	fmov	s10, s0
	mov	x19, x1
	ldr	x9, [x20, #112]
	str	x9, [x8]
Lloh2:
	adrp	x8, _active_particles@GOTPAGE
Lloh3:
	ldr	x8, [x8, _active_particles@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _cg@GOTPAGE
Lloh5:
	ldr	x10, [x10, _cg@GOTPAGEOFF]
	str	x20, [x8]
Lloh6:
	ldr	x8, [x10]
	stp	x8, x9, [x20, #104]
	add	x9, x8, w2, sxtw
	cmp	w2, #0
	cinc	w10, w2, lt
	asr	w10, w10, #1
	add	x8, x8, w10, sxtw
Lloh7:
	adrp	x10, _EMISIVEFADE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _EMISIVEFADE@GOTPAGEOFF]
	stp	x8, x9, [x20, #88]
Lloh9:
	ldr	w8, [x10]
	str	w8, [x20, #80]
	mov	w8, #52429
	movk	w8, #16076, lsl #16
	str	w8, [x20]
	str	xzr, [x20, #72]
	fmov.2d	v0, #0.50000000
	stur	q0, [x20, #8]
	stur	q0, [x20, #24]
Lloh10:
	adrp	x8, _cgs@GOTPAGE
Lloh11:
	ldr	x8, [x8, _cgs@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _P_SMOKE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _P_SMOKE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #64]
	ldr	x1, [x20, #40]
	bl	_VectorCopy
	bl	_crandom
	scvtf	s0, w0
	ldr	x8, [x20, #40]
	ldr	s1, [x8]
	fmadd	s0, s0, s10, s1
	str	s0, [x8]
	bl	_crandom
	scvtf	s0, w0
	ldp	x8, x9, [x20, #40]
	ldr	s1, [x8, #4]
	fmadd	s0, s0, s9, s1
	str	s0, [x8, #4]
	ldp	x8, x10, [x19]
	stp	w8, w10, [x9]
	ldr	x8, [x19, #16]
	str	w8, [x9, #8]
	ldr	x8, [x20, #56]
	str	wzr, [x8, #8]
	str	xzr, [x8]
	bl	_crandom
	ldr	x8, [x20, #48]
	ldr	w9, [x8]
	add	w9, w9, w0, lsl #2
	str	w9, [x8]
	bl	_crandom
	ldr	x8, [x20, #48]
	ldr	w9, [x8, #4]
	add	w9, w9, w0, lsl #2
	str	w9, [x8, #4]
	bl	_crandom
	mov	w8, #10
	mul	w8, w0, w8
	add	w8, w8, #20
	scvtf	s0, w8
	ldr	x8, [x20, #48]
	ldr	s1, [x8, #8]
	scvtf	s1, s1
	fmadd	s0, s0, s8, s1
	fcvtzs	w9, s0
	str	w9, [x8, #8]
	bl	_crandom
	lsl	w8, w0, #2
	ldr	x9, [x20, #56]
	str	w8, [x9]
	bl	_crandom
	lsl	w8, w0, #2
	ldr	x9, [x20, #56]
	str	w8, [x9, #4]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_free_particles,8,3             ; @free_particles
	.comm	_active_particles,8,3           ; @active_particles
	.comm	_cg,8,3                         ; @cg
	.comm	_EMISIVEFADE,4,2                ; @EMISIVEFADE
	.comm	_cgs,4,2                        ; @cgs
	.comm	_P_SMOKE,4,2                    ; @P_SMOKE
.subsections_via_symbols
