	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_EntityEffects
_CG_EntityEffects:                      ## @CG_EntityEffects
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_CG_SetEntitySoundPosition
	movslq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	16(%rbx), %r8
	movq	_ET_SPEAKER@GOTPCREL(%rip), %r9
	movl	28(%rbx), %edi
	movl	(%rbx), %esi
	movq	_cgs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %ecx
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpq	(%r9), %r8
	jne	LBB0_2
## %bb.3:
	callq	_trap_S_AddRealLoopingSound
	jmp	LBB0_4
LBB0_2:
	callq	_trap_S_AddLoopingSound
LBB0_4:
	movl	24(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movzbl	%al, %edx
	movzbl	%ah, %ecx
	movl	%eax, %esi
	shrl	$16, %esi
	movzbl	%sil, %r8d
	shrl	$22, %eax
	andl	$-4, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_trap_R_AddLightToScene         ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ET_SPEAKER,8,3                 ## @ET_SPEAKER
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.comm	_cgs,8,3                        ## @cgs
	.no_dead_strip	_CG_EntityEffects
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_EntityEffects
_CG_EntityEffects:                      ; @CG_EntityEffects
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_CG_SetEntitySoundPosition
	ldrsw	x8, [x19, #8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x9, [x19, #16]
Lloh0:
	adrp	x10, _ET_SPEAKER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ET_SPEAKER@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	w0, [x19, #28]
	ldr	w1, [x19]
Lloh3:
	adrp	x11, _vec3_origin@GOTPAGE
Lloh4:
	ldr	x11, [x11, _vec3_origin@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x11]
Lloh6:
	adrp	x11, _cgs@GOTPAGE
Lloh7:
	ldr	x11, [x11, _cgs@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	ldr	w3, [x11, x8, lsl #2]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.2:
	bl	_trap_S_AddRealLoopingSound
LBB0_3:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_6
LBB0_4:
	and	w2, w8, #0xff
	ubfx	w3, w8, #8, #8
	ubfx	w4, w8, #16, #8
	lsr	w8, w8, #22
	and	w1, w8, #0x3fc
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_trap_R_AddLightToScene
LBB0_5:
	bl	_trap_S_AddLoopingSound
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_4
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ET_SPEAKER,8,3                 ; @ET_SPEAKER
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.comm	_cgs,8,3                        ; @cgs
	.no_dead_strip	_CG_EntityEffects
.subsections_via_symbols
