	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvu_free_hw_resources
_rvu_free_hw_resources:                 ## @rvu_free_hw_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	32(%rdi), %r12
	callq	_rvu_npa_freemem
	movq	%r14, %rdi
	callq	_rvu_npc_freemem
	movq	%r14, %rdi
	callq	_rvu_nix_freemem
	movq	_BLK_COUNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	cmpl	$0, 4(%r12)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	cmpl	$0, 4(%r14)
	je	LBB0_10
## %bb.11:
	movq	_BLKADDR_RVUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RVU_PRIV_CONST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_rvu_read64
	andl	$1048575, %eax                  ## imm = 0xFFFFF
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	movq	_PCI_MSIX_ENTRY_SIZE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_dma_unmap_resource
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_destroy                  ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_COUNT,4,2                  ## @BLK_COUNT
	.comm	_BLKADDR_RVUM,4,2               ## @BLKADDR_RVUM
	.comm	_RVU_PRIV_CONST,4,2             ## @RVU_PRIV_CONST
	.comm	_PCI_MSIX_ENTRY_SIZE,4,2        ## @PCI_MSIX_ENTRY_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_rvu_free_hw_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvu_free_hw_resources
_rvu_free_hw_resources:                 ; @rvu_free_hw_resources
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #32]
	bl	_rvu_npa_freemem
	mov	x0, x19
	bl	_rvu_npc_freemem
	mov	x0, x19
	bl	_rvu_nix_freemem
Lloh0:
	adrp	x21, _BLK_COUNT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BLK_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_kfree
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x21, lsl #2]
	bl	_kfree
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21, lsl #2]
	bl	_kfree
	add	x21, x21, #1
	ldrsw	x8, [x20, #4]
	cmp	x21, x8
	b.lt	LBB0_8
LBB0_9:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_11
; %bb.10:
Lloh2:
	adrp	x8, _BLKADDR_RVUM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BLKADDR_RVUM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _RVU_PRIV_CONST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RVU_PRIV_CONST@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rvu_read64
	and	w8, w0, #0xfffff
Lloh8:
	adrp	x9, _PCI_MSIX_ENTRY_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_MSIX_ENTRY_SIZE@GOTPAGEOFF]
	ldp	w1, w0, [x19, #4]
Lloh10:
	ldr	w9, [x9]
	mul	w2, w9, w8
Lloh11:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	w4, #0
	bl	_dma_unmap_resource
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_destroy
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_COUNT,4,2                  ; @BLK_COUNT
	.comm	_BLKADDR_RVUM,4,2               ; @BLKADDR_RVUM
	.comm	_RVU_PRIV_CONST,4,2             ; @RVU_PRIV_CONST
	.comm	_PCI_MSIX_ENTRY_SIZE,4,2        ; @PCI_MSIX_ENTRY_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_rvu_free_hw_resources
.subsections_via_symbols
