	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_function_pasid
_set_function_pasid:                    ## @set_function_pasid
	.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
	movl	8(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %rdi
	xorl	%eax, %eax
	cmpl	$0, 12(%rbx)
	js	LBB0_5
## %bb.1:
	leaq	-12(%rbp), %rsi
	callq	_ocxl_config_get_pasid_info
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movb	12(%rbx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movl	-12(%rbp), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_4
## %bb.3:
	addq	$8, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movq	$0, (%rbx)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Function requires more PASIDs than is available (%d vs. %d)\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_set_function_pasid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_function_pasid
_set_function_pasid:                    ; @set_function_pasid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	mov	x19, x0
	ldr	w0, [x19, #8]!
	bl	_to_pci_dev
	ldr	w8, [x19, #4]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	add	x1, sp, #12
	bl	_ocxl_config_get_pasid_info
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x20, #12]
	mov	w9, #1
	lsl	w2, w9, w8
	ldr	w3, [sp, #12]
	cmp	w2, w3
	b.le	LBB0_5
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #0
	str	xzr, [x20]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Function requires more PASIDs than is available (%d vs. %d)\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_set_function_pasid
.subsections_via_symbols
