	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt753x_swconfig_init           ## -- Begin function mt753x_swconfig_init
	.p2align	4, 0x90
_mt753x_swconfig_init:                  ## @mt753x_swconfig_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	leaq	8(%rbx), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_MT753X_DFL_CPU_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_3
LBB0_1:
	movl	(%r14), %eax
LBB0_3:
	leaq	16(%rbx), %r14
	movl	12(%rbx), %ecx
	movl	%ecx, 16(%rbx)
	movl	%ecx, 44(%rbx)
	movl	%eax, 40(%rbx)
	movq	_MT753X_NUM_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_MT753X_NUM_VLANS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_mt753x_swdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_register_switch
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	movl	16(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_notice
	jmp	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_mt753x_apply_config
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mediatek,cpuport"

	.comm	_MT753X_DFL_CPU_PORT,4,2        ## @MT753X_DFL_CPU_PORT
	.comm	_MT753X_NUM_PORTS,4,2           ## @MT753X_NUM_PORTS
	.comm	_MT753X_NUM_VLANS,4,2           ## @MT753X_NUM_VLANS
	.comm	_mt753x_swdev_ops,4,2           ## @mt753x_swdev_ops
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register switch %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt753x_swconfig_init           ; -- Begin function mt753x_swconfig_init
	.p2align	2
_mt753x_swconfig_init:                  ; @mt753x_swconfig_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20], #8
	ldr	x0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_of_property_read_u32
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _MT753X_DFL_CPU_PORT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT753X_DFL_CPU_PORT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20]
LBB0_3:
	ldr	w9, [x19, #12]
	mov	x20, x19
	str	w9, [x20, #16]!
	stp	w8, w9, [x20, #24]
Lloh5:
	adrp	x8, _MT753X_NUM_PORTS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT753X_NUM_PORTS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MT753X_NUM_VLANS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MT753X_NUM_VLANS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
Lloh11:
	adrp	x8, _mt753x_swdev_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mt753x_swdev_ops@GOTPAGEOFF]
	str	x8, [x20, #8]
	mov	x0, x20
	mov	x1, #0
	bl	_register_switch
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.4:
	ldr	x0, [x19]
	ldr	w2, [x19, #16]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_notice
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_mt753x_apply_config
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mediatek,cpuport"

	.comm	_MT753X_DFL_CPU_PORT,4,2        ; @MT753X_DFL_CPU_PORT
	.comm	_MT753X_NUM_PORTS,4,2           ; @MT753X_NUM_PORTS
	.comm	_MT753X_NUM_VLANS,4,2           ; @MT753X_NUM_VLANS
	.comm	_mt753x_swdev_ops,4,2           ; @mt753x_swdev_ops
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register switch %s\n"

.subsections_via_symbols
