	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_phy_init
_tg3_phy_init:                          ## @tg3_phy_init
	.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	_TG3_PHYFLG_IS_CONNECTED@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	callq	_tg3_bmcr_reset
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_mdiobus_get_phy
	movq	%rax, %r15
	movl	24(%rbx), %r12d
	movq	%rax, %rdi
	callq	_phydev_name
	movq	_tg3_adjust_link@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %ecx
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_phy_connect
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.11:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movl	(%r15), %eax
	cmpl	$130, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_7
LBB0_5:
	movq	_TG3_PHYFLG_10_100_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
LBB0_8:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_mdiobus_get_phy
	movq	%rax, %rdi
	callq	_phy_disconnect
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_6:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_set_max_speed
	movq	%r15, %rdi
	callq	_phy_support_asym_pause
	movl	(%r13), %eax
	orl	%eax, (%rbx)
	movq	%r15, %rdi
	callq	_phy_attached_info
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_PHYFLG_IS_CONNECTED,4,2    ## @TG3_PHYFLG_IS_CONNECTED
	.comm	_tg3_adjust_link,4,2            ## @tg3_adjust_link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not attach to PHY\n"

	.comm	_TG3_PHYFLG_10_100_ONLY,4,2     ## @TG3_PHYFLG_10_100_ONLY
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tg3_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_phy_init
_tg3_phy_init:                          ; @tg3_phy_init
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _TG3_PHYFLG_IS_CONNECTED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TG3_PHYFLG_IS_CONNECTED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
LBB0_3:
	mov	x19, x0
	bl	_tg3_bmcr_reset
	ldp	w1, w0, [x19, #4]
	bl	_mdiobus_get_phy
	mov	x20, x0
	ldr	w21, [x19, #24]
	bl	_phydev_name
	mov	x1, x0
Lloh2:
	adrp	x8, _tg3_adjust_link@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tg3_adjust_link@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x21
	bl	_phy_connect
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_5:
	ldr	w8, [x20]
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.6:
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_10
LBB0_8:
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_9:
Lloh10:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	ldp	w1, w0, [x19, #4]
	bl	_mdiobus_get_phy
	bl	_phy_disconnect
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
LBB0_11:
Lloh15:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_phy_set_max_speed
	mov	x0, x20
	bl	_phy_support_asym_pause
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_phy_attached_info
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_PHYFLG_IS_CONNECTED,4,2    ; @TG3_PHYFLG_IS_CONNECTED
	.comm	_tg3_adjust_link,4,2            ; @tg3_adjust_link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not attach to PHY\n"

	.comm	_TG3_PHYFLG_10_100_ONLY,4,2     ; @TG3_PHYFLG_10_100_ONLY
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tg3_phy_init
.subsections_via_symbols
