	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_phy_connect
_ag71xx_phy_connect:                    ## @ag71xx_phy_connect
	.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, %r15
	movq	8(%rdi), %r14
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_of_phy_register_fixed_link
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_of_node_get
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
LBB0_5:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	8(%r15), %rdi
	movq	_ag71xx_phy_link_adjust@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %r8d
	xorl	%r12d, %r12d
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_of_phy_connect
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_of_node_put
	testq	%r13, %r13
	je	LBB0_9
## %bb.10:
	movq	%r13, %rdi
	callq	_phy_attached_info
	jmp	LBB0_11
LBB0_6:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movl	%eax, %r12d
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_netif_err
	jmp	LBB0_11
LBB0_9:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rcx
LBB0_7:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_netif_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to register fixed PHY link: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"phy-handle"

L_.str.2:                               ## @.str.2
	.asciz	"Could not find valid phy node\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ag71xx_phy_link_adjust,4,2     ## @ag71xx_phy_link_adjust
L_.str.3:                               ## @.str.3
	.asciz	"Could not connect to PHY device\n"

	.no_dead_strip	_ag71xx_phy_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_phy_connect
_ag71xx_phy_connect:                    ; @ag71xx_phy_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldp	x19, x8, [x0, #8]
	ldr	x22, [x8]
	mov	x0, x22
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x22
	bl	_of_phy_register_fixed_link
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x0, x22
	bl	_of_node_get
	mov	x21, x0
	cbz	x0, LBB0_6
LBB0_3:
	ldr	x0, [x20, #8]
Lloh0:
	adrp	x8, _ag71xx_phy_link_adjust@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ag71xx_phy_link_adjust@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	w4, [x20]
	mov	x1, x21
	mov	w3, #0
	bl	_of_phy_connect
	mov	x22, x0
	mov	x0, x21
	bl	_of_node_put
	cbz	x22, LBB0_8
; %bb.4:
	mov	x0, x22
	bl	_phy_attached_info
	mov	w21, #0
	b	LBB0_10
LBB0_5:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w2, #0
	bl	_of_parse_phandle
	mov	x21, x0
	cbnz	x0, LBB0_3
LBB0_6:
Lloh5:
	adrp	x8, _probe@GOTPAGE
Lloh6:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x3, l_.str.2@PAGE
Lloh9:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_7:
	mov	x21, x0
Lloh10:
	adrp	x8, _probe@GOTPAGE
Lloh11:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh13:
	adrp	x3, l_.str@PAGE
Lloh14:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x8, _probe@GOTPAGE
Lloh16:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x3, l_.str.3@PAGE
Lloh19:
	add	x3, x3, l_.str.3@PAGEOFF
LBB0_9:
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to register fixed PHY link: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"phy-handle"

l_.str.2:                               ; @.str.2
	.asciz	"Could not find valid phy node\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ag71xx_phy_link_adjust,4,2     ; @ag71xx_phy_link_adjust
l_.str.3:                               ; @.str.3
	.asciz	"Could not connect to PHY device\n"

	.no_dead_strip	_ag71xx_phy_connect
.subsections_via_symbols
