	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_devdbg
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_mii_check_media
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mii_ethtool_gset
	movq	_AX88178_MEDIUM_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-32(%rbp), %rdx
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_2
## %bb.1:
	movq	_AX_MEDIUM_GM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	movq	_AX_MEDIUM_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.3:
	orl	%ecx, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_AX_MEDIUM_GM@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	notl	%ecx
	andl	%ecx, %eax
LBB0_5:
	movq	_AX_MEDIUM_ENCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	-24(%rbp), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	movq	_AX_MEDIUM_FD@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	movl	%ebx, %edi
	orl	%eax, %edi
	notl	%ebx
	andl	%eax, %ebx
	cmpq	(%rsi), %rcx
	cmovel	%edi, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_devdbg
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_asix_write_medium_mode
	movq	4(%r14), %rax
	movq	_PHY_MODE_MARVELL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	cmpq	$0, 12(%r14)
	je	LBB0_8
## %bb.7:
	movq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_marvell_led_status
LBB0_8:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ax88178_link_reset()"

	.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: %d duplex: %d setting mode to 0x%04x"

	.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, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_devdbg
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_mii_check_media
	add	x1, sp, #32
	mov	x0, x19
	bl	_mii_ethtool_gset
Lloh2:
	adrp	x8, _AX88178_MEDIUM_DEFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AX88178_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	ldr	x8, [sp, #32]
Lloh5:
	adrp	x10, _SPEED_1000@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SPEED_1000@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x10, _AX_MEDIUM_GM@GOTPAGE
Lloh9:
	ldr	x10, [x10, _AX_MEDIUM_GM@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	b	LBB0_5
LBB0_2:
Lloh11:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x10]
Lloh14:
	adrp	x10, _AX_MEDIUM_PS@GOTPAGE
Lloh15:
	ldr	x10, [x10, _AX_MEDIUM_PS@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	x8, x11
	b.ne	LBB0_4
; %bb.3:
	orr	w9, w10, w9
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x11, _AX_MEDIUM_GM@GOTPAGE
Lloh18:
	ldr	x11, [x11, _AX_MEDIUM_GM@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	orr	w10, w11, w10
	bic	w9, w9, w10
LBB0_5:
Lloh20:
	adrp	x10, _AX_MEDIUM_ENCK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _AX_MEDIUM_ENCK@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	x10, [sp, #40]
Lloh23:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh24:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
Lloh25:
	adrp	x12, _AX_MEDIUM_FD@GOTPAGE
Lloh26:
	ldr	x12, [x12, _AX_MEDIUM_FD@GOTPAGEOFF]
Lloh27:
	ldr	x11, [x11]
Lloh28:
	ldr	w12, [x12]
	orr	w13, w12, w9
	bic	w9, w9, w12
	cmp	x10, x11
	csel	w20, w13, w9, eq
	stp	x8, x10, [sp]
	str	x20, [sp, #16]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devdbg
	mov	x0, x19
	mov	x1, x20
	bl	_asix_write_medium_mode
	ldur	x8, [x19, #4]
Lloh31:
	adrp	x9, _PHY_MODE_MARVELL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PHY_MODE_MARVELL@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldur	x8, [x19, #12]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x1, [sp, #32]
	mov	x0, x19
	bl	_marvell_led_status
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ax88178_link_reset()"

	.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: %d duplex: %d setting mode to 0x%04x"

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