	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_acl_bf_entry_add      ## -- Begin function mlxsw_sp_acl_bf_entry_add
	.p2align	4, 0x90
_mlxsw_sp_acl_bf_entry_add:             ## @mlxsw_sp_acl_bf_entry_add
	.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	%r8, %r14
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %ebx
	movq	%r14, %rdx
	callq	_mlxsw_sp_acl_bf_index_get
	movl	%eax, %r13d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mlxsw_sp_acl_bf_rule_count_index_get
	movl	%eax, %r14d
	shlq	$2, %r14
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	callq	_refcount_inc_not_zero
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ebx, %r12d
	movq	_MLXSW_REG_PEABFE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mlxsw_reg_peabfe_pack
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	callq	_mlxsw_reg_peabfe_rec_pack
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	movq	_peabfe@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mlxsw_reg_write
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_kfree
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.4:
	addq	8(%r15), %r14
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_refcount_set
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PEABFE_LEN,4,2       ## @MLXSW_REG_PEABFE_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_peabfe,4,2                     ## @peabfe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_acl_bf_entry_add      ; -- Begin function mlxsw_sp_acl_bf_entry_add
	.p2align	2
_mlxsw_sp_acl_bf_entry_add:             ; @mlxsw_sp_acl_bf_entry_add
	.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
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	bl	_mlxsw_sp_acl_bf_index_get
	mov	x23, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_mlxsw_sp_acl_bf_rule_count_index_get
	mov	x20, x0
	ldr	x8, [x19, #8]
	add	x0, x8, w0, uxtw #2
	bl	_refcount_inc_not_zero
	cbz	x0, LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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_3:
Lloh0:
	adrp	x8, _MLXSW_REG_PEABFE_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_REG_PEABFE_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x24, x0
	bl	_mlxsw_reg_peabfe_pack
	mov	x0, x24
	mov	w1, #0
	mov	w2, #1
	mov	x3, x22
	mov	x4, x23
	bl	_mlxsw_reg_peabfe_rec_pack
	ldr	w21, [x21]
Lloh6:
	adrp	x8, _peabfe@GOTPAGE
Lloh7:
	ldr	x8, [x8, _peabfe@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x21
	mov	x2, x24
	bl	_mlxsw_reg_write
	mov	x21, x0
	mov	x0, x24
	bl	_kfree
	cbnz	w21, LBB0_2
; %bb.5:
	mov	w8, w20
	ldr	x9, [x19, #8]
	add	x0, x9, x8, lsl #2
	mov	w1, #1
	bl	_refcount_set
	b	LBB0_2
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PEABFE_LEN,4,2       ; @MLXSW_REG_PEABFE_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_peabfe,4,2                     ; @peabfe
.subsections_via_symbols
