	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skge_set_link_ksettings
_skge_set_link_ksettings:               ## @skge_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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	24(%rax), %rdi
	callq	_skge_supported_modes
	movl	%eax, %r15d
	movl	16(%rbx), %esi
	leaq	-36(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movq	(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	%r15d, -36(%rbp)
	movq	$-1, (%r12)
	jmp	LBB0_20
LBB0_2:
	movl	8(%rbx), %ecx
	cmpl	$130, %ecx
	je	LBB0_13
## %bb.3:
	cmpl	$129, %ecx
	je	LBB0_9
## %bb.4:
	cmpl	$128, %ecx
	jne	LBB0_18
## %bb.5:
	movl	12(%rbx), %edx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_7
## %bb.6:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	jne	LBB0_19
	jmp	LBB0_18
LBB0_13:
	movl	12(%rbx), %edx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_15
## %bb.14:
	movq	_SUPPORTED_10baseT_Full@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	jne	LBB0_19
	jmp	LBB0_18
LBB0_9:
	movl	12(%rbx), %edx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_11
## %bb.10:
	movq	_SUPPORTED_100baseT_Full@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	jne	LBB0_19
	jmp	LBB0_18
LBB0_7:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_18
## %bb.8:
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	jne	LBB0_19
	jmp	LBB0_18
LBB0_15:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_18
## %bb.16:
	movq	_SUPPORTED_10baseT_Half@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	jne	LBB0_19
	jmp	LBB0_18
LBB0_11:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_18
## %bb.12:
	movq	_SUPPORTED_100baseT_Half@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	je	LBB0_18
LBB0_19:
	movl	%ecx, 4(%r12)
	movl	%edx, (%r12)
LBB0_20:
	movq	%rax, 8(%r12)
	movl	-36(%rbp), %eax
	movl	%eax, 16(%r12)
	movq	%r14, %rdi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	%r14, %rdi
	callq	_skge_down
	movq	%r14, %rdi
	callq	_skge_up
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_dev_close
	movl	%r15d, %ebx
	jmp	LBB0_23
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SUPPORTED_100baseT_Full,4,2    ## @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ## @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ## @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_10baseT_Half,4,2     ## @SUPPORTED_10baseT_Half
	.no_dead_strip	_skge_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 skge_set_link_ksettings
_skge_set_link_ksettings:               ; @skge_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	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x0, [x0, #24]
	bl	_skge_supported_modes
	mov	x21, x0
	ldr	w1, [x22, #16]
	add	x0, sp, #12
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	str	w21, [sp, #12]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20]
	b	LBB0_19
LBB0_2:
	ldr	w9, [x22, #8]
	cmp	w9, #130
	b.eq	LBB0_7
; %bb.3:
	cmp	w9, #129
	b.eq	LBB0_9
; %bb.4:
	cmp	w9, #128
	b.ne	LBB0_22
; %bb.5:
	ldr	w10, [x22, #12]
Lloh3:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_11
; %bb.6:
Lloh6:
	adrp	x11, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh7:
	ldr	x11, [x11, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
	b	LBB0_17
LBB0_7:
	ldr	w10, [x22, #12]
Lloh8:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_13
; %bb.8:
Lloh11:
	adrp	x11, _SUPPORTED_10baseT_Full@GOTPAGE
Lloh12:
	ldr	x11, [x11, _SUPPORTED_10baseT_Full@GOTPAGEOFF]
	b	LBB0_17
LBB0_9:
	ldr	w10, [x22, #12]
Lloh13:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh14:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_15
; %bb.10:
Lloh16:
	adrp	x11, _SUPPORTED_100baseT_Full@GOTPAGE
Lloh17:
	ldr	x11, [x11, _SUPPORTED_100baseT_Full@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
Lloh18:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh19:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_22
; %bb.12:
Lloh21:
	adrp	x11, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh22:
	ldr	x11, [x11, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
Lloh23:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh24:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_22
; %bb.14:
Lloh26:
	adrp	x11, _SUPPORTED_10baseT_Half@GOTPAGE
Lloh27:
	ldr	x11, [x11, _SUPPORTED_10baseT_Half@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh28:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh29:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
Lloh30:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_22
; %bb.16:
Lloh31:
	adrp	x11, _SUPPORTED_100baseT_Half@GOTPAGE
Lloh32:
	ldr	x11, [x11, _SUPPORTED_100baseT_Half@GOTPAGEOFF]
LBB0_17:
	ldr	w11, [x11]
	tst	w11, w21
	b.eq	LBB0_22
; %bb.18:
	stp	w10, w9, [x20]
LBB0_19:
	str	x8, [x20, #8]
	ldr	w8, [sp, #12]
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_23
; %bb.20:
	mov	x0, x19
	bl	_skge_down
	mov	x0, x19
	bl	_skge_up
	mov	x20, x0
	cbz	w0, LBB0_24
; %bb.21:
	mov	x0, x19
	bl	_dev_close
	b	LBB0_24
LBB0_22:
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_24
LBB0_23:
	mov	w20, #0
LBB0_24:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SUPPORTED_100baseT_Full,4,2    ; @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ; @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ; @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_10baseT_Half,4,2     ; @SUPPORTED_10baseT_Half
	.no_dead_strip	_skge_set_link_ksettings
.subsections_via_symbols
