	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs5535_mfgpt_toggle_event      ## -- Begin function cs5535_mfgpt_toggle_event
	.p2align	4, 0x90
_cs5535_mfgpt_toggle_event:             ## @cs5535_mfgpt_toggle_event
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	addl	$-128, %edx
	cmpl	$3, %edx
	jae	LBB0_3
## %bb.4:
	movl	%ecx, %r14d
	movslq	%edx, %rax
	leaq	l_switch.table.cs5535_mfgpt_toggle_event(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_rdmsr
	xorl	%ebx, %ebx
	negl	%r14d
	movl	$0, %esi
	sbbl	%esi, %esi
	movl	%r15d, %edi
	callq	_wrmsr
	jmp	LBB0_5
LBB0_1:
	movl	$1, %edi
	callq	_WARN_ON
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MFGPT_CMP1,4,2                 ## @MFGPT_CMP1
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MSR_MFGPT_NR,4,2               ## @MSR_MFGPT_NR
	.comm	_MSR_MFGPT_IRQ,4,2              ## @MSR_MFGPT_IRQ
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cs5535_mfgpt_toggle_event
l_switch.table.cs5535_mfgpt_toggle_event:
	.quad	_MSR_MFGPT_NR
	.quad	_MSR_MFGPT_NR
	.quad	_MSR_MFGPT_IRQ

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs5535_mfgpt_toggle_event      ; -- Begin function cs5535_mfgpt_toggle_event
	.p2align	2
_cs5535_mfgpt_toggle_event:             ; @cs5535_mfgpt_toggle_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	sub	w8, w2, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.2:
	mov	x19, x3
Lloh0:
	adrp	x9, l_switch.table.cs5535_mfgpt_toggle_event@PAGE
Lloh1:
	add	x9, x9, l_switch.table.cs5535_mfgpt_toggle_event@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w20, [x8]
	mov	x0, x20
	bl	_rdmsr
	cmp	w19, #0
	csetm	w1, ne
	mov	x0, x20
	bl	_wrmsr
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	w0, #1
	bl	_WARN_ON
LBB0_4:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MFGPT_CMP1,4,2                 ; @MFGPT_CMP1
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MSR_MFGPT_NR,4,2               ; @MSR_MFGPT_NR
	.comm	_MSR_MFGPT_IRQ,4,2              ; @MSR_MFGPT_IRQ
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cs5535_mfgpt_toggle_event
l_switch.table.cs5535_mfgpt_toggle_event:
	.quad	_MSR_MFGPT_NR
	.quad	_MSR_MFGPT_NR
	.quad	_MSR_MFGPT_IRQ

.subsections_via_symbols
