	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7531_sw_post_init
_mt7531_sw_post_init:                   ## @mt7531_sw_post_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
	callq	_mt7531_phy_pll_setup
	movq	_PHY_DEV1F@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_PHY_DEV1F_REG_403@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*(%r14)
	movq	_PHY_EN_BYPASS_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_POWER_ON_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	notl	%r8d
	andl	%eax, %r8d
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*16(%r14)
	movq	%r14, %rdi
	callq	_mt7531_phy_setting
	movq	_MT753X_NUM_PHYS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_9
## %bb.1:
	movq	_MII_BMCR@GOTPCREL(%rip), %r15
	movq	_BMCR_ISOLATE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	*8(%r14)
	movl	(%r12), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	*24(%r14)
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_2
## %bb.3:
	testl	%eax, %eax
	movq	_PHY_DEV1F@GOTPCREL(%rip), %r15
	movq	_PHY_DEV1F_REG_403@GOTPCREL(%rip), %r12
	jle	LBB0_9
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mt7531_adjust_line_driving
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_5
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mt7531_eee_setting
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_8
LBB0_9:
	movq	_CHIP_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt753x_reg_read
	movq	_CHIP_REV_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CHIP_REV_E1@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	movq	_GBE_EFUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt753x_reg_read
	movq	_GBE_SEL_EFUSE_EN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*(%r14)
	movq	_GBE_EFUSE_SETTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	notl	%r8d
	andl	%eax, %r8d
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*16(%r14)
	jmp	LBB0_13
LBB0_12:
	movq	%r14, %rdi
	callq	_mt7531_internal_phy_calibration
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_DEV1F,4,2                  ## @PHY_DEV1F
	.comm	_PHY_DEV1F_REG_403,4,2          ## @PHY_DEV1F_REG_403
	.comm	_PHY_EN_BYPASS_MODE,4,2         ## @PHY_EN_BYPASS_MODE
	.comm	_POWER_ON_OFF,4,2               ## @POWER_ON_OFF
	.comm	_MT753X_NUM_PHYS,4,2            ## @MT753X_NUM_PHYS
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ISOLATE,4,2               ## @BMCR_ISOLATE
	.comm	_CHIP_REV,4,2                   ## @CHIP_REV
	.comm	_CHIP_REV_M,4,2                 ## @CHIP_REV_M
	.comm	_CHIP_REV_E1,4,2                ## @CHIP_REV_E1
	.comm	_GBE_EFUSE,4,2                  ## @GBE_EFUSE
	.comm	_GBE_SEL_EFUSE_EN,4,2           ## @GBE_SEL_EFUSE_EN
	.comm	_GBE_EFUSE_SETTING,4,2          ## @GBE_EFUSE_SETTING
	.no_dead_strip	_mt7531_sw_post_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7531_sw_post_init
_mt7531_sw_post_init:                   ; @mt7531_sw_post_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	x19, x0
	bl	_mt7531_phy_pll_setup
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _PHY_DEV1F@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PHY_DEV1F@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh2:
	adrp	x22, _PHY_DEV1F_REG_403@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PHY_DEV1F_REG_403@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #0
	blr	x8
Lloh4:
	adrp	x8, _PHY_EN_BYPASS_MODE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PHY_EN_BYPASS_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _POWER_ON_OFF@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POWER_ON_OFF@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh9:
	ldr	w9, [x9]
	bic	w4, w8, w9
	ldr	x8, [x19, #16]
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	mov	x0, x19
	bl	_mt7531_phy_setting
Lloh10:
	adrp	x23, _MT753X_NUM_PHYS@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MT753X_NUM_PHYS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w20, #0
Lloh12:
	adrp	x24, _MII_BMCR@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MII_BMCR@GOTPAGEOFF]
Lloh14:
	adrp	x25, _BMCR_ISOLATE@GOTPAGE
Lloh15:
	ldr	x25, [x25, _BMCR_ISOLATE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	ldr	w8, [x25]
	bic	w3, w0, w8
	ldr	x8, [x19, #24]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_2
; %bb.3:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	w20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mt7531_adjust_line_driving
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_5
; %bb.6:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	w20, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mt7531_eee_setting
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_8
LBB0_9:
Lloh16:
	adrp	x8, _CHIP_REV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CHIP_REV@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt753x_reg_read
Lloh19:
	adrp	x8, _CHIP_REV_M@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CHIP_REV_M@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh22:
	adrp	x9, _CHIP_REV_E1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CHIP_REV_E1@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.10:
Lloh25:
	adrp	x8, _GBE_EFUSE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GBE_EFUSE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt753x_reg_read
Lloh28:
	adrp	x8, _GBE_SEL_EFUSE_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GBE_SEL_EFUSE_EN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x19]
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #0
	blr	x8
Lloh31:
	adrp	x8, _GBE_EFUSE_SETTING@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GBE_EFUSE_SETTING@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	bic	w4, w0, w8
	ldr	x8, [x19, #16]
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_mt7531_internal_phy_calibration
LBB0_13:
	mov	w0, #0
	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	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_DEV1F,4,2                  ; @PHY_DEV1F
	.comm	_PHY_DEV1F_REG_403,4,2          ; @PHY_DEV1F_REG_403
	.comm	_PHY_EN_BYPASS_MODE,4,2         ; @PHY_EN_BYPASS_MODE
	.comm	_POWER_ON_OFF,4,2               ; @POWER_ON_OFF
	.comm	_MT753X_NUM_PHYS,4,2            ; @MT753X_NUM_PHYS
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ISOLATE,4,2               ; @BMCR_ISOLATE
	.comm	_CHIP_REV,4,2                   ; @CHIP_REV
	.comm	_CHIP_REV_M,4,2                 ; @CHIP_REV_M
	.comm	_CHIP_REV_E1,4,2                ; @CHIP_REV_E1
	.comm	_GBE_EFUSE,4,2                  ; @GBE_EFUSE
	.comm	_GBE_SEL_EFUSE_EN,4,2           ; @GBE_SEL_EFUSE_EN
	.comm	_GBE_EFUSE_SETTING,4,2          ; @GBE_EFUSE_SETTING
	.no_dead_strip	_mt7531_sw_post_init
.subsections_via_symbols
