	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88772_link_reset
_ax88772_link_reset:                    ## @ax88772_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
	movl	$1, %esi
	movl	$1, %edx
	callq	_mii_check_media
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mii_ethtool_gset
	movq	_AX88772_MEDIUM_DEFAULT@GOTPCREL(%rip), %rax
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	movq	-32(%rbp), %rdx
	cmpq	(%rcx), %rdx
	movq	_AX_MEDIUM_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	movl	$-1, %edi
	cmovel	%edi, %esi
	movq	-24(%rbp), %rcx
	andl	(%rax), %esi
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	movq	_AX_MEDIUM_FD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	cmovel	%edi, %ebx
	andl	%esi, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	callq	_devdbg
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_asix_write_medium_mode
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ## @AX88772_MEDIUM_DEFAULT
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ## @AX_MEDIUM_PS
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_AX_MEDIUM_FD,4,2               ## @AX_MEDIUM_FD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ax88772_link_reset() speed: %d duplex: %d setting mode to 0x%04x"

	.no_dead_strip	_ax88772_link_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88772_link_reset
_ax88772_link_reset:                    ; @ax88772_link_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w1, #1
	mov	w2, #1
	bl	_mii_check_media
	mov	x1, sp
	mov	x0, x19
	bl	_mii_ethtool_gset
Lloh0:
	adrp	x8, _AX88772_MEDIUM_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AX88772_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _AX_MEDIUM_PS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AX_MEDIUM_PS@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldp	x2, x3, [sp]
	cmp	x2, x9
	mov	w9, #-1
	csinv	w10, w9, w10, eq
	and	w8, w10, w8
Lloh9:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _AX_MEDIUM_FD@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AX_MEDIUM_FD@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	x3, x10
	csinv	w9, w9, w11, eq
	and	w20, w8, w9
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_devdbg
	mov	x0, x19
	mov	x1, x20
	bl	_asix_write_medium_mode
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ; @AX88772_MEDIUM_DEFAULT
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ; @AX_MEDIUM_PS
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_AX_MEDIUM_FD,4,2               ; @AX_MEDIUM_FD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ax88772_link_reset() speed: %d duplex: %d setting mode to 0x%04x"

	.no_dead_strip	_ax88772_link_reset
.subsections_via_symbols
