	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rio_set_link_ksettings
_rio_set_link_ksettings:                ## @rio_set_link_ksettings
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movl	(%rbx), %r13d
	movl	16(%rbx), %r12d
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	8(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	jne	LBB0_10
## %bb.2:
	movl	$1, (%r15)
	movq	%r14, %rdi
	callq	_mii_set_media
	jmp	LBB0_10
LBB0_3:
	movl	$0, (%r15)
	cmpl	$1000, 4(%r15)                  ## imm = 0x3E8
	jne	LBB0_5
## %bb.4:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	L_.str(%rip), %rdi
	callq	_printk
	jmp	LBB0_8
LBB0_5:
	cmpl	$130, %r13d
	je	LBB0_6
## %bb.7:
	cmpl	$129, %r13d
	jne	LBB0_11
LBB0_8:
	movl	$100, %eax
	jmp	LBB0_9
LBB0_6:
	movl	$10, %eax
LBB0_9:
	movl	%eax, 4(%r15)
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	(%rax), %r12d
	sete	%cl
	movl	%ecx, 8(%r15)
	movq	%r14, %rdi
	callq	_mii_set_media
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning!! Can't disable Auto negotiation in 1000Mbps, change to Manual 100Mbps, Full duplex.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rio_set_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rio_set_link_ksettings
_rio_set_link_ksettings:                ; @rio_set_link_ksettings
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	w23, [x21]
	ldr	w22, [x21, #16]
	mov	x0, x19
	bl	_netif_carrier_off
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cbnz	w8, LBB0_11
; %bb.2:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_10
LBB0_3:
	str	wzr, [x20]
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x21, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DUPLEX_FULL@GOTPAGEOFF]
	cmp	w8, #1000
	b.ne	LBB0_5
; %bb.4:
	ldr	w22, [x21]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	b	LBB0_7
LBB0_5:
	cmp	w23, #130
	b.eq	LBB0_8
; %bb.6:
	cmp	w23, #129
	b.ne	LBB0_13
LBB0_7:
	mov	w8, #100
	b	LBB0_9
LBB0_8:
	mov	w8, #10
LBB0_9:
	ldr	w9, [x21]
	cmp	w22, w9
	cset	w9, eq
	stp	w8, w9, [x20, #4]
LBB0_10:
	mov	x0, x19
	bl	_mii_set_media
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning!! Can't disable Auto negotiation in 1000Mbps, change to Manual 100Mbps, Full duplex.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rio_set_link_ksettings
.subsections_via_symbols
