	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e100_diag_test
_e100_diag_test:                        ## @e100_diag_test
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_E100_TEST_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	shll	$2, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	%r15, %rdi
	callq	_mii_link_ok
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movl	%ecx, (%rbx)
	movq	%r15, %rdi
	callq	_e100_eeprom_load
	movl	%eax, 4(%rbx)
	movq	_ETH_TEST_FL_OFFLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mii_ethtool_gset
	movq	%r12, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_e100_down
LBB0_3:
	movq	%r15, %rdi
	callq	_e100_self_test
	movl	%eax, 8(%rbx)
	movq	_lb_mac@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_e100_loopback_test
	movl	%eax, 12(%rbx)
	movq	_lb_phy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_e100_loopback_test
	movl	%eax, 16(%rbx)
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mii_ethtool_sset
	movq	%r12, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_e100_up
LBB0_5:
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.6:
	movl	(%r14), %eax
	xorl	%ecx, %ecx
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rdx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	orl	%esi, %eax
	movl	%eax, (%r14)
	incq	%rcx
	movslq	(%r13), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rcx,4), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rdx), %esi
	jmp	LBB0_9
LBB0_10:
	movl	$4000, %edi                     ## imm = 0xFA0
	callq	_msleep_interruptible
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E100_TEST_LEN,4,2              ## @E100_TEST_LEN
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ## @ETH_TEST_FL_OFFLINE
	.comm	_lb_mac,4,2                     ## @lb_mac
	.comm	_lb_phy,4,2                     ## @lb_phy
	.comm	_ETH_TEST_FL_FAILED,4,2         ## @ETH_TEST_FL_FAILED
	.no_dead_strip	_e100_diag_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e100_diag_test
_e100_diag_test:                        ; @e100_diag_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x23, _E100_TEST_LEN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _E100_TEST_LEN@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w2, w8, #2
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	mov	x0, x21
	bl	_mii_link_ok
	cmp	w0, #0
	cset	w8, eq
	str	w8, [x19]
	mov	x0, x21
	bl	_e100_eeprom_load
	str	w0, [x19, #4]
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _ETH_TEST_FL_OFFLINE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ETH_TEST_FL_OFFLINE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	add	x1, sp, #8
	mov	x0, x21
	bl	_mii_ethtool_gset
	mov	x0, x22
	bl	_netif_running
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_e100_down
LBB0_3:
	mov	x0, x21
	bl	_e100_self_test
	str	w0, [x19, #8]
Lloh5:
	adrp	x8, _lb_mac@GOTPAGE
Lloh6:
	ldr	x8, [x8, _lb_mac@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_e100_loopback_test
	str	w0, [x19, #12]
Lloh8:
	adrp	x8, _lb_phy@GOTPAGE
Lloh9:
	ldr	x8, [x8, _lb_phy@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_e100_loopback_test
	str	w0, [x19, #16]
	add	x1, sp, #8
	mov	x0, x21
	bl	_mii_ethtool_sset
	mov	x0, x22
	bl	_netif_running
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_e100_up
LBB0_5:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x8, #0
	ldr	w9, [x20]
Lloh11:
	adrp	x10, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, x8, lsl #2]
	ldr	w12, [x10]
	cmp	w11, #0
	csel	w11, wzr, w12, eq
	orr	w9, w9, w11
	str	w9, [x20]
	add	x8, x8, #1
	ldrsw	x11, [x23]
	cmp	x8, x11
	b.lt	LBB0_7
LBB0_8:
	mov	w0, #4000
	bl	_msleep_interruptible
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_E100_TEST_LEN,4,2              ; @E100_TEST_LEN
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ; @ETH_TEST_FL_OFFLINE
	.comm	_lb_mac,4,2                     ; @lb_mac
	.comm	_lb_phy,4,2                     ; @lb_phy
	.comm	_ETH_TEST_FL_FAILED,4,2         ; @ETH_TEST_FL_FAILED
	.no_dead_strip	_e100_diag_test
.subsections_via_symbols
