	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x86_mrsetvariable
_x86_mrsetvariable:                     ## @x86_mrsetvariable
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_MR686_FIXMTRR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_MTRR_N64K@GOTPCREL(%rip), %rax
	movq	_MTRR_N16K@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	addl	(%rax), %r12d
	movq	_MTRR_N4K@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	cmpl	4(%r15), %r12d
	jl	LBB0_3
	jmp	LBB0_15
LBB0_2:
	xorl	%r12d, %r12d
	cmpl	4(%r15), %r12d
	jge	LBB0_15
LBB0_3:
	movslq	%r12d, %rbx
	shlq	$5, %rbx
	addq	8(%r15), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	testq	%r13, %r13
	cmoveq	%rbx, %r13
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r12d
	addq	$32, %rbx
	cmpl	4(%r15), %r12d
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movq	_MDF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edx, %edi
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %r8
	cmpq	8(%r14), %r8
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%rbx), %rcx
	cmpq	16(%r14), %rcx
	je	LBB0_18
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mroverlap
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_x86_mtrrconflict
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	testq	%r13, %r13
	je	LBB0_15
## %bb.13:
	movq	8(%r14), %r8
	movq	16(%r14), %rcx
	movq	_MDF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	movq	%r13, %rbx
LBB0_14:
	movq	%r8, 8(%rbx)
	movq	%rcx, 16(%rbx)
	callq	_mrcopyflags
	movl	%eax, (%rbx)
	movl	24(%r14), %edi
	movl	24(%rbx), %esi
	movl	$4, %edx
	callq	_bcopy
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_15:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_MDF_BUSY@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_20
## %bb.19:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_20:
	movl	(%r14), %esi
	movq	_MDF_FORCE@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	jne	LBB0_14
## %bb.21:
	movq	_MDF_ATTRMASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	_MDF_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_14
## %bb.22:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MR686_FIXMTRR,4,2              ## @MR686_FIXMTRR
	.comm	_MTRR_N64K,4,2                  ## @MTRR_N64K
	.comm	_MTRR_N16K,4,2                  ## @MTRR_N16K
	.comm	_MTRR_N4K,4,2                   ## @MTRR_N4K
	.comm	_MDF_ACTIVE,4,2                 ## @MDF_ACTIVE
	.comm	_MDF_BUSY,4,2                   ## @MDF_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MDF_FORCE,4,2                  ## @MDF_FORCE
	.comm	_MDF_ATTRMASK,4,2               ## @MDF_ATTRMASK
	.comm	_MDF_UNKNOWN,4,2                ## @MDF_UNKNOWN
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_x86_mrsetvariable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x86_mrsetvariable
_x86_mrsetvariable:                     ; @x86_mrsetvariable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MR686_FIXMTRR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MR686_FIXMTRR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MTRR_N64K@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTRR_N64K@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MTRR_N16K@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MTRR_N16K@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MTRR_N4K@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MTRR_N4K@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	w8, w9, w8
	add	w23, w8, w10
	b	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	ldr	w8, [x21, #4]
	cmp	w23, w8
	b.ge	LBB0_16
; %bb.4:
	mov	x22, #0
	ldr	x8, [x21, #8]
	sxtw	x9, w23
	add	x20, x8, x9, lsl #5
Lloh12:
	adrp	x24, _MDF_ACTIVE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MDF_ACTIVE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	x22, #0
	csel	x22, x20, x22, eq
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	add	x20, x20, #32
	ldr	w8, [x21, #4]
	cmp	w23, w8
	b.ge	LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x20]
	ldr	w0, [x24]
	tst	w0, w10
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20, #16]
	ldr	x11, [x19, #16]
	cmp	x9, x11
	b.eq	LBB0_19
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_mroverlap
	cbz	x0, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20]
	ldr	w1, [x19]
	bl	_x86_mtrrconflict
	cbz	x0, LBB0_6
; %bb.12:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
	cbz	x22, LBB0_16
; %bb.14:
	ldp	x8, x9, [x19, #8]
	ldr	w0, [x24]
	mov	x20, x22
	ldr	w1, [x19]
LBB0_15:
	stp	x8, x9, [x20, #8]
	bl	_mrcopyflags
	str	w0, [x20]
	ldr	w0, [x19, #24]
	ldr	w1, [x20, #24]
	mov	w2, #4
	bl	_bcopy
	mov	w0, #0
	b	LBB0_18
LBB0_16:
Lloh16:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
LBB0_18:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh18:
	adrp	x11, _MDF_BUSY@GOTPAGE
Lloh19:
	ldr	x11, [x11, _MDF_BUSY@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_21
; %bb.20:
Lloh21:
	adrp	x8, _EBUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_17
LBB0_21:
	ldr	w1, [x19]
Lloh23:
	adrp	x11, _MDF_FORCE@GOTPAGE
Lloh24:
	ldr	x11, [x11, _MDF_FORCE@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	tst	w11, w1
	b.ne	LBB0_15
; %bb.22:
Lloh26:
	adrp	x11, _MDF_ATTRMASK@GOTPAGE
Lloh27:
	ldr	x11, [x11, _MDF_ATTRMASK@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh29:
	adrp	x11, _MDF_UNKNOWN@GOTPAGE
Lloh30:
	ldr	x11, [x11, _MDF_UNKNOWN@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_15
; %bb.23:
Lloh32:
	adrp	x8, _EACCES@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MR686_FIXMTRR,4,2              ; @MR686_FIXMTRR
	.comm	_MTRR_N64K,4,2                  ; @MTRR_N64K
	.comm	_MTRR_N16K,4,2                  ; @MTRR_N16K
	.comm	_MTRR_N4K,4,2                   ; @MTRR_N4K
	.comm	_MDF_ACTIVE,4,2                 ; @MDF_ACTIVE
	.comm	_MDF_BUSY,4,2                   ; @MDF_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MDF_FORCE,4,2                  ; @MDF_FORCE
	.comm	_MDF_ATTRMASK,4,2               ; @MDF_ATTRMASK
	.comm	_MDF_UNKNOWN,4,2                ; @MDF_UNKNOWN
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_x86_mrsetvariable
.subsections_via_symbols
