	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ns83820_get_settings
_ns83820_get_settings:                  ## @ns83820_get_settings
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_PRIV
	movq	%rax, %rbx
	movq	_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r15d
	movq	_SPDSTS_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	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, %ecx
	movq	_CFG_DUPSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SUPPORTED_Autoneg@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%r14)
	movq	_CFG_TBI_EN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rsi
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rdi
	movq	_SUPPORTED_FIBRE@GOTPCREL(%rip), %rbx
	orl	(%rsi), %edx
	orl	(%rdi), %edx
	orl	(%rbx), %edx
	movl	%edx, (%r14)
	movq	_PORT_FIBRE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 16(%r14)
LBB0_2:
	xorl	%r15d, %r12d
	testl	%r12d, %eax
	jne	LBB0_3
## %bb.4:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_CFG_SPDSTS0@GOTPCREL(%rip), %rsi
	movl	%r12d, %eax
	cltd
	idivl	(%rsi)
	andl	$3, %eax
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.7:
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	cmpl	$2, %eax
	je	LBB0_9
	jmp	LBB0_10
LBB0_6:
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	cmpl	$2, %eax
	jne	LBB0_10
LBB0_9:
	movq	_SPEED_1000@GOTPCREL(%rip), %rdx
LBB0_10:
	movl	(%rdx), %eax
	movl	%eax, 8(%r14)
	movq	_TBICR_MR_AN_ENABLE@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	andl	(%rax), %ecx
	setne	%dl
	movl	%edx, 4(%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	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_TBI_EN,4,2                 ## @CFG_TBI_EN
	.comm	_CFG_DUPSTS,4,2                 ## @CFG_DUPSTS
	.comm	_SUPPORTED_Autoneg,4,2          ## @SUPPORTED_Autoneg
	.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	_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
	.no_dead_strip	_ns83820_get_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ns83820_get_settings
_ns83820_get_settings:                  ; @ns83820_get_settings
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	_PRIV
	mov	x21, 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	x20, x0
Lloh3:
	adrp	x8, _SPDSTS_POLARITY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPDSTS_POLARITY@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _TANAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TANAR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _TBICR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TBICR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh12:
	adrp	x8, _CFG_DUPSTS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CFG_DUPSTS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SUPPORTED_Autoneg@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SUPPORTED_Autoneg@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [x19]
	ldr	w10, [x21]
Lloh18:
	adrp	x11, _CFG_TBI_EN@GOTPAGE
Lloh19:
	ldr	x11, [x11, _CFG_TBI_EN@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_2
; %bb.1:
Lloh21:
	adrp	x10, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh25:
	ldr	x11, [x11, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
Lloh27:
	adrp	x12, _SUPPORTED_FIBRE@GOTPAGE
Lloh28:
	ldr	x12, [x12, _SUPPORTED_FIBRE@GOTPAGEOFF]
Lloh29:
	ldr	w12, [x12]
	orr	w9, w10, w9
	orr	w9, w9, w11
	orr	w9, w9, w12
	str	w9, [x19]
Lloh30:
	adrp	x9, _PORT_FIBRE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PORT_FIBRE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	str	w9, [x19, #16]
LBB0_2:
	eor	w9, w22, w20
Lloh33:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh34:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh35:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh36:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w8, w9
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh37:
	adrp	x8, _CFG_SPDSTS0@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CFG_SPDSTS0@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	sdiv	w8, w9, w8
Lloh40:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh41:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
	and	w8, w8, #0x3
Lloh42:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh43:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh44:
	adrp	x11, _SPEED_10@GOTPAGE
Lloh45:
	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]
Lloh46:
	adrp	x9, _TBICR_MR_AN_ENABLE@GOTPAGE
Lloh47:
	ldr	x9, [x9, _TBICR_MR_AN_ENABLE@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	tst	w9, w0
	cset	w9, ne
	stp	w9, w8, [x19, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 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 AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.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_TBI_EN,4,2                 ; @CFG_TBI_EN
	.comm	_CFG_DUPSTS,4,2                 ; @CFG_DUPSTS
	.comm	_SUPPORTED_Autoneg,4,2          ; @SUPPORTED_Autoneg
	.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	_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
	.no_dead_strip	_ns83820_get_settings
.subsections_via_symbols
