	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxl_vsec_looks_ok
_cxl_vsec_looks_ok:                     ## @cxl_vsec_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_CXL_STATUS_SECOND_PORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_3:
	movq	%rsi, %r14
	movq	_CXL_UNSUPPORTED_FEATURES@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rsi
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rdi, %r15
	callq	_cxl_compatible_caia_version
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	cmpl	$0, 24(%r15)
	je	LBB0_9
## %bb.10:
	movq	16(%r15), %rax
	cmpl	$0, 12(%rax)
	je	LBB0_12
## %bb.11:
	cmpl	$0, 8(%rax)
	je	LBB0_12
## %bb.13:
	movq	8(%r15), %r12
	movq	%r14, %rdi
	callq	_p2_size
	movq	16(%r15), %rcx
	subq	(%rcx), %rax
	xorl	%ebx, %ebx
	cmpq	%rax, %r12
	jle	LBB0_17
## %bb.14:
	movq	8(%r15), %r12
	movq	%r14, %rdi
	callq	_p2_size
	movq	16(%r15), %rcx
	subq	(%rcx), %rax
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r12, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_7:
	movl	28(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_CXL_STATUS_SECOND_PORT,4,2     ## @CXL_STATUS_SECOND_PORT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CXL_UNSUPPORTED_FEATURES,4,2   ## @CXL_UNSUPPORTED_FEATURES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ABORTING: CXL requires unsupported features\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Ignoring card. PSL type is not supported (caia version: %d)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"ABORTING: Device has no AFUs\n"

L_.str.3:                               ## @.str.3
	.asciz	"ABORTING: VSEC shows no AFU descriptors\n"

L_.str.4:                               ## @.str.4
	.asciz	"ABORTING: Problem state size larger than available in BAR2: 0x%llx > 0x%llx\n"

	.no_dead_strip	_cxl_vsec_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_vsec_looks_ok
_cxl_vsec_looks_ok:                     ; @cxl_vsec_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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _CXL_STATUS_SECOND_PORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CXL_STATUS_SECOND_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x19, x1
Lloh5:
	adrp	x9, _CXL_UNSUPPORTED_FEATURES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CXL_UNSUPPORTED_FEATURES@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x20, x0
	bl	_cxl_compatible_caia_version
	cbz	w0, LBB0_13
; %bb.8:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_14
; %bb.9:
	ldr	x8, [x20, #16]
	ldr	w9, [x8, #12]
	cbz	w9, LBB0_15
; %bb.10:
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_15
; %bb.11:
	ldr	x21, [x20, #8]
	mov	x0, x19
	bl	_p2_size
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	sub	x8, x0, x8
	cmp	x21, x8
	b.le	LBB0_16
; %bb.12:
	ldr	x21, [x20, #8]
	mov	x0, x19
	bl	_p2_size
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	sub	x8, x0, x8
	stp	x21, x8, [sp]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_4
LBB0_13:
	ldr	w2, [x20, #28]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
LBB0_14:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_15:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_16:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CXL_STATUS_SECOND_PORT,4,2     ; @CXL_STATUS_SECOND_PORT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CXL_UNSUPPORTED_FEATURES,4,2   ; @CXL_UNSUPPORTED_FEATURES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ABORTING: CXL requires unsupported features\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Ignoring card. PSL type is not supported (caia version: %d)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"ABORTING: Device has no AFUs\n"

l_.str.3:                               ; @.str.3
	.asciz	"ABORTING: VSEC shows no AFU descriptors\n"

l_.str.4:                               ; @.str.4
	.asciz	"ABORTING: Problem state size larger than available in BAR2: 0x%llx > 0x%llx\n"

	.no_dead_strip	_cxl_vsec_looks_ok
.subsections_via_symbols
