	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_link_ksettings
_set_link_ksettings:                    ## @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
	subq	$24, %rsp
	.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, %r15
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r13
	leaq	(%rax,%rax,2), %r14
	shlq	$4, %r14
	movl	24(%rsi), %esi
	leaq	-48(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movslq	8(%r13,%r14), %rcx
	movq	_SUPPORTED_Autoneg@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.3:
	leaq	(%r14,%r13), %r12
	addq	$8, %r12
	movq	(%rbx), %rax
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_7
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %r12
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_speed_duplex_to_caps
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, (%rdx)
	je	LBB0_8
## %bb.5:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_8
## %bb.6:
	movq	%rdx, %rcx
	movq	%r12, 40(%r13,%r14)
	movl	16(%rbx), %eax
	movl	%eax, 32(%r13,%r14)
	movq	$0, 24(%r13,%r14)
	movq	(%rbx), %rax
	movq	%rdx, %r12
	jmp	LBB0_10
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_ADVERTISED_MASK@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %rsi
	andq	(%rdx), %rsi
	leaq	-1(%rsi), %rdx
	testq	%rdx, %rsi
	cmovneq	%rcx, %rsi
	andq	%rcx, %rsi
	movq	%rsi, -48(%rbp)
	je	LBB0_8
## %bb.9:
	movq	_SPEED_INVALID@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 40(%r13,%r14)
	movq	_DUPLEX_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r13,%r14)
	movq	_ADVERTISED_Autoneg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	-48(%rbp), %rcx
	movq	%rcx, 24(%r13,%r14)
LBB0_10:
	movq	%rax, 16(%r13,%r14)
	movq	%r15, %rdi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	(%r13,%r14), %esi
	movl	4(%r13,%r14), %edi
	movq	%r12, %rdx
	callq	_t1_link_start
	jmp	LBB0_12
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUPPORTED_Autoneg,4,2          ## @SUPPORTED_Autoneg
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_AUTONEG_DISABLE,8,3            ## @AUTONEG_DISABLE
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADVERTISED_MASK,8,3            ## @ADVERTISED_MASK
	.comm	_SPEED_INVALID,8,3              ## @SPEED_INVALID
	.comm	_DUPLEX_INVALID,4,2             ## @DUPLEX_INVALID
	.comm	_ADVERTISED_Autoneg,8,3         ## @ADVERTISED_Autoneg
	.no_dead_strip	_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 set_link_ksettings
_set_link_ksettings:                    ; @set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	ldp	x23, x8, [x0]
	ldr	x24, [x8]
	mov	w8, #48
	madd	x19, x23, x8, x24
	ldr	w1, [x1, #24]
	add	x0, sp, #8
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldrsw	x9, [x19, #8]!
Lloh0:
	adrp	x8, _SUPPORTED_Autoneg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUPPORTED_Autoneg@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x21]
Lloh3:
	adrp	x10, _AUTONEG_DISABLE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_5
; %bb.2:
	ldr	x22, [x21, #8]
	ldr	w1, [x21, #16]
	mov	x0, x22
	bl	_speed_duplex_to_caps
	ldr	w8, [x19]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x22, x9, #4, ne
	b.eq	LBB0_9
; %bb.3:
	mov	w8, #48
	madd	x8, x23, x8, x24
	str	x22, [x8, #40]
	ldr	w9, [x21, #16]
	str	w9, [x8, #32]
	str	xzr, [x8, #24]
	ldr	x8, [x21]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
Lloh11:
	adrp	x10, _ADVERTISED_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ADVERTISED_MASK@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	ldr	x11, [sp, #8]
	and	x10, x11, x10
	sub	x11, x10, #1
	tst	x10, x11
	csel	x10, x10, x9, eq
	ands	x9, x10, x9
	str	x9, [sp, #8]
	b.eq	LBB0_9
; %bb.6:
Lloh14:
	adrp	x9, _SPEED_INVALID@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SPEED_INVALID@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	mov	w10, #48
	madd	x10, x23, x10, x24
	str	x9, [x10, #40]
Lloh17:
	adrp	x9, _DUPLEX_INVALID@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DUPLEX_INVALID@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	str	w9, [x10, #32]
	ldr	x9, [sp, #8]
Lloh20:
	adrp	x11, _ADVERTISED_Autoneg@GOTPAGE
Lloh21:
	ldr	x11, [x11, _ADVERTISED_Autoneg@GOTPAGEOFF]
Lloh22:
	ldr	x11, [x11]
	orr	x9, x11, x9
	str	x9, [x10, #24]
LBB0_7:
	mov	w9, #48
	madd	x9, x23, x9, x24
	str	x8, [x9, #16]
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.8:
	mov	w8, #48
	madd	x8, x23, x8, x24
	ldp	w1, w0, [x8]
	mov	x2, x19
	bl	_t1_link_start
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SUPPORTED_Autoneg,4,2          ; @SUPPORTED_Autoneg
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_AUTONEG_DISABLE,8,3            ; @AUTONEG_DISABLE
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADVERTISED_MASK,8,3            ; @ADVERTISED_MASK
	.comm	_SPEED_INVALID,8,3              ; @SPEED_INVALID
	.comm	_DUPLEX_INVALID,4,2             ; @DUPLEX_INVALID
	.comm	_ADVERTISED_Autoneg,8,3         ; @ADVERTISED_Autoneg
	.no_dead_strip	_set_link_ksettings
.subsections_via_symbols
