	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_acl_tcam_region_alloc
_mlxsw_sp_acl_tcam_region_alloc:        ## @mlxsw_sp_acl_tcam_region_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	%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
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rsi), %r13
	movq	_MLXSW_REG_PTAR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_MLXSW_REG_PTAR_OP_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	_MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r14), %r9d
	movl	4(%r14), %r8d
	movq	%r12, %rdi
	callq	_mlxsw_reg_ptar_pack
	movq	%r13, %rdi
	callq	_mlxsw_afk_key_info_blocks_count_get
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_mlxsw_afk_key_info_block_encoding_get
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_mlxsw_reg_ptar_key_id_pack
	incl	%r15d
	cmpl	%r15d, %ebx
	jne	LBB0_2
LBB0_3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movq	_ptar@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_mlxsw_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_mlxsw_reg_ptar_unpack
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PTAR_LEN,4,2         ## @MLXSW_REG_PTAR_LEN
	.comm	_MLXSW_REG_PTAR_OP_ALLOC,4,2    ## @MLXSW_REG_PTAR_OP_ALLOC
	.comm	_MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT,4,2 ## @MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT
	.comm	_ptar,4,2                       ## @ptar
	.no_dead_strip	_mlxsw_sp_acl_tcam_region_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_tcam_region_alloc
_mlxsw_sp_acl_tcam_region_alloc:        ; @mlxsw_sp_acl_tcam_region_alloc
	.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
	sub	sp, sp, #16
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x1, #16]
Lloh3:
	adrp	x8, _MLXSW_REG_PTAR_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_REG_PTAR_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	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x8, _MLXSW_REG_PTAR_OP_ALLOC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_REG_PTAR_OP_ALLOC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldp	w4, w2, [x19, #4]
Lloh11:
	adrp	x8, _MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	ldr	w5, [x19]
	mov	x0, x20
	bl	_mlxsw_reg_ptar_pack
	mov	x0, x22
	bl	_mlxsw_afk_key_info_blocks_count_get
	cbz	w0, LBB0_3
; %bb.1:
	mov	x23, x0
	mov	w24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_mlxsw_afk_key_info_block_encoding_get
	mov	x2, x0
	mov	x0, x20
	mov	x1, x24
	bl	_mlxsw_reg_ptar_key_id_pack
	add	w24, w24, #1
	cmp	w23, w24
	b.ne	LBB0_2
LBB0_3:
	ldr	w21, [x21]
Lloh14:
	adrp	x8, _ptar@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ptar@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_mlxsw_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mlxsw_reg_ptar_unpack
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x21
	sub	sp, x29, #48
	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_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PTAR_LEN,4,2         ; @MLXSW_REG_PTAR_LEN
	.comm	_MLXSW_REG_PTAR_OP_ALLOC,4,2    ; @MLXSW_REG_PTAR_OP_ALLOC
	.comm	_MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT,4,2 ; @MLXSW_SP_ACL_TCAM_REGION_BASE_COUNT
	.comm	_ptar,4,2                       ; @ptar
	.no_dead_strip	_mlxsw_sp_acl_tcam_region_alloc
.subsections_via_symbols
