	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxl_afu_descriptor_looks_ok
_cxl_afu_descriptor_looks_ok:           ## @cxl_afu_descriptor_looks_ok
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpq	$0, 48(%rdi)
	je	LBB0_3
## %bb.1:
	movq	32(%r15), %rax
	movq	40(%r15), %rcx
	movslq	(%r15), %rdx
	movslq	4(%r15), %rsi
	imulq	%rdx, %rsi
	addq	(%rax), %rsi
	cmpq	%rsi, (%rcx)
	jge	LBB0_3
## %bb.2:
	addq	$16, %r15
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_3:
	cmpq	$0, 24(%r15)
	je	LBB0_6
## %bb.4:
	movl	(%r15), %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_6
## %bb.5:
	leaq	16(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
LBB0_6:
	cmpl	$0, 8(%r15)
	jle	LBB0_12
## %bb.7:
	xorl	%ebx, %ebx
	movq	_cxl_ops@GOTPCREL(%rip), %r12
	leaq	-40(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, -40(%rbp)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	8(%r15), %ebx
	jl	LBB0_8
LBB0_12:
	movq	_CXL_MODE_DEDICATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	xorl	%r14d, %r14d
	testl	%eax, 12(%r15)
	je	LBB0_17
## %bb.13:
	cmpl	$0, 4(%r15)
	jne	LBB0_17
## %bb.14:
	addq	$16, %r15
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_10:
	addq	$16, %r15
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	subl	(%rax), %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"per-process PSA can't fit inside the PSA!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"AFU uses pp_size(%#016llx) < PAGE_SIZE per-process PSA!\n"

	.comm	_cxl_ops,8,3                    ## @cxl_ops
L_.str.2:                               ## @.str.2
	.asciz	"ABORTING: AFU configuration record %i is invalid\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXL_MODE_DEDICATED,4,2         ## @CXL_MODE_DEDICATED
L_.str.3:                               ## @.str.3
	.asciz	"AFU does not support any processes\n"

	.no_dead_strip	_cxl_afu_descriptor_looks_ok
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxl_afu_descriptor_looks_ok
_cxl_afu_descriptor_looks_ok:           ; @cxl_afu_descriptor_looks_ok
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_3
; %bb.1:
	ldp	x9, x8, [x19, #32]
	ldr	x8, [x8]
	ldr	x9, [x9]
	ldpsw	x10, x11, [x19]
	madd	x9, x11, x10, x9
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	add	x0, x19, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_16
LBB0_3:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w2, [x19]
Lloh4:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ge	LBB0_6
; %bb.5:
	add	x0, x19, #16
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_6:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	w20, #0
Lloh9:
	adrp	x21, _cxl_ops@GOTPAGE
Lloh10:
	ldr	x21, [x21, _cxl_ops@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	blr	x8
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19, #8]
	cmp	w20, w8
	b.lt	LBB0_8
LBB0_10:
	ldr	w8, [x19, #12]
Lloh11:
	adrp	x9, _CXL_MODE_DEDICATED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CXL_MODE_DEDICATED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_14
LBB0_12:
	mov	w0, #0
	b	LBB0_17
LBB0_13:
	add	x0, x19, #16
	str	x20, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	add	x0, x19, #16
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_15:
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"per-process PSA can't fit inside the PSA!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"AFU uses pp_size(%#016llx) < PAGE_SIZE per-process PSA!\n"

	.comm	_cxl_ops,8,3                    ; @cxl_ops
l_.str.2:                               ; @.str.2
	.asciz	"ABORTING: AFU configuration record %i is invalid\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXL_MODE_DEDICATED,4,2         ; @CXL_MODE_DEDICATED
l_.str.3:                               ; @.str.3
	.asciz	"AFU does not support any processes\n"

	.no_dead_strip	_cxl_afu_descriptor_looks_ok
.subsections_via_symbols
