	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_phy_reset_5703_4_5
_tg3_phy_reset_5703_4_5:                ## @tg3_phy_reset_5703_4_5
	.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, %r13
	movl	$1, -48(%rbp)
	movl	$10, %r15d
	movl	$1, %eax
	movq	_MII_TG3_EXT_CTRL@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %r14
	testl	%eax, %eax
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:
	movq	%r13, %rdi
	callq	_tg3_bmcr_reset
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movl	$0, -48(%rbp)
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_tg3_readphy
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %edx
	movl	$12288, %eax                    ## imm = 0x3000
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_tg3_writephy
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_tg3_writephy
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	leaq	-52(%rbp), %rdx
	callq	_tg3_readphy
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CTL1000_ENABLE_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CTL1000_AS_MASTER@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_tg3_writephy
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_tg3_phy_toggle_auxctl_smdsp
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	$32773, %esi                    ## imm = 0x8005
	movl	$2048, %edx                     ## imm = 0x800
	callq	_tg3_phydsp_write
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	callq	_tg3_phy_write_and_check_testpat
	testl	%eax, %eax
	je	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	decl	%r15d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_1
	jmp	LBB0_3
LBB0_9:
	movq	%r13, %rdi
	callq	_tg3_phy_reset_chanpat
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	$32773, %esi                    ## imm = 0x8005
	xorl	%edx, %edx
	callq	_tg3_phydsp_write
	movq	_MII_TG3_DSP_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$33280, %edx                    ## imm = 0x8200
	callq	_tg3_writephy
	movq	_MII_TG3_DSP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_writephy
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_tg3_phy_toggle_auxctl_smdsp
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edx
	movq	%r13, %rdi
	callq	_tg3_writephy
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_tg3_readphy
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$-12289, %edx                   ## imm = 0xCFFF
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_tg3_writephy
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_TG3_EXT_CTRL,4,2           ## @MII_TG3_EXT_CTRL
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_CTL1000_AS_MASTER,4,2          ## @CTL1000_AS_MASTER
	.comm	_CTL1000_ENABLE_MASTER,4,2      ## @CTL1000_ENABLE_MASTER
	.comm	_MII_TG3_DSP_ADDRESS,4,2        ## @MII_TG3_DSP_ADDRESS
	.comm	_MII_TG3_DSP_CONTROL,4,2        ## @MII_TG3_DSP_CONTROL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_tg3_phy_reset_5703_4_5
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_phy_reset_5703_4_5
_tg3_phy_reset_5703_4_5:                ; @tg3_phy_reset_5703_4_5
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #4]
	mov	w22, #10
Lloh0:
	adrp	x20, _MII_TG3_EXT_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MII_TG3_EXT_CTRL@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
Lloh4:
	adrp	x24, _BMCR_FULLDPLX@GOTPAGE
Lloh5:
	ldr	x24, [x24, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh6:
	adrp	x25, _BMCR_SPEED1000@GOTPAGE
Lloh7:
	ldr	x25, [x25, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh8:
	adrp	x21, _MII_CTRL1000@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MII_CTRL1000@GOTPAGEOFF]
Lloh10:
	adrp	x26, _CTL1000_AS_MASTER@GOTPAGE
Lloh11:
	ldr	x26, [x26, _CTL1000_AS_MASTER@GOTPAGEOFF]
Lloh12:
	adrp	x27, _CTL1000_ENABLE_MASTER@GOTPAGE
Lloh13:
	ldr	x27, [x27, _CTL1000_ENABLE_MASTER@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_11
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #4]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_tg3_bmcr_reset
	cbnz	w0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [sp, #4]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_readphy
	cbnz	x0, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x3000
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_writephy
	ldr	w1, [x23]
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_tg3_writephy
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_tg3_readphy
	cbnz	x0, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_tg3_writephy
	mov	x0, x19
	mov	w1, #1
	bl	_tg3_phy_toggle_auxctl_smdsp
	cbnz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #32773
	mov	w2, #2048
	bl	_tg3_phydsp_write
	add	x1, sp, #4
	mov	x0, x19
	bl	_tg3_phy_write_and_check_testpat
	cbz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w22, w22, #1
	cbnz	w22, LBB0_2
LBB0_11:
	mov	x0, x19
	bl	_tg3_phy_reset_chanpat
	cbnz	w0, LBB0_15
; %bb.12:
	mov	x0, x19
	mov	w1, #32773
	mov	w2, #0
	bl	_tg3_phydsp_write
Lloh14:
	adrp	x8, _MII_TG3_DSP_ADDRESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MII_TG3_DSP_ADDRESS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33280
	bl	_tg3_writephy
Lloh17:
	adrp	x8, _MII_TG3_DSP_CONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MII_TG3_DSP_CONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_writephy
	mov	x0, x19
	mov	w1, #0
	bl	_tg3_phy_toggle_auxctl_smdsp
	ldr	w1, [x21]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_tg3_writephy
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_readphy
	cbz	x0, LBB0_14
; %bb.13:
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_14:
	ldr	w8, [sp, #12]
	and	w2, w8, #0xffffcfff
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_writephy
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_TG3_EXT_CTRL,4,2           ; @MII_TG3_EXT_CTRL
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_CTL1000_AS_MASTER,4,2          ; @CTL1000_AS_MASTER
	.comm	_CTL1000_ENABLE_MASTER,4,2      ; @CTL1000_ENABLE_MASTER
	.comm	_MII_TG3_DSP_ADDRESS,4,2        ; @MII_TG3_DSP_ADDRESS
	.comm	_MII_TG3_DSP_CONTROL,4,2        ; @MII_TG3_DSP_CONTROL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_tg3_phy_reset_5703_4_5
.subsections_via_symbols
