	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function svm_msr_index
_svm_msr_index:                         ## @svm_msr_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edi killed $edi def $rdi
	movl	$-1, (%rsi)
	leal	3(%rdi), %r8d
	testl	%edi, %edi
	cmovnsl	%edi, %r8d
	movl	%r8d, %eax
	andl	$-4, %eax
	movl	%edi, %ecx
	subl	%eax, %ecx
	addl	%ecx, %ecx
	movl	%ecx, (%rdx)
	movq	_MSR_PENTIUM_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MSR_PENTIUM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edi, %edx
	jg	LBB0_4
## %bb.1:
	cmpl	%edi, %eax
	jl	LBB0_4
## %bb.2:
	sarl	$2, %r8d
	movl	%r8d, (%rsi)
	jmp	LBB0_3
LBB0_4:
	subl	%edx, %eax
	incl	%eax
	movq	_MSR_AMD6TH_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MSR_AMD6TH_END@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	cmpl	%edi, %ecx
	jg	LBB0_7
## %bb.5:
	cmpl	%edi, %r9d
	jl	LBB0_7
## %bb.6:
	addl	%edi, %eax
	subl	%ecx, %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, (%rsi)
	jmp	LBB0_3
LBB0_7:
	movq	_MSR_AMD7TH_START@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	cmpl	%edi, %r8d
	jg	LBB0_10
## %bb.8:
	movq	_MSR_AMD7TH_END@GOTPCREL(%rip), %rdx
	cmpl	%edi, (%rdx)
	jl	LBB0_10
## %bb.9:
	addl	%eax, %edi
	addl	%r9d, %edi
	addl	%r8d, %ecx
	subl	%ecx, %edi
	leal	1(%rdi), %eax
	addl	$4, %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	movl	%edi, (%rsi)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_PENTIUM_START,4,2          ## @MSR_PENTIUM_START
	.comm	_MSR_PENTIUM_END,4,2            ## @MSR_PENTIUM_END
	.comm	_MSR_AMD6TH_START,4,2           ## @MSR_AMD6TH_START
	.comm	_MSR_AMD6TH_END,4,2             ## @MSR_AMD6TH_END
	.comm	_MSR_AMD7TH_START,4,2           ## @MSR_AMD7TH_START
	.comm	_MSR_AMD7TH_END,4,2             ## @MSR_AMD7TH_END
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_svm_msr_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function svm_msr_index
_svm_msr_index:                         ; @svm_msr_index
	.cfi_startproc
; %bb.0:
	mov	w8, #-1
	str	w8, [x1]
	add	w8, w0, #3
	cmp	w0, #0
	csel	w9, w8, w0, lt
	and	w8, w9, #0x7ffffffc
	sub	w8, w0, w8
	lsl	w8, w8, #1
	str	w8, [x2]
Lloh0:
	adrp	x8, _MSR_PENTIUM_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_PENTIUM_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _MSR_PENTIUM_END@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MSR_PENTIUM_END@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w0
	ccmp	w10, w0, #8, le
	b.ge	LBB0_4
; %bb.1:
	sub	w8, w10, w8
	add	w10, w8, #1
Lloh6:
	adrp	x8, _MSR_AMD6TH_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSR_AMD6TH_START@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
Lloh9:
	adrp	x8, _MSR_AMD6TH_END@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSR_AMD6TH_END@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x8]
	cmp	w9, w0
	ccmp	w11, w0, #8, le
	b.ge	LBB0_5
; %bb.2:
Lloh12:
	adrp	x8, _MSR_AMD7TH_START@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSR_AMD7TH_START@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x8]
Lloh15:
	adrp	x8, _MSR_AMD7TH_END@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSR_AMD7TH_END@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w12, w0
	ccmp	w8, w0, #8, le
	b.ge	LBB0_6
; %bb.3:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ret
LBB0_4:
	mov	w8, #0
	b	LBB0_7
LBB0_5:
	mov	w8, #0
	add	w10, w10, w0
	sub	w9, w10, w9
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	b	LBB0_7
LBB0_6:
	mov	w8, #0
	add	w10, w0, w10
	add	w10, w10, w11
	add	w9, w9, w12
	sub	w9, w10, w9
	add	w10, w9, #1
	add	w11, w9, #4
	cmp	w10, #0
	csinc	w9, w11, w9, lt
LBB0_7:
	asr	w9, w9, #2
	str	w9, [x1]
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_PENTIUM_START,4,2          ; @MSR_PENTIUM_START
	.comm	_MSR_PENTIUM_END,4,2            ; @MSR_PENTIUM_END
	.comm	_MSR_AMD6TH_START,4,2           ; @MSR_AMD6TH_START
	.comm	_MSR_AMD6TH_END,4,2             ; @MSR_AMD6TH_END
	.comm	_MSR_AMD7TH_START,4,2           ; @MSR_AMD7TH_START
	.comm	_MSR_AMD7TH_END,4,2             ; @MSR_AMD7TH_END
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_svm_msr_index
.subsections_via_symbols
