	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlan_phy_finish_auto_neg
_tlan_phy_finish_auto_neg:              ## @tlan_phy_finish_auto_neg
	.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	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movl	(%rax,%rcx,4), %r14d
	movq	_MII_GEN_STS@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %r12
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rcx
	callq	_tlan_mii_read_reg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rcx
	callq	_tlan_mii_read_reg
	movq	_MII_GS_AUTOCMPLT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_info
	movq	_MII_AN_ADV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_tlan_mii_read_reg
	movq	_MII_AN_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_tlan_mii_read_reg
	movl	-48(%rbp), %eax
	andl	-52(%rbp), %eax
	testl	$256, %eax                      ## imm = 0x100
	jne	LBB0_4
## %bb.3:
	movl	%eax, %ecx
	andl	$192, %ecx
	cmpl	$64, %ecx
	je	LBB0_4
## %bb.5:
	testl	$384, %eax                      ## imm = 0x180
	jne	LBB0_9
	jmp	LBB0_6
LBB0_1:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	_TLAN_TIMER_PHY_FINISH_AN@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_4:
	movl	$1, 16(%r15)
	testl	$384, %eax                      ## imm = 0x180
	jne	LBB0_9
LBB0_6:
	movq	32(%r15), %rcx
	movq	_TLAN_ADAPTER_USE_INTERN_10@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_9
## %bb.7:
	cmpq	$0, 8(%r15)
	je	LBB0_10
## %bb.8:
	movq	$0, 8(%r15)
	movl	$400, %edi                      ## imm = 0x190
	callq	_msecs_to_jiffies
	movl	%eax, %esi
	movq	_TLAN_TIMER_PHY_PDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	cmpq	$0, 8(%r15)
	jne	LBB0_11
LBB0_10:
	movq	24(%r15), %rcx
	movq	_TLAN_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	setne	%dl
	testb	$64, %al
	sete	%al
	movq	_MII_GEN_CTL@GOTPCREL(%rip), %rsi
	movq	_MII_GC_DUPLEX@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	testb	%al, %dl
	cmovel	(%rdi), %ecx
	movl	(%rsi), %edx
	movq	_MII_GC_AUTOENB@GOTPCREL(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.1(%rip), %r15
	cmovneq	%rsi, %r15
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_tlan_mii_write_reg
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_netdev_info
LBB0_11:
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %esi
	movq	_TLAN_TIMER_FINISH_RESET@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tlan_set_timer
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_GEN_STS,4,2                ## @MII_GEN_STS
	.comm	_MII_GS_AUTOCMPLT,4,2           ## @MII_GS_AUTOCMPLT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_TLAN_TIMER_PHY_FINISH_AN,4,2   ## @TLAN_TIMER_PHY_FINISH_AN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Autonegotiation complete\n"

	.comm	_MII_AN_ADV,4,2                 ## @MII_AN_ADV
	.comm	_MII_AN_LPA,4,2                 ## @MII_AN_LPA
	.comm	_TLAN_ADAPTER_USE_INTERN_10,4,2 ## @TLAN_ADAPTER_USE_INTERN_10
	.comm	_TLAN_TIMER_PHY_PDOWN,4,2       ## @TLAN_TIMER_PHY_PDOWN
	.comm	_TLAN_DUPLEX_FULL,8,3           ## @TLAN_DUPLEX_FULL
	.comm	_MII_GEN_CTL,4,2                ## @MII_GEN_CTL
	.comm	_MII_GC_AUTOENB,4,2             ## @MII_GC_AUTOENB
	.comm	_MII_GC_DUPLEX,4,2              ## @MII_GC_DUPLEX
L_.str.1:                               ## @.str.1
	.asciz	"Starting internal PHY with FULL-DUPLEX\n"

L_.str.2:                               ## @.str.2
	.asciz	"Starting internal PHY with HALF-DUPLEX\n"

	.comm	_TLAN_TIMER_FINISH_RESET,4,2    ## @TLAN_TIMER_FINISH_RESET
	.no_dead_strip	_tlan_phy_finish_auto_neg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlan_phy_finish_auto_neg
_tlan_phy_finish_auto_neg:              ; @tlan_phy_finish_auto_neg
	.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, x0
	bl	_netdev_priv
	mov	x21, x0
	ldp	x8, x9, [x0]
	ldr	w20, [x8, x9, lsl #2]
Lloh0:
	adrp	x22, _MII_GEN_STS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MII_GEN_STS@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x20
	bl	_tlan_mii_read_reg
	mov	w0, #1000
	bl	_udelay
	ldr	w2, [x22]
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x20
	bl	_tlan_mii_read_reg
	ldr	w8, [sp, #4]
Lloh2:
	adrp	x9, _MII_GS_AUTOCMPLT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MII_GS_AUTOCMPLT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_info
Lloh7:
	adrp	x8, _MII_AN_ADV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MII_AN_ADV@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_tlan_mii_read_reg
Lloh10:
	adrp	x8, _MII_AN_LPA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MII_AN_LPA@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_tlan_mii_read_reg
	ldp	w9, w8, [sp, #8]
	and	w8, w9, w8
	tbnz	w8, #8, LBB0_5
; %bb.2:
	and	w9, w8, #0xc0
	cmp	w9, #64
	b.eq	LBB0_5
; %bb.3:
	tst	w8, #0x180
	b.ne	LBB0_9
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x8, _HZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w1, w8, #1
Lloh16:
	adrp	x8, _TLAN_TIMER_PHY_FINISH_AN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TLAN_TIMER_PHY_FINISH_AN@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
	mov	w9, #1
	str	w9, [x21, #16]
	tst	w8, #0x180
	b.ne	LBB0_9
LBB0_6:
	ldr	x9, [x21, #32]
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _TLAN_ADAPTER_USE_INTERN_10@GOTPAGE
Lloh19:
	ldr	x10, [x10, _TLAN_ADAPTER_USE_INTERN_10@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.7:
	ldr	x9, [x21, #8]
	cbz	x9, LBB0_10
; %bb.8:
	str	xzr, [x21, #8]
	mov	w0, #400
	bl	_msecs_to_jiffies
	mov	x1, x0
Lloh21:
	adrp	x8, _TLAN_TIMER_PHY_PDOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TLAN_TIMER_PHY_PDOWN@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	ldr	x9, [x21, #8]
	cbnz	x9, LBB0_11
LBB0_10:
	ldr	x9, [x21, #24]
Lloh23:
	adrp	x10, _TLAN_DUPLEX_FULL@GOTPAGE
Lloh24:
	ldr	x10, [x10, _TLAN_DUPLEX_FULL@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w9, ne
	tst	w8, #0x40
	cset	w8, eq
Lloh26:
	adrp	x10, _MII_GEN_CTL@GOTPAGE
Lloh27:
	ldr	x10, [x10, _MII_GEN_CTL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x10]
Lloh29:
	adrp	x10, _MII_GC_AUTOENB@GOTPAGE
Lloh30:
	ldr	x10, [x10, _MII_GC_AUTOENB@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
Lloh32:
	adrp	x11, _MII_GC_DUPLEX@GOTPAGE
Lloh33:
	ldr	x11, [x11, _MII_GC_DUPLEX@GOTPAGEOFF]
Lloh34:
	ldr	w11, [x11]
	tst	w9, w8
	csel	w8, wzr, w11, ne
	orr	w3, w10, w8
Lloh35:
	adrp	x8, l_.str.1@PAGE
Lloh36:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh37:
	adrp	x9, l_.str.2@PAGE
Lloh38:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x21, x9, x8, ne
	mov	x0, x19
	mov	x1, x20
	bl	_tlan_mii_write_reg
	mov	x0, x19
	mov	x1, x21
	bl	_netdev_info
LBB0_11:
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x1, x0
Lloh39:
	adrp	x8, _TLAN_TIMER_FINISH_RESET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _TLAN_TIMER_FINISH_RESET@GOTPAGEOFF]
LBB0_12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlan_set_timer
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_GEN_STS,4,2                ; @MII_GEN_STS
	.comm	_MII_GS_AUTOCMPLT,4,2           ; @MII_GS_AUTOCMPLT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_TLAN_TIMER_PHY_FINISH_AN,4,2   ; @TLAN_TIMER_PHY_FINISH_AN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Autonegotiation complete\n"

	.comm	_MII_AN_ADV,4,2                 ; @MII_AN_ADV
	.comm	_MII_AN_LPA,4,2                 ; @MII_AN_LPA
	.comm	_TLAN_ADAPTER_USE_INTERN_10,4,2 ; @TLAN_ADAPTER_USE_INTERN_10
	.comm	_TLAN_TIMER_PHY_PDOWN,4,2       ; @TLAN_TIMER_PHY_PDOWN
	.comm	_TLAN_DUPLEX_FULL,8,3           ; @TLAN_DUPLEX_FULL
	.comm	_MII_GEN_CTL,4,2                ; @MII_GEN_CTL
	.comm	_MII_GC_AUTOENB,4,2             ; @MII_GC_AUTOENB
	.comm	_MII_GC_DUPLEX,4,2              ; @MII_GC_DUPLEX
l_.str.1:                               ; @.str.1
	.asciz	"Starting internal PHY with FULL-DUPLEX\n"

l_.str.2:                               ; @.str.2
	.asciz	"Starting internal PHY with HALF-DUPLEX\n"

	.comm	_TLAN_TIMER_FINISH_RESET,4,2    ; @TLAN_TIMER_FINISH_RESET
	.no_dead_strip	_tlan_phy_finish_auto_neg
.subsections_via_symbols
