	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function keystone_set_link_ksettings
_keystone_set_link_ksettings:           ## @keystone_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, %r12
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	8(%r12), %r13
	movl	4(%r12), %esi
	leaq	-48(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	-44(%rbp), %ebx
	andl	-48(%rbp), %ebx
	movq	%r15, %rdi
	callq	_keystone_get_intf_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	cmpq	(%rax), %r13
	jne	LBB0_5
LBB0_15:
	movq	%r13, (%rax)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_phy_ethtool_ksettings_set
	jmp	LBB0_16
LBB0_5:
	movq	_PORT_TP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_7
## %bb.6:
	movq	_ADVERTISED_TP@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_1
LBB0_7:
	movq	_PORT_AUI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_9
## %bb.8:
	movq	_ADVERTISED_AUI@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_1
LBB0_9:
	movq	_PORT_BNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_11
## %bb.10:
	movq	_ADVERTISED_BNC@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_1
LBB0_11:
	movq	_PORT_MII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_13
## %bb.12:
	movq	_ADVERTISED_MII@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_1
LBB0_13:
	movq	_PORT_FIBRE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_15
## %bb.14:
	movq	_ADVERTISED_FIBRE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	jne	LBB0_15
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PORT_TP,8,3                    ## @PORT_TP
	.comm	_ADVERTISED_TP,4,2              ## @ADVERTISED_TP
	.comm	_PORT_AUI,8,3                   ## @PORT_AUI
	.comm	_ADVERTISED_AUI,4,2             ## @ADVERTISED_AUI
	.comm	_PORT_BNC,8,3                   ## @PORT_BNC
	.comm	_ADVERTISED_BNC,4,2             ## @ADVERTISED_BNC
	.comm	_PORT_MII,8,3                   ## @PORT_MII
	.comm	_ADVERTISED_MII,4,2             ## @ADVERTISED_MII
	.comm	_PORT_FIBRE,8,3                 ## @PORT_FIBRE
	.comm	_ADVERTISED_FIBRE,4,2           ## @ADVERTISED_FIBRE
	.no_dead_strip	_keystone_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 keystone_set_link_ksettings
_keystone_set_link_ksettings:           ; @keystone_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	x19, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	x20, [x20]
	ldr	x22, [x19, #8]
	ldr	w1, [x19, #4]
	add	x0, sp, #12
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	w1, [x19]
	add	x0, sp, #8
	bl	_ethtool_convert_link_mode_to_legacy_u32
	cbz	x20, LBB0_15
; %bb.1:
	ldp	w24, w23, [sp, #8]
	mov	x0, x21
	bl	_keystone_get_intf_data
	cbz	x0, LBB0_15
; %bb.2:
	ldr	x8, [x0]
	cbz	x8, LBB0_15
; %bb.3:
	ldr	x9, [x8]
	cmp	x22, x9
	b.ne	LBB0_5
LBB0_4:
	str	x22, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_phy_ethtool_ksettings_set
	b	LBB0_16
LBB0_5:
	and	w9, w24, w23
Lloh0:
	adrp	x10, _PORT_TP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PORT_TP@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x22, x10
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x10, _ADVERTISED_TP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ADVERTISED_TP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
LBB0_7:
Lloh6:
	adrp	x10, _PORT_AUI@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PORT_AUI@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x22, x10
	b.ne	LBB0_9
; %bb.8:
Lloh9:
	adrp	x10, _ADVERTISED_AUI@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ADVERTISED_AUI@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
LBB0_9:
Lloh12:
	adrp	x10, _PORT_BNC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PORT_BNC@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x22, x10
	b.ne	LBB0_11
; %bb.10:
Lloh15:
	adrp	x10, _ADVERTISED_BNC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ADVERTISED_BNC@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
LBB0_11:
Lloh18:
	adrp	x10, _PORT_MII@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PORT_MII@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x22, x10
	b.ne	LBB0_13
; %bb.12:
Lloh21:
	adrp	x10, _ADVERTISED_MII@GOTPAGE
Lloh22:
	ldr	x10, [x10, _ADVERTISED_MII@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
LBB0_13:
Lloh24:
	adrp	x10, _PORT_FIBRE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _PORT_FIBRE@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	x22, x10
	b.ne	LBB0_4
; %bb.14:
Lloh27:
	adrp	x10, _ADVERTISED_FIBRE@GOTPAGE
Lloh28:
	ldr	x10, [x10, _ADVERTISED_FIBRE@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
LBB0_15:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PORT_TP,8,3                    ; @PORT_TP
	.comm	_ADVERTISED_TP,4,2              ; @ADVERTISED_TP
	.comm	_PORT_AUI,8,3                   ; @PORT_AUI
	.comm	_ADVERTISED_AUI,4,2             ; @ADVERTISED_AUI
	.comm	_PORT_BNC,8,3                   ; @PORT_BNC
	.comm	_ADVERTISED_BNC,4,2             ; @ADVERTISED_BNC
	.comm	_PORT_MII,8,3                   ; @PORT_MII
	.comm	_ADVERTISED_MII,4,2             ; @ADVERTISED_MII
	.comm	_PORT_FIBRE,8,3                 ; @PORT_FIBRE
	.comm	_ADVERTISED_FIBRE,4,2           ; @ADVERTISED_FIBRE
	.no_dead_strip	_keystone_set_link_ksettings
.subsections_via_symbols
