	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function CG_AddSpriteExplosion
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x437f0000                      ## float 255
LCPI0_6:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x3fd51eb851eb851f              ## double 0.33000000000000002
LCPI0_3:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_4:
	.quad	0x4045000000000000              ## double 42
LCPI0_5:
	.quad	0x403e000000000000              ## double 30
LCPI0_7:
	.quad	0xbfe0000000000000              ## double -0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_AddSpriteExplosion:                 ## @CG_AddSpriteExplosion
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	%rax, -32(%rbp)
	movups	24(%rdi), %xmm0
	movaps	%xmm0, -48(%rbp)
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movq	_cg@GOTPCREL(%rip), %r14
	movaps	%xmm0, %xmm1
	subss	(%r14), %xmm1
	subss	4(%rdi), %xmm0
	divss	%xmm0, %xmm1
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	minss	%xmm1, %xmm0
	movq	-48(%rbp), %rax
	movabsq	$1095216660735, %rcx            ## imm = 0xFF000000FF
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm1
	mulss	LCPI0_1(%rip), %xmm0
	movq	%rcx, (%rax)
	cvtss2sd	%xmm0, %xmm0
	mulsd	LCPI0_2(%rip), %xmm0
	movl	$255, 8(%rax)
	cvttsd2si	%xmm0, %ecx
	movl	%ecx, 12(%rax)
	movq	_RT_SPRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movsd	LCPI0_3(%rip), %xmm0            ## xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	mulsd	LCPI0_4(%rip), %xmm0
	addsd	LCPI0_5(%rip), %xmm0
	movl	%eax, -32(%rbp)
	cvttsd2si	%xmm0, %eax
	movl	%eax, -40(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_trap_R_AddRefEntityToScene
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jne	LBB0_1
	jnp	LBB0_4
LBB0_1:
	movss	(%r14), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	(%rbx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	movss	4(%rbx), %xmm3                  ## xmm3 = mem[0],zero,zero,zero
	subss	%xmm3, %xmm1
	subss	%xmm3, %xmm2
	divss	%xmm2, %xmm1
	movss	LCPI0_6(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm2
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	ja	LBB0_3
## %bb.2:
	cvtss2sd	%xmm1, %xmm1
	addsd	LCPI0_7(%rip), %xmm1
	addsd	%xmm1, %xmm1
	movsd	LCPI0_3(%rip), %xmm2            ## xmm2 = mem[0],zero
	subsd	%xmm1, %xmm2
	cvtsd2ss	%xmm2, %xmm2
LBB0_3:
	mulss	%xmm2, %xmm0
	movl	-36(%rbp), %edi
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movl	8(%rax), %ecx
	callq	_trap_R_AddLightToScene
LBB0_4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,4,2                         ## @cg
	.comm	_RT_SPRITE,4,2                  ## @RT_SPRITE
	.no_dead_strip	_CG_AddSpriteExplosion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_AddSpriteExplosion
_CG_AddSpriteExplosion:                 ; @CG_AddSpriteExplosion
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldur	q0, [x0, #24]
	str	q0, [sp]
	ldr	x8, [x0, #40]
	str	x8, [sp, #16]
Lloh0:
	adrp	x20, _cg@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cg@GOTPAGEOFF]
	ldr	s0, [x20]
	ldp	s1, s2, [x0]
	fsub	s0, s1, s0
	fsub	s1, s1, s2
	fdiv	s0, s0, s1
	fmov	s8, #1.00000000
	fmin	s0, s0, s8
	ldr	x8, [sp]
	movi	d1, #0x0000ff000000ff
	str	d1, [x8]
	mov	w9, #255
	mov	w10, #1132396544
	fmov	s1, w10
	fmul	s1, s0, s1
	fcvt	d1, s1
	mov	x10, #34079
	movk	x10, #20971, lsl #16
	movk	x10, #7864, lsl #32
	movk	x10, #16341, lsl #48
	fmov	d2, x10
	fmul	d1, d1, d2
	fcvtzs	w10, d1
	stp	w9, w10, [x8, #8]
Lloh2:
	adrp	x8, _RT_SPRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RT_SPRITE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	fcvt	d0, s0
	fmov	d1, #1.00000000
	fsub	d0, d1, d0
	mov	x9, #4631107791820423168
	fmov	d1, x9
	fmov	d2, #30.00000000
	fmadd	d0, d0, d1, d2
	fcvtzs	w9, d0
	str	w8, [sp, #16]
	str	w9, [sp, #8]
	mov	x0, sp
	bl	_trap_R_AddRefEntityToScene
	ldr	s0, [x19, #8]
	fcmp	s0, #0.0
	b.eq	LBB0_4
; %bb.1:
	ldr	s1, [x20]
	ldp	s3, s2, [x19]
	fsub	s1, s1, s2
	fsub	s2, s3, s2
	fdiv	s1, s1, s2
	fmov	s2, #0.50000000
	fcmp	s1, s2
	b.mi	LBB0_3
; %bb.2:
	fcvt	d1, s1
	fmov	d2, #-0.50000000
	fadd	d1, d1, d2
	fmov	d2, #1.00000000
	fmov	d3, #-2.00000000
	fmadd	d1, d1, d3, d2
	fcvt	s8, d1
LBB0_3:
	fmul	s0, s0, s8
	ldr	w0, [sp, #12]
	ldr	x8, [x19, #16]
	ldp	w1, w2, [x8]
	ldr	w3, [x8, #8]
	bl	_trap_R_AddLightToScene
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,4,2                         ; @cg
	.comm	_RT_SPRITE,4,2                  ; @RT_SPRITE
	.no_dead_strip	_CG_AddSpriteExplosion
.subsections_via_symbols
