	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sja1105_init_general_params
_sja1105_init_general_params:           ## @sja1105_init_general_params
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_SJA1105_NUM_PORTS@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_ETH_P_SJA1105@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	16(%rdi), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_dsa_upstream_port
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	16(%r12), %rdi
	xorl	%esi, %esi
	callq	_dsa_upstream_port
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_SJA1105_LINKLOCAL_FILTER_B_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_SJA1105_LINKLOCAL_FILTER_B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_SJA1105_LINKLOCAL_FILTER_A_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_SJA1105_LINKLOCAL_FILTER_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	16(%r12), %rdi
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	callq	_dsa_is_dsa_port
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rdi
	movl	%ebx, %esi
	callq	_dsa_is_user_port
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movl	%r13d, (%rax,%rbx,4)
	incl	%r13d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rdi
	jmp	LBB0_2
LBB0_8:
	movq	(%r12), %r13
	movq	_BLK_IDX_GENERAL_PARAMS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	(,%rbx,8), %r12
	addq	%r13, %r12
	cmpq	$0, 8(%r13,%rbx,8)
	je	LBB0_10
## %bb.9:
	movq	(%r12), %rdi
	callq	_kfree
	movq	$0, 8(%r12)
LBB0_10:
	movq	_SJA1105_MAX_GENERAL_PARAMS_COUNT@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	16(%r13,%rbx,8), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_kcalloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	(%r15), %rcx
	movq	%rcx, 8(%r12)
	movl	$7, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 4(%rax)
	movl	%r14d, 20(%rax)
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 24(%rax)
	movl	%ecx, 28(%rax)
	movups	%xmm0, 32(%rax)
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 48(%rax)
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 52(%rax)
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 56(%rax)
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 60(%rax)
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 64(%rax)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 68(%rax)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 72(%rax)
	movl	$0, 76(%rax)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SJA1105_NUM_PORTS,4,2          ## @SJA1105_NUM_PORTS
	.comm	_ETH_P_SJA1105,4,2              ## @ETH_P_SJA1105
	.comm	_SJA1105_LINKLOCAL_FILTER_B_MASK,4,2 ## @SJA1105_LINKLOCAL_FILTER_B_MASK
	.comm	_SJA1105_LINKLOCAL_FILTER_B,4,2 ## @SJA1105_LINKLOCAL_FILTER_B
	.comm	_SJA1105_LINKLOCAL_FILTER_A_MASK,4,2 ## @SJA1105_LINKLOCAL_FILTER_A_MASK
	.comm	_SJA1105_LINKLOCAL_FILTER_A,4,2 ## @SJA1105_LINKLOCAL_FILTER_A
	.comm	_BLK_IDX_GENERAL_PARAMS,8,3     ## @BLK_IDX_GENERAL_PARAMS
	.comm	_SJA1105_MAX_GENERAL_PARAMS_COUNT,8,3 ## @SJA1105_MAX_GENERAL_PARAMS_COUNT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sja1105_init_general_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sja1105_init_general_params
_sja1105_init_general_params:           ; @sja1105_init_general_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
Lloh0:
	adrp	x20, _SJA1105_NUM_PORTS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SJA1105_NUM_PORTS@GOTPAGEOFF]
	ldr	w24, [x20]
Lloh2:
	adrp	x8, _ETH_P_SJA1105@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETH_P_SJA1105@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	ldr	x0, [x0, #16]
	mov	w1, #0
	bl	_dsa_upstream_port
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x0, [x21, #16]
	mov	w1, #0
	bl	_dsa_upstream_port
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
Lloh5:
	adrp	x8, _SJA1105_LINKLOCAL_FILTER_B_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SJA1105_LINKLOCAL_FILTER_B_MASK@GOTPAGEOFF]
Lloh7:
	adrp	x9, _SJA1105_LINKLOCAL_FILTER_B@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SJA1105_LINKLOCAL_FILTER_B@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x8]
Lloh10:
	ldr	w8, [x9]
	stp	w10, w8, [sp]                   ; 8-byte Folded Spill
Lloh11:
	adrp	x8, _SJA1105_LINKLOCAL_FILTER_A_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SJA1105_LINKLOCAL_FILTER_A_MASK@GOTPAGEOFF]
Lloh13:
	adrp	x9, _SJA1105_LINKLOCAL_FILTER_A@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SJA1105_LINKLOCAL_FILTER_A@GOTPAGEOFF]
Lloh15:
	ldr	w28, [x8]
Lloh16:
	ldr	w27, [x9]
	ldr	x0, [x21, #16]
	ldr	w19, [x0]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, #0
	mov	w25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x22
	bl	_dsa_is_dsa_port
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x22
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x21, #16]
	mov	x1, x22
	bl	_dsa_is_user_port
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21, #8]
	str	w25, [x8, x22, lsl #2]
	add	w25, w25, #1
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.ge	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x21, #16]
	b	LBB0_2
LBB0_8:
	ldr	x22, [x21]
Lloh17:
	adrp	x8, _BLK_IDX_GENERAL_PARAMS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BLK_IDX_GENERAL_PARAMS@GOTPAGEOFF]
Lloh19:
	ldr	x26, [x8]
	mov	w8, #24
	madd	x21, x26, x8, x22
	mov	x20, x21
	ldr	x8, [x20, #8]!
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x0, [x21]
	bl	_kfree
	str	xzr, [x20]
LBB0_10:
Lloh20:
	adrp	x25, _SJA1105_MAX_GENERAL_PARAMS_COUNT@GOTPAGE
Lloh21:
	ldr	x25, [x25, _SJA1105_MAX_GENERAL_PARAMS_COUNT@GOTPAGEOFF]
	ldr	x0, [x25]
	mov	w8, #24
	madd	x8, x26, x8, x22
	ldr	x8, [x8, #16]
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	bl	_kcalloc
	str	x0, [x21]
	cbz	x0, LBB0_12
; %bb.11:
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x25]
	str	x9, [x20]
	mov	w9, #7
	str	w9, [x8]
	stur	xzr, [x8, #12]
	stur	xzr, [x8, #4]
	stp	w24, w23, [x8, #20]
	str	w23, [x8, #28]
	stp	xzr, xzr, [x8, #32]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	stp	w10, w9, [x8, #48]
	ldr	w10, [sp]                       ; 4-byte Folded Reload
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	stp	w10, w9, [x8, #56]
	stp	w28, w27, [x8, #64]
	stp	w19, wzr, [x8, #72]
	b	LBB0_13
LBB0_12:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SJA1105_NUM_PORTS,4,2          ; @SJA1105_NUM_PORTS
	.comm	_ETH_P_SJA1105,4,2              ; @ETH_P_SJA1105
	.comm	_SJA1105_LINKLOCAL_FILTER_B_MASK,4,2 ; @SJA1105_LINKLOCAL_FILTER_B_MASK
	.comm	_SJA1105_LINKLOCAL_FILTER_B,4,2 ; @SJA1105_LINKLOCAL_FILTER_B
	.comm	_SJA1105_LINKLOCAL_FILTER_A_MASK,4,2 ; @SJA1105_LINKLOCAL_FILTER_A_MASK
	.comm	_SJA1105_LINKLOCAL_FILTER_A,4,2 ; @SJA1105_LINKLOCAL_FILTER_A
	.comm	_BLK_IDX_GENERAL_PARAMS,8,3     ; @BLK_IDX_GENERAL_PARAMS
	.comm	_SJA1105_MAX_GENERAL_PARAMS_COUNT,8,3 ; @SJA1105_MAX_GENERAL_PARAMS_COUNT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sja1105_init_general_params
.subsections_via_symbols
