	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_rx_ctrl_cmd
_send_rx_ctrl_cmd:                      ## @send_rx_ctrl_cmd
	.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), %rax
	movq	24(%rdi), %r14
	movq	(%r14), %rcx
	cmpl	%esi, (%rcx,%rax,4)
	je	LBB0_3
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_octeon_alloc_soft_command
	movq	%rax, %rbx
	movq	16(%rax), %rdi
	movq	$0, (%rdi)
	movq	_OCTNET_CMD_RX_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movl	%r15d, (%rdi)
	movl	(%r13), %esi
	sarl	$3, %esi
	callq	_octeon_swap_8B_data
	movq	16(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_OPCODE_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPCODE_NIC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_octeon_prepare_soft_command
	leaq	8(%rbx), %rdi
	callq	_init_completion
	movq	_OCTEON_REQUEST_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_octeon_send_soft_command
	movq	_IQ_SEND_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.4:
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r12), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_info
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_octeon_free_soft_command       ## TAILCALL
LBB0_2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_wait_for_sc_completion_timeout
	testl	%eax, %eax
	je	LBB0_5
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r14), %rax
	movq	(%r12), %rcx
	movl	%r15d, (%rax,%rcx,4)
	movl	(%rbx), %edi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WRITE_ONCE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ## @OCTNET_CMD_SIZE
	.comm	_OCTNET_CMD_RX_CTL,4,2          ## @OCTNET_CMD_RX_CTL
	.comm	_OPCODE_NIC,4,2                 ## @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ## @OPCODE_NIC_CMD
	.comm	_OCTEON_REQUEST_PENDING,4,2     ## @OCTEON_REQUEST_PENDING
	.comm	_IQ_SEND_FAILED,4,2             ## @IQ_SEND_FAILED
	.comm	_rx_err,4,2                     ## @rx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send RX Control message\n"

	.no_dead_strip	_send_rx_ctrl_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_rx_ctrl_cmd
_send_rx_ctrl_cmd:                      ; @send_rx_ctrl_cmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0, #24]
	ldr	x8, [x19]
	ldr	x9, [x0]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, w1
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _OCTNET_CMD_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _OCTNET_CMD_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #16
	mov	w3, #0
	bl	_octeon_alloc_soft_command
	mov	x22, x0
	ldr	x0, [x0, #16]
Lloh2:
	adrp	x8, _OCTNET_CMD_RX_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCTNET_CMD_RX_CTL@GOTPAGEOFF]
	str	xzr, [x0]
Lloh4:
	ldr	w8, [x8]
	stp	w21, w8, [x0]
	ldr	w8, [x23]
	asr	w1, w8, #3
	bl	_octeon_swap_8B_data
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	str	w8, [x22, #12]
Lloh5:
	adrp	x8, _OPCODE_NIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OPCODE_NIC@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _OPCODE_NIC_CMD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OPCODE_NIC_CMD@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_octeon_prepare_soft_command
	add	x0, x22, #8
	bl	_init_completion
Lloh11:
	adrp	x8, _OCTEON_REQUEST_PENDING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OCTEON_REQUEST_PENDING@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x22, #4]
	mov	x0, x19
	mov	x1, x22
	bl	_octeon_send_soft_command
Lloh14:
	adrp	x8, _IQ_SEND_FAILED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IQ_SEND_FAILED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh17:
	adrp	x8, _rx_err@GOTPAGE
Lloh18:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
Lloh20:
	adrp	x3, l_.str@PAGE
Lloh21:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netif_info
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_octeon_free_soft_command
LBB0_3:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_wait_for_sc_completion_timeout
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [x20]
	str	w21, [x8, x9, lsl #2]
	ldr	w0, [x22]
	mov	w1, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WRITE_ONCE
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ; @OCTNET_CMD_SIZE
	.comm	_OCTNET_CMD_RX_CTL,4,2          ; @OCTNET_CMD_RX_CTL
	.comm	_OPCODE_NIC,4,2                 ; @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ; @OPCODE_NIC_CMD
	.comm	_OCTEON_REQUEST_PENDING,4,2     ; @OCTEON_REQUEST_PENDING
	.comm	_IQ_SEND_FAILED,4,2             ; @IQ_SEND_FAILED
	.comm	_rx_err,4,2                     ; @rx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send RX Control message\n"

	.no_dead_strip	_send_rx_ctrl_cmd
.subsections_via_symbols
