	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_ParticleMisc                ## -- Begin function CG_ParticleMisc
	.p2align	4, 0x90
_CG_ParticleMisc:                       ## @CG_ParticleMisc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_CG_Printf
LBB0_2:
	movq	_free_particles@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	72(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	_active_particles@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 72(%rbx)
	movq	%rbx, (%rax)
	movq	_cg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movabsq	$4607182418800017408, %rax      ## imm = 0x3FF0000000000000
	movq	%rax, 8(%rbx)
	movq	$0, 64(%rbx)
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r15d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_rand
	cltq
	imulq	$-1223705765, %rax, %rcx        ## imm = 0xB70FBB5B
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$7, %ecx
	addl	%edx, %ecx
	imull	$179, %ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, 16(%rbx)
	movq	%r13, 56(%rbx)
	testl	%r12d, %r12d
	movq	_cg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovgl	%eax, %r14d
	addl	%r12d, %r14d
	movl	%r14d, 20(%rbx)
	movl	%eax, 24(%rbx)
	movd	%r15d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, 28(%rbx)
	movq	_P_SPRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movl	48(%rbx), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_VectorCopy
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CG_ParticleImpactSmokePuff pshader == ZERO!\n"

	.comm	_free_particles,8,3             ## @free_particles
	.comm	_active_particles,8,3           ## @active_particles
	.comm	_cg,4,2                         ## @cg
	.comm	_P_SPRITE,4,2                   ## @P_SPRITE
	.comm	_qfalse,4,2                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_ParticleMisc                ; -- Begin function CG_ParticleMisc
	.p2align	2
_CG_ParticleMisc:                       ; @CG_ParticleMisc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CG_Printf
LBB0_2:
Lloh2:
	adrp	x8, _free_particles@GOTPAGE
Lloh3:
	ldr	x8, [x8, _free_particles@GOTPAGEOFF]
	ldr	x23, [x8]
	cbz	x23, LBB0_4
; %bb.3:
	ldr	x9, [x23, #72]
	str	x9, [x8]
Lloh4:
	adrp	x8, _active_particles@GOTPAGE
Lloh5:
	ldr	x8, [x8, _active_particles@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x23, [x8]
Lloh6:
	adrp	x24, _cg@GOTPAGE
Lloh7:
	ldr	x24, [x24, _cg@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [x23]
	mov	x8, #4607182418800017408
	str	x8, [x23, #8]
	stp	xzr, x9, [x23, #64]
	bl	_rand
	mov	w8, #47963
	movk	w8, #46863, lsl #16
	smull	x8, w0, w8
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #7
	add	w8, w9, w8, lsr #31
	mov	w9, #179
	msub	w8, w8, w9, w0
	str	x22, [x23, #56]
	ldr	w9, [x24]
	cmp	w21, #0
	csel	w10, w9, wzr, gt
	add	w10, w10, w21
	stp	w8, w10, [x23, #16]
	str	w9, [x23, #24]
	dup.4s	v0, w20
	stur	q0, [x23, #28]
Lloh8:
	adrp	x8, _P_SPRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _P_SPRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x23, #52]
	ldr	w1, [x23, #48]
	mov	x0, x19
	bl	_VectorCopy
Lloh11:
	adrp	x8, _qfalse@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x23, #44]
LBB0_4:
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CG_ParticleImpactSmokePuff pshader == ZERO!\n"

	.comm	_free_particles,8,3             ; @free_particles
	.comm	_active_particles,8,3           ; @active_particles
	.comm	_cg,4,2                         ; @cg
	.comm	_P_SPRITE,4,2                   ; @P_SPRITE
	.comm	_qfalse,4,2                     ; @qfalse
.subsections_via_symbols
