	.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), %r12
	movl	(%r12), %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
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_TG3_PHY_MII_ADDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	movl	24(%rbx), %r15d
	leaq	16(%r13), %rdi
	callq	_dev_name
	movq	_tg3_adjust_link@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r13), %r8d
	movl	12(%r13), %ecx
	movl	%r15d, %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:
	movq	_TG3_PHY_MII_ADDR@GOTPCREL(%rip), %rcx
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.5:
	movl	(%rbx), %eax
	jmp	LBB0_6
LBB0_7:
	movl	(%rbx), %eax
	movq	_TG3_PHYFLG_10_100_ONLY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_6:
	movq	_PHY_BASIC_FEATURES@GOTPCREL(%rip), %rdx
	jmp	LBB0_9
LBB0_12:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_phy_disconnect
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_8:
	movq	_PHY_GBIT_FEATURES@GOTPCREL(%rip), %rdx
LBB0_9:
	movq	_SUPPORTED_Pause@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_SUPPORTED_Asym_Pause@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	andl	4(%r15), %ecx
	movl	%ecx, 4(%r15)
	orl	(%r12), %eax
	movl	%eax, (%rbx)
	movl	%ecx, 8(%r15)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_PHYFLG_IS_CONNECTED,4,2    ## @TG3_PHYFLG_IS_CONNECTED
	.comm	_TG3_PHY_MII_ADDR,8,3           ## @TG3_PHY_MII_ADDR
	.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	_PHY_GBIT_FEATURES,4,2          ## @PHY_GBIT_FEATURES
	.comm	_SUPPORTED_Pause,4,2            ## @SUPPORTED_Pause
	.comm	_SUPPORTED_Asym_Pause,4,2       ## @SUPPORTED_Asym_Pause
	.comm	_PHY_BASIC_FEATURES,4,2         ## @PHY_BASIC_FEATURES
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _TG3_PHYFLG_IS_CONNECTED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TG3_PHYFLG_IS_CONNECTED@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	w0, #0
LBB0_2:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x0
	bl	_tg3_bmcr_reset
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x22, _TG3_PHY_MII_ADDR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TG3_PHY_MII_ADDR@GOTPAGEOFF]
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	x23, [x8, x9, lsl #3]
	ldr	w20, [x19, #24]
	add	x0, x23, #16
	bl	_dev_name
	mov	x1, x0
Lloh4:
	adrp	x8, _tg3_adjust_link@GOTPAGE
Lloh5:
	ldr	x8, [x8, _tg3_adjust_link@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	ldr	w3, [x23, #12]
	ldr	w4, [x23]
	mov	x0, x20
	bl	_phy_connect
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #16]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.8:
	ldr	w8, [x19]
	b	LBB0_10
LBB0_9:
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_10:
Lloh12:
	adrp	x9, _PHY_BASIC_FEATURES@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PHY_BASIC_FEATURES@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	x0, [x8, x9, lsl #3]
	bl	_phy_disconnect
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
LBB0_12:
Lloh17:
	adrp	x9, _PHY_GBIT_FEATURES@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PHY_GBIT_FEATURES@GOTPAGEOFF]
LBB0_13:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _SUPPORTED_Pause@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SUPPORTED_Pause@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
Lloh22:
	adrp	x11, _SUPPORTED_Asym_Pause@GOTPAGE
Lloh23:
	ldr	x11, [x11, _SUPPORTED_Asym_Pause@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh24:
	ldr	w10, [x11]
	orr	w9, w9, w10
	ldr	w10, [x20, #4]
	and	w9, w10, w9
	str	w9, [x20, #4]
	mov	w0, #0
	ldr	w10, [x21]
	orr	w8, w8, w10
	str	w8, [x19]
	str	w9, [x20, #8]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_PHYFLG_IS_CONNECTED,4,2    ; @TG3_PHYFLG_IS_CONNECTED
	.comm	_TG3_PHY_MII_ADDR,8,3           ; @TG3_PHY_MII_ADDR
	.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	_PHY_GBIT_FEATURES,4,2          ; @PHY_GBIT_FEATURES
	.comm	_SUPPORTED_Pause,4,2            ; @SUPPORTED_Pause
	.comm	_SUPPORTED_Asym_Pause,4,2       ; @SUPPORTED_Asym_Pause
	.comm	_PHY_BASIC_FEATURES,4,2         ; @PHY_BASIC_FEATURES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tg3_phy_init
.subsections_via_symbols
