	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_msr_mtrr
_get_msr_mtrr:                          ## @get_msr_mtrr
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_msr_mtrr_valid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_MSR_MTRRdefType@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %eax
	shll	$10, %eax
	cltq
	addq	16(%r15), %rax
	jmp	LBB0_15
LBB0_1:
	movl	$1, %eax
	jmp	LBB0_16
LBB0_4:
	movq	_MSR_MTRRfix64K_00000@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	24(%r15), %rax
	jmp	LBB0_15
LBB0_6:
	movq	_MSR_MTRRfix16K_80000@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rbx, %rax
	je	LBB0_8
## %bb.7:
	movq	_MSR_MTRRfix16K_A0000@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	je	LBB0_8
## %bb.9:
	movq	_MSR_MTRRfix4K_C0000@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rbx, %rax
	jg	LBB0_12
## %bb.10:
	movq	_MSR_MTRRfix4K_F8000@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	jl	LBB0_12
## %bb.11:
	subq	%rax, %rbx
	movq	48(%r15,%rbx,8), %rax
	jmp	LBB0_15
LBB0_8:
	subq	%rax, %rbx
	movq	32(%r15,%rbx,8), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_MSR_IA32_CR_PAT@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_14
## %bb.13:
	movq	32(%r15), %rax
	jmp	LBB0_15
LBB0_14:
	leaq	-512(%rbx), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rbx, %rcx
	addq	$-512, %rcx                     ## imm = 0xFE00
	sarq	%rcx
	leal	(%rcx,%rcx), %edx
	cmpl	%edx, %eax
	movq	8(%r15), %rax
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,8), %rdx
	leaq	4(%rax,%rcx,8), %rax
	cmovneq	%rdx, %rax
	movq	(%rax), %rax
LBB0_15:
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_MTRRdefType,8,3            ## @MSR_MTRRdefType
	.comm	_MSR_MTRRfix64K_00000,8,3       ## @MSR_MTRRfix64K_00000
	.comm	_MSR_MTRRfix16K_80000,8,3       ## @MSR_MTRRfix16K_80000
	.comm	_MSR_MTRRfix16K_A0000,8,3       ## @MSR_MTRRfix16K_A0000
	.comm	_MSR_MTRRfix4K_C0000,8,3        ## @MSR_MTRRfix4K_C0000
	.comm	_MSR_MTRRfix4K_F8000,8,3        ## @MSR_MTRRfix4K_F8000
	.comm	_MSR_IA32_CR_PAT,8,3            ## @MSR_IA32_CR_PAT
	.no_dead_strip	_get_msr_mtrr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_msr_mtrr
_get_msr_mtrr:                          ; @get_msr_mtrr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_msr_mtrr_valid
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MSR_MTRRdefType@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_MTRRdefType@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x20, #16]
	ldr	w9, [x20]
	lsl	w9, w9, #10
	add	x8, x8, w9, sxtw
	b	LBB0_12
LBB0_3:
	mov	w0, #1
	b	LBB0_13
LBB0_4:
	add	x8, x20, #24
Lloh3:
	adrp	x9, _MSR_MTRRfix64K_00000@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MSR_MTRRfix64K_00000@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x21
	b.ne	LBB0_6
LBB0_5:
	ldr	x8, [x8]
	b	LBB0_12
LBB0_6:
Lloh6:
	adrp	x9, _MSR_MTRRfix16K_80000@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MSR_MTRRfix16K_80000@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _MSR_MTRRfix16K_A0000@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MSR_MTRRfix16K_A0000@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x21
	ccmp	x10, x21, #4, ne
	b.ne	LBB0_8
; %bb.7:
	sub	x9, x21, x9
	add	x8, x8, x9, lsl #3
	ldr	x8, [x8, #8]
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x9, _MSR_MTRRfix4K_C0000@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MSR_MTRRfix4K_C0000@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _MSR_MTRRfix4K_F8000@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MSR_MTRRfix4K_F8000@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x21
	ccmp	x10, x21, #8, le
	b.ge	LBB0_11
; %bb.9:
Lloh18:
	adrp	x8, _MSR_IA32_CR_PAT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSR_IA32_CR_PAT@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_14
; %bb.10:
	ldr	x8, [x20, #32]
	b	LBB0_12
LBB0_11:
	sub	x9, x21, x9
	add	x8, x8, x9, lsl #3
	ldr	x8, [x8, #24]
LBB0_12:
	mov	w0, #0
	str	x8, [x19]
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	sub	x8, x21, #512
	sub	x9, x21, #511
	cmp	x8, #0
	csel	x9, x9, x8, lt
	asr	x9, x9, #1
	sub	w8, w8, w9, lsl #1
	ldr	x10, [x20, #8]
	lsl	x9, x9, #32
	add	x9, x10, x9, asr #29
	add	x10, x9, #4
	cmp	w8, #0
	csel	x8, x10, x9, eq
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.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_MTRRdefType,8,3            ; @MSR_MTRRdefType
	.comm	_MSR_MTRRfix64K_00000,8,3       ; @MSR_MTRRfix64K_00000
	.comm	_MSR_MTRRfix16K_80000,8,3       ; @MSR_MTRRfix16K_80000
	.comm	_MSR_MTRRfix16K_A0000,8,3       ; @MSR_MTRRfix16K_A0000
	.comm	_MSR_MTRRfix4K_C0000,8,3        ; @MSR_MTRRfix4K_C0000
	.comm	_MSR_MTRRfix4K_F8000,8,3        ; @MSR_MTRRfix4K_F8000
	.comm	_MSR_IA32_CR_PAT,8,3            ; @MSR_IA32_CR_PAT
	.no_dead_strip	_get_msr_mtrr
.subsections_via_symbols
