	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_detect_gig_phy
_e1000_detect_gig_phy:                  ## @e1000_detect_gig_phy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_18
LBB0_2:
	movq	%rdi, %rbx
	movq	_PHY_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_18
## %bb.3:
	movl	-24(%rbp), %eax
	shll	$16, %eax
	cltq
	movq	%rax, (%rbx)
	movl	$20, %edi
	callq	_udelay
	movq	_PHY_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_18
## %bb.4:
	movl	-20(%rbp), %ecx
	movq	_PHY_REVISION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	andl	%ecx, %eax
	cltq
	orq	(%rbx), %rax
	movq	%rax, (%rbx)
	notl	%edx
	andl	%ecx, %edx
	movl	%edx, 8(%rbx)
	movl	12(%rbx), %esi
	leal	-128(%rsi), %ecx
	cmpl	$11, %ecx
	ja	LBB0_11
## %bb.5:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_9:
	movq	_M88E1011_I_PHY_ID@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_10:
	movq	_IGP01E1000_I_PHY_ID@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_11:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_e_dbg
	movq	_E1000_ERR_CONFIG@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_12:
	movq	_RTL8211B_PHY_ID@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	setne	%cl
	movq	_RTL8201N_PHY_ID@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	cmpq	%rdx, %rax
	setne	%dl
	andb	%cl, %dl
	movq	_M88E1118_E_PHY_ID@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	setne	%r14b
	andb	%dl, %r14b
	jmp	LBB0_13
LBB0_8:
	movq	_M88E1000_I_PHY_ID@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_M88E1000_E_PHY_ID@GOTPCREL(%rip), %rcx
LBB0_7:
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	setne	%r14b
LBB0_13:
	movq	%rbx, %rdi
	callq	_e1000_set_phy_type
	movl	(%rbx), %esi
	testb	%r14b, %r14b
	jne	LBB0_16
## %bb.14:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
	movq	(%rbx), %rax
	jmp	LBB0_18
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_18:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_E1000_SUCCESS,8,3              ## @E1000_SUCCESS
	.comm	_PHY_ID1,4,2                    ## @PHY_ID1
	.comm	_PHY_ID2,4,2                    ## @PHY_ID2
	.comm	_PHY_REVISION_MASK,4,2          ## @PHY_REVISION_MASK
	.comm	_M88E1000_E_PHY_ID,4,2          ## @M88E1000_E_PHY_ID
	.comm	_M88E1000_I_PHY_ID,4,2          ## @M88E1000_I_PHY_ID
	.comm	_M88E1011_I_PHY_ID,4,2          ## @M88E1011_I_PHY_ID
	.comm	_RTL8211B_PHY_ID,4,2            ## @RTL8211B_PHY_ID
	.comm	_RTL8201N_PHY_ID,4,2            ## @RTL8201N_PHY_ID
	.comm	_M88E1118_E_PHY_ID,4,2          ## @M88E1118_E_PHY_ID
	.comm	_IGP01E1000_I_PHY_ID,4,2        ## @IGP01E1000_I_PHY_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid MAC type %d\n"

	.comm	_E1000_ERR_CONFIG,8,3           ## @E1000_ERR_CONFIG
L_.str.1:                               ## @.str.1
	.asciz	"PHY ID 0x%X detected\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid PHY ID 0x%X\n"

	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.no_dead_strip	_e1000_detect_gig_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_detect_gig_phy
_e1000_detect_gig_phy:                  ; @e1000_detect_gig_phy
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	b	LBB0_17
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x8, _PHY_ID1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_ID1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_17
; %bb.3:
	ldr	w8, [sp, #12]
	lsl	w8, w8, #16
	sxtw	x8, w8
	str	x8, [x19]
	mov	w0, #20
	bl	_udelay
Lloh6:
	adrp	x8, _PHY_ID2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_ID2@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_17
; %bb.4:
Lloh9:
	adrp	x8, _PHY_REVISION_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PHY_REVISION_MASK@GOTPAGEOFF]
	ldr	w9, [sp, #8]
Lloh11:
	ldr	w10, [x8]
	and	w8, w10, w9
	sxtw	x8, w8
	ldr	x11, [x19]
	orr	x8, x11, x8
	str	x8, [x19]
	bic	w9, w9, w10
	str	w9, [x19, #8]
	ldr	w1, [x19, #12]
	sub	w9, w1, #128
	cmp	w9, #11
	b.hi	LBB0_8
; %bb.5:
Lloh12:
	adrp	x10, lJTI0_0@PAGE
Lloh13:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_6
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_6:
Lloh14:
	adrp	x9, _M88E1011_I_PHY_ID@GOTPAGE
Lloh15:
	ldr	x9, [x9, _M88E1011_I_PHY_ID@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
Lloh16:
	adrp	x9, _IGP01E1000_I_PHY_ID@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IGP01E1000_I_PHY_ID@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
Lloh20:
	adrp	x8, _E1000_ERR_CONFIG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _E1000_ERR_CONFIG@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
Lloh22:
	adrp	x9, _RTL8211B_PHY_ID@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RTL8211B_PHY_ID@GOTPAGEOFF]
Lloh24:
	ldrsw	x9, [x9]
	cmp	x8, x9
Lloh25:
	adrp	x9, _RTL8201N_PHY_ID@GOTPAGE
Lloh26:
	ldr	x9, [x9, _RTL8201N_PHY_ID@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	ccmp	x8, x9, #4, ne
Lloh28:
	adrp	x9, _M88E1118_E_PHY_ID@GOTPAGE
Lloh29:
	ldr	x9, [x9, _M88E1118_E_PHY_ID@GOTPAGEOFF]
Lloh30:
	ldrsw	x9, [x9]
	ccmp	x8, x9, #4, ne
	b	LBB0_13
LBB0_10:
Lloh31:
	adrp	x9, _M88E1000_I_PHY_ID@GOTPAGE
Lloh32:
	ldr	x9, [x9, _M88E1000_I_PHY_ID@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh33:
	adrp	x9, _M88E1000_E_PHY_ID@GOTPAGE
Lloh34:
	ldr	x9, [x9, _M88E1000_E_PHY_ID@GOTPAGEOFF]
LBB0_12:
	ldrsw	x9, [x9]
	cmp	x8, x9
LBB0_13:
	cset	w20, ne
	mov	x0, x19
	bl	_e1000_set_phy_type
Lloh35:
	adrp	x21, _E1000_SUCCESS@GOTPAGE
Lloh36:
	ldr	x21, [x21, _E1000_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w1, [x19]
	cmp	w20, #0
	ccmp	x0, x8, #0, eq
	b.eq	LBB0_16
; %bb.14:
Lloh37:
	adrp	x0, l_.str.2@PAGE
Lloh38:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
Lloh39:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
LBB0_15:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_17
LBB0_16:
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
	ldr	x0, [x21]
LBB0_17:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
                                        ; -- End function
	.comm	_E1000_SUCCESS,8,3              ; @E1000_SUCCESS
	.comm	_PHY_ID1,4,2                    ; @PHY_ID1
	.comm	_PHY_ID2,4,2                    ; @PHY_ID2
	.comm	_PHY_REVISION_MASK,4,2          ; @PHY_REVISION_MASK
	.comm	_M88E1000_E_PHY_ID,4,2          ; @M88E1000_E_PHY_ID
	.comm	_M88E1000_I_PHY_ID,4,2          ; @M88E1000_I_PHY_ID
	.comm	_M88E1011_I_PHY_ID,4,2          ; @M88E1011_I_PHY_ID
	.comm	_RTL8211B_PHY_ID,4,2            ; @RTL8211B_PHY_ID
	.comm	_RTL8201N_PHY_ID,4,2            ; @RTL8201N_PHY_ID
	.comm	_M88E1118_E_PHY_ID,4,2          ; @M88E1118_E_PHY_ID
	.comm	_IGP01E1000_I_PHY_ID,4,2        ; @IGP01E1000_I_PHY_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid MAC type %d\n"

	.comm	_E1000_ERR_CONFIG,8,3           ; @E1000_ERR_CONFIG
l_.str.1:                               ; @.str.1
	.asciz	"PHY ID 0x%X detected\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid PHY ID 0x%X\n"

	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.no_dead_strip	_e1000_detect_gig_phy
.subsections_via_symbols
