	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ag71xx_phy_connect             ## -- Begin function ag71xx_phy_connect
	.p2align	4, 0x90
_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_of_phy_register_fixed_link
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	callq	_of_node_get
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
LBB0_4:
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	16(%r12), %r8d
	movl	20(%r12), %edi
	movq	_ag71xx_phy_link_adjust@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_of_phy_connect
	movq	%rax, (%r12)
	movq	%r15, %rdi
	callq	_of_node_put
	movq	(%r12), %rdi
	movq	8(%r12), %rbx
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.6:
	callq	_phydev_name
	movq	(%r12), %rdx
	movl	8(%rdx), %ecx
	movq	(%rdx), %rdx
	movl	(%rdx), %r8d
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_info
	jmp	LBB0_11
LBB0_7:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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. Deferring probe.\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.4:                               ## @.str.4
	.asciz	"connected to PHY at %s [uid=%08x, driver=%s]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ag71xx_phy_connect             ; -- Begin function ag71xx_phy_connect
	.p2align	2
_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	x19, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	mov	x0, x21
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_of_phy_register_fixed_link
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x0, x21
	bl	_of_node_get
	mov	x20, x0
	cbz	x0, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _ag71xx_phy_link_adjust@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ag71xx_phy_link_adjust@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldp	w4, w0, [x19, #16]
	mov	x1, x20
	mov	w3, #0
	bl	_of_phy_connect
	str	x0, [x19]
	mov	x0, x20
	bl	_of_node_put
	ldp	x0, x20, [x19]
	cbz	x0, LBB0_8
; %bb.4:
	bl	_phydev_name
	mov	x2, x0
	ldr	x8, [x19]
	ldr	w3, [x8, #8]
	ldr	x8, [x8]
	ldr	w4, [x8]
Lloh3:
	adrp	x1, l_.str.4@PAGE
Lloh4:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	w20, #0
	b	LBB0_10
LBB0_5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_parse_phandle
	mov	x20, x0
	cbnz	x0, LBB0_3
LBB0_6:
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x20, x0
	ldr	x0, [x19, #8]
	str	x20, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh15:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.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. Deferring probe.\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.4:                               ; @.str.4
	.asciz	"connected to PHY at %s [uid=%08x, driver=%s]\n"

.subsections_via_symbols
