	.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_MakeExplosion
LCPI0_0:
	.long	0x447a0000                      ## float 1000
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CG_MakeExplosion
	.p2align	4, 0x90
_CG_MakeExplosion:                      ## @CG_MakeExplosion
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, %r12d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	testl	%r8d, %r8d
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_CG_Error
LBB0_2:
	xorl	%eax, %eax
	callq	_rand
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_CG_AllocLocalEntity
	movq	%rax, %rbx
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	_LE_SPRITE_EXPLOSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	xorl	%eax, %eax
	callq	_rand
	cltq
	imulq	$-1240768329, %rax, %rcx        ## imm = 0xB60B60B7
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$8, %ecx
	addl	%edx, %ecx
	imull	$360, %ecx, %ecx                ## imm = 0x168
	subl	%ecx, %eax
	movl	%eax, 16(%rbx)
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_VectorScale
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_VectorAdd
	jmp	LBB0_7
LBB0_4:
	movq	_LE_EXPLOSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_VectorCopy
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_rand
	cltq
	imulq	$-1240768329, %rax, %rcx        ## imm = 0xB60B60B7
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$8, %ecx
	addl	%edx, %ecx
	imull	$360, %ecx, %ecx                ## imm = 0x168
	subl	%ecx, %eax
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	48(%rbx), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_VectorCopy
	movq	48(%rbx), %rdi
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_RotateAroundDirection
	jmp	LBB0_7
LBB0_5:
	movq	48(%rbx), %rdi
	callq	_AxisClear
LBB0_7:
	andl	$63, %r13d
	movq	_cg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%r13d, %eax
	movl	%eax, (%rbx)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addl	%eax, %r12d
	movl	%r12d, 4(%rbx)
	divss	LCPI0_0(%rip), %xmm0
	movss	%xmm0, 20(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movl	28(%rbx), %esi
	callq	_VectorCopy
	movl	24(%rbx), %esi
	callq	_VectorCopy
	movq	8(%rbx), %rax
	movabsq	$4607182418800017408, %rcx      ## imm = 0x3FF0000000000000
	movq	%rcx, 16(%rax)
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [1.0E+0,1.0E+0]
	movups	%xmm0, (%rax)
	movq	%rbx, %rax
	addq	$24, %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_MakeExplosion: msec = %i"

	.comm	_LE_SPRITE_EXPLOSION,4,2        ## @LE_SPRITE_EXPLOSION
	.comm	_LE_EXPLOSION,4,2               ## @LE_EXPLOSION
	.comm	_cg,4,2                         ## @cg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_MakeExplosion               ; -- Begin function CG_MakeExplosion
	.p2align	2
_CG_MakeExplosion:                      ; @CG_MakeExplosion
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x26, x5
	mov	x22, x4
	mov	x19, x3
	mov	x20, x2
	mov	x24, x1
	mov	x25, x0
	cmp	w4, #0
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_CG_Error
LBB0_2:
	bl	_rand
	mov	x23, x0
	bl	_CG_AllocLocalEntity
	mov	x21, x0
	cbz	x26, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _LE_SPRITE_EXPLOSION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LE_SPRITE_EXPLOSION@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x21, #56]
	bl	_rand
	mov	w8, #24759
	movk	w8, #46603, lsl #16
	smull	x8, w0, w8
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #8
	add	w8, w9, w8, lsr #31
	mov	w9, #360
	msub	w8, w8, w9, w0
	str	w8, [x21, #16]
	mov	x0, x24
	mov	w1, #16
	bl	_VectorScale
	mov	x1, x25
	bl	_VectorAdd
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _LE_EXPLOSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LE_EXPLOSION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21, #56]
	mov	x0, x25
	bl	_VectorCopy
	cbz	w24, LBB0_6
; %bb.5:
	bl	_rand
	mov	w8, #24759
	movk	w8, #46603, lsl #16
	smull	x8, w0, w8
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #8
	add	w8, w9, w8, lsr #31
	mov	w9, #360
	msub	w8, w8, w9, w0
	scvtf	s8, w8
	ldr	x8, [x21, #48]
	ldr	w1, [x8]
	mov	x0, x24
	bl	_VectorCopy
	ldr	x0, [x21, #48]
	fmov	s0, s8
	bl	_RotateAroundDirection
	b	LBB0_7
LBB0_6:
	ldr	x0, [x21, #48]
	bl	_AxisClear
LBB0_7:
	and	w8, w23, #0x3f
Lloh8:
	adrp	x9, _cg@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cg@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sub	w8, w9, w8
	add	w9, w8, w22
	stp	w8, w9, [x21]
	scvtf	s0, w8
	mov	w8, #1148846080
	fmov	s1, w8
	fdiv	s0, s0, s1
	str	s0, [x21, #20]
	stp	x19, x20, [x21, #32]
	ldr	w1, [x21, #28]
	bl	_VectorCopy
	ldr	w1, [x21, #24]
	bl	_VectorCopy
	ldr	x8, [x21, #8]
	mov	x9, #4607182418800017408
	str	x9, [x8, #16]
	fmov.2d	v0, #1.00000000
	str	q0, [x8]
	mov	x0, x21
	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	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CG_MakeExplosion: msec = %i"

	.comm	_LE_SPRITE_EXPLOSION,4,2        ; @LE_SPRITE_EXPLOSION
	.comm	_LE_EXPLOSION,4,2               ; @LE_EXPLOSION
	.comm	_cg,4,2                         ; @cg
.subsections_via_symbols
