	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_attach_afu_directed_psl8   ## -- Begin function cxl_attach_afu_directed_psl8
	.p2align	4, 0x90
_cxl_attach_afu_directed_psl8:          ## @cxl_attach_afu_directed_psl8
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_cxl_assign_psn_space
	movq	8(%rbx), %rax
	movq	$0, 104(%rax)
	movq	_SPRN_LPID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mfspr
	movq	%rax, %rdi
	callq	_cpu_to_be32
	movq	8(%rbx), %rcx
	movq	%rax, 96(%rcx)
	movq	$0, 88(%rcx)
	movq	_SPRN_SDR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mfspr
	movq	%rax, %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, 80(%rcx)
	cmpq	$0, 48(%rbx)
	jne	LBB0_1
## %bb.2:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	movq	$0, 64(%rcx)
	callq	_cpu_to_be32
	movq	8(%rbx), %rcx
	movq	%rax, 56(%rcx)
	movq	%rbx, %rdi
	callq	_calculate_sr
	movq	%rax, %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, 72(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rcx)
	movq	$0, 48(%rcx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_cxl_prefault
	movq	40(%rbx), %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, 24(%rcx)
	movq	32(%rbx), %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, 16(%rcx)
	movq	16(%rbx), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	(%rbx), %rcx
	movq	24(%rbx), %rdx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movl	$1, (%rax)
LBB0_5:
	movq	%rbx, %rdi
	callq	_update_ivtes_directed
	movq	%r15, %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r14, %rdi
	callq	_cpu_to_be64
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_cxl_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_process_element            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPRN_LPID,4,2                  ## @SPRN_LPID
	.comm	_SPRN_SDR1,4,2                  ## @SPRN_SDR1
	.comm	_current,8,3                    ## @current
	.comm	_cxl_ops,8,3                    ## @cxl_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_attach_afu_directed_psl8   ; -- Begin function cxl_attach_afu_directed_psl8
	.p2align	2
_cxl_attach_afu_directed_psl8:          ; @cxl_attach_afu_directed_psl8
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_cxl_assign_psn_space
	ldr	x8, [x19, #8]
	str	xzr, [x8, #104]
Lloh0:
	adrp	x8, _SPRN_LPID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPRN_LPID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_mfspr
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	stp	xzr, x0, [x8, #88]
Lloh3:
	adrp	x8, _SPRN_SDR1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPRN_SDR1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_mfspr
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8, #80]
Lloh6:
	adrp	x9, _current@GOTPAGE
Lloh7:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x10, [x19, #48]
	cmp	x10, #0
	csel	x0, x9, xzr, eq
	str	xzr, [x8, #64]
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	str	x0, [x8, #56]
	mov	x0, x19
	bl	_calculate_sr
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8, #72]
	stp	xzr, xzr, [x8, #40]
	str	xzr, [x8, #32]
	mov	x0, x19
	mov	x1, x20
	bl	_cxl_prefault
	ldr	x0, [x19, #40]
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8, #24]
	ldr	x0, [x19, #32]
	bl	_cpu_to_be64
	ldp	x9, x8, [x19, #8]
	str	x0, [x9, #16]
	ldr	w9, [x8]
	cbnz	w9, LBB0_2
; %bb.1:
	ldr	x9, [x19]
	ldr	x9, [x9]
	ldr	w9, [x9]
	ldr	x10, [x19, #24]
	str	w9, [x10]
	mov	w9, #1
	str	w9, [x8]
LBB0_2:
	mov	x0, x19
	bl	_update_ivtes_directed
	mov	x0, x21
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_cpu_to_be64
	ldp	x8, x9, [x19]
	str	x0, [x9]
Lloh9:
	adrp	x9, _cxl_ops@GOTPAGE
Lloh10:
	ldr	x9, [x9, _cxl_ops@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x9, [x9]
	mov	x0, x8
	blr	x9
	cbz	w0, LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_add_process_element
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SPRN_LPID,4,2                  ; @SPRN_LPID
	.comm	_SPRN_SDR1,4,2                  ; @SPRN_SDR1
	.comm	_current,8,3                    ; @current
	.comm	_cxl_ops,8,3                    ; @cxl_ops
.subsections_via_symbols
