	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_rss_template_free        ## -- Begin function hinic_rss_template_free
	.p2align	4, 0x90
_hinic_rss_template_free:               ## @hinic_rss_template_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	(%rdi), %rbx
	movq	(%rbx), %rdi
	movq	(%rdi), %r14
	callq	_HINIC_HWIF_FUNC_IDX
	movl	%eax, -48(%rbp)
	movl	%r15d, -52(%rbp)
	movq	_NIC_RSS_CMD_TEMP_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_HINIC_PORT_CMD_RSS_TEMP_MGR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	leaq	-28(%rbp), %r9
	movq	%rbx, %rdi
	movl	$24, %ecx
	movq	%rdx, %r8
	callq	_hinic_port_msg_cmd
	movl	-28(%rbp), %r8d
	movq	-64(%rbp), %rcx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	testl	%r8d, %r8d
	je	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	testq	%rcx, %rcx
	je	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	subl	(%rax), %edx
LBB0_4:
	movl	%edx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIC_RSS_CMD_TEMP_FREE,4,2      ## @NIC_RSS_CMD_TEMP_FREE
	.comm	_HINIC_PORT_CMD_RSS_TEMP_MGR,4,2 ## @HINIC_PORT_CMD_RSS_TEMP_MGR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to free rss template, err: %d, status: 0x%x, out size: 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_rss_template_free        ; -- Begin function hinic_rss_template_free
	.p2align	2
_hinic_rss_template_free:               ; @hinic_rss_template_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
	mov	x20, x1
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	ldr	x21, [x0]
	ldr	x0, [x21]
	ldr	x19, [x0]
	bl	_HINIC_HWIF_FUNC_IDX
	str	w0, [sp, #24]
Lloh0:
	adrp	x8, _NIC_RSS_CMD_TEMP_FREE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIC_RSS_CMD_TEMP_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w20, [sp, #16]
Lloh3:
	adrp	x8, _HINIC_PORT_CMD_RSS_TEMP_MGR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HINIC_PORT_CMD_RSS_TEMP_MGR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x0, x21
	mov	w3, #24
	bl	_hinic_port_msg_cmd
	ldr	w4, [sp, #4]
	ldr	x3, [sp, #8]
	cmp	w0, #0
	ccmp	w4, #0, #4, eq
	ccmp	x3, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NIC_RSS_CMD_TEMP_FREE,4,2      ; @NIC_RSS_CMD_TEMP_FREE
	.comm	_HINIC_PORT_CMD_RSS_TEMP_MGR,4,2 ; @HINIC_PORT_CMD_RSS_TEMP_MGR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to free rss template, err: %d, status: 0x%x, out size: 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
