	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ns83820_get_link_ksettings
_ns83820_get_link_ksettings:            ## @ns83820_get_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, %r15
	callq	_PRIV
	movq	%rax, %rbx
	movq	_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SPDSTS_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_TANAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_TBICR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r14d
	movq	_CFG_DUPSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_SUPPORTED_Autoneg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CFG_TBI_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PORT_FIBRE@GOTPCREL(%rip), %rcx
	movq	_SUPPORTED_FIBRE@GOTPCREL(%rip), %rdx
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rdi
	jmp	LBB0_3
LBB0_2:
	movq	_SUPPORTED_10baseT_Half@GOTPCREL(%rip), %rcx
	movq	_SUPPORTED_10baseT_Full@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_SUPPORTED_100baseT_Half@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_SUPPORTED_100baseT_Full@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_PORT_MII@GOTPCREL(%rip), %rcx
	movq	_SUPPORTED_MII@GOTPCREL(%rip), %rdx
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rdi
LBB0_3:
	xorl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	(%rdi), %esi
	orl	(%rdx), %esi
	orl	%eax, %esi
	movl	(%rcx), %eax
	movl	%eax, 12(%r15)
	movl	16(%r15), %edi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	testl	%r13d, %r12d
	jne	LBB0_4
## %bb.5:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_CFG_SPDSTS0@GOTPCREL(%rip), %rcx
	movl	%r13d, %eax
	cltd
	idivl	(%rcx)
	andl	$3, %eax
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.8:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpl	$2, %eax
	je	LBB0_10
	jmp	LBB0_11
LBB0_7:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpl	$2, %eax
	jne	LBB0_11
LBB0_10:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %eax
	movl	%eax, 4(%r15)
	movq	_TBICR_MR_AN_ENABLE@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	jne	LBB0_12
## %bb.13:
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG,8,3                        ## @CFG
	.comm	_SPDSTS_POLARITY,4,2            ## @SPDSTS_POLARITY
	.comm	_TANAR,8,3                      ## @TANAR
	.comm	_TBICR,8,3                      ## @TBICR
	.comm	_CFG_DUPSTS,4,2                 ## @CFG_DUPSTS
	.comm	_SUPPORTED_Autoneg,4,2          ## @SUPPORTED_Autoneg
	.comm	_CFG_TBI_EN,4,2                 ## @CFG_TBI_EN
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_SUPPORTED_FIBRE,4,2            ## @SUPPORTED_FIBRE
	.comm	_PORT_FIBRE,4,2                 ## @PORT_FIBRE
	.comm	_SUPPORTED_10baseT_Half,4,2     ## @SUPPORTED_10baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ## @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ## @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_100baseT_Full,4,2    ## @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_MII,4,2              ## @SUPPORTED_MII
	.comm	_PORT_MII,4,2                   ## @PORT_MII
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_CFG_SPDSTS0,4,2                ## @CFG_SPDSTS0
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_TBICR_MR_AN_ENABLE,4,2         ## @TBICR_MR_AN_ENABLE
	.comm	_AUTONEG_ENABLE,4,2             ## @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,4,2            ## @AUTONEG_DISABLE
	.no_dead_strip	_ns83820_get_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ns83820_get_link_ksettings
_ns83820_get_link_ksettings:            ; @ns83820_get_link_ksettings
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	bl	_PRIV
	mov	x22, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _CFG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CFG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
Lloh3:
	adrp	x8, _SPDSTS_POLARITY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPDSTS_POLARITY@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	x8, [x22, #8]
Lloh6:
	adrp	x9, _TANAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TANAR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x22, #8]
Lloh9:
	adrp	x9, _TBICR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TBICR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
Lloh12:
	adrp	x8, _CFG_DUPSTS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CFG_DUPSTS@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
Lloh15:
	adrp	x8, _SUPPORTED_Autoneg@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SUPPORTED_Autoneg@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x22]
Lloh18:
	adrp	x10, _CFG_TBI_EN@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CFG_TBI_EN@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh21:
	adrp	x9, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x9]
Lloh24:
	adrp	x9, _PORT_FIBRE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PORT_FIBRE@GOTPAGEOFF]
Lloh26:
	adrp	x11, _SUPPORTED_FIBRE@GOTPAGE
Lloh27:
	ldr	x11, [x11, _SUPPORTED_FIBRE@GOTPAGEOFF]
Lloh28:
	adrp	x12, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh29:
	ldr	x12, [x12, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh30:
	adrp	x9, _SUPPORTED_10baseT_Half@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SUPPORTED_10baseT_Half@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _SUPPORTED_10baseT_Full@GOTPAGE
Lloh34:
	ldr	x10, [x10, _SUPPORTED_10baseT_Full@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh36:
	adrp	x10, _SUPPORTED_100baseT_Half@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SUPPORTED_100baseT_Half@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh39:
	adrp	x10, _SUPPORTED_100baseT_Full@GOTPAGE
Lloh40:
	ldr	x10, [x10, _SUPPORTED_100baseT_Full@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh42:
	adrp	x10, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh43:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	orr	w10, w9, w10
Lloh45:
	adrp	x9, _PORT_MII@GOTPAGE
Lloh46:
	ldr	x9, [x9, _PORT_MII@GOTPAGEOFF]
Lloh47:
	adrp	x11, _SUPPORTED_MII@GOTPAGE
Lloh48:
	ldr	x11, [x11, _SUPPORTED_MII@GOTPAGEOFF]
Lloh49:
	adrp	x12, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh50:
	ldr	x12, [x12, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
LBB0_3:
	ldr	w12, [x12]
	eor	w21, w23, w21
	orr	w10, w10, w12
	ldr	w11, [x11]
	orr	w10, w10, w11
	ldr	w9, [x9]
	str	w9, [x19, #12]
	orr	w1, w10, w8
	ldr	w0, [x19, #16]
	bl	_ethtool_convert_legacy_u32_to_link_mode
Lloh51:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh52:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh53:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh54:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w24, w21
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh55:
	adrp	x8, _CFG_SPDSTS0@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CFG_SPDSTS0@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	sdiv	w8, w21, w8
	and	w8, w8, #0x3
Lloh58:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh59:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh60:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh61:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh62:
	adrp	x11, _SPEED_10@GOTPAGE
Lloh63:
	ldr	x11, [x11, _SPEED_10@GOTPAGEOFF]
	cmp	w8, #1
	csel	x10, x10, x11, eq
	cmp	w8, #2
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh64:
	adrp	x8, _TBICR_MR_AN_ENABLE@GOTPAGE
Lloh65:
	ldr	x8, [x8, _TBICR_MR_AN_ENABLE@GOTPAGEOFF]
Lloh66:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh67:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh68:
	adrp	x10, _AUTONEG_DISABLE@GOTPAGE
Lloh69:
	ldr	x10, [x10, _AUTONEG_DISABLE@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	tst	w8, w20
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh70
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG,8,3                        ; @CFG
	.comm	_SPDSTS_POLARITY,4,2            ; @SPDSTS_POLARITY
	.comm	_TANAR,8,3                      ; @TANAR
	.comm	_TBICR,8,3                      ; @TBICR
	.comm	_CFG_DUPSTS,4,2                 ; @CFG_DUPSTS
	.comm	_SUPPORTED_Autoneg,4,2          ; @SUPPORTED_Autoneg
	.comm	_CFG_TBI_EN,4,2                 ; @CFG_TBI_EN
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_SUPPORTED_FIBRE,4,2            ; @SUPPORTED_FIBRE
	.comm	_PORT_FIBRE,4,2                 ; @PORT_FIBRE
	.comm	_SUPPORTED_10baseT_Half,4,2     ; @SUPPORTED_10baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ; @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ; @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_100baseT_Full,4,2    ; @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_MII,4,2              ; @SUPPORTED_MII
	.comm	_PORT_MII,4,2                   ; @PORT_MII
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_CFG_SPDSTS0,4,2                ; @CFG_SPDSTS0
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_TBICR_MR_AN_ENABLE,4,2         ; @TBICR_MR_AN_ENABLE
	.comm	_AUTONEG_ENABLE,4,2             ; @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,4,2            ; @AUTONEG_DISABLE
	.no_dead_strip	_ns83820_get_link_ksettings
.subsections_via_symbols
