	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_acl_erp_tables_init
_mlxsw_sp_acl_erp_tables_init:          ## @mlxsw_sp_acl_erp_tables_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %edi
	movq	_ACL_MAX_ERPT_BANK_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	movq	_ACL_MAX_ERPT_BANKS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	(%r15), %edi
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r12
	movl	(%r15), %edi
	movl	(%r13), %esi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	$-1, %esi
	callq	_gen_pool_create
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_gen_pool_best_fit@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_gen_pool_set_algo
	movl	(%r14), %edi
	movq	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	movl	$-1, %ecx
	callq	_gen_pool_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_mlxsw_sp_acl_bf_init
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_sp_acl_erp_tables_sizes_query
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_mlxsw_sp_acl_bf_fini
LBB0_11:
	movl	(%r14), %edi
	callq	_gen_pool_destroy
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ACL_MAX_ERPT_BANK_SIZE,4,2     ## @ACL_MAX_ERPT_BANK_SIZE
	.comm	_ACL_MAX_ERPT_BANKS,4,2         ## @ACL_MAX_ERPT_BANKS
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gen_pool_best_fit,4,2          ## @gen_pool_best_fit
	.comm	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET,4,2 ## @MLXSW_SP_ACL_ERP_GENALLOC_OFFSET
	.no_dead_strip	_mlxsw_sp_acl_erp_tables_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_acl_erp_tables_init
_mlxsw_sp_acl_erp_tables_init:          ; @mlxsw_sp_acl_erp_tables_init
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _ACL_MAX_ERPT_BANK_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ACL_MAX_ERPT_BANK_SIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x20]
Lloh2:
	adrp	x22, _ACL_MAX_ERPT_BANKS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ACL_MAX_ERPT_BANKS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_MLXSW_CORE_RES_GET
	mov	x21, x0
	ldr	w0, [x20]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_GET
	str	x0, [x19, #8]
	mov	w0, #0
	mov	w1, #-1
	bl	_gen_pool_create
	str	w0, [x19]
	cbz	w0, LBB0_8
; %bb.3:
Lloh4:
	adrp	x8, _gen_pool_best_fit@GOTPAGE
Lloh5:
	ldr	x8, [x8, _gen_pool_best_fit@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_gen_pool_set_algo
	ldr	w0, [x19]
Lloh7:
	adrp	x8, _MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, x21
	mov	w3, #-1
	bl	_gen_pool_add
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.4:
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_mlxsw_sp_acl_bf_init
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w0, [x19, #4]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_11
LBB0_6:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_acl_erp_tables_sizes_query
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x19, #4]
	bl	_mlxsw_sp_acl_bf_fini
LBB0_11:
	ldr	w0, [x19]
	bl	_gen_pool_destroy
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ACL_MAX_ERPT_BANK_SIZE,4,2     ; @ACL_MAX_ERPT_BANK_SIZE
	.comm	_ACL_MAX_ERPT_BANKS,4,2         ; @ACL_MAX_ERPT_BANKS
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gen_pool_best_fit,4,2          ; @gen_pool_best_fit
	.comm	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET,4,2 ; @MLXSW_SP_ACL_ERP_GENALLOC_OFFSET
	.no_dead_strip	_mlxsw_sp_acl_erp_tables_init
.subsections_via_symbols
