	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_CheckChangedPredictableEvents ## -- Begin function CG_CheckChangedPredictableEvents
	.p2align	4, 0x90
_CG_CheckChangedPredictableEvents:      ## @CG_CheckChangedPredictableEvents
	.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	_MAX_PS_EVENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r13
	movl	(%rdi), %ebx
	subl	%eax, %ebx
	movq	_cg@GOTPCREL(%rip), %r15
	movq	_MAX_PREDICTED_EVENTS@GOTPCREL(%rip), %rsi
	leaq	16(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rsi), %eax
	subl	%eax, %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rdx
	movq	_MAX_PS_EVENTS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	movslq	%ebx, %r14
	andq	%r14, %rcx
	movl	(%rdx,%rcx,4), %r12d
	movq	8(%r15), %rdx
	decl	%eax
	andl	%ebx, %eax
	cltq
	cmpl	(%rdx,%rax,4), %r12d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, 20(%r15)
	movq	16(%r13), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r15)
	movl	16(%r15), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_CG_EntityEvent
	movq	_MAX_PREDICTED_EVENTS@GOTPCREL(%rip), %rsi
	movq	8(%r15), %rax
	movslq	(%rsi), %rcx
	decq	%rcx
	andq	%r14, %rcx
	movl	%r12d, (%rax,%rcx,4)
	movq	_cg_showmiss@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_CG_Printf
	movq	_MAX_PREDICTED_EVENTS@GOTPCREL(%rip), %rsi
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,32,3                        ## @cg
	.comm	_MAX_PS_EVENTS,4,2              ## @MAX_PS_EVENTS
	.comm	_MAX_PREDICTED_EVENTS,4,2       ## @MAX_PREDICTED_EVENTS
	.comm	_cg_showmiss,8,3                ## @cg_showmiss
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: changed predicted event\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_CheckChangedPredictableEvents ; -- Begin function CG_CheckChangedPredictableEvents
	.p2align	2
_CG_CheckChangedPredictableEvents:      ; @CG_CheckChangedPredictableEvents
	.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
Lloh0:
	adrp	x22, _MAX_PS_EVENTS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_PS_EVENTS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w9, [x0]
	sub	w23, w9, w8
Lloh2:
	adrp	x24, _cg@GOTPAGE
Lloh3:
	ldr	x24, [x24, _cg@GOTPAGEOFF]
Lloh4:
	adrp	x25, _MAX_PREDICTED_EVENTS@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MAX_PREDICTED_EVENTS@GOTPAGEOFF]
Lloh6:
	adrp	x26, _cg_showmiss@GOTPAGE
Lloh7:
	ldr	x26, [x26, _cg_showmiss@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	w8, [x19]
	cmp	w23, w8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w23, w8
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x25]
	sub	w8, w8, w9
	cmp	w23, w8
	b.le	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x19, #8]
	ldr	w8, [x22]
	sub	w8, w8, #1
	and	w8, w8, w23
	ldr	w27, [x10, w8, sxtw #2]
	ldr	x10, [x24, #8]
	sub	w9, w9, #1
	and	w9, w9, w23
	ldr	w9, [x10, w9, sxtw #2]
	cmp	w27, w9
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x24
	ldr	w1, [x21, #16]!
	sxtw	x8, w8
	str	w27, [x21, #4]
	ldr	x9, [x19, #16]
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x21, #8]
	mov	x0, x21
	bl	_CG_EntityEvent
	ldur	x8, [x21, #-8]
	ldr	w9, [x25]
	sub	w9, w9, #1
	and	w9, w9, w23
	str	w27, [x8, w9, sxtw #2]
	ldr	x8, [x26]
	cbz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_CG_Printf
	b	LBB0_2
LBB0_8:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,32,3                        ; @cg
	.comm	_MAX_PS_EVENTS,4,2              ; @MAX_PS_EVENTS
	.comm	_MAX_PREDICTED_EVENTS,4,2       ; @MAX_PREDICTED_EVENTS
	.comm	_cg_showmiss,8,3                ; @cg_showmiss
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: changed predicted event\n"

.subsections_via_symbols
