	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_enable_msix
_ena_enable_msix:                       ## @ena_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_ENA_FLAG_MSIX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r13), %edx
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_netif_err
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movl	%ebx, %edi
	callq	_ENA_MAX_MSIX_VEC
	movl	%eax, %r12d
	movq	_probe@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	8(%r13), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r13, %rdi
	movl	%eax, %r8d
	callq	_netif_dbg
	movl	24(%r13), %edi
	movq	_ENA_MIN_MSIX_VEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edx
	callq	_pci_alloc_irq_vectors
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	cmpl	%r12d, %r15d
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %esi
	movl	8(%r13), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r13, %rdi
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	callq	_netif_notice
	movl	%r15d, %eax
	movq	_ENA_ADMIN_MSIX_VEC@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, 16(%r13)
LBB0_5:
	movq	%r13, %rdi
	callq	_ena_init_rx_cpu_rmap
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %esi
	movl	8(%r13), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r13, %rdi
	callq	_netif_warn
LBB0_7:
	movl	%r15d, (%r13)
	movq	_ENA_FLAG_MSIX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%rbx), %esi
	movl	8(%r13), %edx
	leaq	L_.str.2(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_netif_err
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_FLAG_MSIX_ENABLED,4,2      ## @ENA_FLAG_MSIX_ENABLED
	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error, MSI-X is already enabled\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"trying to enable MSI-X, vectors %d\n"

	.comm	_ENA_MIN_MSIX_VEC,4,2           ## @ENA_MIN_MSIX_VEC
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable MSI-X. irq_cnt %d\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.3:                               ## @.str.3
	.asciz	"enable only %d MSI-X (out of %d), reduce the number of queues\n"

	.comm	_ENA_ADMIN_MSIX_VEC,8,3         ## @ENA_ADMIN_MSIX_VEC
L_.str.4:                               ## @.str.4
	.asciz	"Failed to map IRQs to CPUs\n"

	.no_dead_strip	_ena_enable_msix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_enable_msix
_ena_enable_msix:                       ; @ena_enable_msix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _ENA_FLAG_MSIX_ENABLED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ENA_FLAG_MSIX_ENABLED@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x20, x19, #4
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _probe@GOTPAGE
Lloh3:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh7:
	adrp	x8, _EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	mov	x0, x21
	bl	_ENA_MAX_MSIX_VEC
	mov	x22, x0
Lloh9:
	adrp	x24, _probe@GOTPAGE
Lloh10:
	ldr	x24, [x24, _probe@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [x19, #8]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x22
	bl	_netif_dbg
	ldr	w0, [x19, #24]
Lloh13:
	adrp	x8, _ENA_MIN_MSIX_VEC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENA_MIN_MSIX_VEC@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x2, x22
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.4:
	cmp	w21, w22
	b.eq	LBB0_6
; %bb.5:
	ldr	w1, [x24]
	ldr	w2, [x19, #8]
Lloh19:
	adrp	x3, l_.str.3@PAGE
Lloh20:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x4, x21
	mov	x5, x22
	bl	_netif_notice
	mov	w8, w21
Lloh21:
	adrp	x9, _ENA_ADMIN_MSIX_VEC@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ENA_ADMIN_MSIX_VEC@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x19, #16]
LBB0_6:
	mov	x0, x19
	bl	_ena_init_rx_cpu_rmap
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w1, [x24]
	ldr	w2, [x19, #8]
Lloh24:
	adrp	x3, l_.str.4@PAGE
Lloh25:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netif_warn
LBB0_8:
	str	w21, [x19]
	ldr	w0, [x23]
	mov	x1, x20
	bl	_set_bit
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w1, [x24]
	ldr	w2, [x19, #8]
	str	x21, [sp]
Lloh26:
	adrp	x3, l_.str.2@PAGE
Lloh27:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh28:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_FLAG_MSIX_ENABLED,4,2      ; @ENA_FLAG_MSIX_ENABLED
	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error, MSI-X is already enabled\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"trying to enable MSI-X, vectors %d\n"

	.comm	_ENA_MIN_MSIX_VEC,4,2           ; @ENA_MIN_MSIX_VEC
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable MSI-X. irq_cnt %d\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.3:                               ; @.str.3
	.asciz	"enable only %d MSI-X (out of %d), reduce the number of queues\n"

	.comm	_ENA_ADMIN_MSIX_VEC,8,3         ; @ENA_ADMIN_MSIX_VEC
l_.str.4:                               ; @.str.4
	.asciz	"Failed to map IRQs to CPUs\n"

	.no_dead_strip	_ena_enable_msix
.subsections_via_symbols
