	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88178_link_reset
_ax88178_link_reset:                    ## @ax88178_link_reset
	.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
	movq	$0, -48(%rbp)
	movq	_ETHTOOL_GSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_dbg
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_mii_check_media
	leaq	-48(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mii_ethtool_gset
	movq	_AX88178_MEDIUM_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_ethtool_cmd_speed
	movq	%rax, %r14
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_2
## %bb.1:
	movq	_AX_MEDIUM_GM@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	jmp	LBB0_5
LBB0_2:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	movq	_AX_MEDIUM_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	(%rcx), %r14
	jne	LBB0_4
## %bb.3:
	orl	%eax, %r12d
	jmp	LBB0_5
LBB0_4:
	movq	_AX_MEDIUM_GM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, %r12d
LBB0_5:
	movq	_AX_MEDIUM_ENCK@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	-48(%rbp), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movq	_AX_MEDIUM_FD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	orl	%r12d, %edx
	notl	%ebx
	andl	%r12d, %ebx
	cmpq	(%rax), %rcx
	cmovel	%edx, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_asix_write_medium_mode
	movq	8(%r15), %rax
	movq	_PHY_MODE_MARVELL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	cmpq	$0, 16(%r15)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_marvell_led_status
LBB0_8:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETHTOOL_GSET,4,2               ## @ETHTOOL_GSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ax88178_link_reset()\n"

	.comm	_AX88178_MEDIUM_DEFAULT,4,2     ## @AX88178_MEDIUM_DEFAULT
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_AX_MEDIUM_GM,4,2               ## @AX_MEDIUM_GM
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ## @AX_MEDIUM_PS
	.comm	_AX_MEDIUM_ENCK,4,2             ## @AX_MEDIUM_ENCK
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_AX_MEDIUM_FD,4,2               ## @AX_MEDIUM_FD
L_.str.1:                               ## @.str.1
	.asciz	"ax88178_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n"

	.comm	_PHY_MODE_MARVELL,8,3           ## @PHY_MODE_MARVELL
	.no_dead_strip	_ax88178_link_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88178_link_reset
_ax88178_link_reset:                    ; @ax88178_link_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, _ETHTOOL_GSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETHTOOL_GSET@GOTPAGEOFF]
	str	xzr, [sp, #32]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	mov	x20, x0
	ldr	w0, [x20], #4
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_dbg
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_mii_check_media
	add	x1, sp, #32
	mov	x0, x20
	bl	_mii_ethtool_gset
Lloh5:
	adrp	x8, _AX88178_MEDIUM_DEFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AX88178_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	add	x0, sp, #32
	bl	_ethtool_cmd_speed
	mov	x20, x0
Lloh8:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _AX_MEDIUM_GM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AX_MEDIUM_GM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w8, w8, w21
	b	LBB0_5
LBB0_2:
Lloh14:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x8]
Lloh17:
	adrp	x8, _AX_MEDIUM_PS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AX_MEDIUM_PS@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	x20, x9
	b.ne	LBB0_4
; %bb.3:
	orr	w8, w8, w21
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x9, _AX_MEDIUM_GM@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AX_MEDIUM_GM@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w21, w8
LBB0_5:
Lloh23:
	adrp	x9, _AX_MEDIUM_ENCK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AX_MEDIUM_ENCK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [sp, #32]
Lloh26:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh27:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
Lloh29:
	adrp	x11, _AX_MEDIUM_FD@GOTPAGE
Lloh30:
	ldr	x11, [x11, _AX_MEDIUM_FD@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	orr	w12, w11, w8
	bic	w8, w8, w11
	cmp	x9, x10
	csel	w21, w12, w8, eq
	ldr	w0, [x19]
	stp	x20, x9, [sp]
	str	x21, [sp, #16]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_dbg
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_asix_write_medium_mode
	ldr	x8, [x19, #8]
Lloh34:
	adrp	x9, _PHY_MODE_MARVELL@GOTPAGE
Lloh35:
	ldr	x9, [x9, _PHY_MODE_MARVELL@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_marvell_led_status
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ETHTOOL_GSET,4,2               ; @ETHTOOL_GSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ax88178_link_reset()\n"

	.comm	_AX88178_MEDIUM_DEFAULT,4,2     ; @AX88178_MEDIUM_DEFAULT
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_AX_MEDIUM_GM,4,2               ; @AX_MEDIUM_GM
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ; @AX_MEDIUM_PS
	.comm	_AX_MEDIUM_ENCK,4,2             ; @AX_MEDIUM_ENCK
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_AX_MEDIUM_FD,4,2               ; @AX_MEDIUM_FD
l_.str.1:                               ; @.str.1
	.asciz	"ax88178_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n"

	.comm	_PHY_MODE_MARVELL,8,3           ; @PHY_MODE_MARVELL
	.no_dead_strip	_ax88178_link_reset
.subsections_via_symbols
