	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_memory_wc                  ## -- Begin function set_memory_wc
	.p2align	4, 0x90
_set_memory_wc:                         ## @set_memory_wc
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_pat_enabled@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	___pa
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	___pa
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movslq	(%r12), %rsi
	movslq	%r14d, %r13
	imulq	%r13, %rsi
	addq	%rax, %rsi
	movq	__PAGE_CACHE_WC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_reserve_memtype
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	__set_memory_wc
	movl	%eax, %r14d
	movl	$0, %eax
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	___pa
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	___pa
	movslq	(%r12), %rsi
	imulq	%r13, %rsi
	addq	%rax, %rsi
	movq	%r15, %rdi
	callq	_free_memtype
	movl	%r14d, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_memory_uc                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pat_enabled,4,2                ## @pat_enabled
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	__PAGE_CACHE_WC,4,2             ## @_PAGE_CACHE_WC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_memory_wc                  ; -- Begin function set_memory_wc
	.p2align	2
_set_memory_wc:                         ; @set_memory_wc
	.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	x20, x0
Lloh0:
	adrp	x8, _pat_enabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pat_enabled@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	___pa
	mov	x21, x0
	mov	x0, x20
	bl	___pa
Lloh3:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x23]
	sxtw	x9, w19
	madd	x1, x8, x9, x0
Lloh5:
	adrp	x8, __PAGE_CACHE_WC@GOTPAGE
Lloh6:
	ldr	x8, [x8, __PAGE_CACHE_WC@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, #0
	bl	_reserve_memtype
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	__set_memory_wc
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	___pa
	mov	x22, x0
	mov	x0, x20
	bl	___pa
	ldrsw	x8, [x23]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x9, w19
	madd	x1, x8, x9, x0
	mov	x0, x22
	bl	_free_memtype
LBB0_4:
	mov	x0, x21
	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_5:
	mov	x0, x20
	mov	x1, x19
	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
	b	_set_memory_uc
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_pat_enabled,4,2                ; @pat_enabled
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	__PAGE_CACHE_WC,4,2             ; @_PAGE_CACHE_WC
.subsections_via_symbols
