	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_MouseEvent                  ## -- Begin function CG_MouseEvent
	.p2align	4, 0x90
_CG_MouseEvent:                         ## @CG_MouseEvent
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_cg@GOTPCREL(%rip), %rax
	movq	8(%rax), %rcx
	movq	_PM_NORMAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.1:
	movq	_PM_SPECTATOR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
LBB0_2:
	movq	(%rax), %rax
	movq	_qfalse@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.20:
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_Key_SetCatcher            ## TAILCALL
LBB0_3:
	movq	_cgs@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	%r15d, %edi
	movl	%edi, (%rbx)
	js	LBB0_4
## %bb.5:
	movl	$640, %eax                      ## imm = 0x280
	cmpl	$641, %edi                      ## imm = 0x281
	jae	LBB0_6
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	movl	%eax, (%rbx)
	movl	%eax, %edi
LBB0_7:
	movl	4(%rbx), %esi
	addl	%r14d, %esi
	movl	%esi, 4(%rbx)
	js	LBB0_8
## %bb.9:
	movl	$480, %eax                      ## imm = 0x1E0
	cmpl	$481, %esi                      ## imm = 0x1E1
	jae	LBB0_10
	jmp	LBB0_11
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	movl	%eax, 4(%rbx)
	movl	%eax, %esi
LBB0_11:
	callq	_Display_CursorType
	movq	$0, 32(%rbx)
	movq	_CURSOR_ARROW@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.12:
	leaq	24(%rbx), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_CURSOR_SIZER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.14:
	leaq	16(%rbx), %rax
LBB0_15:
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
LBB0_16:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.17:
	movl	%r15d, %esi
	movl	%r14d, %edx
	jmp	LBB0_18
LBB0_19:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	xorl	%edi, %edi
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Display_MouseMove              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,16,3                        ## @cg
	.comm	_PM_NORMAL,8,3                  ## @PM_NORMAL
	.comm	_PM_SPECTATOR,8,3               ## @PM_SPECTATOR
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_cgs,40,3                       ## @cgs
	.comm	_CURSOR_ARROW,4,2               ## @CURSOR_ARROW
	.comm	_CURSOR_SIZER,4,2               ## @CURSOR_SIZER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_MouseEvent                  ; -- Begin function CG_MouseEvent
	.p2align	2
_CG_MouseEvent:                         ; @CG_MouseEvent
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _cg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg@GOTPAGEOFF]
	ldr	x9, [x8, #8]
Lloh2:
	adrp	x10, _PM_NORMAL@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PM_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _PM_SPECTATOR@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PM_SPECTATOR@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _qfalse@GOTPAGE
Lloh9:
	ldr	x9, [x9, _qfalse@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	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
	b	_trap_Key_SetCatcher
LBB0_3:
Lloh11:
	adrp	x21, _cgs@GOTPAGE
Lloh12:
	ldr	x21, [x21, _cgs@GOTPAGEOFF]
	ldr	w8, [x21]
	adds	w0, w8, w20
	str	w0, [x21]
	b.mi	LBB0_6
; %bb.4:
	cmp	w0, #641
	b.lo	LBB0_8
; %bb.5:
	mov	w0, #640
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	str	w0, [x21]
LBB0_8:
	ldr	w8, [x21, #4]
	adds	w1, w8, w19
	str	w1, [x21, #4]
	b.mi	LBB0_11
; %bb.9:
	cmp	w1, #481
	b.lo	LBB0_13
; %bb.10:
	mov	w1, #480
	b	LBB0_12
LBB0_11:
	mov	w1, #0
LBB0_12:
	str	w1, [x21, #4]
LBB0_13:
	bl	_Display_CursorType
	str	xzr, [x21, #32]
Lloh13:
	adrp	x8, _CURSOR_ARROW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CURSOR_ARROW@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.14:
	add	x8, x21, #24
	b	LBB0_17
LBB0_15:
Lloh16:
	adrp	x8, _CURSOR_SIZER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CURSOR_SIZER@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.16:
	add	x8, x21, #16
LBB0_17:
	ldr	x8, [x8]
	str	x8, [x21, #32]
LBB0_18:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_20
; %bb.19:
	mov	x1, x20
	mov	x2, x19
	b	LBB0_21
LBB0_20:
	ldp	w1, w2, [x21]
LBB0_21:
	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
	b	_Display_MouseMove
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,16,3                        ; @cg
	.comm	_PM_NORMAL,8,3                  ; @PM_NORMAL
	.comm	_PM_SPECTATOR,8,3               ; @PM_SPECTATOR
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_cgs,40,3                       ; @cgs
	.comm	_CURSOR_ARROW,4,2               ; @CURSOR_ARROW
	.comm	_CURSOR_SIZER,4,2               ; @CURSOR_SIZER
.subsections_via_symbols
