	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlan_phy_reset
_tlan_phy_reset:                        ## @tlan_phy_reset
	.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	%rdi, %r14
	callq	_netdev_priv
	movq	_jiffies@GOTPCREL(%rip), %rdx
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	addq	(%rdx), %r15
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx,%rax,4), %ebx
	movq	_TLAN_DEBUG_GNRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_TLAN_DBG
	movl	(%r14), %edi
	callq	_tlan_mii_sync
	movq	_MII_GC_LOOPBK@GOTPCREL(%rip), %rax
	movq	_MII_GC_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	movq	_MII_GEN_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_tlan_mii_write_reg
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r12, %rcx
	callq	_tlan_mii_read_reg
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MII_GC_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_1
## %bb.4:
	movl	$50, %edi
	callq	_msecs_to_jiffies
	movq	_TLAN_TIMER_PHY_START_LINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_tlan_set_timer
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_TLAN_DEBUG_GNRL,4,2            ## @TLAN_DEBUG_GNRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Resetting PHY.\n"

	.comm	_MII_GC_LOOPBK,4,2              ## @MII_GC_LOOPBK
	.comm	_MII_GC_RESET,4,2               ## @MII_GC_RESET
	.comm	_MII_GEN_CTL,4,2                ## @MII_GEN_CTL
L_.str.1:                               ## @.str.1
	.asciz	"PHY reset timeout\n"

	.comm	_TLAN_TIMER_PHY_START_LINK,4,2  ## @TLAN_TIMER_PHY_START_LINK
	.no_dead_strip	_tlan_phy_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlan_phy_reset
_tlan_phy_reset:                        ; @tlan_phy_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	bl	_netdev_priv
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _HZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x20, x9, x8
	ldp	x8, x9, [x0]
	ldr	w21, [x8, x9, lsl #2]
Lloh5:
	adrp	x8, _TLAN_DEBUG_GNRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TLAN_DEBUG_GNRL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_TLAN_DBG
	ldr	w0, [x19]
	bl	_tlan_mii_sync
Lloh10:
	adrp	x8, _MII_GC_LOOPBK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MII_GC_LOOPBK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x23, _MII_GC_RESET@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MII_GC_RESET@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w3, w9, w8
	str	w3, [sp, #12]
Lloh15:
	adrp	x24, _MII_GEN_CTL@GOTPAGE
Lloh16:
	ldr	x24, [x24, _MII_GEN_CTL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_tlan_mii_write_reg
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_tlan_mii_read_reg
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #50
	bl	_msecs_to_jiffies
	mov	x1, x0
Lloh17:
	adrp	x8, _TLAN_TIMER_PHY_START_LINK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TLAN_TIMER_PHY_START_LINK@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlan_set_timer
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_TLAN_DEBUG_GNRL,4,2            ; @TLAN_DEBUG_GNRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Resetting PHY.\n"

	.comm	_MII_GC_LOOPBK,4,2              ; @MII_GC_LOOPBK
	.comm	_MII_GC_RESET,4,2               ; @MII_GC_RESET
	.comm	_MII_GEN_CTL,4,2                ; @MII_GEN_CTL
l_.str.1:                               ; @.str.1
	.asciz	"PHY reset timeout\n"

	.comm	_TLAN_TIMER_PHY_START_LINK,4,2  ; @TLAN_TIMER_PHY_START_LINK
	.no_dead_strip	_tlan_phy_reset
.subsections_via_symbols
