	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esw_hw_init
_esw_hw_init:                           ## @esw_hw_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
	movq	_RT305X_ESW_REG_FCT0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-929007536, %esi               ## imm = 0xC8A07850
	callq	_esw_w32
	movq	_RT305X_ESW_REG_SGC2@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_PORTS_ALL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RT305X_ESW_PFC1_EN_VLAN_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	orl	$21845, %esi                    ## imm = 0x5555
	movq	_RT305X_ESW_REG_PFC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	movl	(%rbx), %esi
	movq	_RT305X_ESW_POC0_EN_BP_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%esi, %eax
	shll	%cl, %eax
	movq	_RT305X_ESW_POC0_EN_FC_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%eax, %esi
	movq	_RT305X_ESW_REG_POC0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	movl	(%rbx), %eax
	movq	_RT305X_ESW_POC2_ENAGING_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_RT305X_ESW_PORTS_NOCPU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_RT305X_ESW_POC2_UNTAG_EN_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%eax, %esi
	movq	_RT305X_ESW_REG_POC2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	movl	(%r14), %eax
	testl	%eax, %eax
	movq	_RT305X_ESW_REG_FCT2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	$151564, %esi                   ## imm = 0x2500C
	cmovnel	%eax, %esi
	movq	%r14, %rdi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_SGC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$566017, %esi                   ## imm = 0x8A301
	callq	_esw_w32
	movq	_RT305X_ESW_SOCPC_CRC_PADDING@GOTPCREL(%rip), %rax
	movq	_RT305X_ESW_PORTS_CPU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_RT305X_ESW_SOCPC_DISUN2CPU_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %edx
	shll	%cl, %edx
	orl	(%rax), %edx
	movq	_RT305X_ESW_SOCPC_DISMC2CPU_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%esi, %eax
	shll	%cl, %eax
	movq	_RT305X_ESW_SOCPC_DISBC2CPU_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%eax, %esi
	orl	%edx, %esi
	movq	_RT305X_ESW_REG_SOCPC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	movl	4(%r14), %eax
	testl	%eax, %eax
	movl	$1062218536, %esi               ## imm = 0x3F502B28
	cmovnel	%eax, %esi
	movq	_RT305X_ESW_REG_FPA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_FPA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_P0LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_P1LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_P2LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_P3LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_esw_w32
	movq	_RT305X_ESW_REG_P4LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_esw_w32
	movl	8(%r14), %ebx
	movq	%r14, %rdi
	callq	_esw_get_port_disable
	orl	%ebx, %eax
	movq	24(%r14), %rcx
	movl	%eax, %edx
	andl	$1, %edx
	movl	%edx, (%rcx)
	movl	%eax, %edx
	shrl	%edx
	andl	$1, %edx
	movl	%edx, 8(%rcx)
	movl	%eax, %edx
	shrl	$2, %edx
	andl	$1, %edx
	movl	%edx, 16(%rcx)
	movl	%eax, %edx
	shrl	$3, %edx
	andl	$1, %edx
	movl	%edx, 24(%rcx)
	movl	%eax, %edx
	shrl	$4, %edx
	andl	$1, %edx
	movl	%edx, 32(%rcx)
	shrl	$5, %eax
	andl	$1, %eax
	movl	%eax, 40(%rcx)
	movq	_ralink_soc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_RT305X_SOC_RT3352@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	movq	_RT5350_RESET_EPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fe_reset
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_rt305x_mii_write
	movq	_MII_BMCR@GOTPCREL(%rip), %r12
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %r13
	movq	_BMCR_PDOWN@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	(%r13), %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$26, %edx
	movl	$5633, %ecx                     ## imm = 0x1601
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$29, %edx
	movl	$28694, %ecx                    ## imm = 0x7016
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$30, %edx
	movl	$56, %ecx
	callq	_rt305x_mii_write
	incq	%rbx
	cmpq	$5, %rbx
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	cmpl	$0, (%rax,%rbx,8)
	movl	(%r12), %edx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %ecx
	jmp	LBB0_5
LBB0_7:
	movq	_RT305X_SOC_RT5350@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.8:
	movq	_RT5350_RESET_EPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fe_reset
	movl	12(%r14), %esi
	andl	$31, %esi
	movq	_RT5350_EWS_REG_LED_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_esw_w32
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_rt305x_mii_write
	movq	_MII_BMCR@GOTPCREL(%rip), %r12
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %r13
	movq	_BMCR_PDOWN@GOTPCREL(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	(%r13), %ecx
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$26, %edx
	movl	$5633, %ecx                     ## imm = 0x1601
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$29, %edx
	movl	$28693, %ecx                    ## imm = 0x7015
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$30, %edx
	movl	$56, %ecx
	callq	_rt305x_mii_write
	incq	%rbx
	cmpq	$5, %rbx
	je	LBB0_6
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	cmpl	$0, (%rax,%rbx,8)
	movl	(%r12), %edx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %ecx
	jmp	LBB0_12
LBB0_6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	xorl	%ecx, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$19008, %ecx                    ## imm = 0x4A40
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$25172, %ecx                    ## imm = 0x6254
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$3, %edx
	movl	$41343, %ecx                    ## imm = 0xA17F
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	movl	$32426, %ecx                    ## imm = 0x7EAA
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$14, %edx
	movl	$101, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	movl	$1668, %ecx                     ## imm = 0x684
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$17, %edx
	movl	$4064, %ecx                     ## imm = 0xFE0
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$18, %edx
	movl	$16570, %ecx                    ## imm = 0x40BA
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$22, %edx
	movl	$9535, %ecx                     ## imm = 0x253F
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$27, %edx
	movl	$12250, %ecx                    ## imm = 0x2FDA
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	movl	$50192, %ecx                    ## imm = 0xC410
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$29, %edx
	movl	$22923, %ecx                    ## imm = 0x598B
LBB0_24:
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_rt305x_mii_write
	movq	_RT305X_ESW_REG_SGC2@GOTPCREL(%rip), %r15
LBB0_25:
	movl	16(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_27
## %bb.26:
	movq	_RT305X_ESW_PMAP_LLLLLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_27:
	movq	_RT305X_ESW_SGC2_LAN_PMAP_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_RT305X_ESW_SGC2_LAN_PMAP_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	(%r15), %esi
	shll	%cl, %eax
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_esw_rmw
	movq	_RT305X_ESW_NUM_LEDS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_30
## %bb.28:
	movq	24(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	$5, 4(%rcx,%rdx,8)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_29
LBB0_30:
	leaq	20(%r14), %rdi
	callq	_esw_apply_config
	movq	_RT305X_ESW_PORT_ST_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	movq	_RT305X_ESW_REG_IMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_esw_w32                        ## TAILCALL
LBB0_13:
	movq	_MT762X_SOC_MT7628AN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.14:
	movq	_MT762X_SOC_MT7688@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.18:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_rt305x_mii_write
	movq	_MII_BMCR@GOTPCREL(%rip), %r12
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %r13
	movq	_BMCR_PDOWN@GOTPCREL(%rip), %r15
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	(%r13), %ecx
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$26, %edx
	movl	$5633, %ecx                     ## imm = 0x1601
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$29, %edx
	movl	$28760, %ecx                    ## imm = 0x7058
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$30, %edx
	movl	$24, %ecx
	callq	_rt305x_mii_write
	incq	%rbx
	cmpq	$5, %rbx
	je	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	cmpl	$0, (%rax,%rbx,8)
	movl	(%r12), %edx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	(%r15), %ecx
	jmp	LBB0_22
LBB0_15:
	movq	_RT5350_RESET_EPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fe_reset
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$8192, %ecx                     ## imm = 0x2000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$26, %edx
	movl	$32, %ecx
	callq	_rt305x_mii_write
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$31, %edx
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	$12544, %ecx                    ## imm = 0x3100
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$30, %edx
	movl	$40960, %ecx                    ## imm = 0xA000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$31, %edx
	movl	$40960, %ecx                    ## imm = 0xA000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$16, %edx
	movl	$1542, %ecx                     ## imm = 0x606
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$23, %edx
	movl	$3854, %ecx                     ## imm = 0xF0E
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$24, %edx
	movl	$5648, %ecx                     ## imm = 0x1610
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$30, %edx
	movl	$7957, %ecx                     ## imm = 0x1F15
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$28, %edx
	movl	$24849, %ecx                    ## imm = 0x6111
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$31, %edx
	movl	$8192, %ecx                     ## imm = 0x2000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$26, %edx
	xorl	%ecx, %ecx
	callq	_rt305x_mii_write
	incl	%ebx
	cmpl	$5, %ebx
	jne	LBB0_16
## %bb.17:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	movl	$20480, %ecx                    ## imm = 0x5000
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$19, %edx
	movl	$74, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	movl	$346, %ecx                      ## imm = 0x15A
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$21, %edx
	movl	$238, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$22, %edx
	movl	$51, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$23, %edx
	movl	$522, %ecx                      ## imm = 0x20A
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	xorl	%ecx, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$25, %edx
	movl	$586, %ecx                      ## imm = 0x24A
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$26, %edx
	movl	$858, %ecx                      ## imm = 0x35A
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$27, %edx
	movl	$750, %ecx                      ## imm = 0x2EE
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	movl	$563, %ecx                      ## imm = 0x233
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$29, %edx
	movl	$10, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$30, %edx
	xorl	%ecx, %ecx
	callq	_rt305x_mii_write
	jmp	LBB0_25
LBB0_23:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$31, %edx
	xorl	%ecx, %ecx
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$22, %edx
	movl	$1327, %ecx                     ## imm = 0x52F
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$17, %edx
	movl	$4064, %ecx                     ## imm = 0xFE0
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$18, %edx
	movl	$16570, %ecx                    ## imm = 0x40BA
	callq	_rt305x_mii_write
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$14, %edx
	movl	$101, %ecx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_RT305X_ESW_PMAP_LLLLLL,4,2     ## @RT305X_ESW_PMAP_LLLLLL
	.comm	_RT305X_ESW_REG_FCT0,4,2        ## @RT305X_ESW_REG_FCT0
	.comm	_RT305X_ESW_REG_SGC2,4,2        ## @RT305X_ESW_REG_SGC2
	.comm	_RT305X_ESW_PORTS_ALL,4,2       ## @RT305X_ESW_PORTS_ALL
	.comm	_RT305X_ESW_PFC1_EN_VLAN_S,4,2  ## @RT305X_ESW_PFC1_EN_VLAN_S
	.comm	_RT305X_ESW_REG_PFC1,4,2        ## @RT305X_ESW_REG_PFC1
	.comm	_RT305X_ESW_POC0_EN_BP_S,4,2    ## @RT305X_ESW_POC0_EN_BP_S
	.comm	_RT305X_ESW_POC0_EN_FC_S,4,2    ## @RT305X_ESW_POC0_EN_FC_S
	.comm	_RT305X_ESW_REG_POC0,4,2        ## @RT305X_ESW_REG_POC0
	.comm	_RT305X_ESW_POC2_ENAGING_S,4,2  ## @RT305X_ESW_POC2_ENAGING_S
	.comm	_RT305X_ESW_PORTS_NOCPU,4,2     ## @RT305X_ESW_PORTS_NOCPU
	.comm	_RT305X_ESW_POC2_UNTAG_EN_S,4,2 ## @RT305X_ESW_POC2_UNTAG_EN_S
	.comm	_RT305X_ESW_REG_POC2,4,2        ## @RT305X_ESW_REG_POC2
	.comm	_RT305X_ESW_REG_FCT2,4,2        ## @RT305X_ESW_REG_FCT2
	.comm	_RT305X_ESW_REG_SGC,4,2         ## @RT305X_ESW_REG_SGC
	.comm	_RT305X_ESW_SOCPC_CRC_PADDING,4,2 ## @RT305X_ESW_SOCPC_CRC_PADDING
	.comm	_RT305X_ESW_PORTS_CPU,4,2       ## @RT305X_ESW_PORTS_CPU
	.comm	_RT305X_ESW_SOCPC_DISUN2CPU_S,4,2 ## @RT305X_ESW_SOCPC_DISUN2CPU_S
	.comm	_RT305X_ESW_SOCPC_DISMC2CPU_S,4,2 ## @RT305X_ESW_SOCPC_DISMC2CPU_S
	.comm	_RT305X_ESW_SOCPC_DISBC2CPU_S,4,2 ## @RT305X_ESW_SOCPC_DISBC2CPU_S
	.comm	_RT305X_ESW_REG_SOCPC,4,2       ## @RT305X_ESW_REG_SOCPC
	.comm	_RT305X_ESW_REG_FPA2,4,2        ## @RT305X_ESW_REG_FPA2
	.comm	_RT305X_ESW_REG_FPA,4,2         ## @RT305X_ESW_REG_FPA
	.comm	_RT305X_ESW_REG_P0LED,4,2       ## @RT305X_ESW_REG_P0LED
	.comm	_RT305X_ESW_REG_P1LED,4,2       ## @RT305X_ESW_REG_P1LED
	.comm	_RT305X_ESW_REG_P2LED,4,2       ## @RT305X_ESW_REG_P2LED
	.comm	_RT305X_ESW_REG_P3LED,4,2       ## @RT305X_ESW_REG_P3LED
	.comm	_RT305X_ESW_REG_P4LED,4,2       ## @RT305X_ESW_REG_P4LED
	.comm	_ralink_soc,8,3                 ## @ralink_soc
	.comm	_RT305X_SOC_RT3352,8,3          ## @RT305X_SOC_RT3352
	.comm	_RT5350_RESET_EPHY,4,2          ## @RT5350_RESET_EPHY
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ## @BMCR_PDOWN
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.comm	_RT305X_SOC_RT5350,8,3          ## @RT305X_SOC_RT5350
	.comm	_RT5350_EWS_REG_LED_POLARITY,4,2 ## @RT5350_EWS_REG_LED_POLARITY
	.comm	_MT762X_SOC_MT7628AN,8,3        ## @MT762X_SOC_MT7628AN
	.comm	_MT762X_SOC_MT7688,8,3          ## @MT762X_SOC_MT7688
	.comm	_RT305X_ESW_SGC2_LAN_PMAP_M,4,2 ## @RT305X_ESW_SGC2_LAN_PMAP_M
	.comm	_RT305X_ESW_SGC2_LAN_PMAP_S,4,2 ## @RT305X_ESW_SGC2_LAN_PMAP_S
	.comm	_RT305X_ESW_NUM_LEDS,4,2        ## @RT305X_ESW_NUM_LEDS
	.comm	_RT305X_ESW_PORT_ST_CHG,4,2     ## @RT305X_ESW_PORT_ST_CHG
	.comm	_RT305X_ESW_REG_IMR,4,2         ## @RT305X_ESW_REG_IMR
	.no_dead_strip	_esw_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esw_hw_init
_esw_hw_init:                           ; @esw_hw_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, _RT305X_ESW_REG_FCT0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT305X_ESW_REG_FCT0@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #30800
	movk	w1, #51360, lsl #16
	bl	_esw_w32
Lloh3:
	adrp	x21, _RT305X_ESW_REG_SGC2@GOTPAGE
Lloh4:
	ldr	x21, [x21, _RT305X_ESW_REG_SGC2@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_esw_w32
Lloh5:
	adrp	x20, _RT305X_ESW_PORTS_ALL@GOTPAGE
Lloh6:
	ldr	x20, [x20, _RT305X_ESW_PORTS_ALL@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _RT305X_ESW_PFC1_EN_VLAN_S@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RT305X_ESW_PFC1_EN_VLAN_S@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	mov	w9, #21845
	orr	w1, w8, w9
Lloh10:
	adrp	x8, _RT305X_ESW_REG_PFC1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RT305X_ESW_REG_PFC1@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	ldr	w8, [x20]
Lloh13:
	adrp	x9, _RT305X_ESW_POC0_EN_BP_S@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RT305X_ESW_POC0_EN_BP_S@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w9, w8, w9
Lloh16:
	adrp	x10, _RT305X_ESW_POC0_EN_FC_S@GOTPAGE
Lloh17:
	ldr	x10, [x10, _RT305X_ESW_POC0_EN_FC_S@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w1, w8, w9
Lloh19:
	adrp	x8, _RT305X_ESW_REG_POC0@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RT305X_ESW_REG_POC0@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	ldr	w8, [x20]
Lloh22:
	adrp	x9, _RT305X_ESW_POC2_ENAGING_S@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RT305X_ESW_POC2_ENAGING_S@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh25:
	adrp	x9, _RT305X_ESW_PORTS_NOCPU@GOTPAGE
Lloh26:
	ldr	x9, [x9, _RT305X_ESW_PORTS_NOCPU@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	adrp	x10, _RT305X_ESW_POC2_UNTAG_EN_S@GOTPAGE
Lloh29:
	ldr	x10, [x10, _RT305X_ESW_POC2_UNTAG_EN_S@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w1, w9, w8
Lloh31:
	adrp	x8, _RT305X_ESW_REG_POC2@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RT305X_ESW_REG_POC2@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	ldr	w8, [x19]
Lloh34:
	adrp	x9, _RT305X_ESW_REG_FCT2@GOTPAGE
Lloh35:
	ldr	x9, [x9, _RT305X_ESW_REG_FCT2@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x9]
	mov	w9, #20492
	movk	w9, #2, lsl #16
	cmp	w8, #0
	csel	w1, w9, w8, eq
	mov	x0, x19
	bl	_esw_w32
Lloh37:
	adrp	x8, _RT305X_ESW_REG_SGC@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RT305X_ESW_REG_SGC@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #41729
	movk	w1, #8, lsl #16
	bl	_esw_w32
Lloh40:
	adrp	x8, _RT305X_ESW_SOCPC_CRC_PADDING@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RT305X_ESW_SOCPC_CRC_PADDING@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _RT305X_ESW_PORTS_CPU@GOTPAGE
Lloh44:
	ldr	x9, [x9, _RT305X_ESW_PORTS_CPU@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
Lloh46:
	adrp	x10, _RT305X_ESW_SOCPC_DISUN2CPU_S@GOTPAGE
Lloh47:
	ldr	x10, [x10, _RT305X_ESW_SOCPC_DISUN2CPU_S@GOTPAGEOFF]
Lloh48:
	ldr	w10, [x10]
	lsl	w10, w9, w10
Lloh49:
	adrp	x11, _RT305X_ESW_SOCPC_DISMC2CPU_S@GOTPAGE
Lloh50:
	ldr	x11, [x11, _RT305X_ESW_SOCPC_DISMC2CPU_S@GOTPAGEOFF]
	orr	w8, w10, w8
Lloh51:
	ldr	w10, [x11]
	lsl	w10, w9, w10
	orr	w8, w8, w10
Lloh52:
	adrp	x10, _RT305X_ESW_SOCPC_DISBC2CPU_S@GOTPAGE
Lloh53:
	ldr	x10, [x10, _RT305X_ESW_SOCPC_DISBC2CPU_S@GOTPAGEOFF]
Lloh54:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w1, w8, w9
Lloh55:
	adrp	x8, _RT305X_ESW_REG_SOCPC@GOTPAGE
Lloh56:
	ldr	x8, [x8, _RT305X_ESW_REG_SOCPC@GOTPAGEOFF]
Lloh57:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	ldr	w8, [x19, #4]
	mov	w9, #11048
	movk	w9, #16208, lsl #16
	cmp	w8, #0
	csel	w1, w9, w8, eq
Lloh58:
	adrp	x8, _RT305X_ESW_REG_FPA2@GOTPAGE
Lloh59:
	ldr	x8, [x8, _RT305X_ESW_REG_FPA2@GOTPAGEOFF]
Lloh60:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
Lloh61:
	adrp	x8, _RT305X_ESW_REG_FPA@GOTPAGE
Lloh62:
	ldr	x8, [x8, _RT305X_ESW_REG_FPA@GOTPAGEOFF]
Lloh63:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_esw_w32
Lloh64:
	adrp	x8, _RT305X_ESW_REG_P0LED@GOTPAGE
Lloh65:
	ldr	x8, [x8, _RT305X_ESW_REG_P0LED@GOTPAGEOFF]
Lloh66:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_esw_w32
Lloh67:
	adrp	x8, _RT305X_ESW_REG_P1LED@GOTPAGE
Lloh68:
	ldr	x8, [x8, _RT305X_ESW_REG_P1LED@GOTPAGEOFF]
Lloh69:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_esw_w32
Lloh70:
	adrp	x8, _RT305X_ESW_REG_P2LED@GOTPAGE
Lloh71:
	ldr	x8, [x8, _RT305X_ESW_REG_P2LED@GOTPAGEOFF]
Lloh72:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_esw_w32
Lloh73:
	adrp	x8, _RT305X_ESW_REG_P3LED@GOTPAGE
Lloh74:
	ldr	x8, [x8, _RT305X_ESW_REG_P3LED@GOTPAGEOFF]
Lloh75:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_esw_w32
Lloh76:
	adrp	x8, _RT305X_ESW_REG_P4LED@GOTPAGE
Lloh77:
	ldr	x8, [x8, _RT305X_ESW_REG_P4LED@GOTPAGEOFF]
Lloh78:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_esw_w32
	ldr	w20, [x19, #8]
	mov	x0, x19
	bl	_esw_get_port_disable
	orr	w8, w0, w20
	ldr	x9, [x19, #24]
	and	w10, w8, #0x1
	str	w10, [x9]
	ubfx	w10, w8, #1, #1
	str	w10, [x9, #8]
	ubfx	w10, w8, #2, #1
	str	w10, [x9, #16]
	ubfx	w10, w8, #3, #1
	str	w10, [x9, #24]
	ubfx	w10, w8, #4, #1
	str	w10, [x9, #32]
	ubfx	w8, w8, #5, #1
Lloh79:
	adrp	x10, _ralink_soc@GOTPAGE
Lloh80:
	ldr	x10, [x10, _ralink_soc@GOTPAGEOFF]
	str	w8, [x9, #40]
Lloh81:
	ldr	x8, [x10]
Lloh82:
	adrp	x9, _RT305X_SOC_RT3352@GOTPAGE
Lloh83:
	ldr	x9, [x9, _RT305X_SOC_RT3352@GOTPAGEOFF]
Lloh84:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
Lloh85:
	adrp	x8, _RT5350_RESET_EPHY@GOTPAGE
Lloh86:
	ldr	x8, [x8, _RT5350_RESET_EPHY@GOTPAGEOFF]
Lloh87:
	ldr	w0, [x8]
	bl	_fe_reset
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #32768
	bl	_rt305x_mii_write
	mov	x22, #0
	mov	x20, #0
Lloh88:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh89:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
Lloh90:
	adrp	x24, _BMCR_FULLDPLX@GOTPAGE
Lloh91:
	ldr	x24, [x24, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh92:
	adrp	x25, _BMCR_ANENABLE@GOTPAGE
Lloh93:
	ldr	x25, [x25, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh94:
	adrp	x26, _BMCR_SPEED100@GOTPAGE
Lloh95:
	ldr	x26, [x26, _BMCR_SPEED100@GOTPAGEOFF]
Lloh96:
	adrp	x27, _BMCR_PDOWN@GOTPAGE
Lloh97:
	ldr	x27, [x27, _BMCR_PDOWN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w3, w8, w9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #26
	mov	w3, #5633
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #29
	mov	w3, #28694
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	mov	w3, #56
	bl	_rt305x_mii_write
	add	x20, x20, #1
	add	x22, x22, #8
	cmp	x20, #5
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x22]
	ldr	w2, [x23]
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x27]
	b	LBB0_3
LBB0_6:
Lloh98:
	adrp	x9, _RT305X_SOC_RT5350@GOTPAGE
Lloh99:
	ldr	x9, [x9, _RT305X_SOC_RT5350@GOTPAGEOFF]
Lloh100:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.7:
Lloh101:
	adrp	x8, _RT5350_RESET_EPHY@GOTPAGE
Lloh102:
	ldr	x8, [x8, _RT5350_RESET_EPHY@GOTPAGEOFF]
Lloh103:
	ldr	w0, [x8]
	bl	_fe_reset
	ldr	w8, [x19, #12]
	and	w1, w8, #0x1f
Lloh104:
	adrp	x8, _RT5350_EWS_REG_LED_POLARITY@GOTPAGE
Lloh105:
	ldr	x8, [x8, _RT5350_EWS_REG_LED_POLARITY@GOTPAGEOFF]
Lloh106:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #32768
	bl	_rt305x_mii_write
	mov	x22, #0
	mov	x20, #0
Lloh107:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh108:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
Lloh109:
	adrp	x24, _BMCR_FULLDPLX@GOTPAGE
Lloh110:
	ldr	x24, [x24, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh111:
	adrp	x25, _BMCR_ANENABLE@GOTPAGE
Lloh112:
	ldr	x25, [x25, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh113:
	adrp	x26, _BMCR_SPEED100@GOTPAGE
Lloh114:
	ldr	x26, [x26, _BMCR_SPEED100@GOTPAGEOFF]
Lloh115:
	adrp	x27, _BMCR_PDOWN@GOTPAGE
Lloh116:
	ldr	x27, [x27, _BMCR_PDOWN@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w3, w8, w9
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #26
	mov	w3, #5633
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #29
	mov	w3, #28693
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	mov	w3, #56
	bl	_rt305x_mii_write
	add	x20, x20, #1
	add	x22, x22, #8
	cmp	x20, #5
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x22]
	ldr	w2, [x23]
	cbz	w8, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w3, [x27]
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #0
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	w3, #19008
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2
	mov	w3, #25172
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #3
	mov	w3, #41343
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #12
	mov	w3, #32426
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #14
	mov	w3, #101
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	mov	w3, #1668
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #17
	mov	w3, #4064
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #18
	mov	w3, #16570
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #22
	mov	w3, #9535
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #27
	mov	w3, #12250
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #28
	mov	w3, #50192
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #29
	mov	w3, #22923
LBB0_13:
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #32768
LBB0_14:
	bl	_rt305x_mii_write
	ldr	w8, [x19, #16]
Lloh117:
	adrp	x9, _RT305X_ESW_PMAP_LLLLLL@GOTPAGE
Lloh118:
	ldr	x9, [x9, _RT305X_ESW_PMAP_LLLLLL@GOTPAGEOFF]
Lloh119:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w8, eq
	ldr	w1, [x21]
Lloh120:
	adrp	x9, _RT305X_ESW_SGC2_LAN_PMAP_M@GOTPAGE
Lloh121:
	ldr	x9, [x9, _RT305X_ESW_SGC2_LAN_PMAP_M@GOTPAGEOFF]
Lloh122:
	ldr	w9, [x9]
Lloh123:
	adrp	x10, _RT305X_ESW_SGC2_LAN_PMAP_S@GOTPAGE
Lloh124:
	ldr	x10, [x10, _RT305X_ESW_SGC2_LAN_PMAP_S@GOTPAGEOFF]
Lloh125:
	ldr	w10, [x10]
	lsl	w2, w9, w10
	lsl	w3, w8, w10
	mov	x0, x19
	bl	_esw_rmw
Lloh126:
	adrp	x8, _RT305X_ESW_NUM_LEDS@GOTPAGE
Lloh127:
	ldr	x8, [x8, _RT305X_ESW_NUM_LEDS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.15:
	mov	x9, #0
	ldr	x10, [x19, #24]
	add	x10, x10, #4
	mov	w11, #5
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	str	w11, [x10], #8
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_16
LBB0_17:
	add	x0, x19, #20
	bl	_esw_apply_config
Lloh128:
	adrp	x8, _RT305X_ESW_PORT_ST_CHG@GOTPAGE
Lloh129:
	ldr	x8, [x8, _RT305X_ESW_PORT_ST_CHG@GOTPAGEOFF]
Lloh130:
	ldr	w8, [x8]
	mvn	w1, w8
Lloh131:
	adrp	x8, _RT305X_ESW_REG_IMR@GOTPAGE
Lloh132:
	ldr	x8, [x8, _RT305X_ESW_REG_IMR@GOTPAGEOFF]
Lloh133:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_esw_w32
LBB0_18:
Lloh134:
	adrp	x9, _MT762X_SOC_MT7628AN@GOTPAGE
Lloh135:
	ldr	x9, [x9, _MT762X_SOC_MT7628AN@GOTPAGEOFF]
Lloh136:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.19:
Lloh137:
	adrp	x9, _MT762X_SOC_MT7688@GOTPAGE
Lloh138:
	ldr	x9, [x9, _MT762X_SOC_MT7688@GOTPAGEOFF]
Lloh139:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.20:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #32768
	bl	_rt305x_mii_write
	mov	x22, #0
	mov	x20, #0
Lloh140:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh141:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
Lloh142:
	adrp	x24, _BMCR_FULLDPLX@GOTPAGE
Lloh143:
	ldr	x24, [x24, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh144:
	adrp	x25, _BMCR_ANENABLE@GOTPAGE
Lloh145:
	ldr	x25, [x25, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh146:
	adrp	x26, _BMCR_SPEED100@GOTPAGE
Lloh147:
	ldr	x26, [x26, _BMCR_SPEED100@GOTPAGEOFF]
Lloh148:
	adrp	x27, _BMCR_PDOWN@GOTPAGE
Lloh149:
	ldr	x27, [x27, _BMCR_PDOWN@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w3, w8, w9
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #26
	mov	w3, #5633
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #29
	mov	w3, #28760
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	mov	w3, #24
	bl	_rt305x_mii_write
	add	x20, x20, #1
	add	x22, x22, #8
	cmp	x20, #5
	b.eq	LBB0_28
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x22]
	ldr	w2, [x23]
	cbz	w8, LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w3, [x27]
	b	LBB0_22
LBB0_25:
Lloh150:
	adrp	x8, _RT5350_RESET_EPHY@GOTPAGE
Lloh151:
	ldr	x8, [x8, _RT5350_RESET_EPHY@GOTPAGEOFF]
Lloh152:
	ldr	w0, [x8]
	bl	_fe_reset
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #8192
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #26
	mov	w3, #32
	bl	_rt305x_mii_write
	mov	w20, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #31
	mov	w3, #32768
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #12544
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	mov	w3, #40960
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #31
	mov	w3, #40960
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #16
	mov	w3, #1542
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #23
	mov	w3, #3854
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #24
	mov	w3, #5648
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	mov	w3, #7957
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #28
	mov	w3, #24849
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #31
	mov	w3, #8192
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #26
	mov	w3, #0
	bl	_rt305x_mii_write
	add	w20, w20, #1
	cmp	w20, #5
	b.ne	LBB0_26
; %bb.27:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #20480
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #19
	mov	w3, #74
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #20
	mov	w3, #346
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #21
	mov	w3, #238
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #22
	mov	w3, #51
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #23
	mov	w3, #522
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	mov	w3, #0
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #25
	mov	w3, #586
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #26
	mov	w3, #858
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #27
	mov	w3, #750
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #28
	mov	w3, #563
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #29
	mov	w3, #10
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #30
	mov	w3, #0
	b	LBB0_14
LBB0_28:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #31
	mov	w3, #0
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #22
	mov	w3, #1327
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #17
	mov	w3, #4064
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #18
	mov	w3, #16570
	bl	_rt305x_mii_write
	mov	x0, x19
	mov	w1, #0
	mov	w2, #14
	mov	w3, #101
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpLdrGot	Lloh92, Lloh93
	.loh AdrpLdrGot	Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGot	Lloh115, Lloh116
	.loh AdrpLdrGot	Lloh113, Lloh114
	.loh AdrpLdrGot	Lloh111, Lloh112
	.loh AdrpLdrGot	Lloh109, Lloh110
	.loh AdrpLdrGot	Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGot	Lloh126, Lloh127
	.loh AdrpLdrGotLdr	Lloh123, Lloh124, Lloh125
	.loh AdrpLdrGotLdr	Lloh120, Lloh121, Lloh122
	.loh AdrpLdrGotLdr	Lloh117, Lloh118, Lloh119
	.loh AdrpLdrGotLdr	Lloh131, Lloh132, Lloh133
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh130
	.loh AdrpLdrGotLdr	Lloh134, Lloh135, Lloh136
	.loh AdrpLdrGotLdr	Lloh137, Lloh138, Lloh139
	.loh AdrpLdrGot	Lloh148, Lloh149
	.loh AdrpLdrGot	Lloh146, Lloh147
	.loh AdrpLdrGot	Lloh144, Lloh145
	.loh AdrpLdrGot	Lloh142, Lloh143
	.loh AdrpLdrGot	Lloh140, Lloh141
	.loh AdrpLdrGotLdr	Lloh150, Lloh151, Lloh152
	.cfi_endproc
                                        ; -- End function
	.comm	_RT305X_ESW_PMAP_LLLLLL,4,2     ; @RT305X_ESW_PMAP_LLLLLL
	.comm	_RT305X_ESW_REG_FCT0,4,2        ; @RT305X_ESW_REG_FCT0
	.comm	_RT305X_ESW_REG_SGC2,4,2        ; @RT305X_ESW_REG_SGC2
	.comm	_RT305X_ESW_PORTS_ALL,4,2       ; @RT305X_ESW_PORTS_ALL
	.comm	_RT305X_ESW_PFC1_EN_VLAN_S,4,2  ; @RT305X_ESW_PFC1_EN_VLAN_S
	.comm	_RT305X_ESW_REG_PFC1,4,2        ; @RT305X_ESW_REG_PFC1
	.comm	_RT305X_ESW_POC0_EN_BP_S,4,2    ; @RT305X_ESW_POC0_EN_BP_S
	.comm	_RT305X_ESW_POC0_EN_FC_S,4,2    ; @RT305X_ESW_POC0_EN_FC_S
	.comm	_RT305X_ESW_REG_POC0,4,2        ; @RT305X_ESW_REG_POC0
	.comm	_RT305X_ESW_POC2_ENAGING_S,4,2  ; @RT305X_ESW_POC2_ENAGING_S
	.comm	_RT305X_ESW_PORTS_NOCPU,4,2     ; @RT305X_ESW_PORTS_NOCPU
	.comm	_RT305X_ESW_POC2_UNTAG_EN_S,4,2 ; @RT305X_ESW_POC2_UNTAG_EN_S
	.comm	_RT305X_ESW_REG_POC2,4,2        ; @RT305X_ESW_REG_POC2
	.comm	_RT305X_ESW_REG_FCT2,4,2        ; @RT305X_ESW_REG_FCT2
	.comm	_RT305X_ESW_REG_SGC,4,2         ; @RT305X_ESW_REG_SGC
	.comm	_RT305X_ESW_SOCPC_CRC_PADDING,4,2 ; @RT305X_ESW_SOCPC_CRC_PADDING
	.comm	_RT305X_ESW_PORTS_CPU,4,2       ; @RT305X_ESW_PORTS_CPU
	.comm	_RT305X_ESW_SOCPC_DISUN2CPU_S,4,2 ; @RT305X_ESW_SOCPC_DISUN2CPU_S
	.comm	_RT305X_ESW_SOCPC_DISMC2CPU_S,4,2 ; @RT305X_ESW_SOCPC_DISMC2CPU_S
	.comm	_RT305X_ESW_SOCPC_DISBC2CPU_S,4,2 ; @RT305X_ESW_SOCPC_DISBC2CPU_S
	.comm	_RT305X_ESW_REG_SOCPC,4,2       ; @RT305X_ESW_REG_SOCPC
	.comm	_RT305X_ESW_REG_FPA2,4,2        ; @RT305X_ESW_REG_FPA2
	.comm	_RT305X_ESW_REG_FPA,4,2         ; @RT305X_ESW_REG_FPA
	.comm	_RT305X_ESW_REG_P0LED,4,2       ; @RT305X_ESW_REG_P0LED
	.comm	_RT305X_ESW_REG_P1LED,4,2       ; @RT305X_ESW_REG_P1LED
	.comm	_RT305X_ESW_REG_P2LED,4,2       ; @RT305X_ESW_REG_P2LED
	.comm	_RT305X_ESW_REG_P3LED,4,2       ; @RT305X_ESW_REG_P3LED
	.comm	_RT305X_ESW_REG_P4LED,4,2       ; @RT305X_ESW_REG_P4LED
	.comm	_ralink_soc,8,3                 ; @ralink_soc
	.comm	_RT305X_SOC_RT3352,8,3          ; @RT305X_SOC_RT3352
	.comm	_RT5350_RESET_EPHY,4,2          ; @RT5350_RESET_EPHY
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ; @BMCR_PDOWN
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.comm	_RT305X_SOC_RT5350,8,3          ; @RT305X_SOC_RT5350
	.comm	_RT5350_EWS_REG_LED_POLARITY,4,2 ; @RT5350_EWS_REG_LED_POLARITY
	.comm	_MT762X_SOC_MT7628AN,8,3        ; @MT762X_SOC_MT7628AN
	.comm	_MT762X_SOC_MT7688,8,3          ; @MT762X_SOC_MT7688
	.comm	_RT305X_ESW_SGC2_LAN_PMAP_M,4,2 ; @RT305X_ESW_SGC2_LAN_PMAP_M
	.comm	_RT305X_ESW_SGC2_LAN_PMAP_S,4,2 ; @RT305X_ESW_SGC2_LAN_PMAP_S
	.comm	_RT305X_ESW_NUM_LEDS,4,2        ; @RT305X_ESW_NUM_LEDS
	.comm	_RT305X_ESW_PORT_ST_CHG,4,2     ; @RT305X_ESW_PORT_ST_CHG
	.comm	_RT305X_ESW_REG_IMR,4,2         ; @RT305X_ESW_REG_IMR
	.no_dead_strip	_esw_hw_init
.subsections_via_symbols
