	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_run_loopback_test
_e1000_run_loopback_test:               ## @e1000_run_loopback_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_RDT
	movl	16(%rbx), %esi
	decl	%esi
	movl	%eax, %edi
	callq	_ew32
	movl	16(%rbx), %ecx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	32(%rbx), %eax
	cmpl	%eax, %ecx
	cmovgl	%ecx, %eax
	cmpl	$-63, %eax
	jl	LBB0_15
## %bb.1:
	leal	63(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$6, %ecx
	leal	(%rcx,%rcx), %eax
	incl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_8 Depth 2
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$64, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	decl	%r12d
	je	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	40(%r14), %r15
	movslq	%ebx, %r13
	leaq	(,%r13,2), %rbx
	addq	%r13, %rbx
	movl	(%r15,%rbx,4), %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_e1000_create_lbtest_frame
	movl	4(%r15,%rbx,4), %esi
	movl	8(%r15,%rbx,4), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dma_sync_single_for_device
	incl	%r13d
	xorl	%ebx, %ebx
	cmpl	32(%r14), %r13d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%r13d, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_TDT
	movl	%eax, %edi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$200, %edi
	callq	_msleep
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$20, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	24(%r14), %r15
	movslq	-44(%rbp), %rbx                 ## 4-byte Folded Reload
	leaq	(%rbx,%rbx,2), %r12
	movl	4(%r15,%r12,4), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$2048, %edx                     ## imm = 0x800
	callq	_dma_sync_single_for_cpu
	movl	(%r15,%r12,4), %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_e1000_check_lbtest_frame
	movl	%eax, %r12d
	cmpl	$1, %eax
	adcl	$0, %r13d
	incl	%ebx
	movl	$0, %r15d
	cmpl	16(%r14), %ebx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movl	%ebx, %r15d
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_time_after
	cmpl	$63, %r13d
	ja	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	jne	LBB0_14
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leal	1(%rcx), %eax
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_3
	jmp	LBB0_15
LBB0_12:
	movl	$13, %r12d
LBB0_15:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$14, %r12d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_e1000_run_loopback_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_run_loopback_test
_e1000_run_loopback_test:               ; @e1000_run_loopback_test
	.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	x19, x0
	ldr	x20, [x0, #8]
	mov	w0, #0
	bl	_RDT
	ldr	w8, [x19, #16]
	sub	w1, w8, #1
	bl	_ew32
	mov	w22, #0
	ldr	w8, [x19, #16]
	ldr	w9, [x19, #32]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	cmn	w8, #63
	b.lt	LBB0_10
; %bb.1:
	mov	w24, #0
	mov	w21, #0
	mov	w10, #0
	add	w9, w8, #63
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #6
	mov	w9, #1
	bfi	w9, w8, #1, #31
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	mov	w27, #12
Lloh0:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	adrp	x26, _jiffies@GOTPAGE
Lloh3:
	ldr	x26, [x26, _jiffies@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_5 Depth 2
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
	mov	w22, #64
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #40]
	smaddl	x23, w21, w27, x8
	ldr	w0, [x23]
	mov	w1, #1024
	bl	_e1000_create_lbtest_frame
	ldp	w1, w2, [x23, #4]
	ldr	w3, [x28]
	mov	x0, x20
	bl	_dma_sync_single_for_device
	add	w8, w21, #1
	ldr	w9, [x19, #32]
	cmp	w8, w9
	csinc	w21, wzr, w21, eq
	subs	w22, w22, #1
	b.ne	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	bl	_TDT
	mov	x1, x21
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #200
	bl	_msleep
	mov	w25, #0
	ldr	x8, [x26]
	add	x23, x8, #20
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #24]
	smaddl	x22, w24, w27, x8
	ldr	w1, [x22, #4]
Lloh4:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #2048
	bl	_dma_sync_single_for_cpu
	ldr	w0, [x22]
	mov	w1, #1024
	bl	_e1000_check_lbtest_frame
	mov	x22, x0
	cmp	w0, #0
	cinc	w25, w25, eq
	add	w8, w24, #1
	ldr	w9, [x19, #16]
	cmp	w8, w9
	csinc	w24, wzr, w24, eq
	ldr	x0, [x26]
	mov	x1, x23
	bl	_time_after
	cmp	w25, #63
	b.hi	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cbz	x0, LBB0_5
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w10, w9, [sp, #8]               ; 8-byte Folded Reload
	add	w8, w9, #1
	cmp	w9, w10
	mov	x10, x8
	b.ne	LBB0_2
	b	LBB0_10
LBB0_9:
	mov	w22, #13
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	mov	w22, #14
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_e1000_run_loopback_test
.subsections_via_symbols
