	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arc_emac_adjust_link
_arc_emac_adjust_link:                  ## @arc_emac_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	(%r14), %rax
	xorl	%ebx, %ebx
	cmpq	%rax, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%rax, (%r15)
	movl	$1, %ebx
LBB0_2:
	movq	8(%r14), %rsi
	cmpq	%rsi, 8(%r15)
	je	LBB0_5
## %bb.3:
	movq	%rsi, 8(%r15)
	movq	24(%r15), %rcx
	movl	$1, %ebx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	*%rcx
LBB0_5:
	movq	16(%r15), %rax
	cmpq	16(%r14), %rax
	jne	LBB0_6
## %bb.8:
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_R_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_arc_reg_get
	movq	16(%r14), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	movq	_ENFL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %edi
	orl	%eax, %edi
	notl	%edx
	andl	%eax, %edx
	cmpq	(%rsi), %rcx
	cmovel	%edi, %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_arc_reg_set
	movq	16(%r14), %rax
	movq	%rax, 16(%r15)
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R_CTRL,4,2                     ## @R_CTRL
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_ENFL_MASK,4,2                  ## @ENFL_MASK
	.no_dead_strip	_arc_emac_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arc_emac_adjust_link
_arc_emac_adjust_link:                  ; @arc_emac_adjust_link
	.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	x19, [x19]
	ldr	x9, [x0]
	ldr	x8, [x19]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_3
LBB0_2:
	str	x8, [x20]
	mov	w8, #1
LBB0_3:
	ldr	x9, [x20, #8]
	ldr	x1, [x19, #8]
	cmp	x9, x1
	b.eq	LBB0_7
; %bb.4:
	str	x1, [x20, #8]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x20
	blr	x8
LBB0_6:
	mov	w8, #1
LBB0_7:
	ldr	x9, [x20, #16]
	ldr	x10, [x19, #16]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.8:
	cbnz	w8, LBB0_11
; %bb.9:
	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_10:
Lloh0:
	adrp	x21, _R_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _R_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_arc_reg_get
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _ENFL_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ENFL_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w11, w10, w0
	bic	w10, w0, w10
	cmp	x8, x9
	csel	w2, w11, w10, eq
	ldr	w1, [x21]
	mov	x0, x20
	bl	_arc_reg_set
	ldr	x8, [x19, #16]
	str	x8, [x20, #16]
LBB0_11:
	mov	x0, x19
	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
	b	_phy_print_status
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R_CTRL,4,2                     ; @R_CTRL
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_ENFL_MASK,4,2                  ; @ENFL_MASK
	.no_dead_strip	_arc_emac_adjust_link
.subsections_via_symbols
