	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_nonintegrated_phy_loopback
_e1000_nonintegrated_phy_loopback:      ## @e1000_nonintegrated_phy_loopback
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_er32
	movq	_E1000_CTRL_ILOS@GOTPCREL(%rip), %rcx
	movq	_E1000_CTRL_FRCSPD@GOTPCREL(%rip), %rdx
	movq	_E1000_CTRL_FRCDPX@GOTPCREL(%rip), %rsi
	movq	_E1000_CTRL_SPD_1000@GOTPCREL(%rip), %rdi
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	orl	(%rdi), %eax
	movq	_E1000_CTRL_FD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_ew32
	movq	_M88E1000_PHY_SPEC_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	movq	_M88E1000_PSCR_AUTO_X_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_e1000_write_phy_reg
	movq	%rbx, %rdi
	callq	_e1000_phy_reset
	movq	%rbx, %rdi
	callq	_e1000_phy_reset_clk_and_crs
	movq	_PHY_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$33024, %edx                    ## imm = 0x8100
	callq	_e1000_write_phy_reg
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	%rbx, %rdi
	callq	_e1000_phy_reset_clk_and_crs
	movq	%rbx, %rdi
	callq	_e1000_phy_disable_receiver
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	movq	_MII_CR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_e1000_write_phy_reg
	movq	%rbx, %rdi
	callq	_e1000_phy_reset_clk_and_crs
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	movl	$9, %eax
	cmpl	$16640, -28(%rbp)               ## imm = 0x4100
	jne	LBB0_3
## %bb.1:
	movq	_M88E1000_EXT_PHY_SPEC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_e1000_read_phy_reg
	movl	$10, %eax
	cmpl	$112, -28(%rbp)
	jne	LBB0_3
## %bb.2:
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$29, %esi
	callq	_e1000_read_phy_reg
	xorl	%ecx, %ecx
	cmpl	$26, -28(%rbp)
	movl	$11, %eax
	cmovel	%ecx, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_E1000_CTRL_ILOS,4,2            ## @E1000_CTRL_ILOS
	.comm	_E1000_CTRL_FRCSPD,4,2          ## @E1000_CTRL_FRCSPD
	.comm	_E1000_CTRL_FRCDPX,4,2          ## @E1000_CTRL_FRCDPX
	.comm	_E1000_CTRL_SPD_1000,4,2        ## @E1000_CTRL_SPD_1000
	.comm	_E1000_CTRL_FD,4,2              ## @E1000_CTRL_FD
	.comm	_M88E1000_PHY_SPEC_CTRL,4,2     ## @M88E1000_PHY_SPEC_CTRL
	.comm	_M88E1000_PSCR_AUTO_X_MODE,4,2  ## @M88E1000_PSCR_AUTO_X_MODE
	.comm	_PHY_CTRL,4,2                   ## @PHY_CTRL
	.comm	_MII_CR_LOOPBACK,4,2            ## @MII_CR_LOOPBACK
	.comm	_M88E1000_EXT_PHY_SPEC_CTRL,4,2 ## @M88E1000_EXT_PHY_SPEC_CTRL
	.no_dead_strip	_e1000_nonintegrated_phy_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_nonintegrated_phy_loopback
_e1000_nonintegrated_phy_loopback:      ; @e1000_nonintegrated_phy_loopback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh2:
	adrp	x8, _E1000_CTRL_ILOS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E1000_CTRL_ILOS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _E1000_CTRL_FRCSPD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _E1000_CTRL_FRCSPD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _E1000_CTRL_FRCDPX@GOTPAGE
Lloh9:
	ldr	x10, [x10, _E1000_CTRL_FRCDPX@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _E1000_CTRL_SPD_1000@GOTPAGE
Lloh12:
	ldr	x11, [x11, _E1000_CTRL_SPD_1000@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
Lloh14:
	adrp	x12, _E1000_CTRL_FD@GOTPAGE
Lloh15:
	ldr	x12, [x12, _E1000_CTRL_FD@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w1, w8, w12
	ldr	w0, [x20]
	bl	_ew32
Lloh17:
	adrp	x20, _M88E1000_PHY_SPEC_CTRL@GOTPAGE
Lloh18:
	ldr	x20, [x20, _M88E1000_PHY_SPEC_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
Lloh19:
	adrp	x8, _M88E1000_PSCR_AUTO_X_MODE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _M88E1000_PSCR_AUTO_X_MODE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	mov	x0, x19
	bl	_e1000_phy_reset
	mov	x0, x19
	bl	_e1000_phy_reset_clk_and_crs
Lloh22:
	adrp	x20, _PHY_CTRL@GOTPAGE
Lloh23:
	ldr	x20, [x20, _PHY_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #33024
	bl	_e1000_write_phy_reg
	mov	w0, #500
	bl	_udelay
	mov	x0, x19
	bl	_e1000_phy_reset_clk_and_crs
	mov	x0, x19
	bl	_e1000_phy_disable_receiver
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
Lloh24:
	adrp	x8, _MII_CR_LOOPBACK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MII_CR_LOOPBACK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	mov	x0, x19
	bl	_e1000_phy_reset_clk_and_crs
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
	mov	w9, #16640
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
Lloh27:
	adrp	x8, _M88E1000_EXT_PHY_SPEC_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _M88E1000_EXT_PHY_SPEC_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
	cmp	w8, #112
	b.ne	LBB0_4
; %bb.2:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #29
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
	mov	w9, #11
	cmp	w8, #26
	csel	w0, wzr, w9, eq
	b	LBB0_5
LBB0_3:
	mov	w0, #9
	b	LBB0_5
LBB0_4:
	mov	w0, #10
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_E1000_CTRL_ILOS,4,2            ; @E1000_CTRL_ILOS
	.comm	_E1000_CTRL_FRCSPD,4,2          ; @E1000_CTRL_FRCSPD
	.comm	_E1000_CTRL_FRCDPX,4,2          ; @E1000_CTRL_FRCDPX
	.comm	_E1000_CTRL_SPD_1000,4,2        ; @E1000_CTRL_SPD_1000
	.comm	_E1000_CTRL_FD,4,2              ; @E1000_CTRL_FD
	.comm	_M88E1000_PHY_SPEC_CTRL,4,2     ; @M88E1000_PHY_SPEC_CTRL
	.comm	_M88E1000_PSCR_AUTO_X_MODE,4,2  ; @M88E1000_PSCR_AUTO_X_MODE
	.comm	_PHY_CTRL,4,2                   ; @PHY_CTRL
	.comm	_MII_CR_LOOPBACK,4,2            ; @MII_CR_LOOPBACK
	.comm	_M88E1000_EXT_PHY_SPEC_CTRL,4,2 ; @M88E1000_EXT_PHY_SPEC_CTRL
	.no_dead_strip	_e1000_nonintegrated_phy_loopback
.subsections_via_symbols
