	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efa_enable_msix
_efa_enable_msix:                       ## @efa_enable_msix
	.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	%rdi, %rbx
	movq	_EFA_NUM_MSIX_VEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
	movq	_EFA_MGMNT_MSIX_VEC_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rdi
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	%r14d, %edx
	callq	_pci_alloc_irq_vectors
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	cmpl	%r14d, %eax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFA_NUM_MSIX_VEC,4,2           ## @EFA_NUM_MSIX_VEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to enable MSI-X, vectors %d\n"

	.comm	_EFA_MGMNT_MSIX_VEC_IDX,4,2     ## @EFA_MGMNT_MSIX_VEC_IDX
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable MSI-X. irq_num %d\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.2:                               ## @.str.2
	.asciz	"Allocated %d MSI-X (out of %d requested)\n"

	.no_dead_strip	_efa_enable_msix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efa_enable_msix
_efa_enable_msix:                       ; @efa_enable_msix
	.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
Lloh0:
	adrp	x8, _EFA_NUM_MSIX_VEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFA_NUM_MSIX_VEC@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x0, [x0]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
Lloh5:
	adrp	x8, _EFA_MGMNT_MSIX_VEC_IDX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFA_MGMNT_MSIX_VEC_IDX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldr	x0, [x20]
Lloh8:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x1, x19
	mov	x2, x19
	bl	_pci_alloc_irq_vectors
	mov	x2, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	cmp	w2, w19
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
	ldr	x0, [x20]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	ldr	x0, [x20]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_5:
	bl	_dev_err
Lloh15:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EFA_NUM_MSIX_VEC,4,2           ; @EFA_NUM_MSIX_VEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to enable MSI-X, vectors %d\n"

	.comm	_EFA_MGMNT_MSIX_VEC_IDX,4,2     ; @EFA_MGMNT_MSIX_VEC_IDX
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable MSI-X. irq_num %d\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.2:                               ; @.str.2
	.asciz	"Allocated %d MSI-X (out of %d requested)\n"

	.no_dead_strip	_efa_enable_msix
.subsections_via_symbols
