	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npa_lf_free   ## -- Begin function rvu_mbox_handler_npa_lf_free
	.p2align	4, 0x90
_rvu_mbox_handler_npa_lf_free:          ## @rvu_mbox_handler_npa_lf_free
	.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, %r12
	movq	8(%rdi), %r13
	movl	(%rsi), %r15d
	movl	%r15d, %esi
	callq	_rvu_get_pfvf
	movq	%rax, %r14
	movq	_BLKTYPE_NPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rvu_get_blkaddr
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.1:
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movl	%eax, %ebx
	shlq	$2, %rbx
	addq	(%r13), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_rvu_get_lf
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_rvu_lf_reset
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_NPA_AF_ERR_LF_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_NPA_AF_ERR_AF_LF_INVALID@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_npa_ctx_free
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKTYPE_NPA,4,2                ## @BLKTYPE_NPA
	.comm	_NPA_AF_ERR_AF_LF_INVALID,4,2   ## @NPA_AF_ERR_AF_LF_INVALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to reset NPALF%d\n"

	.comm	_NPA_AF_ERR_LF_RESET,4,2        ## @NPA_AF_ERR_LF_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npa_lf_free   ; -- Begin function rvu_mbox_handler_npa_lf_free
	.p2align	2
_rvu_mbox_handler_npa_lf_free:          ; @rvu_mbox_handler_npa_lf_free
	.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	x22, [x0, #8]
	ldr	w21, [x1]
	mov	x1, x21
	bl	_rvu_get_pfvf
	mov	x20, x0
Lloh0:
	adrp	x8, _BLKTYPE_NPA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLKTYPE_NPA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_rvu_get_blkaddr
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.1:
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	x8, [x22]
	add	x22, x8, w0, uxtw #2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #0
	bl	_rvu_get_lf
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_rvu_lf_reset
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh5:
	adrp	x8, _NPA_AF_ERR_LF_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NPA_AF_ERR_LF_RESET@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _NPA_AF_ERR_AF_LF_INVALID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NPA_AF_ERR_AF_LF_INVALID@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
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
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_npa_ctx_free
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKTYPE_NPA,4,2                ; @BLKTYPE_NPA
	.comm	_NPA_AF_ERR_AF_LF_INVALID,4,2   ; @NPA_AF_ERR_AF_LF_INVALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to reset NPALF%d\n"

	.comm	_NPA_AF_ERR_LF_RESET,4,2        ; @NPA_AF_ERR_LF_RESET
.subsections_via_symbols
