	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_fids_init             ## -- Begin function mlxsw_sp_fids_init
	.p2align	4, 0x90
_mlxsw_sp_fids_init:                    ## @mlxsw_sp_fids_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	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_mlxsw_core_max_ports
	movl	%eax, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, (%r14)
	movq	_mlxsw_sp_fid_ht_params@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_rhashtable_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	movq	%r12, %r13
	addq	$4, %r13
	movq	_mlxsw_sp_fid_vni_ht_params@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_rhashtable_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_MLXSW_SP_FID_TYPE_MAX@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.8:
	xorl	%ebx, %ebx
	movq	_mlxsw_sp_fid_family_arr@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_mlxsw_sp_fid_family_register
	testl	%eax, %eax
	jne	LBB0_10
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movq	_MLXSW_SP_FID_TYPE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	xorl	%r15d, %r15d
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_17
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_17
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_14
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_10:
	movl	%eax, %r15d
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.11:
	incq	%rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	-16(%rax,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_mlxsw_sp_fid_family_unregister
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_12
LBB0_13:
	movq	8(%r12), %rdi
	callq	_kfree
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rhashtable_destroy
LBB0_15:
	movq	%r12, %rdi
	callq	_rhashtable_destroy
LBB0_16:
	movq	%r12, %rdi
	callq	_kfree
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mlxsw_sp_fid_ht_params,4,2     ## @mlxsw_sp_fid_ht_params
	.comm	_mlxsw_sp_fid_vni_ht_params,4,2 ## @mlxsw_sp_fid_vni_ht_params
	.comm	_MLXSW_SP_FID_TYPE_MAX,4,2      ## @MLXSW_SP_FID_TYPE_MAX
	.comm	_mlxsw_sp_fid_family_arr,8,3    ## @mlxsw_sp_fid_family_arr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_fids_init             ; -- Begin function mlxsw_sp_fids_init
	.p2align	2
_mlxsw_sp_fids_init:                    ; @mlxsw_sp_fids_init
	.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
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_mlxsw_core_max_ports
	mov	x23, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	str	x0, [x20]
Lloh2:
	adrp	x1, _mlxsw_sp_fid_ht_params@GOTPAGE
Lloh3:
	ldr	x1, [x1, _mlxsw_sp_fid_ht_params@GOTPAGEOFF]
	bl	_rhashtable_init
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.2:
	add	x21, x19, #4
Lloh4:
	adrp	x1, _mlxsw_sp_fid_vni_ht_params@GOTPAGE
Lloh5:
	ldr	x1, [x1, _mlxsw_sp_fid_vni_ht_params@GOTPAGEOFF]
	mov	x0, x21
	bl	_rhashtable_init
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	w2, [x24]
	mov	x0, x23
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.4:
Lloh6:
	adrp	x23, _MLXSW_SP_FID_TYPE_MAX@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MLXSW_SP_FID_TYPE_MAX@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x24, #0
Lloh8:
	adrp	x25, _mlxsw_sp_fid_family_arr@GOTPAGE
Lloh9:
	ldr	x25, [x25, _mlxsw_sp_fid_family_arr@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x20
	bl	_mlxsw_sp_fid_family_register
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_6
	b	LBB0_18
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_18
LBB0_9:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_10:
	mov	w22, #0
	b	LBB0_18
LBB0_11:
	cbz	w24, LBB0_14
; %bb.12:
	sub	x23, x24, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x23, lsl #3]
	mov	x0, x20
	bl	_mlxsw_sp_fid_family_unregister
	add	x8, x23, #1
	sub	x23, x23, #1
	cmp	x8, #1
	b.gt	LBB0_13
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_15:
	mov	x0, x21
	bl	_rhashtable_destroy
LBB0_16:
	mov	x0, x19
	bl	_rhashtable_destroy
LBB0_17:
	mov	x0, x19
	bl	_kfree
LBB0_18:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mlxsw_sp_fid_ht_params,4,2     ; @mlxsw_sp_fid_ht_params
	.comm	_mlxsw_sp_fid_vni_ht_params,4,2 ; @mlxsw_sp_fid_vni_ht_params
	.comm	_MLXSW_SP_FID_TYPE_MAX,4,2      ; @MLXSW_SP_FID_TYPE_MAX
	.comm	_mlxsw_sp_fid_family_arr,8,3    ; @mlxsw_sp_fid_family_arr
.subsections_via_symbols
