	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bnad_enable_msix
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_2:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_3:
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
LCPI0_4:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
LCPI0_5:
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
LCPI0_6:
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
LCPI0_7:
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
LCPI0_8:
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bnad_enable_msix:                      ## @bnad_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
	movq	%rdi, %r13
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_BNAD_CF_MSIX@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	andl	(%r13), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.1:
	cmpq	$0, 16(%r13)
	je	LBB0_2
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	4(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_20
## %bb.3:
	movl	4(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_15
## %bb.4:
	cmpl	$8, %edx
	jae	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	jmp	LBB0_14
LBB0_6:
	movl	%edx, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$3, %r8d
	cmpq	$24, %rsi
	jae	LBB0_8
## %bb.7:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%esi, %esi
	jmp	LBB0_10
LBB0_8:
	andq	$-4, %rdi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%esi, %esi
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	movdqa	LCPI0_3(%rip), %xmm10           ## xmm10 = [12,12,12,12]
	movdqa	LCPI0_4(%rip), %xmm4            ## xmm4 = [16,16,16,16]
	movdqa	LCPI0_5(%rip), %xmm5            ## xmm5 = [20,20,20,20]
	movdqa	LCPI0_6(%rip), %xmm6            ## xmm6 = [24,24,24,24]
	movdqa	LCPI0_7(%rip), %xmm7            ## xmm7 = [28,28,28,28]
	movdqa	LCPI0_8(%rip), %xmm1            ## xmm1 = [32,32,32,32]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm2
	paddd	%xmm8, %xmm2
	movdqu	%xmm0, (%rax,%rsi,4)
	movdqu	%xmm2, 16(%rax,%rsi,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm9, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm10, %xmm3
	movdqu	%xmm2, 32(%rax,%rsi,4)
	movdqu	%xmm3, 48(%rax,%rsi,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm4, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm5, %xmm3
	movdqu	%xmm2, 64(%rax,%rsi,4)
	movdqu	%xmm3, 80(%rax,%rsi,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm6, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm3
	movdqu	%xmm2, 96(%rax,%rsi,4)
	movdqu	%xmm3, 112(%rax,%rsi,4)
	addq	$32, %rsi
	paddd	%xmm1, %xmm0
	addq	$-4, %rdi
	jne	LBB0_9
LBB0_10:
	testq	%r8, %r8
	je	LBB0_13
## %bb.11:
	leaq	(%rax,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %r8
	xorl	%edi, %edi
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [8,8,8,8]
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm3
	paddd	%xmm1, %xmm3
	movdqu	%xmm0, -16(%rsi,%rdi)
	movdqu	%xmm3, (%rsi,%rdi)
	paddd	%xmm2, %xmm0
	addq	$32, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_12
LBB0_13:
	cmpq	%rdx, %rcx
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rax,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_14
LBB0_15:
	movl	24(%r13), %edi
	movq	%rax, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_pci_enable_msix
	testl	%eax, %eax
	jle	LBB0_19
## %bb.16:
	movl	%eax, %r15d
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_BNAD_MAILBOX_MSIX_VECTORS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%r15d, %ecx
	subl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movq	%r13, %rdi
	movl	%edx, %esi
	callq	_bnad_q_num_adjust
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_BNAD_NUM_TXQ@GOTPCREL(%rip), %rax
	movq	_BNAD_NUM_RXP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	(%rax), %edx
	addl	(%rbx), %edx
	movl	%edx, 4(%r13)
	cmpl	%r15d, %edx
	jg	LBB0_20
## %bb.17:
	movl	24(%r13), %edi
	movq	16(%r13), %rsi
	callq	_pci_enable_msix
	testl	%eax, %eax
	je	LBB0_18
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	16(%r13), %rdi
	callq	_kfree
	movq	$0, 16(%r13)
	movl	$0, 4(%r13)
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_bnad_q_num_init
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_19:
	js	LBB0_20
LBB0_18:
	movl	24(%r13), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_intx                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BNAD_CF_MSIX,4,2               ## @BNAD_CF_MSIX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BNA: %d MSI-X vectors allocated < %d requested\n"

	.comm	_BNAD_MAILBOX_MSIX_VECTORS,4,2  ## @BNAD_MAILBOX_MSIX_VECTORS
	.comm	_BNAD_NUM_TXQ,4,2               ## @BNAD_NUM_TXQ
	.comm	_BNAD_NUM_RXP,4,2               ## @BNAD_NUM_RXP
L_.str.1:                               ## @.str.1
	.asciz	"BNA: MSI-X enable failed - operating in INTx mode\n"

	.no_dead_strip	_bnad_enable_msix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function bnad_enable_msix
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bnad_enable_msix:                      ; @bnad_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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x22, _BNAD_CF_MSIX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BNAD_CF_MSIX@GOTPAGEOFF]
	ldr	w9, [x22]
	and	w21, w9, w8
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	w21, LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
LBB0_2:
	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_3:
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_14
; %bb.4:
	mov	x1, x0
	ldr	w2, [x20, #4]
	cmp	w2, #1
	b.lt	LBB0_11
; %bb.5:
	cmp	w2, #16
	b.hs	LBB0_7
; %bb.6:
	mov	x8, #0
	b	LBB0_10
LBB0_7:
	and	x8, x2, #0xfffffff0
Lloh5:
	adrp	x9, lCPI0_0@PAGE
Lloh6:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	add	x9, x1, #32
	movi.4s	v1, #4
	movi.4s	v2, #8
	movi.4s	v3, #12
	movi.4s	v4, #16
	mov	x10, x8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v5, v0, v1
	add.4s	v6, v0, v2
	add.4s	v7, v0, v3
	stp	q0, q5, [x9, #-32]
	stp	q6, q7, [x9], #64
	add.4s	v0, v0, v4
	subs	x10, x10, #16
	b.ne	LBB0_8
; %bb.9:
	cmp	x8, x2
	b.eq	LBB0_11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	str	w8, [x1, x8, lsl #2]
	add	x8, x8, #1
	cmp	x2, x8
	b.ne	LBB0_10
LBB0_11:
	ldr	w0, [x20, #24]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pci_enable_msix
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.12:
	ldr	w8, [x20, #4]
	stp	x21, x8, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh9:
	adrp	x23, _BNAD_MAILBOX_MSIX_VECTORS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BNAD_MAILBOX_MSIX_VECTORS@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w8, w21, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x20
	mov	x2, x1
	bl	_bnad_q_num_adjust
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh11:
	adrp	x8, _BNAD_NUM_TXQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BNAD_NUM_TXQ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _BNAD_NUM_RXP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BNAD_NUM_RXP@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	ldr	w10, [x23]
	add	w8, w9, w8
	add	w2, w8, w10
	str	w2, [x20, #4]
	cmp	w2, w21
	b.gt	LBB0_14
; %bb.13:
	ldr	w0, [x20, #24]
	ldr	x1, [x20, #16]
	bl	_pci_enable_msix
	cbz	w0, LBB0_16
LBB0_14:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	ldr	x0, [x20, #16]
	bl	_kfree
	str	xzr, [x20, #16]
	str	wzr, [x20, #4]
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_bnad_q_num_init
	mov	x0, x19
	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
	b	_spin_unlock_irqrestore
LBB0_15:
	tbnz	w21, #31, LBB0_14
LBB0_16:
	ldr	w0, [x20, #24]
	mov	w1, #0
	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
	b	_pci_intx
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BNAD_CF_MSIX,4,2               ; @BNAD_CF_MSIX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BNA: %d MSI-X vectors allocated < %d requested\n"

	.comm	_BNAD_MAILBOX_MSIX_VECTORS,4,2  ; @BNAD_MAILBOX_MSIX_VECTORS
	.comm	_BNAD_NUM_TXQ,4,2               ; @BNAD_NUM_TXQ
	.comm	_BNAD_NUM_RXP,4,2               ; @BNAD_NUM_RXP
l_.str.1:                               ; @.str.1
	.asciz	"BNA: MSI-X enable failed - operating in INTx mode\n"

	.no_dead_strip	_bnad_enable_msix
.subsections_via_symbols
