	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_adjust_link
_sh_eth_adjust_link:                    ## @sh_eth_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	%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
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	(%r15), %r14
	leaq	16(%rax), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 24(%rbx)
	je	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	callq	_sh_eth_rcv_snd_disable
LBB0_3:
	cmpq	$0, 16(%r14)
	je	LBB0_12
## %bb.4:
	movl	(%r14), %eax
	xorl	%r13d, %r13d
	cmpl	(%rbx), %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, (%rbx)
	movq	32(%rbx), %rax
	movq	16(%rax), %rcx
	movl	$1, %r13d
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	*%rcx
LBB0_7:
	movq	8(%r14), %rax
	cmpq	8(%rbx), %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, 8(%rbx)
	movq	32(%rbx), %rax
	movq	8(%rax), %rcx
	movl	$1, %r13d
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	*%rcx
LBB0_10:
	cmpq	$0, 40(%rbx)
	jne	LBB0_16
## %bb.11:
	movq	_ECMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ECMR_TXF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_sh_eth_modify
	movq	16(%r14), %rax
	movq	%rax, 40(%rbx)
	jmp	LBB0_15
LBB0_12:
	cmpq	$0, 40(%rbx)
	je	LBB0_13
## %bb.14:
	movq	$0, 40(%rbx)
	movq	$0, 8(%rbx)
	movl	$-1, (%rbx)
LBB0_15:
	movl	$1, %r13d
	jmp	LBB0_16
LBB0_13:
	xorl	%r13d, %r13d
LBB0_16:
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_18
## %bb.17:
	cmpq	$0, 24(%rbx)
	je	LBB0_20
LBB0_18:
	cmpq	$0, 16(%r14)
	je	LBB0_20
## %bb.19:
	movq	%r15, %rdi
	callq	_sh_eth_rcv_snd_enable
LBB0_20:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	testl	%r13d, %r13d
	je	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ECMR,4,2                       ## @ECMR
	.comm	_ECMR_TXF,4,2                   ## @ECMR_TXF
	.no_dead_strip	_sh_eth_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_adjust_link
_sh_eth_adjust_link:                    ; @sh_eth_adjust_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x21]
	add	x22, x0, #16
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_sh_eth_rcv_snd_disable
LBB0_3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w8, [x19]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.5:
	mov	w23, #0
	b	LBB0_11
LBB0_6:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_18
; %bb.7:
	str	xzr, [x20, #40]
	str	xzr, [x20, #8]
	mov	w8, #-1
	str	w8, [x20]
	b	LBB0_17
LBB0_8:
	str	w8, [x20]
	ldr	x8, [x20, #32]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x21
	blr	x8
LBB0_10:
	mov	w23, #1
LBB0_11:
	ldr	x8, [x19, #8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.12:
	str	x8, [x20, #8]
	ldr	x8, [x20, #32]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x21
	blr	x8
LBB0_14:
	mov	w23, #1
LBB0_15:
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_19
; %bb.16:
Lloh0:
	adrp	x8, _ECMR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ECMR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ECMR_TXF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ECMR_TXF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #0
	bl	_sh_eth_modify
	ldr	x8, [x19, #16]
	str	x8, [x20, #40]
LBB0_17:
	mov	w23, #1
	b	LBB0_19
LBB0_18:
	mov	w23, #0
LBB0_19:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	cbnz	x8, LBB0_21
; %bb.20:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_23
LBB0_21:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_23
; %bb.22:
	mov	x0, x21
	bl	_sh_eth_rcv_snd_enable
LBB0_23:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	cbz	w23, LBB0_26
; %bb.24:
	mov	x0, x20
	bl	_netif_msg_link
	cbz	x0, LBB0_26
; %bb.25:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_phy_print_status
LBB0_26:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ECMR,4,2                       ; @ECMR
	.comm	_ECMR_TXF,4,2                   ; @ECMR_TXF
	.no_dead_strip	_sh_eth_adjust_link
.subsections_via_symbols
