	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CG_AddFragment
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0xc030000000000000              ## double -16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CG_AddFragment
	.p2align	4, 0x90
_CG_AddFragment:                        ## @CG_AddFragment
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	48(%rdi), %rax
	movq	_TR_STATIONARY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movl	(%r12), %ebx
	movq	_cg@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	_SINK_TIME@GOTPCREL(%rip), %r15
	leaq	16(%r12), %r14
	cmpl	(%r15), %ebx
	jge	LBB0_3
## %bb.2:
	movq	16(%r12), %rdi
	movq	24(%r12), %rsi
	callq	_VectorCopy
	movq	_RF_LIGHTING_ORIGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 36(%r12)
	cvtsi2ss	%ebx, %xmm0
	movq	16(%r12), %rax
	cvtsi2ssl	(%r15), %xmm1
	movss	8(%rax), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	movss	%xmm2, -36(%rbp)                ## 4-byte Spill
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm2, %xmm0
	mulsd	LCPI0_1(%rip), %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, 8(%rax)
	movq	%r14, %rdi
	callq	_trap_R_AddRefEntityToScene
	movq	16(%r12), %rax
	movss	-36(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 8(%rax)
	jmp	LBB0_12
LBB0_4:
	leaq	48(%r12), %rdi
	movq	_cg@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_BG_EvaluateTrajectory
	leaq	16(%r12), %r14
	movq	16(%r12), %rsi
	movq	_CONTENTS_SOLID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-56(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$-1, %r9d
	callq	_CG_Trace
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	ucomisd	LCPI0_0(%rip), %xmm0
	jne	LBB0_9
	jp	LBB0_9
## %bb.5:
	movq	16(%r12), %rsi
	callq	_VectorCopy
	movq	_LEF_TUMBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_7
## %bb.6:
	leaq	40(%r12), %rdi
	movl	(%r15), %esi
	callq	_BG_EvaluateTrajectory
	movl	32(%r12), %esi
	callq	_AnglesToAxis
LBB0_7:
	movq	%r14, %rdi
	callq	_trap_R_AddRefEntityToScene
	movq	8(%r12), %rax
	movq	_LEBS_BLOOD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.8:
	movq	%r12, %rdi
	callq	_CG_BloodTrail
	jmp	LBB0_12
LBB0_3:
	movq	%r14, %rdi
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_R_AddRefEntityToScene     ## TAILCALL
LBB0_9:
	movl	-48(%rbp), %edi
	xorl	%esi, %esi
	callq	_trap_CM_PointContents
	movq	_CONTENTS_NODROP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_CG_FreeLocalEntity
	jmp	LBB0_12
LBB0_11:
	leaq	-56(%rbp), %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_CG_FragmentBounceMark
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_CG_FragmentBounceSound
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_CG_ReflectVelocity
	movq	%r14, %rdi
	callq	_trap_R_AddRefEntityToScene
LBB0_12:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TR_STATIONARY,8,3              ## @TR_STATIONARY
	.comm	_cg,4,2                         ## @cg
	.comm	_SINK_TIME,4,2                  ## @SINK_TIME
	.comm	_RF_LIGHTING_ORIGIN,4,2         ## @RF_LIGHTING_ORIGIN
	.comm	_CONTENTS_SOLID,4,2             ## @CONTENTS_SOLID
	.comm	_LEF_TUMBLE,4,2                 ## @LEF_TUMBLE
	.comm	_LEBS_BLOOD,8,3                 ## @LEBS_BLOOD
	.comm	_CONTENTS_NODROP,4,2            ## @CONTENTS_NODROP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_AddFragment                 ; -- Begin function CG_AddFragment
	.p2align	2
_CG_AddFragment:                        ; @CG_AddFragment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	.cfi_offset b8, -56
	.cfi_offset b9, -64
	mov	x19, x0
	ldr	x8, [x0, #48]!
Lloh0:
	adrp	x9, _TR_STATIONARY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TR_STATIONARY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x19
	ldr	w8, [x20], #16
Lloh3:
	adrp	x9, _cg@GOTPAGE
Lloh4:
	ldr	x9, [x9, _cg@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x21, _SINK_TIME@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SINK_TIME@GOTPAGEOFF]
	ldr	w10, [x21]
	sub	w22, w8, w9
	cmp	w22, w10
	b.ge	LBB0_8
; %bb.2:
	ldp	x0, x1, [x19, #16]
	bl	_VectorCopy
Lloh8:
	adrp	x8, _RF_LIGHTING_ORIGIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RF_LIGHTING_ORIGIN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x19, #36]
	orr	w8, w9, w8
	str	w8, [x19, #36]
	ldr	x8, [x19, #16]
	scvtf	s0, w22
	ldr	s8, [x8, #8]
	ldr	s1, [x21]
	scvtf	s1, s1
	fdiv	s0, s0, s1
	fcvt	d0, s0
	fmov	d1, #1.00000000
	fsub	d0, d1, d0
	fcvt	d1, s8
	fmov	d2, #-16.00000000
	fmadd	d0, d0, d2, d1
	fcvt	s0, d0
	str	s0, [x8, #8]
	mov	x0, x20
	bl	_trap_R_AddRefEntityToScene
	ldr	x8, [x19, #16]
	str	s8, [x8, #8]
	b	LBB0_12
LBB0_3:
Lloh11:
	adrp	x21, _cg@GOTPAGE
Lloh12:
	ldr	x21, [x21, _cg@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_BG_EvaluateTrajectory
	mov	x20, x19
	ldr	x1, [x20, #16]!
Lloh13:
	adrp	x8, _CONTENTS_SOLID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CONTENTS_SOLID@GOTPAGEOFF]
Lloh15:
	ldr	w6, [x8]
	mov	x0, sp
	mov	x2, #0
	mov	x3, #0
	mov	w5, #-1
	bl	_CG_Trace
	ldr	d0, [sp]
	fmov	d1, #1.00000000
	fcmp	d0, d1
	b.ne	LBB0_9
; %bb.4:
	ldr	x1, [x19, #16]
	bl	_VectorCopy
	ldr	w8, [x19, #4]
Lloh16:
	adrp	x9, _LEF_TUMBLE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LEF_TUMBLE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	add	x0, x19, #40
	ldr	w1, [x21]
	bl	_BG_EvaluateTrajectory
	ldr	w1, [x19, #32]
	bl	_AnglesToAxis
LBB0_6:
	mov	x0, x20
	bl	_trap_R_AddRefEntityToScene
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _LEBS_BLOOD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LEBS_BLOOD@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_CG_BloodTrail
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_trap_R_AddRefEntityToScene
LBB0_9:
	ldr	w0, [sp, #8]
	mov	w1, #0
	bl	_trap_CM_PointContents
Lloh22:
	adrp	x8, _CONTENTS_NODROP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CONTENTS_NODROP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_CG_FreeLocalEntity
	b	LBB0_12
LBB0_11:
	mov	x1, sp
	mov	x0, x19
	bl	_CG_FragmentBounceMark
	mov	x1, sp
	mov	x0, x19
	bl	_CG_FragmentBounceSound
	mov	x1, sp
	mov	x0, x19
	bl	_CG_ReflectVelocity
	mov	x0, x20
	bl	_trap_R_AddRefEntityToScene
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_TR_STATIONARY,8,3              ; @TR_STATIONARY
	.comm	_cg,4,2                         ; @cg
	.comm	_SINK_TIME,4,2                  ; @SINK_TIME
	.comm	_RF_LIGHTING_ORIGIN,4,2         ; @RF_LIGHTING_ORIGIN
	.comm	_CONTENTS_SOLID,4,2             ; @CONTENTS_SOLID
	.comm	_LEF_TUMBLE,4,2                 ; @LEF_TUMBLE
	.comm	_LEBS_BLOOD,8,3                 ; @LEBS_BLOOD
	.comm	_CONTENTS_NODROP,4,2            ; @CONTENTS_NODROP
.subsections_via_symbols
