	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_acl_erp_table_expand
_mlxsw_sp_acl_erp_table_expand:         ## @mlxsw_sp_acl_erp_table_expand
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %r14d
	cmpq	$0, 16(%rdi)
	setg	%cl
	xorl	%r12d, %r12d
	cmpl	%r14d, 24(%rdi)
	jb	LBB0_8
## %bb.1:
	movq	_MLXSW_SP_ACL_ERP_MAX_PER_REGION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_3
## %bb.2:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_3:
	movq	%rdi, %rbx
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movq	40(%rdi), %r15
	leaq	8(%rdi), %rcx
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r13d
	addl	%r14d, %r13d
	movq	32(%rdi), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_mlxsw_sp_acl_erp_table_alloc
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, (%rbx)
	movq	%rbx, %rdi
	callq	_mlxsw_sp_acl_erp_table_relocate
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	xorl	%esi, %esi
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %sil
	movq	%rbx, %rdi
	callq	_mlxsw_sp_acl_erp_table_enable
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movl	%r14d, (%rbx)
	movq	8(%rbx), %rcx
	movq	32(%rbx), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_mlxsw_sp_acl_erp_table_free
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
LBB0_8:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	32(%rbx), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_mlxsw_sp_acl_erp_table_free
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_SP_ACL_ERP_MAX_PER_REGION,4,2 ## @MLXSW_SP_ACL_ERP_MAX_PER_REGION
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.no_dead_strip	_mlxsw_sp_acl_erp_table_expand
.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_table_expand
_mlxsw_sp_acl_erp_table_expand:         ; @mlxsw_sp_acl_erp_table_expand
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w20, [x0]
	ldr	x8, [x0, #16]
	cmp	x8, #0
	cset	w23, gt
	ldr	w8, [x0, #24]
	cmp	w8, w20
	b.hs	LBB0_2
; %bb.1:
	mov	w25, #0
	b	LBB0_8
LBB0_2:
Lloh0:
	adrp	x8, _MLXSW_SP_ACL_ERP_MAX_PER_REGION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_SP_ACL_ERP_MAX_PER_REGION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_8
LBB0_4:
	mov	x19, x0
	mov	x3, x0
	ldr	x21, [x3, #8]!
	ldp	x8, x22, [x0, #32]
	ldr	w9, [x22]
	add	w24, w9, w20
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_mlxsw_sp_acl_erp_table_alloc
	mov	x25, x0
	cbnz	w0, LBB0_8
; %bb.5:
	str	w24, [x19]
	mov	x0, x19
	bl	_mlxsw_sp_acl_erp_table_relocate
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x23
	bl	_mlxsw_sp_acl_erp_table_enable
	mov	x25, x0
	cbz	w0, LBB0_9
LBB0_7:
	str	w20, [x19]
	ldr	x8, [x19, #32]
	ldr	w2, [x8]
	ldr	x3, [x19, #8]
	mov	x0, x22
	mov	x1, x24
	bl	_mlxsw_sp_acl_erp_table_free
	str	x21, [x19, #8]
LBB0_8:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x19, #32]
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_mlxsw_sp_acl_erp_table_free
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_SP_ACL_ERP_MAX_PER_REGION,4,2 ; @MLXSW_SP_ACL_ERP_MAX_PER_REGION
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.no_dead_strip	_mlxsw_sp_acl_erp_table_expand
.subsections_via_symbols
