	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_activate_dedicated_process_psl9 ## -- Begin function cxl_activate_dedicated_process_psl9
	.p2align	4, 0x90
_cxl_activate_dedicated_process_psl9:   ## @cxl_activate_dedicated_process_psl9
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	addq	$16, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$1, (%rbx)
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_3:
	movq	%rbx, %rdi
	callq	_attach_spa
	movq	_CXL_PSL_SCNTL_An@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CXL_PSL_SCNTL_An_PM_Process@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_cxl_p1n_write
	movq	_CXL_PSL_ID_An@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CXL_PSL_ID_An_F@GOTPCREL(%rip), %rax
	movq	_CXL_PSL_ID_An_L@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_cxl_p1n_write
	movq	_CXL_MODE_DEDICATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_cxl_chardev_d_afu_add          ## TAILCALL
LBB0_1:
	movq	_CXL_MODE_DEDICATED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cxl_alloc_spa
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Activating dedicated process mode\n"

	.comm	_CXL_MODE_DEDICATED,4,2         ## @CXL_MODE_DEDICATED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CXL_PSL_SCNTL_An,4,2           ## @CXL_PSL_SCNTL_An
	.comm	_CXL_PSL_SCNTL_An_PM_Process,4,2 ## @CXL_PSL_SCNTL_An_PM_Process
	.comm	_CXL_PSL_ID_An,4,2              ## @CXL_PSL_ID_An
	.comm	_CXL_PSL_ID_An_F,4,2            ## @CXL_PSL_ID_An_F
	.comm	_CXL_PSL_ID_An_L,4,2            ## @CXL_PSL_ID_An_L
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_activate_dedicated_process_psl9 ; -- Begin function cxl_activate_dedicated_process_psl9
	.p2align	2
_cxl_activate_dedicated_process_psl9:   ; @cxl_activate_dedicated_process_psl9
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh2:
	adrp	x20, _CXL_MODE_DEDICATED@GOTPAGE
Lloh3:
	ldr	x20, [x20, _CXL_MODE_DEDICATED@GOTPAGEOFF]
	cbz	x8, LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_attach_spa
Lloh4:
	adrp	x8, _CXL_PSL_SCNTL_An@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CXL_PSL_SCNTL_An@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _CXL_PSL_SCNTL_An_PM_Process@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CXL_PSL_SCNTL_An_PM_Process@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cxl_p1n_write
Lloh10:
	adrp	x8, _CXL_PSL_ID_An@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CXL_PSL_ID_An@GOTPAGEOFF]
Lloh12:
	adrp	x9, _CXL_PSL_ID_An_F@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CXL_PSL_ID_An_F@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	ldr	w8, [x9]
Lloh16:
	adrp	x9, _CXL_PSL_ID_An_L@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CXL_PSL_ID_An_L@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_cxl_p1n_write
	ldr	w8, [x20]
	str	w8, [x19, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cxl_chardev_d_afu_add
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_cxl_alloc_spa
	cbz	x0, LBB0_1
; %bb.3:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Activating dedicated process mode\n"

	.comm	_CXL_MODE_DEDICATED,4,2         ; @CXL_MODE_DEDICATED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CXL_PSL_SCNTL_An,4,2           ; @CXL_PSL_SCNTL_An
	.comm	_CXL_PSL_SCNTL_An_PM_Process,4,2 ; @CXL_PSL_SCNTL_An_PM_Process
	.comm	_CXL_PSL_ID_An,4,2              ; @CXL_PSL_ID_An
	.comm	_CXL_PSL_ID_An_F,4,2            ; @CXL_PSL_ID_An_F
	.comm	_CXL_PSL_ID_An_L,4,2            ; @CXL_PSL_ID_An_L
.subsections_via_symbols
