	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_phy_loopbacktest
_smsc911x_phy_loopbacktest:             ## @smsc911x_phy_loopbacktest
	.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, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rax, %rbx
	movq	(%r15), %r12
	movq	_EIO@GOTPCREL(%rip), %rax
	movq	(%r14), %rdi
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_eth_broadcast_addr
	movq	(%r14), %rax
	movb	$6, 6(%rax)
	movq	(%r14), %rax
	movb	$7, 7(%rax)
	movq	(%r14), %rax
	movb	$8, 8(%rax)
	movq	(%r14), %rax
	movb	$9, 9(%rax)
	movq	(%r14), %rax
	movb	$10, 10(%rax)
	movq	(%r14), %rax
	movb	$11, 11(%rax)
	movq	(%r14), %rax
	movb	$0, 12(%rax)
	movq	(%r14), %rax
	movb	$0, 13(%rax)
	movq	_MIN_PACKET_SIZE@GOTPCREL(%rip), %rax
	cmpl	$15, (%rax)
	jb	LBB0_3
## %bb.1:
	movl	$14, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	movb	%cl, (%rdx,%rcx)
	incq	%rcx
	movl	(%rax), %edx
	cmpq	%rdx, %rcx
	jb	LBB0_2
LBB0_3:
	movq	_HW_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_smsc911x_reg_read
	movq	_HW_CFG_TX_FIF_SZ_@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_HW_CFG_SF_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_smsc911x_reg_write
	movq	_TX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TX_CFG_TX_ON_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_smsc911x_reg_write
	movq	_RX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	andl	$3, %edx
	shll	$8, %edx
	movq	%rbx, %rdi
	callq	_smsc911x_reg_write
	addq	$8, %r14
	movl	$10, %r15d
	movq	_MAC_CR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	callq	_smsc911x_mii_write
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %esi
	movq	_MAC_CR_TXEN_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAC_CR_FDPX_@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MAC_CR_RXEN_@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_smsc911x_mac_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_smsc911x_phy_check_loopbackpkt
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	12(%rbx)
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_smsc911x_mac_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_smsc911x_phy_reset
	decl	%r15d
	jne	LBB0_4
## %bb.7:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_5:
	xorl	%r15d, %r15d
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_smsc911x_mac_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_smsc911x_mii_write
	movq	_TX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_smsc911x_reg_write
	movq	_RX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_smsc911x_reg_write
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MIN_PACKET_SIZE,4,2            ## @MIN_PACKET_SIZE
	.comm	_HW_CFG,4,2                     ## @HW_CFG
	.comm	_HW_CFG_TX_FIF_SZ_,4,2          ## @HW_CFG_TX_FIF_SZ_
	.comm	_HW_CFG_SF_,4,2                 ## @HW_CFG_SF_
	.comm	_TX_CFG,4,2                     ## @TX_CFG
	.comm	_TX_CFG_TX_ON_,4,2              ## @TX_CFG_TX_ON_
	.comm	_RX_CFG,4,2                     ## @RX_CFG
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_MAC_CR,4,2                     ## @MAC_CR
	.comm	_MAC_CR_FDPX_,4,2               ## @MAC_CR_FDPX_
	.comm	_MAC_CR_TXEN_,4,2               ## @MAC_CR_TXEN_
	.comm	_MAC_CR_RXEN_,4,2               ## @MAC_CR_RXEN_
	.no_dead_strip	_smsc911x_phy_loopbacktest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_phy_loopbacktest
_smsc911x_phy_loopbacktest:             ; @smsc911x_phy_loopbacktest
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x22, [x20]
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x0, [x0]
	bl	_eth_broadcast_addr
	ldr	x8, [x19]
	mov	w9, #6
	strb	w9, [x8, #6]
	ldr	x8, [x19]
	mov	w9, #7
	strb	w9, [x8, #7]
	ldr	x8, [x19]
	mov	w9, #8
	strb	w9, [x8, #8]
	ldr	x8, [x19]
	mov	w9, #9
	strb	w9, [x8, #9]
	ldr	x8, [x19]
	mov	w9, #10
	strb	w9, [x8, #10]
	ldr	x8, [x19]
	mov	w9, #11
	strb	w9, [x8, #11]
	neg	w8, w20
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x8, [x19]
	strb	wzr, [x8, #12]
	ldr	x8, [x19]
	strb	wzr, [x8, #13]
Lloh3:
	adrp	x8, _MIN_PACKET_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIN_PACKET_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #15
	b.lo	LBB0_3
; %bb.1:
	mov	w9, #14
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19]
	strb	w9, [x10, x9]
	add	x9, x9, #1
	ldr	w10, [x8]
	cmp	x9, x10
	b.lo	LBB0_2
LBB0_3:
Lloh5:
	adrp	x20, _HW_CFG@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HW_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_smsc911x_reg_read
Lloh7:
	adrp	x8, _HW_CFG_TX_FIF_SZ_@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HW_CFG_TX_FIF_SZ_@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh10:
	adrp	x9, _HW_CFG_SF_@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HW_CFG_SF_@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_smsc911x_reg_write
Lloh13:
	adrp	x8, _TX_CFG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TX_CFG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _TX_CFG_TX_ON_@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TX_CFG_TX_ON_@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_smsc911x_reg_write
Lloh19:
	adrp	x8, _RX_CFG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RX_CFG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w8, [x19, #16]
	ubfiz	w2, w8, #8, #2
	mov	x0, x19
	bl	_smsc911x_reg_write
	add	x21, x19, #8
	mov	w27, #10
Lloh22:
	adrp	x28, _BMCR_LOOPBACK@GOTPAGE
Lloh23:
	ldr	x28, [x28, _BMCR_LOOPBACK@GOTPAGEOFF]
Lloh24:
	adrp	x23, _BMCR_FULLDPLX@GOTPAGE
Lloh25:
	ldr	x23, [x23, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh26:
	adrp	x26, _MAC_CR@GOTPAGE
Lloh27:
	ldr	x26, [x26, _MAC_CR@GOTPAGEOFF]
Lloh28:
	adrp	x24, _MAC_CR_FDPX_@GOTPAGE
Lloh29:
	ldr	x24, [x24, _MAC_CR_FDPX_@GOTPAGEOFF]
Lloh30:
	adrp	x20, _MAC_CR_TXEN_@GOTPAGE
Lloh31:
	ldr	x20, [x20, _MAC_CR_TXEN_@GOTPAGEOFF]
Lloh32:
	adrp	x25, _MAC_CR_RXEN_@GOTPAGE
Lloh33:
	ldr	x25, [x25, _MAC_CR_RXEN_@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22]
Lloh34:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	ldr	w8, [x28]
	ldr	w9, [x23]
	orr	w3, w9, w8
	bl	_smsc911x_mii_write
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w1, [x26]
	ldr	w8, [x24]
	ldr	w9, [x20]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_smsc911x_mac_write
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_smsc911x_phy_check_loopbackpkt
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #0
	bl	_smsc911x_mac_write
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_smsc911x_phy_reset
	subs	w27, w27, #1
	b.ne	LBB0_4
; %bb.6:
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #0
	bl	_smsc911x_mac_write
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldp	w1, w0, [x22]
Lloh37:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_smsc911x_mii_write
Lloh40:
	adrp	x8, _TX_CFG@GOTPAGE
Lloh41:
	ldr	x8, [x8, _TX_CFG@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_smsc911x_reg_write
Lloh43:
	adrp	x8, _RX_CFG@GOTPAGE
Lloh44:
	ldr	x8, [x8, _RX_CFG@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_smsc911x_reg_write
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MIN_PACKET_SIZE,4,2            ; @MIN_PACKET_SIZE
	.comm	_HW_CFG,4,2                     ; @HW_CFG
	.comm	_HW_CFG_TX_FIF_SZ_,4,2          ; @HW_CFG_TX_FIF_SZ_
	.comm	_HW_CFG_SF_,4,2                 ; @HW_CFG_SF_
	.comm	_TX_CFG,4,2                     ; @TX_CFG
	.comm	_TX_CFG_TX_ON_,4,2              ; @TX_CFG_TX_ON_
	.comm	_RX_CFG,4,2                     ; @RX_CFG
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_MAC_CR,4,2                     ; @MAC_CR
	.comm	_MAC_CR_FDPX_,4,2               ; @MAC_CR_FDPX_
	.comm	_MAC_CR_TXEN_,4,2               ; @MAC_CR_TXEN_
	.comm	_MAC_CR_RXEN_,4,2               ; @MAC_CR_RXEN_
	.no_dead_strip	_smsc911x_phy_loopbacktest
.subsections_via_symbols
