	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atomic_switch_perf_msrs
_atomic_switch_perf_msrs:               ## @atomic_switch_perf_msrs
	.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
	movq	%rdi, %r14
	leaq	-28(%rbp), %rdi
	callq	_perf_guest_get_msrs
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	cmpl	$0, -28(%rbp)
	jle	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	addq	$16, %rbx
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_add_atomic_switch_msr
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	-28(%rbp), %rax
	addq	$24, %rbx
	cmpq	%rax, %r15
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-16(%rbx), %rcx
	movq	-8(%rbx), %rdx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	cmpq	%rdx, %rcx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_clear_atomic_switch_msr
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_atomic_switch_perf_msrs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atomic_switch_perf_msrs
_atomic_switch_perf_msrs:               ; @atomic_switch_perf_msrs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	add	x0, sp, #12
	bl	_perf_guest_get_msrs
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x20, #0
	add	x21, x0, #8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_add_atomic_switch_msr
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [sp, #12]
	add	x21, x21, #24
	cmp	x20, x8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x3, x2, [x21, #-8]
	ldr	w1, [x21, #8]
	mov	x0, x19
	cmp	x3, x2
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_clear_atomic_switch_msr
	b	LBB0_4
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_atomic_switch_perf_msrs
.subsections_via_symbols
