	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvu_setup_msix_resources
_rvu_setup_msix_resources:              ## @rvu_setup_msix_resources
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	32(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.1:
	xorl	%edi, %edi
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %r15
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	incq	%rdi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %rdi
	jge	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	(%r15), %ebx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_RVU_PRIV_PFX_CFG
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_rvu_read64
	testl	$1048576, %eax                  ## imm = 0x100000
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %esi
	leaq	-68(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	callq	_rvu_get_pf_numvfs
	movq	24(%r13), %rax
	movq	%r15, %rbx
	shlq	$4, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rbx), %r12
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r15d, %edi
	callq	_RVU_PRIV_PFX_MSIX_CFG
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rvu_read64
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_rvu_check_min_msix_vec
	movq	%r12, %rdi
	callq	_rvu_alloc_bitmap
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r13), %edi
	movl	(%r12), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx,%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rbx
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	%r13d, %edi
	callq	_RVU_PRIV_PFX_INT_CFG
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rvu_read64
	movl	%eax, %r12d
	shrl	$12, %eax
	movzbl	%al, %esi
	andl	$-2048, %r12d                   ## imm = 0xF800
	movq	%rbx, %rdi
	callq	_rvu_alloc_rsrc_contig
	movl	%eax, %r14d
	movl	(%r15), %r15d
	movl	%r13d, %edi
	callq	_RVU_PRIV_PFX_INT_CFG
	orl	%r12d, %r14d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_rvu_write64
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -68(%rbp)
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %r15
	jle	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %r12
	movl	-52(%rbp), %eax
	addl	%ebx, %eax
	movq	%r13, %r14
	movq	%r15, %rcx
	movslq	%eax, %r15
	shlq	$4, %r15
	leaq	(%r12,%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_RVU_PRIV_PFX_MSIX_CFG
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_rvu_read64
                                        ## kill: def $eax killed $eax def $rax
	andl	$4095, %eax                     ## imm = 0xFFF
	leal	1(%rax), %esi
	movl	%esi, (%r12,%r15)
	leal	1(%rbx), %ecx
	movq	%r14, %r13
	movq	%r14, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	callq	_rvu_check_min_msix_vec
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rvu_alloc_bitmap
	testl	%eax, %eax
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	8(%r13), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r12,%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	-52(%rbp), %edi
	addl	%ebx, %edi
	callq	_RVU_PRIV_HWVFX_INT_CFG
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rvu_read64
	movl	%eax, %r14d
	shrl	$12, %eax
	movzbl	%al, %esi
	andl	$-2048, %r14d                   ## imm = 0xF800
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rvu_alloc_rsrc_contig
	movl	%eax, %r12d
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	addl	-52(%rbp), %ebx
	movl	%ebx, %edi
	callq	_RVU_PRIV_HWVFX_INT_CFG
	orl	%r14d, %r12d
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%r12d, %ecx
	callq	_rvu_write64
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	cmpl	-68(%rbp), %eax
	jl	LBB0_10
	jmp	LBB0_2
LBB0_13:
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_RVU_PRIV_CONST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_rvu_read64
	movl	%eax, %ebx
	andl	$1048575, %ebx                  ## imm = 0xFFFFF
	movl	(%r15), %esi
	movq	_RVU_AF_MSIXTR_BASE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_rvu_read64
	movl	8(%r13), %edi
	movq	_PCI_MSIX_ENTRY_SIZE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %ebx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	movl	%eax, %esi
	movl	%ebx, %edx
	xorl	%r8d, %r8d
	callq	_dma_map_resource
	movq	%rax, %rbx
	movl	8(%r13), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_18:
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_17:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%r13, %rdi
	movl	%ebx, %ecx
	callq	_rvu_write64
	movq	%rbx, (%r13)
LBB0_19:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKADDR_RVUM,4,2               ## @BLKADDR_RVUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RVU_PRIV_CONST,4,2             ## @RVU_PRIV_CONST
	.comm	_RVU_AF_MSIXTR_BASE,4,2         ## @RVU_AF_MSIXTR_BASE
	.comm	_PCI_MSIX_ENTRY_SIZE,4,2        ## @PCI_MSIX_ENTRY_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_rvu_setup_msix_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvu_setup_msix_resources
_rvu_setup_msix_resources:              ; @rvu_setup_msix_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x25, [x0, #32]
	ldr	w8, [x25]
Lloh0:
	adrp	x24, _BLKADDR_RVUM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BLKADDR_RVUM@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x20, #0
Lloh2:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x25]
	cmp	x20, x8
	b.ge	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w21, [x24]
	mov	x0, x20
	bl	_RVU_PRIV_PFX_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_rvu_read64
	tbz	w0, #20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_get_pf_numvfs
	ldr	x8, [x19, #24]
	add	x21, x8, x20, lsl #4
	ldr	w22, [x24]
	mov	x0, x20
	bl	_RVU_PRIV_PFX_MSIX_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_rvu_read64
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_rvu_check_min_msix_vec
	mov	x0, x21
	bl	_rvu_alloc_bitmap
	cbnz	w0, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #8]
	ldr	w1, [x21]
	ldr	w3, [x26]
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x21, #8]
	cbz	x0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x20, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w22, [x24]
	mov	x0, x20
	bl	_RVU_PRIV_PFX_INT_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_rvu_read64
	ubfx	w1, w0, #12, #8
	and	w23, w0, #0xfffff800
	mov	x0, x21
	bl	_rvu_alloc_rsrc_contig
	mov	x21, x0
	ldr	w22, [x24]
	mov	x0, x20
	bl	_RVU_PRIV_PFX_INT_CFG
	mov	x2, x0
	orr	w3, w23, w21
	mov	x0, x19
	mov	x1, x22
	bl	_rvu_write64
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #0
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x23, [x19, #16]
	ldr	w8, [sp, #8]
	add	w28, w27, w8
	add	x22, x23, w28, sxtw #4
	ldr	w21, [x24]
	mov	x0, x20
	bl	_RVU_PRIV_PFX_MSIX_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_rvu_read64
	and	w8, w0, #0xfff
	add	w1, w8, #1
	str	w1, [x22]
	add	w21, w27, #1
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_rvu_check_min_msix_vec
	mov	x0, x22
	bl	_rvu_alloc_bitmap
	cbnz	w0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	sxtw	x28, w28
	ldr	w0, [x19, #8]
	ldr	w1, [x22]
	ldr	w3, [x26]
	mov	w2, #4
	bl	_devm_kcalloc
	add	x8, x23, x28, lsl #4
	str	x0, [x8, #8]
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w23, [x24]
	ldr	w8, [sp, #8]
	add	w0, w27, w8
	bl	_RVU_PRIV_HWVFX_INT_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_rvu_read64
	ubfx	w1, w0, #12, #8
	and	w28, w0, #0xfffff800
	mov	x0, x22
	bl	_rvu_alloc_rsrc_contig
	mov	x22, x0
	ldr	w23, [x24]
	ldr	w8, [sp, #8]
	add	w0, w27, w8
	bl	_RVU_PRIV_HWVFX_INT_CFG
	mov	x2, x0
	orr	w3, w28, w22
	mov	x0, x19
	mov	x1, x23
	bl	_rvu_write64
	ldr	w8, [sp, #12]
	mov	x27, x21
	cmp	w21, w8
	b.lt	LBB0_10
	b	LBB0_2
LBB0_13:
	ldr	w1, [x24]
Lloh4:
	adrp	x8, _RVU_PRIV_CONST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RVU_PRIV_CONST@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rvu_read64
	and	w20, w0, #0xfffff
	ldr	w1, [x24]
Lloh7:
	adrp	x21, _RVU_AF_MSIXTR_BASE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _RVU_AF_MSIXTR_BASE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_rvu_read64
	mov	x1, x0
Lloh9:
	adrp	x8, _PCI_MSIX_ENTRY_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_MSIX_ENTRY_SIZE@GOTPAGEOFF]
	ldr	w0, [x19, #8]
Lloh11:
	ldr	w8, [x8]
	mul	w2, w8, w20
Lloh12:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	w4, #0
	bl	_dma_map_resource
	mov	x20, x0
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_dma_mapping_error
	cbz	x0, LBB0_15
LBB0_14:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	ldr	w1, [x24]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x3, x20
	bl	_rvu_write64
	mov	w0, #0
	str	x20, [x19]
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKADDR_RVUM,4,2               ; @BLKADDR_RVUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RVU_PRIV_CONST,4,2             ; @RVU_PRIV_CONST
	.comm	_RVU_AF_MSIXTR_BASE,4,2         ; @RVU_AF_MSIXTR_BASE
	.comm	_PCI_MSIX_ENTRY_SIZE,4,2        ; @PCI_MSIX_ENTRY_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_rvu_setup_msix_resources
.subsections_via_symbols
