	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_GetSnapshot                 ## -- Begin function CL_GetSnapshot
	.p2align	4, 0x90
_CL_GetSnapshot:                        ## @CL_GetSnapshot
	.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	%rsi, %r14
	movl	%edi, %ebx
	movq	_cl@GOTPCREL(%rip), %r15
	movl	24(%r15), %ecx
	cmpl	%edi, %ecx
	jge	LBB0_2
## %bb.1:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
	movl	24(%r15), %ecx
LBB0_2:
	subl	%ebx, %ecx
	movq	_PACKET_BACKUP@GOTPCREL(%rip), %rdx
	movq	_qfalse@GOTPCREL(%rip), %r9
	cmpl	(%rdx), %ecx
	jge	LBB0_14
## %bb.3:
	movq	16(%r15), %r12
	movq	_PACKET_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,8), %rbx
	cmpl	$0, 32(%r12,%rbx,4)
	je	LBB0_14
## %bb.4:
	movl	(%r15), %ecx
	subl	(%r12,%rbx,4), %ecx
	movq	_MAX_PARSE_ENTITIES@GOTPCREL(%rip), %r13
	cmpl	(%r13), %ecx
	jge	LBB0_14
## %bb.5:
	movups	16(%r12,%rbx,4), %xmm0
	movups	%xmm0, 24(%r14)
	movl	20(%r14), %edi
	movl	12(%r12,%rbx,4), %esi
	movl	$4, %edx
	callq	_Com_Memcpy
	movl	8(%r12,%rbx,4), %eax
	movl	%eax, 16(%r14)
	movl	4(%r12,%rbx,4), %esi
	movq	_MAX_ENTITIES_IN_SNAPSHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %esi
	jle	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_Com_DPrintf
	movq	_MAX_ENTITIES_IN_SNAPSHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_7:
	movl	%esi, (%r14)
	movq	_qtrue@GOTPCREL(%rip), %r9
	testl	%esi, %esi
	jle	LBB0_14
## %bb.8:
	leaq	(%r12,%rbx,4), %rdi
	movq	8(%r15), %rcx
	movq	8(%r14), %rdx
	movl	%esi, %r8d
	cmpl	$1, %esi
	jne	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_10:
	movl	%r8d, %r10d
	andl	$-2, %r10d
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi), %eax
	addl	%esi, %eax
	movslq	(%r13), %rbx
	decq	%rbx
	cltq
	andq	%rbx, %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%rdx,%rsi,4)
	movl	(%rdi), %eax
	addl	%esi, %eax
	incl	%eax
	movslq	(%r13), %rbx
	decq	%rbx
	cltq
	andq	%rbx, %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 4(%rdx,%rsi,4)
	addq	$2, %rsi
	cmpq	%rsi, %r10
	jne	LBB0_11
LBB0_12:
	testb	$1, %r8b
	je	LBB0_14
## %bb.13:
	movslq	(%rdi), %rax
	movslq	%esi, %rdi
	addq	%rax, %rdi
	movslq	(%r13), %rax
	decq	%rax
	andq	%rdi, %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%rdx,%rsi,4)
LBB0_14:
	movl	(%r9), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cl,32,3                        ## @cl
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CL_GetSnapshot: snapshotNumber > cl.snapshot.messageNum"

	.comm	_PACKET_BACKUP,4,2              ## @PACKET_BACKUP
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_PACKET_MASK,4,2                ## @PACKET_MASK
	.comm	_MAX_PARSE_ENTITIES,4,2         ## @MAX_PARSE_ENTITIES
	.comm	_MAX_ENTITIES_IN_SNAPSHOT,4,2   ## @MAX_ENTITIES_IN_SNAPSHOT
L_.str.1:                               ## @.str.1
	.asciz	"CL_GetSnapshot: truncated %i entities to %i\n"

	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_GetSnapshot                 ; -- Begin function CL_GetSnapshot
	.p2align	2
_CL_GetSnapshot:                        ; @CL_GetSnapshot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _cl@GOTPAGE
Lloh1:
	ldr	x21, [x21, _cl@GOTPAGEOFF]
	ldr	w8, [x21, #24]
	cmp	w8, w0
	b.ge	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	ldr	w8, [x21, #24]
LBB0_2:
Lloh7:
	adrp	x9, _PACKET_BACKUP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PACKET_BACKUP@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	sub	w8, w8, w20
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.3:
Lloh10:
	adrp	x9, _PACKET_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PACKET_MASK@GOTPAGEOFF]
	ldr	x8, [x21, #16]
Lloh12:
	ldr	w9, [x9]
	and	w9, w9, w20
	mov	w10, #36
	smaddl	x10, w9, w10, x8
	ldr	w10, [x10, #32]
	cbz	w10, LBB0_10
; %bb.4:
	sxtw	x9, w9
	ldr	w10, [x21]
	mov	w11, #36
	madd	x20, x9, x11, x8
	ldr	w11, [x20]
Lloh13:
	adrp	x22, _MAX_PARSE_ENTITIES@GOTPAGE
Lloh14:
	ldr	x22, [x22, _MAX_PARSE_ENTITIES@GOTPAGEOFF]
	ldr	w12, [x22]
	sub	w10, w10, w11
	cmp	w10, w12
	b.ge	LBB0_10
; %bb.5:
	mov	w10, #36
	madd	x23, x9, x10, x8
	ldr	q0, [x23, #16]
	stur	q0, [x19, #24]
	ldr	w0, [x19, #20]
	ldr	w1, [x23, #12]
	mov	w2, #4
	bl	_Com_Memcpy
	ldp	w1, w8, [x23, #4]
	str	w8, [x19, #16]
Lloh15:
	adrp	x23, _MAX_ENTITIES_IN_SNAPSHOT@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MAX_ENTITIES_IN_SNAPSHOT@GOTPAGEOFF]
	ldr	w2, [x23]
	cmp	w1, w2
	b.le	LBB0_7
; %bb.6:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Com_DPrintf
	ldr	w1, [x23]
LBB0_7:
	str	w1, [x19]
	cmp	w1, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x9, #0
	ldr	x10, [x21, #8]
	ldr	x11, [x19, #8]
	mov	w12, w1
Lloh19:
	adrp	x8, _qtrue@GOTPAGE
Lloh20:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x20]
	ldr	w14, [x22]
	sub	w14, w14, #1
	add	w13, w9, w13
	and	w13, w14, w13
	ldr	w13, [x10, w13, sxtw #2]
	str	w13, [x11, x9, lsl #2]
	add	x9, x9, #1
	cmp	x12, x9
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x8, _qfalse@GOTPAGE
Lloh22:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh23:
	adrp	x8, _qtrue@GOTPAGE
Lloh24:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_cl,32,3                        ; @cl
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CL_GetSnapshot: snapshotNumber > cl.snapshot.messageNum"

	.comm	_PACKET_BACKUP,4,2              ; @PACKET_BACKUP
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_PACKET_MASK,4,2                ; @PACKET_MASK
	.comm	_MAX_PARSE_ENTITIES,4,2         ; @MAX_PARSE_ENTITIES
	.comm	_MAX_ENTITIES_IN_SNAPSHOT,4,2   ; @MAX_ENTITIES_IN_SNAPSHOT
l_.str.1:                               ; @.str.1
	.asciz	"CL_GetSnapshot: truncated %i entities to %i\n"

	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
