	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_SetNextSnap
_CG_SetNextSnap:                        ## @CG_SetNextSnap
	.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
	movq	%rdi, %r13
	movq	_cg@GOTPCREL(%rip), %rbx
	movq	%rdi, 16(%rbx)
	addq	$8, %rdi
	movq	_cg_entities@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	8(%r13), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rsi
	addq	$16, %rsi
	movq	_qfalse@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	callq	_BG_PlayerStateToEntityState
	movq	_qtrue@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rcx
	movq	(%r15), %rdx
	movq	8(%rbx), %rax
	movq	8(%rax), %rsi
	leaq	(%rsi,%rsi,2), %rsi
	movq	%rcx, (%rdx,%rsi,8)
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
	movq	%rax, (%r13,%r14,8)
	incq	%r12
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movslq	(%r13), %rax
	addq	$16, %r15
	cmpq	%rax, %r12
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rbx
	leaq	(%rbx,%r15), %rsi
	movq	_cg_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	(%rbx,%r15), %rax
	leaq	(%rax,%rax,2), %r14
	leaq	16(,%r14,8), %rdi
	addq	%r13, %rdi
	movl	$16, %edx
	callq	_memcpy
	cmpl	$0, 12(%r13,%r14,8)
	movq	_qfalse@GOTPCREL(%rip), %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx,%r15), %ecx
	xorl	8(%r13,%r14,8), %ecx
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	_EF_TELEPORT_BIT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_cg@GOTPCREL(%rip), %rbx
	movq	8(%rbx), %rax
	testq	%rax, %rax
	movq	_qfalse@GOTPCREL(%rip), %r14
	movq	_qtrue@GOTPCREL(%rip), %rdi
	je	LBB0_7
LBB0_8:
	movl	16(%rax), %ecx
	xorl	16(%r13), %ecx
	movq	_EF_TELEPORT_BIT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_10
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	movq	%r14, %rdi
LBB0_10:
	movq	(%rdi), %rcx
	movq	%rcx, (%rbx)
	movq	16(%rbx), %rcx
	movq	8(%rcx), %rdx
	cmpq	8(%rax), %rdx
	je	LBB0_12
## %bb.11:
	movq	_qtrue@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%rbx)
LBB0_12:
	movl	(%rax), %eax
	xorl	4(%rcx), %eax
	movq	_SNAPFLAG_SERVERCOUNT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CG_BuildSolidList              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,24,3                        ## @cg
	.comm	_cg_entities,8,3                ## @cg_entities
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_EF_TELEPORT_BIT,4,2            ## @EF_TELEPORT_BIT
	.comm	_SNAPFLAG_SERVERCOUNT,4,2       ## @SNAPFLAG_SERVERCOUNT
	.no_dead_strip	_CG_SetNextSnap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_SetNextSnap
_CG_SetNextSnap:                        ; @CG_SetNextSnap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x21, _cg@GOTPAGE
Lloh1:
	ldr	x21, [x21, _cg@GOTPAGEOFF]
	str	x0, [x21, #16]
Lloh2:
	adrp	x23, _cg_entities@GOTPAGE
Lloh3:
	ldr	x23, [x23, _cg_entities@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x0, #8]!
	mov	w20, #24
	madd	x8, x9, x20, x8
	add	x1, x8, #16
Lloh4:
	adrp	x24, _qfalse@GOTPAGE
Lloh5:
	ldr	x24, [x24, _qfalse@GOTPAGEOFF]
	ldr	x2, [x24]
	bl	_BG_PlayerStateToEntityState
Lloh6:
	adrp	x8, _qtrue@GOTPAGE
Lloh7:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x8]
	ldr	x10, [x23]
	ldr	x8, [x21, #8]
	ldr	x11, [x8, #8]
	mul	x11, x11, x20
	str	x9, [x10, x11]
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x26, #0
	mov	x27, #0
	mov	w28, #24
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x22, x28, x21
	ldr	w8, [x8, #8]
	ldr	w9, [x20, #8]
	eor	w8, w9, w8
Lloh9:
	adrp	x9, _EF_TELEPORT_BIT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EF_TELEPORT_BIT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w8, w9
Lloh12:
	adrp	x8, _qtrue@GOTPAGE
Lloh13:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	csel	x8, x8, x24, eq
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x8]
	mul	x9, x22, x28
	str	x8, [x21, x9]
	add	x27, x27, #1
	ldrsw	x8, [x19]
	add	x26, x26, #16
	cmp	x27, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x20, x8, x26
	ldr	x21, [x23]
	ldr	x22, [x20]
	madd	x25, x22, x28, x21
	add	x0, x25, #16
	mov	x1, x20
	mov	w2, #16
	bl	_memcpy
	ldr	w8, [x25, #12]
	cbnz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x24
	b	LBB0_3
LBB0_6:
Lloh14:
	adrp	x21, _cg@GOTPAGE
Lloh15:
	ldr	x21, [x21, _cg@GOTPAGEOFF]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_9
LBB0_7:
	ldr	w9, [x19, #16]
	ldr	w10, [x8, #16]
	eor	w9, w10, w9
Lloh16:
	adrp	x10, _EF_TELEPORT_BIT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _EF_TELEPORT_BIT@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w9, w10
	b.eq	LBB0_9
; %bb.8:
Lloh19:
	adrp	x9, _qtrue@GOTPAGE
Lloh20:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh21:
	adrp	x9, _qfalse@GOTPAGE
Lloh22:
	ldr	x9, [x9, _qfalse@GOTPAGEOFF]
LBB0_10:
	ldr	x9, [x9]
	str	x9, [x21]
	ldr	x9, [x21, #16]
	ldr	x10, [x9, #8]
	ldr	x11, [x8, #8]
	cmp	x10, x11
	b.eq	LBB0_12
; %bb.11:
Lloh23:
	adrp	x10, _qtrue@GOTPAGE
Lloh24:
	ldr	x10, [x10, _qtrue@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	str	x10, [x21]
LBB0_12:
	ldr	w9, [x9, #4]
	ldr	w8, [x8]
	eor	w8, w8, w9
Lloh26:
	adrp	x9, _SNAPFLAG_SERVERCOUNT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SNAPFLAG_SERVERCOUNT@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_14
; %bb.13:
Lloh29:
	adrp	x8, _qtrue@GOTPAGE
Lloh30:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_14:
	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	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_CG_BuildSolidList
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,24,3                        ; @cg
	.comm	_cg_entities,8,3                ; @cg_entities
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_EF_TELEPORT_BIT,4,2            ; @EF_TELEPORT_BIT
	.comm	_SNAPFLAG_SERVERCOUNT,4,2       ; @SNAPFLAG_SERVERCOUNT
	.no_dead_strip	_CG_SetNextSnap
.subsections_via_symbols
