	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_phy
_init_phy:                              ## @init_phy
	.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, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_FSL_GIANFAR_DEV_HAS_GIGABIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%r12), %ebx
	je	LBB0_2
## %bb.1:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r12)
	movl	$-1, 4(%r12)
	movq	%r14, %rdi
	callq	_gfar_get_interface
	movq	%rax, %r15
	movl	16(%r12), %esi
	movq	_adjust_link@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movq	%rax, %r8
	callq	_of_phy_connect
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	_adjust_link@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_of_phy_connect_fixed_link
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_gfar_configure_serdes
	movq	8(%r12), %rax
LBB0_7:
	movq	_GFAR_SUPPORTED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	andl	(%rax), %ebx
	movl	%ebx, (%rax)
	movl	%ebx, 4(%rax)
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_FSL_GIANFAR_DEV_HAS_GIGABIT,4,2 ## @FSL_GIANFAR_DEV_HAS_GIGABIT
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_adjust_link,4,2                ## @adjust_link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PHY_INTERFACE_MODE_SGMII,8,3   ## @PHY_INTERFACE_MODE_SGMII
	.comm	_GFAR_SUPPORTED,4,2             ## @GFAR_SUPPORTED
	.no_dead_strip	_init_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_phy
_init_phy:                              ; @init_phy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_netdev_priv
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FSL_GIANFAR_DEV_HAS_GIGABIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FSL_GIANFAR_DEV_HAS_GIGABIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w22, wzr, w10, eq
	stp	xzr, xzr, [x0, #24]
	mov	w8, #-1
	str	w8, [x0, #4]
	mov	x0, x19
	bl	_gfar_get_interface
	mov	x21, x0
	ldr	w1, [x20, #16]
Lloh6:
	adrp	x2, _adjust_link@GOTPAGE
Lloh7:
	ldr	x2, [x2, _adjust_link@GOTPAGEOFF]
	mov	x0, x19
	mov	w3, #0
	mov	x4, x21
	bl	_of_phy_connect
	str	x0, [x20, #8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x1, _adjust_link@GOTPAGE
Lloh9:
	ldr	x1, [x1, _adjust_link@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x21
	bl	_of_phy_connect_fixed_link
	str	x0, [x20, #8]
	cbz	x0, LBB0_6
LBB0_2:
Lloh10:
	adrp	x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_gfar_configure_serdes
	ldr	x0, [x20, #8]
LBB0_4:
	mov	w8, #0
Lloh13:
	adrp	x9, _GFAR_SUPPORTED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _GFAR_SUPPORTED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w9, w9, w22
	ldr	w10, [x0]
	and	w9, w10, w9
	stp	w9, w9, [x0]
LBB0_5:
	mov	x0, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FSL_GIANFAR_DEV_HAS_GIGABIT,4,2 ; @FSL_GIANFAR_DEV_HAS_GIGABIT
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_adjust_link,4,2                ; @adjust_link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PHY_INTERFACE_MODE_SGMII,8,3   ; @PHY_INTERFACE_MODE_SGMII
	.comm	_GFAR_SUPPORTED,4,2             ; @GFAR_SUPPORTED
	.no_dead_strip	_init_phy
.subsections_via_symbols
