	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igb_loopback_cleanup
_igb_loopback_cleanup:                  ## @igb_loopback_cleanup
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_E1000_DEV_ID_DH89XXCC_SGMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.1:
	movq	_E1000_DEV_ID_DH89XXCC_SERDES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_E1000_DEV_ID_DH89XXCC_BACKPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_E1000_DEV_ID_DH89XXCC_SFP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_E1000_DEV_ID_I354_SGMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	movq	_E1000_MPHY_ADDR_CTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_rd32
	movq	_E1000_MPHY_ADDR_CTL_OFFSET_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_E1000_MPHY_PCS_CLK_REG_OFFSET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_wr32
	movq	_E1000_MPHY_DATA@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_rd32
	movq	_E1000_MPHY_PCS_CLK_REG_DIGINELBEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r14), %edi
	callq	_wr32
LBB0_6:
	movq	_E1000_RCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_rd32
	movq	_E1000_RCTL_LBM_TCVR@GOTPCREL(%rip), %rcx
	movq	_E1000_RCTL_LBM_MAC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r14), %edi
	callq	_wr32
	movl	$1, 8(%rbx)
	movq	_PHY_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_igb_read_phy_reg
	movl	-20(%rbp), %edx
	movq	_MII_CR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_8
## %bb.7:
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -20(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_igb_write_phy_reg
	movq	%rbx, %rdi
	callq	_igb_phy_sw_reset
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E1000_DEV_ID_DH89XXCC_SGMII,8,3 ## @E1000_DEV_ID_DH89XXCC_SGMII
	.comm	_E1000_DEV_ID_DH89XXCC_SERDES,8,3 ## @E1000_DEV_ID_DH89XXCC_SERDES
	.comm	_E1000_DEV_ID_DH89XXCC_BACKPLANE,8,3 ## @E1000_DEV_ID_DH89XXCC_BACKPLANE
	.comm	_E1000_DEV_ID_DH89XXCC_SFP,8,3  ## @E1000_DEV_ID_DH89XXCC_SFP
	.comm	_E1000_DEV_ID_I354_SGMII,8,3    ## @E1000_DEV_ID_I354_SGMII
	.comm	_E1000_MPHY_ADDR_CTL,4,2        ## @E1000_MPHY_ADDR_CTL
	.comm	_E1000_MPHY_ADDR_CTL_OFFSET_MASK,4,2 ## @E1000_MPHY_ADDR_CTL_OFFSET_MASK
	.comm	_E1000_MPHY_PCS_CLK_REG_OFFSET,4,2 ## @E1000_MPHY_PCS_CLK_REG_OFFSET
	.comm	_E1000_MPHY_DATA,4,2            ## @E1000_MPHY_DATA
	.comm	_E1000_MPHY_PCS_CLK_REG_DIGINELBEN,4,2 ## @E1000_MPHY_PCS_CLK_REG_DIGINELBEN
	.comm	_E1000_RCTL,4,2                 ## @E1000_RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ## @E1000_RCTL_LBM_TCVR
	.comm	_E1000_RCTL_LBM_MAC,4,2         ## @E1000_RCTL_LBM_MAC
	.comm	_PHY_CONTROL,4,2                ## @PHY_CONTROL
	.comm	_MII_CR_LOOPBACK,4,2            ## @MII_CR_LOOPBACK
	.no_dead_strip	_igb_loopback_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igb_loopback_cleanup
_igb_loopback_cleanup:                  ; @igb_loopback_cleanup
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _E1000_DEV_ID_DH89XXCC_SGMII@GOTPAGE
Lloh1:
	ldr	x9, [x9, _E1000_DEV_ID_DH89XXCC_SGMII@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _E1000_DEV_ID_DH89XXCC_SERDES@GOTPAGE
Lloh4:
	ldr	x10, [x10, _E1000_DEV_ID_DH89XXCC_SERDES@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _E1000_DEV_ID_DH89XXCC_BACKPLANE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _E1000_DEV_ID_DH89XXCC_BACKPLANE@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _E1000_DEV_ID_DH89XXCC_SFP@GOTPAGE
Lloh10:
	ldr	x12, [x12, _E1000_DEV_ID_DH89XXCC_SFP@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _E1000_DEV_ID_I354_SGMII@GOTPAGE
Lloh13:
	ldr	x13, [x13, _E1000_DEV_ID_I354_SGMII@GOTPAGEOFF]
Lloh14:
	ldr	x13, [x13]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	ccmp	x8, x13, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh15:
	adrp	x20, _E1000_MPHY_ADDR_CTL@GOTPAGE
Lloh16:
	ldr	x20, [x20, _E1000_MPHY_ADDR_CTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_rd32
Lloh17:
	adrp	x8, _E1000_MPHY_ADDR_CTL_OFFSET_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E1000_MPHY_ADDR_CTL_OFFSET_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh20:
	adrp	x9, _E1000_MPHY_PCS_CLK_REG_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _E1000_MPHY_PCS_CLK_REG_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x20]
	bl	_wr32
Lloh23:
	adrp	x20, _E1000_MPHY_DATA@GOTPAGE
Lloh24:
	ldr	x20, [x20, _E1000_MPHY_DATA@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_rd32
Lloh25:
	adrp	x8, _E1000_MPHY_PCS_CLK_REG_DIGINELBEN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _E1000_MPHY_PCS_CLK_REG_DIGINELBEN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_wr32
LBB0_2:
Lloh28:
	adrp	x20, _E1000_RCTL@GOTPAGE
Lloh29:
	ldr	x20, [x20, _E1000_RCTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_rd32
Lloh30:
	adrp	x8, _E1000_RCTL_LBM_TCVR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _E1000_RCTL_LBM_TCVR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _E1000_RCTL_LBM_MAC@GOTPAGE
Lloh34:
	ldr	x9, [x9, _E1000_RCTL_LBM_MAC@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_wr32
	mov	w8, #1
	str	w8, [x19, #8]
Lloh36:
	adrp	x20, _PHY_CONTROL@GOTPAGE
Lloh37:
	ldr	x20, [x20, _PHY_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_igb_read_phy_reg
	ldr	w8, [sp, #12]
Lloh38:
	adrp	x9, _MII_CR_LOOPBACK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _MII_CR_LOOPBACK@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_igb_write_phy_reg
	mov	x0, x19
	bl	_igb_phy_sw_reset
LBB0_4:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_E1000_DEV_ID_DH89XXCC_SGMII,8,3 ; @E1000_DEV_ID_DH89XXCC_SGMII
	.comm	_E1000_DEV_ID_DH89XXCC_SERDES,8,3 ; @E1000_DEV_ID_DH89XXCC_SERDES
	.comm	_E1000_DEV_ID_DH89XXCC_BACKPLANE,8,3 ; @E1000_DEV_ID_DH89XXCC_BACKPLANE
	.comm	_E1000_DEV_ID_DH89XXCC_SFP,8,3  ; @E1000_DEV_ID_DH89XXCC_SFP
	.comm	_E1000_DEV_ID_I354_SGMII,8,3    ; @E1000_DEV_ID_I354_SGMII
	.comm	_E1000_MPHY_ADDR_CTL,4,2        ; @E1000_MPHY_ADDR_CTL
	.comm	_E1000_MPHY_ADDR_CTL_OFFSET_MASK,4,2 ; @E1000_MPHY_ADDR_CTL_OFFSET_MASK
	.comm	_E1000_MPHY_PCS_CLK_REG_OFFSET,4,2 ; @E1000_MPHY_PCS_CLK_REG_OFFSET
	.comm	_E1000_MPHY_DATA,4,2            ; @E1000_MPHY_DATA
	.comm	_E1000_MPHY_PCS_CLK_REG_DIGINELBEN,4,2 ; @E1000_MPHY_PCS_CLK_REG_DIGINELBEN
	.comm	_E1000_RCTL,4,2                 ; @E1000_RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ; @E1000_RCTL_LBM_TCVR
	.comm	_E1000_RCTL_LBM_MAC,4,2         ; @E1000_RCTL_LBM_MAC
	.comm	_PHY_CONTROL,4,2                ; @PHY_CONTROL
	.comm	_MII_CR_LOOPBACK,4,2            ; @MII_CR_LOOPBACK
	.no_dead_strip	_igb_loopback_cleanup
.subsections_via_symbols
