	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_link_update_pe            ## -- Begin function ocxl_link_update_pe
	.p2align	4, 0x90
_ocxl_link_update_pe:                   ## @ocxl_link_update_pe
	.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	_SPA_PASID_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jge	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	%edx, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_SPA_PE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movslq	%esi, %r12
	movq	8(%r14), %r13
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movl	%eax, (%r13,%r12,4)
	xorl	%eax, %eax
	callq	_mb
	movl	(%rbx), %edi
	movl	%r12d, %esi
	callq	_pnv_ocxl_spa_remove_pe_from_cache
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPA_PASID_MAX,4,2              ## @SPA_PASID_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SPA_PE_MASK,4,2                ## @SPA_PE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_link_update_pe            ; -- Begin function ocxl_link_update_pe
	.p2align	2
_ocxl_link_update_pe:                   ; @ocxl_link_update_pe
	.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
Lloh0:
	adrp	x8, _SPA_PASID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPA_PASID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_3
LBB0_2:
	mov	x20, x2
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh6:
	adrp	x8, _SPA_PE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPA_PE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w22, w8, w1
	ldr	x23, [x21, #8]
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	_cpu_to_be32
	str	w0, [x23, w22, sxtw #2]
	bl	_mb
	ldr	w0, [x19]
	mov	x1, x22
	bl	_pnv_ocxl_spa_remove_pe_from_cache
	mov	x19, x0
	bl	_WARN_ON
	mov	x0, x21
	bl	_mutex_unlock
LBB0_3:
	mov	x0, 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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SPA_PASID_MAX,4,2              ; @SPA_PASID_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SPA_PE_MASK,4,2                ; @SPA_PE_MASK
.subsections_via_symbols
