	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88172a_adjust_link
_ax88172a_adjust_link:                  ## @ax88172a_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	callq	_netdev_priv
	movq	(%rax), %r12
	cmpq	$0, 16(%r15)
	je	LBB0_1
## %bb.2:
	movq	_AX88772_MEDIUM_DEFAULT@GOTPCREL(%rip), %rcx
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	movq	(%r15), %rsi
	cmpq	(%rdx), %rsi
	movq	_AX_MEDIUM_FD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	movl	$-1, %ebx
	cmovel	%edx, %ebx
	andl	(%rcx), %ebx
	movq	8(%r15), %rcx
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_AX_MEDIUM_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %ebx
LBB0_4:
	cmpl	(%r12), %ebx
	jne	LBB0_6
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	(%r12), %ebx
	je	LBB0_5
LBB0_6:
	movq	%rax, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_asix_write_medium_mode
	movl	%ebx, (%r12)
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	callq	_netdev_dbg
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ## @AX88772_MEDIUM_DEFAULT
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_AX_MEDIUM_FD,4,2               ## @AX_MEDIUM_FD
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ## @AX_MEDIUM_PS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"speed %u duplex %d, setting mode to 0x%04x\n"

	.no_dead_strip	_ax88172a_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88172a_adjust_link
_ax88172a_adjust_link:                  ; @ax88172a_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
	ldr	x19, [x0]
	bl	_netdev_priv
	ldr	x22, [x0]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AX88772_MEDIUM_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AX88772_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldp	x10, x11, [x19]
	cmp	x10, x9
Lloh6:
	adrp	x9, _AX_MEDIUM_FD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AX_MEDIUM_FD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mov	w10, #-1
	csinv	w9, w10, w9, ne
	and	w21, w9, w8
Lloh9:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x11, x8
	b.eq	LBB0_4
; %bb.2:
Lloh12:
	adrp	x8, _AX_MEDIUM_PS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AX_MEDIUM_PS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	bic	w21, w21, w8
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_6
; %bb.5:
	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_6:
	mov	x1, x21
	mov	w2, #0
	bl	_asix_write_medium_mode
	str	w21, [x22]
	ldp	x3, x2, [x19]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x4, x21
	bl	_netdev_dbg
	mov	x0, x19
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ; @AX88772_MEDIUM_DEFAULT
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_AX_MEDIUM_FD,4,2               ; @AX_MEDIUM_FD
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_AX_MEDIUM_PS,4,2               ; @AX_MEDIUM_PS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"speed %u duplex %d, setting mode to 0x%04x\n"

	.no_dead_strip	_ax88172a_adjust_link
.subsections_via_symbols
