	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_re_net_ring_free
_bnxt_re_net_ring_free:                 ## @bnxt_re_net_ring_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movl	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	leaq	-64(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_HWRM_RING_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_re_init_hwrm_hdr
	movl	%r12d, -56(%rbp)
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movl	%eax, -52(%rbp)
	movq	_DFLT_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-72(%rbp), %rcx
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	movl	$12, %edx
	movl	$4, %r8d
	callq	_bnxt_re_fill_fw_msg
	movq	(%rbx), %rax
	movq	_BNXT_ROCE_ULP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_rdev_to_dev
	movl	-52(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %ecx
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HWRM_RING_FREE,4,2             ## @HWRM_RING_FREE
	.comm	_DFLT_HWRM_CMD_TIMEOUT,4,2      ## @DFLT_HWRM_CMD_TIMEOUT
	.comm	_BNXT_ROCE_ULP,4,2              ## @BNXT_ROCE_ULP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to free HW ring:%d :%#x"

	.no_dead_strip	_bnxt_re_net_ring_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_re_net_ring_free
_bnxt_re_net_ring_free:                 ; @bnxt_re_net_ring_free
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	x20, [x0]
	str	wzr, [sp, #24]
	str	xzr, [sp, #16]
	cbz	x20, LBB0_3
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _HWRM_RING_FREE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HWRM_RING_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #16
	mov	x0, x19
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_re_init_hwrm_hdr
	str	w22, [sp, #16]
	mov	x0, x21
	bl	_cpu_to_le16
	str	w0, [sp, #20]
Lloh3:
	adrp	x8, _DFLT_HWRM_CMD_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DFLT_HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, sp
	add	x1, sp, #16
	add	x3, sp, #8
	mov	w2, #12
	mov	w4, #4
	bl	_bnxt_re_fill_fw_msg
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _BNXT_ROCE_ULP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BNXT_ROCE_ULP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x2, sp
	mov	x0, x20
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_rdev_to_dev
	ldr	w2, [sp, #20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HWRM_RING_FREE,4,2             ; @HWRM_RING_FREE
	.comm	_DFLT_HWRM_CMD_TIMEOUT,4,2      ; @DFLT_HWRM_CMD_TIMEOUT
	.comm	_BNXT_ROCE_ULP,4,2              ; @BNXT_ROCE_ULP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to free HW ring:%d :%#x"

	.no_dead_strip	_bnxt_re_net_ring_free
.subsections_via_symbols
