	.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_alloc
_mlxsw_sp_acl_erp_table_alloc:          ## @mlxsw_sp_acl_erp_table_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	divl	(%rdi)
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ecx
	jmp	LBB0_6
LBB0_2:
	movq	8(%rdi), %rcx
	movl	%ebx, %edx
	movl	16(%rdi), %edi
	imull	(%rcx,%rdx,4), %eax
	movl	%eax, %esi
	callq	_gen_pool_alloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, (%r14)
	xorl	%ecx, %ecx
LBB0_6:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET,8,3 ## @MLXSW_SP_ACL_ERP_GENALLOC_OFFSET
	.no_dead_strip	_mlxsw_sp_acl_erp_table_alloc
.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_alloc
_mlxsw_sp_acl_erp_table_alloc:          ; @mlxsw_sp_acl_erp_table_alloc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w9, [x0]
	udiv	w8, w1, w9
	msub	w9, w8, w9, w1
	cbz	w9, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	mov	x19, x3
	ldr	x9, [x0, #8]
	ldr	w9, [x9, w2, uxtw #2]
	ldr	w0, [x0, #16]
	mul	w1, w8, w9
	bl	_gen_pool_alloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x8, x0
	mov	w0, #0
Lloh2:
	adrp	x9, _MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLXSW_SP_ACL_ERP_GENALLOC_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh5:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_MLXSW_SP_ACL_ERP_GENALLOC_OFFSET,8,3 ; @MLXSW_SP_ACL_ERP_GENALLOC_OFFSET
	.no_dead_strip	_mlxsw_sp_acl_erp_table_alloc
.subsections_via_symbols
