	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_polarity_reversal_workaround
_e1000_polarity_reversal_workaround:    ## @e1000_polarity_reversal_workaround
	.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	%rdi, %rbx
	movq	_M88E1000_PHY_PAGE_SELECT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$25, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.1:
	movq	_M88E1000_PHY_GEN_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.2:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.3:
	movq	_PHY_FORCE_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	jle	LBB0_9
## %bb.4:
	incq	%r13
	movq	_PHY_STATUS@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MII_SR_LINK_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	testq	%rax, -48(%rbp)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$100, %edi
	callq	_msleep
	decq	%r13
	cmpq	$1, %r13
	jg	LBB0_5
LBB0_9:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$25, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	movq	_M88E1000_PHY_GEN_CONTROL@GOTPCREL(%rip), %r14
	jne	LBB0_21
## %bb.10:
	movl	$50, %edi
	callq	_msleep
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$65520, %edx                    ## imm = 0xFFF0
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.11:
	movl	$50, %edi
	callq	_msleep
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$65280, %edx                    ## imm = 0xFF00
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.12:
	movl	$50, %edi
	callq	_msleep
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.13:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.14:
	movq	_PHY_FORCE_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	testq	%r15, %r15
	jle	LBB0_20
## %bb.15:
	incq	%r15
	movq	_PHY_STATUS@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r14
	movq	_MII_SR_LINK_STATUS@GOTPCREL(%rip), %r13
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_e1000_read_phy_reg
	testq	%rax, %rax
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r13), %rax
	testq	%rax, -48(%rbp)
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	$100, %edi
	callq	_msleep
	decq	%r15
	cmpq	$1, %r15
	jg	LBB0_16
LBB0_20:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M88E1000_PHY_PAGE_SELECT,4,2   ## @M88E1000_PHY_PAGE_SELECT
	.comm	_M88E1000_PHY_GEN_CONTROL,4,2   ## @M88E1000_PHY_GEN_CONTROL
	.comm	_PHY_FORCE_TIME,8,3             ## @PHY_FORCE_TIME
	.comm	_PHY_STATUS,4,2                 ## @PHY_STATUS
	.comm	_MII_SR_LINK_STATUS,8,3         ## @MII_SR_LINK_STATUS
	.comm	_E1000_SUCCESS,8,3              ## @E1000_SUCCESS
	.no_dead_strip	_e1000_polarity_reversal_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_polarity_reversal_workaround
_e1000_polarity_reversal_workaround:    ; @e1000_polarity_reversal_workaround
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x20, _M88E1000_PHY_PAGE_SELECT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _M88E1000_PHY_PAGE_SELECT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #25
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.1:
Lloh2:
	adrp	x21, _M88E1000_PHY_GEN_CONTROL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _M88E1000_PHY_GEN_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #65535
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.2:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.3:
Lloh4:
	adrp	x22, _PHY_FORCE_TIME@GOTPAGE
Lloh5:
	ldr	x22, [x22, _PHY_FORCE_TIME@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.4:
	add	x23, x8, #1
Lloh6:
	adrp	x24, _PHY_STATUS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PHY_STATUS@GOTPAGEOFF]
Lloh8:
	adrp	x25, _MII_SR_LINK_STATUS@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MII_SR_LINK_STATUS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x25]
	bics	xzr, x8, x9
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #100
	bl	_msleep
	sub	x23, x23, #1
	cmp	x23, #1
	b.gt	LBB0_5
LBB0_9:
	mov	w0, #1000
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #25
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.10:
	mov	w0, #50
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #65520
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.11:
	mov	w0, #50
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #65280
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.12:
	mov	w0, #50
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.13:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_21
; %bb.14:
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_20
; %bb.15:
	add	x20, x8, #1
Lloh10:
	adrp	x21, _PHY_STATUS@GOTPAGE
Lloh11:
	ldr	x21, [x21, _PHY_STATUS@GOTPAGEOFF]
Lloh12:
	adrp	x22, _MII_SR_LINK_STATUS@GOTPAGE
Lloh13:
	ldr	x22, [x22, _MII_SR_LINK_STATUS@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	x0, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x22]
	tst	x9, x8
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w0, #100
	bl	_msleep
	sub	x20, x20, #1
	cmp	x20, #1
	b.gt	LBB0_16
LBB0_20:
Lloh14:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_M88E1000_PHY_PAGE_SELECT,4,2   ; @M88E1000_PHY_PAGE_SELECT
	.comm	_M88E1000_PHY_GEN_CONTROL,4,2   ; @M88E1000_PHY_GEN_CONTROL
	.comm	_PHY_FORCE_TIME,8,3             ; @PHY_FORCE_TIME
	.comm	_PHY_STATUS,4,2                 ; @PHY_STATUS
	.comm	_MII_SR_LINK_STATUS,8,3         ; @MII_SR_LINK_STATUS
	.comm	_E1000_SUCCESS,8,3              ; @E1000_SUCCESS
	.no_dead_strip	_e1000_polarity_reversal_workaround
.subsections_via_symbols
