	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nmi_evntsel_msr_to_bit
_nmi_evntsel_msr_to_bit:                ## @nmi_evntsel_msr_to_bit
	.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	%edi, %ebx
	movq	_boot_cpu_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.2:
	movq	_MSR_F15H_PERF_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, %eax
	jbe	LBB0_3
## %bb.4:
	movq	_MSR_K7_EVNTSEL0@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	_X86_FEATURE_ARCH_PERFMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_boot_cpu_data@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_cpu_has
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_MSR_ARCH_PERFMON_EVENTSEL0@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	subl	%eax, %ebx
	shrl	%ebx
LBB0_12:
	movl	%ebx, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	4(%r15), %eax
	cmpl	$15, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$6, %eax
	jne	LBB0_13
## %bb.9:
	movq	_MSR_P6_EVNTSEL0@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_MSR_P4_BSU_ESCR0@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_boot_cpu_data,8,2              ## @boot_cpu_data
	.comm	_MSR_F15H_PERF_CTL,4,2          ## @MSR_F15H_PERF_CTL
	.comm	_MSR_K7_EVNTSEL0,4,2            ## @MSR_K7_EVNTSEL0
	.comm	_X86_FEATURE_ARCH_PERFMON,4,2   ## @X86_FEATURE_ARCH_PERFMON
	.comm	_MSR_ARCH_PERFMON_EVENTSEL0,4,2 ## @MSR_ARCH_PERFMON_EVENTSEL0
	.comm	_MSR_P6_EVNTSEL0,4,2            ## @MSR_P6_EVNTSEL0
	.comm	_MSR_P4_BSU_ESCR0,4,2           ## @MSR_P4_BSU_ESCR0
	.no_dead_strip	_nmi_evntsel_msr_to_bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nmi_evntsel_msr_to_bit
_nmi_evntsel_msr_to_bit:                ; @nmi_evntsel_msr_to_bit
	.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
Lloh0:
	adrp	x8, _boot_cpu_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _boot_cpu_data@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.2:
Lloh3:
	adrp	x8, _MSR_F15H_PERF_CTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSR_F15H_PERF_CTL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ls	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _MSR_K7_EVNTSEL0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSR_K7_EVNTSEL0@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _X86_FEATURE_ARCH_PERFMON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _X86_FEATURE_ARCH_PERFMON@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x20, _boot_cpu_data@GOTPAGE
Lloh12:
	ldr	x20, [x20, _boot_cpu_data@GOTPAGEOFF]
	mov	x0, x20
	bl	_cpu_has
	cbz	w0, LBB0_8
; %bb.5:
Lloh13:
	adrp	x8, _MSR_ARCH_PERFMON_EVENTSEL0@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSR_ARCH_PERFMON_EVENTSEL0@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	sub	w0, w19, w8
	b	LBB0_12
LBB0_7:
	sub	w8, w19, w8
	lsr	w0, w8, #1
	b	LBB0_12
LBB0_8:
	ldr	w8, [x20, #4]
	cmp	w8, #15
	b.eq	LBB0_13
; %bb.9:
	cmp	w8, #6
	b.ne	LBB0_11
; %bb.10:
Lloh15:
	adrp	x8, _MSR_P6_EVNTSEL0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSR_P6_EVNTSEL0@GOTPAGEOFF]
	b	LBB0_6
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh17:
	adrp	x8, _MSR_P4_BSU_ESCR0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSR_P4_BSU_ESCR0@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_boot_cpu_data,8,2              ; @boot_cpu_data
	.comm	_MSR_F15H_PERF_CTL,4,2          ; @MSR_F15H_PERF_CTL
	.comm	_MSR_K7_EVNTSEL0,4,2            ; @MSR_K7_EVNTSEL0
	.comm	_X86_FEATURE_ARCH_PERFMON,4,2   ; @X86_FEATURE_ARCH_PERFMON
	.comm	_MSR_ARCH_PERFMON_EVENTSEL0,4,2 ; @MSR_ARCH_PERFMON_EVENTSEL0
	.comm	_MSR_P6_EVNTSEL0,4,2            ; @MSR_P6_EVNTSEL0
	.comm	_MSR_P4_BSU_ESCR0,4,2           ; @MSR_P4_BSU_ESCR0
	.no_dead_strip	_nmi_evntsel_msr_to_bit
.subsections_via_symbols
