	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netdev_set_link_ksettings
_netdev_set_link_ksettings:             ## @netdev_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	24(%rax), %r14
	movl	8(%r15), %r12d
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	cmpq	$0, 16(%r15)
	je	LBB0_12
## %bb.1:
	movl	(%rbx), %eax
	cmpl	-36(%rbp), %eax
	jne	LBB0_12
## %bb.2:
	movq	_ADVERTISED_ALL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -36(%rbp)
	cmpl	$100, %r12d
	je	LBB0_5
## %bb.3:
	cmpl	$10, %r12d
	jne	LBB0_7
## %bb.4:
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rcx
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rcx
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
LBB0_6:
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, %eax
	movl	%eax, -36(%rbp)
LBB0_7:
	movl	12(%r15), %ecx
	cmpl	$1, %ecx
	je	LBB0_10
## %bb.8:
	testl	%ecx, %ecx
	jne	LBB0_12
## %bb.9:
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rcx
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rdx
	jmp	LBB0_11
LBB0_10:
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rcx
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
LBB0_11:
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, %eax
	movl	%eax, -36(%rbp)
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movl	-36(%rbp), %ecx
	movq	_ADVERTISED_ALL@GOTPCREL(%rip), %rdx
	notl	%ecx
	testl	%ecx, (%rdx)
	jne	LBB0_15
## %bb.14:
	movq	$0, 8(%rbx)
	movl	$0, 16(%rbx)
	jmp	LBB0_20
LBB0_15:
	movl	12(%r15), %ecx
	incl	%ecx
	movl	%ecx, 8(%rbx)
	cmpl	$1000, %r12d                    ## imm = 0x3E8
	je	LBB0_17
## %bb.16:
	movl	%r12d, 12(%rbx)
LBB0_17:
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	$0, 16(%rbx)
	jmp	LBB0_20
LBB0_19:
	movl	$1, 16(%rbx)
LBB0_20:
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$24, %edx
	callq	_memcpy
	movl	-64(%rbp), %edi
	movl	-36(%rbp), %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	addq	$4, %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_mii_ethtool_set_link_ksettings
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADVERTISED_ALL,4,2             ## @ADVERTISED_ALL
	.comm	_ADVERTISED_100baseT_Full,4,2   ## @ADVERTISED_100baseT_Full
	.comm	_ADVERTISED_100baseT_Half,4,2   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_10baseT_Full,4,2    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_10baseT_Half,4,2    ## @ADVERTISED_10baseT_Half
	.no_dead_strip	_netdev_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 netdev_set_link_ksettings
_netdev_set_link_ksettings:             ; @netdev_set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x0, #24]
	ldr	w22, [x21, #8]
	ldr	w1, [x21]
	add	x0, sp, #4
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_12
; %bb.1:
	ldr	w8, [x20]
	ldr	w9, [sp, #4]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.2:
Lloh0:
	adrp	x9, _ADVERTISED_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADVERTISED_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #4]
	cmp	w22, #100
	b.eq	LBB0_5
; %bb.3:
	cmp	w22, #10
	b.ne	LBB0_7
; %bb.4:
Lloh3:
	adrp	x9, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x9, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
LBB0_6:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [sp, #4]
LBB0_7:
	ldr	w9, [x21, #12]
	cmp	w9, #1
	b.eq	LBB0_10
; %bb.8:
	cbnz	w9, LBB0_12
; %bb.9:
Lloh13:
	adrp	x9, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh18:
	adrp	x9, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh22:
	ldr	x10, [x10, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
LBB0_11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [sp, #4]
LBB0_12:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	w9, [sp, #4]
Lloh23:
	adrp	x10, _ADVERTISED_ALL@GOTPAGE
Lloh24:
	ldr	x10, [x10, _ADVERTISED_ALL@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	bics	wzr, w10, w9
	b.ne	LBB0_15
; %bb.14:
	str	xzr, [x20, #8]
	str	wzr, [x20, #16]
	b	LBB0_20
LBB0_15:
	ldr	w9, [x21, #12]
	add	w9, w9, #1
	str	w9, [x20, #8]
	cmp	w22, #1000
	b.eq	LBB0_17
; %bb.16:
	str	w22, [x20, #12]
LBB0_17:
	cbz	x8, LBB0_19
; %bb.18:
	str	wzr, [x20, #16]
	b	LBB0_20
LBB0_19:
	mov	w8, #1
	str	w8, [x20, #16]
LBB0_20:
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #24
	bl	_memcpy
	ldp	w1, w0, [sp, #4]
	bl	_ethtool_convert_legacy_u32_to_link_mode
	add	x0, x20, #4
	add	x1, sp, #8
	bl	_mii_ethtool_set_link_ksettings
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ADVERTISED_ALL,4,2             ; @ADVERTISED_ALL
	.comm	_ADVERTISED_100baseT_Full,4,2   ; @ADVERTISED_100baseT_Full
	.comm	_ADVERTISED_100baseT_Half,4,2   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_10baseT_Full,4,2    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_10baseT_Half,4,2    ; @ADVERTISED_10baseT_Half
	.no_dead_strip	_netdev_set_link_ksettings
.subsections_via_symbols
