	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et131x_adjust_link
_et131x_adjust_link:                    ## @et131x_adjust_link
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.1:
	movq	%rax, %r14
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_14
## %bb.2:
	movq	%r14, %rdi
	callq	_et1310_in_phy_coma
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_et1310_disable_phy_coma
LBB0_4:
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_phy_print_status
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.5:
	movl	$20, 8(%r14)
	movq	8(%rbx), %rax
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_PHY_MPHY_CONTROL_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_et131x_mii_read
	movl	16(%rbx), %esi
	movl	(%r15), %edx
	movl	-40(%rbp), %ecx
	orl	$4, %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movq	_PHY_INDEX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$33794, %ecx                    ## imm = 0x8402
	orl	-40(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movq	_PHY_DATA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$511, %ecx                      ## imm = 0x1FF
	orl	-40(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movl	(%r15), %edx
	movl	-40(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
LBB0_7:
	movq	%r14, %rdi
	callq	_et1310_config_flow_control
	movq	8(%rbx), %rax
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:
	cmpl	$2049, 12(%r14)                 ## imm = 0x801
	jl	LBB0_10
## %bb.9:
	movq	_PHY_CONFIG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_et131x_mii_read
	movq	_ET_PHY_CONFIG_TX_FIFO_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	notl	%ecx
	andl	-44(%rbp), %ecx
	movq	_ET_PHY_CONFIG_FIFO_DEPTH_32@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	movl	16(%rbx), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_et131x_mii_write
LBB0_10:
	movq	%r14, %rdi
	callq	_et131x_set_rx_dma_timer
	movq	%r14, %rdi
	callq	_et1310_config_mac_regs2
	jmp	LBB0_14
LBB0_11:
	movl	$0, 8(%r14)
	movq	8(%rbx), %rax
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_PHY_MPHY_CONTROL_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_et131x_mii_read
	movl	16(%rbx), %esi
	movl	(%r12), %edx
	movl	-36(%rbp), %ecx
	orl	$4, %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movq	_PHY_INDEX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$33794, %ecx                    ## imm = 0x8402
	orl	-36(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movq	_PHY_DATA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$511, %ecx                      ## imm = 0x1FF
	orl	-36(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
	movl	16(%rbx), %esi
	movl	(%r12), %edx
	movl	-36(%rbp), %ecx
	movq	%r14, %rdi
	callq	_et131x_mii_write
LBB0_13:
	movq	%r14, %rdi
	callq	_et131x_free_busy_send_packets
	movq	%r14, %rdi
	callq	_et131x_init_send
	movq	%r14, %rdi
	callq	_et131x_soft_reset
	movq	%r14, %rdi
	callq	_et131x_adapter_setup
	movq	%r15, %rdi
	callq	_et131x_disable_txrx
	movq	%r15, %rdi
	callq	_et131x_enable_txrx
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_PHY_MPHY_CONTROL_REG,4,2       ## @PHY_MPHY_CONTROL_REG
	.comm	_PHY_INDEX_REG,4,2              ## @PHY_INDEX_REG
	.comm	_PHY_DATA_REG,4,2               ## @PHY_DATA_REG
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_PHY_CONFIG,4,2                 ## @PHY_CONFIG
	.comm	_ET_PHY_CONFIG_TX_FIFO_DEPTH,4,2 ## @ET_PHY_CONFIG_TX_FIFO_DEPTH
	.comm	_ET_PHY_CONFIG_FIFO_DEPTH_32,4,2 ## @ET_PHY_CONFIG_FIFO_DEPTH_32
	.no_dead_strip	_et131x_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et131x_adjust_link
_et131x_adjust_link:                    ; @et131x_adjust_link
	.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	x21, x0
	bl	_netdev_priv
	ldr	x20, [x21]
	cbz	x20, LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x9, [x0]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.2:
	mov	x0, x19
	bl	_et1310_in_phy_coma
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_et1310_disable_phy_coma
LBB0_4:
	ldr	x8, [x20]
	str	x8, [x19]
	mov	x0, x20
	bl	_phy_print_status
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.5:
	mov	w8, #20
	str	w8, [x19, #8]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x21, _PHY_MPHY_CONTROL_REG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PHY_MPHY_CONTROL_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_et131x_mii_read
	ldr	w1, [x20, #16]
	ldr	w2, [x21]
	ldr	w8, [sp, #12]
	orr	w3, w8, #0x4
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
Lloh5:
	adrp	x8, _PHY_INDEX_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_INDEX_REG@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	w8, [sp, #12]
	mov	w9, #33794
	orr	w3, w8, w9
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
Lloh8:
	adrp	x8, _PHY_DATA_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHY_DATA_REG@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	w8, [sp, #12]
	orr	w3, w8, #0x1ff
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
	ldr	w2, [x21]
	ldr	w3, [sp, #12]
	mov	x0, x19
	bl	_et131x_mii_write
LBB0_7:
	mov	x0, x19
	bl	_et1310_config_flow_control
	ldr	x8, [x20, #8]
Lloh11:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x19, #12]
	cmp	w8, #2049
	b.lt	LBB0_10
; %bb.9:
Lloh14:
	adrp	x21, _PHY_CONFIG@GOTPAGE
Lloh15:
	ldr	x21, [x21, _PHY_CONFIG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_et131x_mii_read
Lloh16:
	adrp	x8, _ET_PHY_CONFIG_TX_FIFO_DEPTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ET_PHY_CONFIG_TX_FIFO_DEPTH@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
Lloh19:
	adrp	x10, _ET_PHY_CONFIG_FIFO_DEPTH_32@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ET_PHY_CONFIG_FIFO_DEPTH_32@GOTPAGEOFF]
	bic	w8, w9, w8
Lloh21:
	ldr	w9, [x10]
	orr	w3, w9, w8
	str	w3, [sp, #8]
	ldr	w1, [x20, #16]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_et131x_mii_write
LBB0_10:
	mov	x0, x19
	bl	_et131x_set_rx_dma_timer
	mov	x0, x19
	bl	_et1310_config_mac_regs2
	b	LBB0_14
LBB0_11:
	str	wzr, [x19, #8]
	ldr	x8, [x20, #8]
Lloh22:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
Lloh25:
	adrp	x22, _PHY_MPHY_CONTROL_REG@GOTPAGE
Lloh26:
	ldr	x22, [x22, _PHY_MPHY_CONTROL_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #4
	mov	x0, x19
	bl	_et131x_mii_read
	ldr	w1, [x20, #16]
	ldr	w2, [x22]
	ldr	w8, [sp, #4]
	orr	w3, w8, #0x4
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
Lloh27:
	adrp	x8, _PHY_INDEX_REG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PHY_INDEX_REG@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	ldr	w8, [sp, #4]
	mov	w9, #33794
	orr	w3, w8, w9
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
Lloh30:
	adrp	x8, _PHY_DATA_REG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PHY_DATA_REG@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	ldr	w8, [sp, #4]
	orr	w3, w8, #0x1ff
	mov	x0, x19
	bl	_et131x_mii_write
	ldr	w1, [x20, #16]
	ldr	w2, [x22]
	ldr	w3, [sp, #4]
	mov	x0, x19
	bl	_et131x_mii_write
LBB0_13:
	mov	x0, x19
	bl	_et131x_free_busy_send_packets
	mov	x0, x19
	bl	_et131x_init_send
	mov	x0, x19
	bl	_et131x_soft_reset
	mov	x0, x19
	bl	_et131x_adapter_setup
	mov	x0, x21
	bl	_et131x_disable_txrx
	mov	x0, x21
	bl	_et131x_enable_txrx
LBB0_14:
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_PHY_MPHY_CONTROL_REG,4,2       ; @PHY_MPHY_CONTROL_REG
	.comm	_PHY_INDEX_REG,4,2              ; @PHY_INDEX_REG
	.comm	_PHY_DATA_REG,4,2               ; @PHY_DATA_REG
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_PHY_CONFIG,4,2                 ; @PHY_CONFIG
	.comm	_ET_PHY_CONFIG_TX_FIFO_DEPTH,4,2 ; @ET_PHY_CONFIG_TX_FIFO_DEPTH
	.comm	_ET_PHY_CONFIG_FIFO_DEPTH_32,4,2 ; @ET_PHY_CONFIG_FIFO_DEPTH_32
	.no_dead_strip	_et131x_adjust_link
.subsections_via_symbols
