	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_femac_adjust_link
_hisi_femac_adjust_link:                ## @hisi_femac_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, %r14
	movq	(%rbx), %r15
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r15)
	movq	_MAC_PORTSET_LINKED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	cmovel	%ecx, %edx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %r8
	movq	(%r15), %rdi
	movq	8(%r15), %rsi
	movl	$0, %ebx
	cmpq	(%r8), %rdi
	jne	LBB0_2
## %bb.1:
	movq	_MAC_PORTSET_DUPLEX_FULL@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
LBB0_2:
	orl	%edx, %ebx
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	jne	LBB0_4
## %bb.3:
	movq	_MAC_PORTSET_SPEED_100M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	%ecx, %ebx
	movl	(%r14), %ecx
	cmpl	%ecx, %ebx
	je	LBB0_6
## %bb.5:
	orl	%ebx, %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.7:
	movq	_MAC_PORTSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movl	%ebx, (%r14)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_PORTSET_LINKED,4,2         ## @MAC_PORTSET_LINKED
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_MAC_PORTSET_DUPLEX_FULL,4,2    ## @MAC_PORTSET_DUPLEX_FULL
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_MAC_PORTSET_SPEED_100M,4,2     ## @MAC_PORTSET_SPEED_100M
	.comm	_MAC_PORTSET,8,3                ## @MAC_PORTSET
	.no_dead_strip	_hisi_femac_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_femac_adjust_link
_hisi_femac_adjust_link:                ; @hisi_femac_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	x20, x0
	bl	_netdev_priv
	ldr	x20, [x20]
	ldp	x13, x8, [x20, #8]
Lloh0:
	adrp	x9, _MAC_PORTSET_LINKED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC_PORTSET_LINKED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
Lloh3:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
	csel	w10, wzr, w9, eq
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x11, _MAC_PORTSET_DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MAC_PORTSET_DUPLEX_FULL@GOTPAGEOFF]
	ldr	x12, [x20]
	cmp	x12, x8
Lloh8:
	ldr	w8, [x11]
	csel	w8, w8, wzr, eq
	orr	w8, w8, w10
Lloh9:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _MAC_PORTSET_SPEED_100M@GOTPAGE
Lloh13:
	ldr	x11, [x11, _MAC_PORTSET_SPEED_100M@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	x13, x10
	csel	w10, w11, wzr, eq
	orr	w21, w8, w10
	ldr	w8, [x0]
	cmp	w21, w8
	orr	w8, w21, w8
	and	w8, w8, w9
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	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_2:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh15:
	adrp	x9, _MAC_PORTSET@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAC_PORTSET@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	str	w21, [x19]
	mov	x0, x20
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_PORTSET_LINKED,4,2         ; @MAC_PORTSET_LINKED
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_MAC_PORTSET_DUPLEX_FULL,4,2    ; @MAC_PORTSET_DUPLEX_FULL
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_MAC_PORTSET_SPEED_100M,4,2     ; @MAC_PORTSET_SPEED_100M
	.comm	_MAC_PORTSET,8,3                ; @MAC_PORTSET
	.no_dead_strip	_hisi_femac_adjust_link
.subsections_via_symbols
