	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88172_link_reset
_ax88172_link_reset:                    ## @ax88172_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, %r14
	movq	$0, -48(%rbp)
	movq	_ETHTOOL_GSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	leaq	4(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_mii_check_media
	leaq	-48(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mii_ethtool_gset
	movq	-48(%rbp), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	movq	_AX88172_MEDIUM_FD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	cmovel	%edx, %ebx
	movq	_AX88172_MEDIUM_DEFAULT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r14), %r12d
	movq	%r15, %rdi
	callq	_ethtool_cmd_speed
	movq	-48(%rbp), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	movl	%ebx, %r8d
	callq	_netdev_dbg
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_asix_write_medium_mode
	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
	.comm	_AX88172_MEDIUM_DEFAULT,4,2     ## @AX88172_MEDIUM_DEFAULT
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_AX88172_MEDIUM_FD,4,2          ## @AX88172_MEDIUM_FD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ax88172_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n"

	.no_dead_strip	_ax88172_link_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88172_link_reset
_ax88172_link_reset:                    ; @ax88172_link_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	xzr, [sp]
Lloh0:
	adrp	x8, _ETHTOOL_GSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETHTOOL_GSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x20, x0, #4
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_mii_check_media
	mov	x1, sp
	mov	x0, x20
	bl	_mii_ethtool_gset
Lloh3:
	adrp	x8, _AX88172_MEDIUM_DEFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AX88172_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [sp]
Lloh6:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh8:
	adrp	x11, _AX88172_MEDIUM_FD@GOTPAGE
Lloh9:
	ldr	x11, [x11, _AX88172_MEDIUM_FD@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	ldr	w11, [x11]
	cmp	x9, x10
	csinv	w9, wzr, w11, eq
	orr	w20, w9, w8
	ldr	w21, [x19]
	mov	x0, sp
	bl	_ethtool_cmd_speed
	mov	x2, x0
	ldr	x3, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x4, x20
	bl	_netdev_dbg
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_asix_write_medium_mode
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ETHTOOL_GSET,4,2               ; @ETHTOOL_GSET
	.comm	_AX88172_MEDIUM_DEFAULT,4,2     ; @AX88172_MEDIUM_DEFAULT
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_AX88172_MEDIUM_FD,4,2          ; @AX88172_MEDIUM_FD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ax88172_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n"

	.no_dead_strip	_ax88172_link_reset
.subsections_via_symbols
