	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ave_init
_ave_init:                              ## @ave_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
	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, %rbx
	movq	$0, -72(%rbp)
	movl	$0, -64(%rbp)
	movq	_ETHTOOL_GWOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	callq	_netdev_priv
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	cmpl	$0, (%r12)
	movl	$0, %r13d
	jle	LBB0_8
## %bb.1:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%r13,4), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jl	LBB0_2
LBB0_8:
	cmpl	$0, 4(%r12)
	jle	LBB0_13
## %bb.9:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%r15,4), %edi
	callq	_reset_control_deassert
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	movslq	4(%r12), %rax
	cmpq	%rax, %r15
	jl	LBB0_10
LBB0_13:
	movl	48(%r12), %edi
	movq	_SG_ETPINMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%r12), %ecx
	movl	44(%r12), %edx
	callq	_regmap_update_bits
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.14:
	movq	%rbx, %rdi
	callq	_ave_global_reset
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_of_get_child_by_name
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movl	24(%r12), %edi
	movq	%rax, %rsi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_of_mdiobus_register
	movl	%eax, %r14d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_of_node_put
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.17:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_18
LBB0_3:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_4
LBB0_11:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
LBB0_21:
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.22:
	movl	%r15d, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	-8(%rax,%rbx,4), %edi
	callq	_reset_control_assert
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_23
LBB0_4:
	testl	%r13d, %r13d
	jle	LBB0_27
## %bb.5:
	movl	%r13d, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	-8(%rax,%rbx,4), %edi
	callq	_clk_disable_unprepare
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_6
LBB0_27:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_19:
	movq	_ave_phy_adjust_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_of_phy_get_and_connect
	testq	%rax, %rax
	je	LBB0_20
## %bb.24:
	movq	%rax, %r14
	movq	%rax, 32(%r12)
	leaq	-72(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ave_ethtool_get_wol
	xorl	%esi, %esi
	cmpl	$0, -64(%rbp)
	setne	%sil
	movq	%rbx, %rdi
	callq	_device_set_wakeup_capable
	movq	$0, -72(%rbp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ave_ethtool_set_wol
	movq	%r14, %rdi
	callq	_phy_interface_is_rgmii
	testl	%eax, %eax
	jne	LBB0_26
## %bb.25:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_phy_set_max_speed
LBB0_26:
	movq	%r14, %rdi
	callq	_phy_support_asym_pause
	movq	%r14, %rdi
	callq	_phy_attached_info
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_20:
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	24(%r12), %edi
	callq	_mdiobus_unregister
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_ETHTOOL_GWOL,4,2               ## @ETHTOOL_GWOL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't enable clock\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't deassert reset\n"

	.comm	_SG_ETPINMODE,4,2               ## @SG_ETPINMODE
L_.str.2:                               ## @.str.2
	.asciz	"mdio"

L_.str.3:                               ## @.str.3
	.asciz	"mdio node not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"failed to register mdiobus\n"

	.comm	_ave_phy_adjust_link,4,2        ## @ave_phy_adjust_link
L_.str.5:                               ## @.str.5
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.no_dead_strip	_ave_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ave_init
_ave_init:                              ; @ave_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
	str	xzr, [sp]
Lloh0:
	adrp	x8, _ETHTOOL_GWOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETHTOOL_GWOL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #8]
	bl	_netdev_priv
	mov	x19, x0
	ldr	x21, [x20]
	ldr	x23, [x21]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x25, lsl #2]
	bl	_clk_prepare_enable
	cbnz	w0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x19]
	cmp	x25, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w25, #0
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x26, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x26, lsl #2]
	bl	_reset_control_deassert
	cbnz	w0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x19, #4]
	cmp	x26, x8
	b.lt	LBB0_7
	b	LBB0_11
LBB0_9:
	mov	x22, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_20
LBB0_10:
	mov	w26, #0
LBB0_11:
	ldp	w2, w0, [x19, #44]
Lloh5:
	adrp	x8, _SG_ETPINMODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SG_ETPINMODE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x19, #40]
	bl	_regmap_update_bits
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.12:
	mov	x0, x20
	bl	_ave_global_reset
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_of_get_child_by_name
	cbz	x0, LBB0_24
; %bb.13:
	mov	x24, x0
	ldr	w0, [x19, #24]
	mov	x1, x24
	bl	_of_mdiobus_register
	mov	x22, x0
	mov	x0, x24
	bl	_of_node_put
	cbz	w22, LBB0_25
; %bb.14:
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_15:
	mov	x22, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x21
	bl	_dev_err
LBB0_17:
	cmp	w26, #1
	b.lt	LBB0_20
; %bb.18:
	mov	w8, w26
	sub	x20, x8, #1
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_reset_control_assert
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.hi	LBB0_19
LBB0_20:
	cmp	w25, #1
	b.lt	LBB0_23
; %bb.21:
	mov	w8, w25
	sub	x20, x8, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x20, lsl #2]
	bl	_clk_disable_unprepare
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.hi	LBB0_22
LBB0_23:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_24:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_25:
Lloh19:
	adrp	x8, _ave_phy_adjust_link@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ave_phy_adjust_link@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_of_phy_get_and_connect
	cbz	x0, LBB0_29
; %bb.26:
	mov	x22, x0
	str	x0, [x19, #32]
	mov	x1, sp
	mov	x0, x20
	bl	_ave_ethtool_get_wol
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cset	w1, ne
	mov	x0, x20
	bl	_device_set_wakeup_capable
	str	xzr, [sp]
	mov	x1, sp
	mov	x0, x20
	bl	_ave_ethtool_set_wol
	mov	x0, x22
	bl	_phy_interface_is_rgmii
	cbnz	w0, LBB0_28
; %bb.27:
Lloh22:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_phy_set_max_speed
LBB0_28:
	mov	x0, x22
	bl	_phy_support_asym_pause
	mov	x0, x22
	bl	_phy_attached_info
	mov	w22, #0
	b	LBB0_23
LBB0_29:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh27:
	adrp	x8, _ENODEV@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	w0, [x19, #24]
	bl	_mdiobus_unregister
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ETHTOOL_GWOL,4,2               ; @ETHTOOL_GWOL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't enable clock\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't deassert reset\n"

	.comm	_SG_ETPINMODE,4,2               ; @SG_ETPINMODE
l_.str.2:                               ; @.str.2
	.asciz	"mdio"

l_.str.3:                               ; @.str.3
	.asciz	"mdio node not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"failed to register mdiobus\n"

	.comm	_ave_phy_adjust_link,4,2        ; @ave_phy_adjust_link
l_.str.5:                               ; @.str.5
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.no_dead_strip	_ave_init
.subsections_via_symbols
