	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gem_set_link_ksettings
_gem_set_link_ksettings:                ## @gem_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	(%r15), %rbx
	movl	24(%r15), %esi
	leaq	-32(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movq	8(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rdx, %rax
	je	LBB0_3
## %bb.1:
	cmpq	%rcx, %rax
	jne	LBB0_2
LBB0_3:
	cmpq	%rdx, %rax
	jne	LBB0_5
## %bb.4:
	cmpq	$0, -32(%rbp)
	jne	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	%rcx, %rax
	jne	LBB0_11
## %bb.6:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_9
## %bb.7:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_9
## %bb.8:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_2
LBB0_9:
	movq	16(%r15), %rax
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_11:
	movl	4(%r14), %edi
	callq	_netif_device_present
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_del_timer_sync
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_gem_begin_auto_negotiation
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,8,3            ## @AUTONEG_DISABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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
	.no_dead_strip	_gem_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 gem_set_link_ksettings
_gem_set_link_ksettings:                ; @gem_set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x19]
	ldr	w1, [x19, #24]
	add	x0, sp, #8
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
Lloh3:
	adrp	x9, _AUTONEG_DISABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_7
; %bb.1:
	ldr	x11, [sp, #8]
	cmp	x8, x10
	ccmp	x11, #0, #0, eq
	b.eq	LBB0_7
; %bb.2:
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x21, x8
	ccmp	x21, x9, #4, ne
	ccmp	x21, x10, #4, ne
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
LBB0_5:
	ldr	w0, [x20, #4]
	bl	_netif_device_present
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_del_timer_sync
	mov	x0, x20
	mov	x1, x19
	bl	_gem_begin_auto_negotiation
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,8,3            ; @AUTONEG_DISABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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
	.no_dead_strip	_gem_set_link_ksettings
.subsections_via_symbols
