	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_ReadNextSnapshot
_CG_ReadNextSnapshot:                   ## @CG_ReadNextSnapshot
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cg@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_cgs@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	leaq	1000(%rdx), %rax
	cmpq	%rax, %rsi
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_CG_Printf
	movq	(%r12), %rdx
	movq	(%r15), %rsi
LBB0_2:
	xorl	%r14d, %r14d
	cmpq	%rsi, %rdx
	jge	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	xorl	%ecx, %ecx
	cmpq	%rax, 8(%r15)
	sete	%cl
	leaq	(%rax,%rcx,8), %rbx
	incq	%rdx
	movq	%rdx, (%r12)
	movq	%rdx, %rdi
	movq	%rbx, %rsi
	callq	_trap_GetSnapshot
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	callq	_CG_AddLagometerSnapshotInfo
	movq	(%r12), %rdx
	cmpq	(%r15), %rdx
	jl	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_CG_AddLagometerSnapshotInfo
	movq	%rbx, %r14
LBB0_6:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,24,3                        ## @cg
	.comm	_cgs,8,3                        ## @cgs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: CG_ReadNextSnapshot: way out of range, %i > %i"

	.no_dead_strip	_CG_ReadNextSnapshot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_ReadNextSnapshot
_CG_ReadNextSnapshot:                   ; @CG_ReadNextSnapshot
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _cg@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cg@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh2:
	adrp	x21, _cgs@GOTPAGE
Lloh3:
	ldr	x21, [x21, _cgs@GOTPAGEOFF]
	ldr	x2, [x21]
	add	x8, x2, #1000
	cmp	x1, x8
	b.le	LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CG_Printf
	ldr	x2, [x21]
	ldr	x1, [x20]
LBB0_2:
	cmp	x2, x1
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x20, #8]
	cmp	x8, x9
	cset	w8, eq
	add	x19, x9, w8, uxtw #3
	add	x0, x2, #1
	str	x0, [x21]
	mov	x1, x19
	bl	_trap_GetSnapshot
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_CG_AddLagometerSnapshotInfo
	ldr	x2, [x21]
	ldr	x8, [x20]
	cmp	x2, x8
	b.lt	LBB0_3
LBB0_5:
	mov	x19, #0
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_CG_AddLagometerSnapshotInfo
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,24,3                        ; @cg
	.comm	_cgs,8,3                        ; @cgs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: CG_ReadNextSnapshot: way out of range, %i > %i"

	.no_dead_strip	_CG_ReadNextSnapshot
.subsections_via_symbols
