	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_rss_set_indir_tbl        ## -- Begin function hinic_rss_set_indir_tbl
	.p2align	4, 0x90
_hinic_rss_set_indir_tbl:               ## @hinic_rss_set_indir_tbl
	.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	%rdx, %r13
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %r15
	addq	$8, %rbx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_hinic_alloc_cmdq_buf
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_2:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	$32, -64(%rbp)
	movq	-56(%rbp), %r12
	movq	%r14, %rdi
	callq	_cpu_to_be32
	movq	%rax, 24(%r12)
	movq	_HINIC_RSS_INDIR_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r14,8), %rcx
	movq	(%r12), %r15
	movq	%rcx, (%r15,%r14,8)
	movl	%r14d, %ecx
	notl	%ecx
	testb	$3, %cl
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-24(%r15,%r14,8), %rdi
	callq	_cpu_to_be32
	movq	%rax, -24(%r15,%r14,8)
	movl	(%rbx), %eax
	jmp	LBB0_6
LBB0_7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rbx
	movq	$0, 16(%r12)
	movq	%rbx, %rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%r12)
	movq	_HINIC_MOD_L2NIC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_hinic_cmdq_direct_resp
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	cmpq	$0, -48(%rbp)
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_cpu_to_be32
	movq	%rax, 16(%r12)
	movq	%rbx, %rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%r12)
	movq	(%r12), %rdi
	leaq	(%rdi,%rbx,8), %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movl	(%r15), %esi
	movl	(%r13), %edx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	callq	_hinic_cmdq_direct_resp
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	xorl	%r12d, %r12d
	cmpq	$0, -48(%rbp)
	je	LBB0_12
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hinic_free_cmdq_buf
LBB0_13:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate cmdq buf\n"

	.comm	_HINIC_RSS_INDIR_SIZE,4,2       ## @HINIC_RSS_INDIR_SIZE
	.comm	_HINIC_MOD_L2NIC,4,2            ## @HINIC_MOD_L2NIC
	.comm	_HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE,4,2 ## @HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set rss indir table\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_rss_set_indir_tbl        ; -- Begin function hinic_rss_set_indir_tbl
	.p2align	2
_hinic_rss_set_indir_tbl:               ; @hinic_rss_set_indir_tbl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x23, x1
	ldr	x19, [x0]
	ldr	x8, [x19], #8
	ldr	x20, [x8]
	add	x1, sp, #16
	mov	x0, x19
	bl	_hinic_alloc_cmdq_buf
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_2:
	mov	w8, #32
	str	w8, [sp, #16]
	ldr	x22, [sp, #24]
	mov	x0, x23
	bl	_cpu_to_be32
	str	x0, [x22, #24]
Lloh2:
	adrp	x23, _HINIC_RSS_INDIR_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HINIC_RSS_INDIR_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mvn	w10, w24
	lsl	x11, x24, #3
	ldr	x12, [x21, x11]
	ldr	x9, [x22]
	str	x12, [x9, x11]
	tst	x10, #0x3
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x9, x24, lsl #3
	ldur	x0, [x25, #-24]
	bl	_cpu_to_be32
	stur	x0, [x25, #-24]
	ldr	w8, [x23]
	b	LBB0_4
LBB0_7:
	cmp	w8, #0
	cinc	w8, w8, lt
	sbfx	x21, x8, #1, #31
	str	xzr, [x22, #16]
	mov	x0, x21
	bl	_cpu_to_be32
	str	x0, [x22, #8]
Lloh4:
	adrp	x23, _HINIC_MOD_L2NIC@GOTPAGE
Lloh5:
	ldr	x23, [x23, _HINIC_MOD_L2NIC@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh6:
	adrp	x24, _HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x0, x19
	bl	_hinic_cmdq_direct_resp
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #0, eq
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_cpu_to_be32
	str	x0, [x22, #16]
	mov	x0, x21
	bl	_cpu_to_be32
	str	x0, [x22, #8]
	ldr	x0, [x22]
	add	x1, x0, x21, lsl #3
	mov	x2, x21
	bl	_memcpy
	ldr	w1, [x23]
	ldr	w2, [x24]
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x0, x19
	bl	_hinic_cmdq_direct_resp
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #0, eq
	b.eq	LBB0_10
LBB0_9:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_10:
	mov	w22, #0
LBB0_11:
	add	x1, sp, #16
	mov	x0, x19
	bl	_hinic_free_cmdq_buf
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate cmdq buf\n"

	.comm	_HINIC_RSS_INDIR_SIZE,4,2       ; @HINIC_RSS_INDIR_SIZE
	.comm	_HINIC_MOD_L2NIC,4,2            ; @HINIC_MOD_L2NIC
	.comm	_HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE,4,2 ; @HINIC_UCODE_CMD_SET_RSS_INDIR_TABLE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set rss indir table\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
