	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_diag_test
_e1000_diag_test:                       ## @e1000_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	leaq	8(%rax), %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, %rbx
	callq	_netif_running
	movl	%eax, %r15d
	movq	___E1000_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movl	(%rbx), %eax
	movq	_ETH_TEST_FL_OFFLINE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.1:
	movl	24(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movups	8(%r14), %xmm0
	movaps	%xmm0, -80(%rbp)                ## 16-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_e_info
	leaq	16(%r12), %rsi
	movq	%r14, %rdi
	callq	_e1000_link_test
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_3:
	testl	%r15d, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_e1000_close
	jmp	LBB0_6
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_e_info
	leaq	16(%r12), %rsi
	movq	%r14, %rdi
	callq	_e1000_link_test
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_18:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	___E1000_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	jmp	LBB0_19
LBB0_5:
	movq	%r14, %rdi
	callq	_e1000_reset
LBB0_6:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_e1000_reg_test
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_8:
	movq	%r14, %rdi
	callq	_e1000_reset
	leaq	4(%r12), %rsi
	movq	%r14, %rdi
	callq	_e1000_eeprom_test
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_10:
	movq	%r14, %rdi
	callq	_e1000_reset
	leaq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	_e1000_intr_test
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_12:
	movq	%r14, %rdi
	callq	_e1000_reset
	movq	%r14, %rdi
	callq	_e1000_power_up_phy
	addq	$12, %r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_e1000_loopback_test
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%r14)
	movaps	-80(%rbp), %xmm0                ## 16-byte Reload
	movups	%xmm0, 8(%r14)
	movq	%r14, %rdi
	callq	_e1000_reset
	movq	___E1000_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.15:
	movq	%r13, %rdi
	callq	_e1000_open
LBB0_19:
	movl	$4000, %edi                     ## imm = 0xFA0
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep_interruptible           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	___E1000_TESTING,4,2            ## @__E1000_TESTING
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ## @ETH_TEST_FL_OFFLINE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"offline testing starting\n"

	.comm	_ETH_TEST_FL_FAILED,4,2         ## @ETH_TEST_FL_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"online testing starting\n"

	.no_dead_strip	_e1000_diag_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_diag_test
_e1000_diag_test:                       ; @e1000_diag_test
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_netdev_priv
	mov	x19, x0
	add	x24, x0, #8
	mov	x0, x21
	bl	_netif_running
	mov	x23, x0
Lloh0:
	adrp	x25, ___E1000_TESTING@GOTPAGE
Lloh1:
	ldr	x25, [x25, ___E1000_TESTING@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x19
	bl	_set_bit
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _ETH_TEST_FL_OFFLINE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ETH_TEST_FL_OFFLINE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	ldr	w26, [x19, #24]
	ldp	x28, x27, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_e_info
	add	x1, x22, #16
	mov	x0, x19
	bl	_e1000_link_test
	cbz	x0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_3:
	cbz	w23, LBB0_8
; %bb.4:
	mov	x0, x21
	bl	_e1000_close
	b	LBB0_9
LBB0_5:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_e_info
	add	x1, x22, #16
	mov	x0, x19
	bl	_e1000_link_test
	cbz	x0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_7:
	stp	xzr, xzr, [x22]
	ldr	w0, [x25]
	mov	x1, x19
	bl	_clear_bit
	b	LBB0_19
LBB0_8:
	mov	x0, x19
	bl	_e1000_reset
LBB0_9:
	mov	x0, x19
	mov	x1, x22
	bl	_e1000_reg_test
	cbz	x0, LBB0_11
; %bb.10:
Lloh15:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_11:
	mov	x0, x19
	bl	_e1000_reset
	add	x1, x22, #4
	mov	x0, x19
	bl	_e1000_eeprom_test
	cbz	x0, LBB0_13
; %bb.12:
Lloh18:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_13:
	mov	x0, x19
	bl	_e1000_reset
	add	x1, x22, #8
	mov	x0, x19
	bl	_e1000_intr_test
	cbz	x0, LBB0_15
; %bb.14:
Lloh21:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_15:
	mov	x0, x19
	bl	_e1000_reset
	mov	x0, x19
	bl	_e1000_power_up_phy
	add	x1, x22, #12
	mov	x0, x19
	bl	_e1000_loopback_test
	cbz	x0, LBB0_17
; %bb.16:
Lloh24:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_17:
	str	w26, [x19, #24]
	stp	x28, x27, [x19, #8]
	mov	x0, x19
	bl	_e1000_reset
	ldr	w0, [x25]
	mov	x1, x19
	bl	_clear_bit
	cbz	w23, LBB0_19
; %bb.18:
	mov	x0, x21
	bl	_e1000_open
LBB0_19:
	mov	w0, #4000
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_msleep_interruptible
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	___E1000_TESTING,4,2            ; @__E1000_TESTING
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ; @ETH_TEST_FL_OFFLINE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"offline testing starting\n"

	.comm	_ETH_TEST_FL_FAILED,4,2         ; @ETH_TEST_FL_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"online testing starting\n"

	.no_dead_strip	_e1000_diag_test
.subsections_via_symbols
