	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_afa_block_append_action
_mlxsw_afa_block_append_action:         ## @mlxsw_afa_block_append_action
	.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
	cmpq	$0, 24(%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movslq	(%rdi), %r13
	leaq	(%rdx,%r13), %rax
	movq	16(%rdi), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_4
## %bb.5:
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_mlxsw_afa_set_create
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	8(%r12), %rcx
	movq	%rcx, 16(%rax)
	movl	$0, (%r12)
	movq	%rax, 8(%rcx)
	movq	%rax, 8(%r12)
	jmp	LBB0_8
LBB0_4:
	movq	8(%r12), %rax
LBB0_8:
	movq	_MLXSW_AFA_ONE_ACTION_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rbx
	movslq	%r13d, %rcx
	imulq	%rcx, %rbx
	addq	(%rax), %rbx
	addl	%r15d, %ecx
	movl	%ecx, (%r12)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_afa_all_action_type_set
	movq	_MLXSW_AFA_PAYLOAD_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_MLXSW_AFA_ONE_ACTION_LEN,4,2   ## @MLXSW_AFA_ONE_ACTION_LEN
	.comm	_MLXSW_AFA_PAYLOAD_OFFSET,4,2   ## @MLXSW_AFA_PAYLOAD_OFFSET
	.no_dead_strip	_mlxsw_afa_block_append_action
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_afa_block_append_action
_mlxsw_afa_block_append_action:         ; @mlxsw_afa_block_append_action
	.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
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_3:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldrsw	x8, [x0]
	ldr	x9, [x0, #16]
	ldr	x9, [x9]
	add	x10, x8, x2
	cmp	x10, x9
	b.le	LBB0_6
; %bb.4:
	mov	w0, #0
	bl	_mlxsw_afa_set_create
	cbz	x0, LBB0_8
; %bb.5:
	mov	w8, #0
	ldr	x9, [x21, #8]
	str	x9, [x0, #16]
	str	wzr, [x21]
	str	x0, [x9, #8]
	str	x0, [x21, #8]
	b	LBB0_7
LBB0_6:
	ldr	x0, [x21, #8]
LBB0_7:
	ldr	x9, [x0]
Lloh2:
	adrp	x10, _MLXSW_AFA_ONE_ACTION_LEN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MLXSW_AFA_ONE_ACTION_LEN@GOTPAGEOFF]
Lloh4:
	ldrsw	x10, [x10]
	mov	x11, x8
	sxtw	x11, w11
	madd	x22, x10, x11, x9
	add	w8, w8, w20
	str	w8, [x21]
	mov	x0, x22
	mov	x1, x19
	bl	_mlxsw_afa_all_action_type_set
Lloh5:
	adrp	x8, _MLXSW_AFA_PAYLOAD_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLXSW_AFA_PAYLOAD_OFFSET@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
	add	x0, x22, x8
	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:
Lloh8:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_MLXSW_AFA_ONE_ACTION_LEN,4,2   ; @MLXSW_AFA_ONE_ACTION_LEN
	.comm	_MLXSW_AFA_PAYLOAD_OFFSET,4,2   ; @MLXSW_AFA_PAYLOAD_OFFSET
	.no_dead_strip	_mlxsw_afa_block_append_action
.subsections_via_symbols
