	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_ethtool_ksettings_set      ## -- Begin function phy_ethtool_ksettings_set
	.p2align	4, 0x90
_phy_ethtool_ksettings_set:             ## @phy_ethtool_ksettings_set
	.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, %r14
	movq	_advertising@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	___ETHTOOL_DECLARE_LINK_MODE_MASK
	movq	24(%rbx), %rax
	cmpq	48(%r14), %rax
	jne	LBB0_1
## %bb.2:
	movq	(%rbx), %r13
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edi
	movl	40(%rbx), %esi
	callq	_linkmode_copy
	movl	(%r12), %edi
	movl	40(%r14), %edx
	movl	%edi, %esi
	callq	_linkmode_and
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rcx, %r13
	je	LBB0_4
## %bb.3:
	cmpq	%rax, %r13
	jne	LBB0_1
LBB0_4:
	cmpq	%rcx, %r13
	jne	LBB0_7
## %bb.5:
	movl	(%r12), %edi
	callq	_linkmode_empty
	testq	%rax, %rax
	jne	LBB0_1
## %bb.6:
	movq	(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rdx
LBB0_7:
	cmpq	%rax, %r13
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_13
## %bb.8:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_11
## %bb.9:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_11
## %bb.10:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_1
LBB0_11:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_13
## %bb.12:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r13, 32(%r14)
	movq	%rcx, 24(%r14)
	movl	16(%r14), %edi
	movl	(%r12), %esi
	movq	%rdx, %r12
	callq	_linkmode_copy
	movq	_ETHTOOL_LINK_MODE_Autoneg_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r14), %esi
	xorl	%edx, %edx
	cmpq	(%r12), %r13
	sete	%dl
	callq	_linkmode_mod_bit
	movq	%r15, 8(%r14)
	movl	32(%rbx), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_phy_start_aneg
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_advertising,4,2                ## @advertising
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,8,3            ## @AUTONEG_DISABLE
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_ETHTOOL_LINK_MODE_Autoneg_BIT,4,2 ## @ETHTOOL_LINK_MODE_Autoneg_BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_ethtool_ksettings_set      ; -- Begin function phy_ethtool_ksettings_set
	.p2align	2
_phy_ethtool_ksettings_set:             ; @phy_ethtool_ksettings_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _advertising@GOTPAGE
Lloh1:
	ldr	x22, [x22, _advertising@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	___ETHTOOL_DECLARE_LINK_MODE_MASK
	ldr	x8, [x20, #24]
	ldr	x9, [x19, #48]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
	ldp	x23, x21, [x20]
	ldr	x24, [x20, #16]
	ldr	w0, [x22]
	ldr	w1, [x20, #40]
	bl	_linkmode_copy
	ldr	w0, [x22]
	ldr	w2, [x19, #40]
	mov	x1, x0
	bl	_linkmode_and
Lloh2:
	adrp	x25, _AUTONEG_ENABLE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AUTONEG_ENABLE@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh4:
	adrp	x26, _AUTONEG_DISABLE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _AUTONEG_DISABLE@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x23, x9
	ccmp	x23, x8, #4, ne
	b.ne	LBB0_11
; %bb.2:
	cmp	x23, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x22]
	bl	_linkmode_empty
	cbnz	x0, LBB0_11
; %bb.4:
	ldr	x8, [x26]
LBB0_5:
	cmp	x23, x8
	b.ne	LBB0_13
; %bb.6:
Lloh6:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x24, x8
	b.eq	LBB0_9
; %bb.7:
Lloh9:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x24, x8
	b.eq	LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ne	LBB0_11
LBB0_9:
Lloh15:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_13
; %bb.10:
Lloh18:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_13
LBB0_11:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	stp	x24, x23, [x19, #24]
	ldr	w0, [x19, #16]
	ldr	w1, [x22]
	bl	_linkmode_copy
Lloh24:
	adrp	x8, _ETHTOOL_LINK_MODE_Autoneg_BIT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETHTOOL_LINK_MODE_Autoneg_BIT@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	ldr	x8, [x25]
	cmp	x23, x8
	cset	w2, eq
	bl	_linkmode_mod_bit
	str	x21, [x19, #8]
	ldr	w8, [x20, #32]
	str	w8, [x19]
	mov	x0, x19
	bl	_phy_start_aneg
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_advertising,4,2                ; @advertising
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,8,3            ; @AUTONEG_DISABLE
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_ETHTOOL_LINK_MODE_Autoneg_BIT,4,2 ; @ETHTOOL_LINK_MODE_Autoneg_BIT
.subsections_via_symbols
