	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e100_loopback_test
_e100_loopback_test:                    ## @e100_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_e100_rx_alloc_list
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%r14, %rdi
	callq	_e100_alloc_cbs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movq	_ich@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movq	_lb_phy@GOTPCREL(%rip), %r12
	movl	%r15d, %ecx
	cmpl	%r15d, (%r12)
	jne	LBB0_4
## %bb.3:
	movq	_lb_mac@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	testl	%eax, %eax
	cmovnel	%ecx, %r15d
	movl	%r15d, 4(%r14)
	movq	%r14, %rdi
	callq	_e100_hw_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	cmpl	(%r12), %r15d
	jne	LBB0_7
## %bb.6:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_mdio_write
LBB0_7:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_e100_start_receiver
	movl	12(%r14), %edi
	movq	_ETH_DATA_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movl	(%r12), %esi
	movq	%rax, %rdi
	callq	_skb_put
	movl	(%r15), %edi
	movl	(%r12), %edx
	movl	$255, %esi
	callq	_memset
	movl	12(%r14), %esi
	movq	%r15, %rdi
	callq	_e100_xmit_frame
	movl	$10, %edi
	callq	_msleep
	movl	24(%r14), %edi
	movq	16(%r14), %rax
	movl	8(%rax), %esi
	movq	_RFD_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_dma_sync_single_for_cpu
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	addq	$4, %rdi
	movl	(%r15), %esi
	movl	(%r12), %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_mdio_write
	movq	_lb_none@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_e100_clean_cbs
	movq	%r14, %rdi
	callq	_e100_hw_reset
LBB0_13:
	movq	%r14, %rdi
	callq	_e100_rx_clean_list
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ich,4,2                        ## @ich
	.comm	_lb_phy,4,2                     ## @lb_phy
	.comm	_lb_mac,4,2                     ## @lb_mac
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.comm	_ETH_DATA_LEN,4,2               ## @ETH_DATA_LEN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RFD_BUF_LEN,4,2                ## @RFD_BUF_LEN
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_lb_none,4,2                    ## @lb_none
	.no_dead_strip	_e100_loopback_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e100_loopback_test
_e100_loopback_test:                    ; @e100_loopback_test
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	bl	_e100_rx_alloc_list
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.1:
	mov	x0, x19
	bl	_e100_alloc_cbs
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _ich@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ich@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x22, _lb_phy@GOTPAGE
Lloh4:
	ldr	x22, [x22, _lb_phy@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w9, w21
	ccmp	w8, #0, #4, eq
Lloh5:
	adrp	x8, _lb_mac@GOTPAGE
Lloh6:
	ldr	x8, [x8, _lb_mac@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	csel	w23, w8, w21, ne
	str	w23, [x19, #4]
	mov	x0, x19
	bl	_e100_hw_init
	mov	x20, x0
Lloh8:
	adrp	x21, _MII_BMCR@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MII_BMCR@GOTPAGEOFF]
	cbnz	w0, LBB0_11
; %bb.3:
	ldr	w8, [x22]
	cmp	w23, w8
	b.ne	LBB0_5
; %bb.4:
	ldp	w1, w0, [x19, #8]
	ldr	w2, [x21]
Lloh10:
	adrp	x8, _BMCR_LOOPBACK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BMCR_LOOPBACK@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	bl	_mdio_write
LBB0_5:
	mov	x0, x19
	mov	x1, #0
	bl	_e100_start_receiver
	ldr	w0, [x19, #12]
Lloh13:
	adrp	x22, _ETH_DATA_LEN@GOTPAGE
Lloh14:
	ldr	x22, [x22, _ETH_DATA_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_8
; %bb.6:
	mov	x20, x0
	ldr	w1, [x22]
	bl	_skb_put
	ldr	w0, [x20]
	ldr	w2, [x22]
	mov	w1, #255
	bl	_memset
	ldr	w1, [x19, #12]
	mov	x0, x20
	bl	_e100_xmit_frame
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w1, [x8, #8]
Lloh15:
	adrp	x8, _RFD_BUF_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RFD_BUF_LEN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	bl	_pci_dma_sync_single_for_cpu
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x0, x8, #4
	ldr	w1, [x20]
	ldr	w2, [x22]
	bl	_memcmp
	cbz	x0, LBB0_10
; %bb.7:
Lloh21:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_10:
	mov	w20, #0
LBB0_11:
	ldp	w1, w0, [x19, #8]
	ldr	w2, [x21]
	mov	w3, #0
	bl	_mdio_write
Lloh25:
	adrp	x8, _lb_none@GOTPAGE
Lloh26:
	ldr	x8, [x8, _lb_none@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_e100_clean_cbs
	mov	x0, x19
	bl	_e100_hw_reset
LBB0_12:
	mov	x0, x19
	bl	_e100_rx_clean_list
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ich,4,2                        ; @ich
	.comm	_lb_phy,4,2                     ; @lb_phy
	.comm	_lb_mac,4,2                     ; @lb_mac
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.comm	_ETH_DATA_LEN,4,2               ; @ETH_DATA_LEN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RFD_BUF_LEN,4,2                ; @RFD_BUF_LEN
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_lb_none,4,2                    ; @lb_none
	.no_dead_strip	_e100_loopback_test
.subsections_via_symbols
