	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp2_acl_tcam_init
_mlxsw_sp2_acl_tcam_init:               ## @mlxsw_sp2_acl_tcam_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MLXSW_REG_PEFA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	_MLXSW_REG_PGCR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%rbx), %edx
	movl	%edx, (%r12)
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r12), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rcx
	callq	_mlxsw_sp_kvdl_alloc
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %edi
	callq	_mlxsw_afa_block_create
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mlxsw_afa_block_continue
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	movq	%r12, %r14
	movq	%rbx, %r12
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPCREL(%rip), %rbx
	jne	LBB0_9
## %bb.4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mlxsw_afa_block_cur_set
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r14)
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_11
## %bb.5:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_mlxsw_reg_pefa_pack
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movq	_pefa@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_mlxsw_reg_write
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movslq	(%r14), %rax
	cmpq	%rax, %r13
	jl	LBB0_7
LBB0_11:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mlxsw_reg_pgcr_pack
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %r15d
	movq	_pgcr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mlxsw_reg_write
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPCREL(%rip), %rbx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_9
## %bb.12:
	leaq	16(%r14), %rsi
	movq	%r13, %rdi
	callq	_mlxsw_sp_acl_atcam_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.13:
	movq	%r12, %rdi
	callq	_mlxsw_afa_block_destroy
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%r12, %r14
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPCREL(%rip), %rbx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_9:
	movq	%r12, %rdi
	callq	_mlxsw_afa_block_destroy
LBB0_10:
	movl	(%rbx), %esi
	movl	(%r14), %edx
	movq	8(%r14), %rcx
	movq	%r13, %rdi
	callq	_mlxsw_sp_kvdl_free
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PEFA_LEN,4,2         ## @MLXSW_REG_PEFA_LEN
	.comm	_MLXSW_REG_PGCR_LEN,4,2         ## @MLXSW_REG_PGCR_LEN
	.comm	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET,4,2 ## @MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pefa,4,2                       ## @pefa
	.comm	_pgcr,4,2                       ## @pgcr
	.no_dead_strip	_mlxsw_sp2_acl_tcam_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp2_acl_tcam_init
_mlxsw_sp2_acl_tcam_init:               ; @mlxsw_sp2_acl_tcam_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MLXSW_REG_PEFA_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_REG_PEFA_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh8:
	adrp	x8, _MLXSW_REG_PGCR_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_REG_PGCR_LEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w2, [x2]
	mov	x24, x1
	str	w2, [x24], #8
Lloh13:
	adrp	x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGE
Lloh14:
	ldr	x26, [x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x3, x24
	bl	_mlxsw_sp_kvdl_alloc
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_mlxsw_afa_block_create
	cbz	x0, LBB0_10
; %bb.2:
	mov	x21, x0
	bl	_mlxsw_afa_block_continue
	mov	x25, x0
	bl	_WARN_ON
	cbnz	x0, LBB0_12
; %bb.3:
	mov	x0, x21
	bl	_mlxsw_afa_block_cur_set
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x26, x0
	mov	x28, #0
Lloh15:
	adrp	x27, _pefa@GOTPAGE
Lloh16:
	ldr	x27, [x27, _pefa@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x1, x28, x8
	mov	x0, x23
	mov	w2, #1
	mov	x3, x26
	bl	_mlxsw_reg_pefa_pack
	ldr	w25, [x19]
	ldr	w0, [x27]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x25
	mov	x2, x23
	bl	_mlxsw_reg_write
	cbnz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [x20]
	cmp	x28, x8
	b.lt	LBB0_5
LBB0_7:
	ldr	x1, [x24]
	mov	x0, x22
	bl	_mlxsw_reg_pgcr_pack
	ldr	w23, [x19]
Lloh17:
	adrp	x8, _pgcr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pgcr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	bl	_mlxsw_reg_write
	mov	x25, x0
Lloh20:
	adrp	x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGE
Lloh21:
	ldr	x26, [x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGEOFF]
	cbnz	w0, LBB0_12
; %bb.8:
	add	x1, x20, #16
	mov	x0, x19
	bl	_mlxsw_sp_acl_atcam_init
	mov	x25, x0
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x21
	bl	_mlxsw_afa_block_destroy
	b	LBB0_14
LBB0_10:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_13
LBB0_11:
	mov	x25, x0
Lloh25:
	adrp	x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGE
Lloh26:
	ldr	x26, [x26, _MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET@GOTPAGEOFF]
LBB0_12:
	mov	x0, x21
	bl	_mlxsw_afa_block_destroy
LBB0_13:
	ldr	w1, [x26]
	ldr	w2, [x20]
	ldr	x3, [x20, #8]
	mov	x0, x19
	bl	_mlxsw_sp_kvdl_free
LBB0_14:
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x25
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PEFA_LEN,4,2         ; @MLXSW_REG_PEFA_LEN
	.comm	_MLXSW_REG_PGCR_LEN,4,2         ; @MLXSW_REG_PGCR_LEN
	.comm	_MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET,4,2 ; @MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pefa,4,2                       ; @pefa
	.comm	_pgcr,4,2                       ; @pgcr
	.no_dead_strip	_mlxsw_sp2_acl_tcam_init
.subsections_via_symbols
