	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clear_atomic_switch_msr
_clear_atomic_switch_msr:               ## @clear_atomic_switch_msr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpl	$128, %esi
	jne	LBB0_2
## %bb.1:
	movq	_cpu_has_load_perf_global_ctrl@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.6:
	movq	_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_clear_atomic_switch_msr_special ## TAILCALL
LBB0_2:
	movl	(%rbx), %eax
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	16(%rbx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, (%rdx,%rcx,4)
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_8
	jmp	LBB0_10
LBB0_3:
	xorl	%ecx, %ecx
LBB0_4:
	cmpl	%eax, %ecx
	jne	LBB0_5
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	decl	%eax
	movl	%eax, (%rbx)
	movq	16(%rbx), %rdx
	movl	%ecx, %ecx
	movl	(%rdx,%rax,4), %eax
	movl	%eax, (%rdx,%rcx,4)
	movq	8(%rbx), %rax
	movl	(%rbx), %edx
	movl	(%rax,%rdx,4), %edx
	movl	%edx, (%rax,%rcx,4)
	movq	_VM_ENTRY_MSR_LOAD_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_vmcs_write32
	movq	_VM_EXIT_MSR_LOAD_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_vmcs_write32                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_has_load_perf_global_ctrl,4,2 ## @cpu_has_load_perf_global_ctrl
	.comm	_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL,4,2 ## @VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL
	.comm	_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL,4,2 ## @VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL
	.comm	_VM_ENTRY_MSR_LOAD_COUNT,4,2    ## @VM_ENTRY_MSR_LOAD_COUNT
	.comm	_VM_EXIT_MSR_LOAD_COUNT,4,2     ## @VM_EXIT_MSR_LOAD_COUNT
	.no_dead_strip	_clear_atomic_switch_msr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clear_atomic_switch_msr
_clear_atomic_switch_msr:               ; @clear_atomic_switch_msr
	.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
	mov	x19, x0
	cmp	w1, #128
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _cpu_has_load_perf_global_ctrl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpu_has_load_perf_global_ctrl@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_clear_atomic_switch_msr_special
LBB0_3:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.4:
	mov	x9, #0
	ldr	x10, [x19, #16]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cmp	w11, w1
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_5
	b	LBB0_9
LBB0_7:
	mov	w9, #0
LBB0_8:
	cmp	w9, w8
	b.ne	LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	sub	w8, w8, #1
	str	w8, [x19]
	mov	w9, w9
	ldp	x11, x10, [x19, #8]
	ldr	w8, [x10, w8, uxtw #2]
	lsl	x9, x9, #2
	str	w8, [x10, x9]
	ldr	w8, [x19]
	ldr	w8, [x11, x8, lsl #2]
	str	w8, [x11, x9]
Lloh9:
	adrp	x8, _VM_ENTRY_MSR_LOAD_COUNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VM_ENTRY_MSR_LOAD_COUNT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_vmcs_write32
Lloh12:
	adrp	x8, _VM_EXIT_MSR_LOAD_COUNT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VM_EXIT_MSR_LOAD_COUNT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vmcs_write32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_has_load_perf_global_ctrl,4,2 ; @cpu_has_load_perf_global_ctrl
	.comm	_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL,4,2 ; @VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL
	.comm	_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL,4,2 ; @VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL
	.comm	_VM_ENTRY_MSR_LOAD_COUNT,4,2    ; @VM_ENTRY_MSR_LOAD_COUNT
	.comm	_VM_EXIT_MSR_LOAD_COUNT,4,2     ; @VM_EXIT_MSR_LOAD_COUNT
	.no_dead_strip	_clear_atomic_switch_msr
.subsections_via_symbols
