	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_nix_freemem                ## -- Begin function rvu_nix_freemem
	.p2align	4, 0x90
_rvu_nix_freemem:                       ## @rvu_nix_freemem
	.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	8(%rdi), %r15
	movq	_BLKTYPE_NIX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_rvu_get_blkaddr
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	%eax, %ebx
	movq	(%r15), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_rvu_aq_free
	movq	_BLKADDR_NIX0@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.2:
	movq	8(%r14), %rdi
	movl	%ebx, %esi
	callq	_get_nix_hw
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r12
	movq	_NIX_TXSCH_LVL_CNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movl	(%r14), %edi
	movl	8(%r12), %esi
	callq	_qmem_free
	movl	(%r14), %edi
	movl	4(%r12), %esi
	callq	_qmem_free
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_destroy                  ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKTYPE_NIX,4,2                ## @BLKTYPE_NIX
	.comm	_BLKADDR_NIX0,4,2               ## @BLKADDR_NIX0
	.comm	_NIX_TXSCH_LVL_CNT,4,2          ## @NIX_TXSCH_LVL_CNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_nix_freemem                ; -- Begin function rvu_nix_freemem
	.p2align	2
_rvu_nix_freemem:                       ; @rvu_nix_freemem
	.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	x21, [x0, #8]
Lloh0:
	adrp	x8, _BLKTYPE_NIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLKTYPE_NIX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_rvu_get_blkaddr
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w1, [x8, w0, uxtw #2]
	mov	x0, x19
	bl	_rvu_aq_free
Lloh3:
	adrp	x8, _BLKADDR_NIX0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLKADDR_NIX0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_7
; %bb.2:
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_get_nix_hw
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
Lloh6:
	adrp	x21, _NIX_TXSCH_LVL_CNT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _NIX_TXSCH_LVL_CNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x22, lsl #2]
	bl	_kfree
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w0, [x19]
	ldr	w1, [x20, #8]
	bl	_qmem_free
	ldr	w0, [x19]
	ldr	w1, [x20, #4]
	bl	_qmem_free
	mov	x0, x20
	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_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKTYPE_NIX,4,2                ; @BLKTYPE_NIX
	.comm	_BLKADDR_NIX0,4,2               ; @BLKADDR_NIX0
	.comm	_NIX_TXSCH_LVL_CNT,4,2          ; @NIX_TXSCH_LVL_CNT
.subsections_via_symbols
