	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_phy_open
_lan743x_phy_open:                      ## @lan743x_phy_open
	.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
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	8(%rdi), %r12
	movl	(%rdi), %edi
	callq	_phy_find_first
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	_lan743x_phy_link_status_change@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PHY_INTERFACE_MODE_GMII@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_phy_connect_direct
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_remove_link_mode
	movq	%r15, %rdi
	callq	_phy_support_asym_pause
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rax
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 16(%r14)
	movl	(%r15), %eax
	movl	%eax, 20(%r14)
	movq	%r15, %rdi
	callq	_phy_start
	movq	%r15, %rdi
	callq	_phy_start_aneg
	xorl	%ebx, %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_lan743x_phy_link_status_change,4,2 ## @lan743x_phy_link_status_change
	.comm	_PHY_INTERFACE_MODE_GMII,4,2    ## @PHY_INTERFACE_MODE_GMII
	.comm	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT,4,2 ## @ETHTOOL_LINK_MODE_1000baseT_Half_BIT
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
	.no_dead_strip	_lan743x_phy_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_phy_open
_lan743x_phy_open:                      ; @lan743x_phy_open
	.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
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x21, [x0, #8]
	ldr	w0, [x0]
	bl	_phy_find_first
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _lan743x_phy_link_status_change@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lan743x_phy_link_status_change@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _PHY_INTERFACE_MODE_GMII@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_GMII@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_phy_connect_direct
	cbnz	w0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_phy_remove_link_mode
	mov	x0, x20
	bl	_phy_support_asym_pause
Lloh12:
	adrp	x8, _FLOW_CTRL_RX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FLOW_CTRL_RX@GOTPAGEOFF]
Lloh14:
	adrp	x9, _FLOW_CTRL_TX@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	stp	w8, w9, [x19, #16]
	mov	x0, x20
	bl	_phy_start
	mov	x0, x20
	bl	_phy_start_aneg
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	neg	w0, w22
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_lan743x_phy_link_status_change,4,2 ; @lan743x_phy_link_status_change
	.comm	_PHY_INTERFACE_MODE_GMII,4,2    ; @PHY_INTERFACE_MODE_GMII
	.comm	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT,4,2 ; @ETHTOOL_LINK_MODE_1000baseT_Half_BIT
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
	.no_dead_strip	_lan743x_phy_open
.subsections_via_symbols
