	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_handle_mm_fault            ## -- Begin function cxl_handle_mm_fault
	.p2align	4, 0x90
_cxl_handle_mm_fault:                   ## @cxl_handle_mm_fault
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	$0, -44(%rbp)
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mm_cpumask
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_cpumask_test_cpu
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mm_cpumask
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_cpumask_set_cpu
	xorl	%eax, %eax
	callq	_smp_mb
LBB0_3:
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_copro_handle_mm_fault
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_devel
	jmp	LBB0_16
LBB0_5:
	xorl	%eax, %eax
	callq	_radix_enabled
	testl	%eax, %eax
	jne	LBB0_16
## %bb.6:
	movq	__PAGE_PRESENT@GOTPCREL(%rip), %rax
	movq	__PAGE_READ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	orq	(%rax), %r13
	movq	_CXL_PSL_DSISR_An_S@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.8:
	movq	__PAGE_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	orq	%rax, %r13
	testq	%r12, %r12
	jne	LBB0_12
## %bb.10:
	movl	%r14d, %edi
	callq	_get_region_id
	movq	_USER_REGION_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	__PAGE_PRIVILEGED@GOTPCREL(%rip), %rax
	orq	(%rax), %r13
LBB0_12:
	movq	_DSISR_NOHPTE@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	je	LBB0_13
## %bb.14:
	movq	_HPTE_NOHPTE_UPDATE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_15
LBB0_13:
	xorl	%r15d, %r15d
LBB0_15:
	callq	_local_irq_save
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movl	$768, %ecx                      ## imm = 0x300
	movq	%r15, %r8
	callq	_hash_page_mm
	callq	_local_irq_restore
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copro_handle_mm_fault failed: %#x\n"

	.comm	__PAGE_PRESENT,8,3              ## @_PAGE_PRESENT
	.comm	__PAGE_READ,8,3                 ## @_PAGE_READ
	.comm	_CXL_PSL_DSISR_An_S,4,2         ## @CXL_PSL_DSISR_An_S
	.comm	__PAGE_WRITE,8,3                ## @_PAGE_WRITE
	.comm	_USER_REGION_ID,8,3             ## @USER_REGION_ID
	.comm	__PAGE_PRIVILEGED,8,3           ## @_PAGE_PRIVILEGED
	.comm	_DSISR_NOHPTE,4,2               ## @DSISR_NOHPTE
	.comm	_HPTE_NOHPTE_UPDATE,8,3         ## @HPTE_NOHPTE_UPDATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_handle_mm_fault            ; -- Begin function cxl_handle_mm_fault
	.p2align	2
_cxl_handle_mm_fault:                   ; @cxl_handle_mm_fault
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_smp_processor_id
	mov	x22, x0
	mov	x0, x20
	bl	_mm_cpumask
	mov	x1, x0
	mov	x0, x22
	bl	_cpumask_test_cpu
	cbnz	w0, LBB0_3
; %bb.2:
	bl	_smp_processor_id
	mov	x22, x0
	mov	x0, x20
	bl	_mm_cpumask
	mov	x1, x0
	mov	x0, x22
	bl	_cpumask_set_cpu
	bl	_smp_mb
LBB0_3:
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_copro_handle_mm_fault
	mov	x22, x0
	cbz	w0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_devel
	b	LBB0_10
LBB0_5:
	bl	_radix_enabled
	cbnz	w0, LBB0_10
; %bb.6:
Lloh2:
	adrp	x8, __PAGE_PRESENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PAGE_PRESENT@GOTPAGEOFF]
Lloh4:
	adrp	x9, __PAGE_READ@GOTPAGE
Lloh5:
	ldr	x9, [x9, __PAGE_READ@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	ldr	x9, [x9]
	orr	x8, x9, x8
Lloh8:
	adrp	x9, _CXL_PSL_DSISR_An_S@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CXL_PSL_DSISR_An_S@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, __PAGE_WRITE@GOTPAGE
Lloh12:
	ldr	x10, [x10, __PAGE_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	tst	w9, w21
	csel	x9, xzr, x10, eq
	orr	x23, x8, x9
	cbnz	x20, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_get_region_id
Lloh14:
	adrp	x8, _USER_REGION_ID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _USER_REGION_ID@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, __PAGE_PRIVILEGED@GOTPAGE
Lloh18:
	ldr	x8, [x8, __PAGE_PRIVILEGED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	orr	x23, x8, x23
LBB0_9:
Lloh20:
	adrp	x8, _DSISR_NOHPTE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DSISR_NOHPTE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _HPTE_NOHPTE_UPDATE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _HPTE_NOHPTE_UPDATE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	tst	w8, w21
	csel	x21, xzr, x9, eq
	bl	_local_irq_save
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	mov	w3, #768
	mov	x4, x21
	bl	_hash_page_mm
	bl	_local_irq_restore
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copro_handle_mm_fault failed: %#x\n"

	.comm	__PAGE_PRESENT,8,3              ; @_PAGE_PRESENT
	.comm	__PAGE_READ,8,3                 ; @_PAGE_READ
	.comm	_CXL_PSL_DSISR_An_S,4,2         ; @CXL_PSL_DSISR_An_S
	.comm	__PAGE_WRITE,8,3                ; @_PAGE_WRITE
	.comm	_USER_REGION_ID,8,3             ; @USER_REGION_ID
	.comm	__PAGE_PRIVILEGED,8,3           ; @_PAGE_PRIVILEGED
	.comm	_DSISR_NOHPTE,4,2               ; @DSISR_NOHPTE
	.comm	_HPTE_NOHPTE_UPDATE,8,3         ; @HPTE_NOHPTE_UPDATE
.subsections_via_symbols
