	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arc_emac_rx
_arc_emac_rx:                           ## @arc_emac_rx
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_netdev_priv
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	xorl	%ecx, %ecx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_EMAC_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FOR_EMAC@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	incl	16(%rbx)
	incl	20(%rbx)
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	cmpl	%ecx, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_19
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %r15d
	leaq	(,%r15,8), %rcx
	addq	16(%r12), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r14
	shlq	$4, %r15
	movq	(%r14,%r15), %rdi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movq	_OWN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r13d, %eax
	xorl	%edi, %edi
	movq	_FOR_EMAC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	incl	%eax
	xorl	%edx, %edx
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rcx
	divl	(%rcx)
	movl	%edx, (%r12)
	movl	%r13d, %eax
	notl	%eax
	xorl	%edi, %edi
	movq	_FIRST_OR_LAST_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	_EMAC_BUFFER_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %r14
	movq	%rbx, %rdi
	callq	_netdev_alloc_skb_ip_align
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	movq	%r14, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rsi
	movl	(%r12), %edx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_map_single
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	movq	%r14, %rbx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_dev_kfree_skb
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %edi
	movq	_FOR_EMAC@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	incl	16(%rbx)
	incl	12(%rbx)
	jmp	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %esi
	movl	%ebx, -72(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_dma_unmap_addr
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r14, %r12
	movq	_len@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_dma_unmap_single
	movq	_LEN_MASK@GOTPCREL(%rip), %rax
	movl	%r13d, %esi
	andl	(%rax), %esi
	incl	8(%r12)
	addl	%esi, 4(%r12)
	movq	%r12, %r13
	movq	(%rbx), %rdi
	callq	_skb_put
	movq	(%rbx), %rdi
	movq	%r12, 8(%rdi)
	movq	%r12, %rsi
	callq	_eth_type_trans
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	callq	_netif_receive_skb
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movl	%r12d, %edx
	callq	_dma_unmap_addr_set
	movl	(%r14), %esi
	movq	_EMAC_BUFFER_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_dma_unmap_len_set
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx,%r15)
	xorl	%eax, %eax
	callq	_wmb
	movl	(%r14), %edi
	movq	_FOR_EMAC@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%r13, %rbx
	jmp	LBB0_18
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_19:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_20
LBB0_4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OWN_MASK,4,2                   ## @OWN_MASK
	.comm	_FOR_EMAC,4,2                   ## @FOR_EMAC
	.comm	_RX_BD_NUM,4,2                  ## @RX_BD_NUM
	.comm	_FIRST_OR_LAST_MASK,4,2         ## @FIRST_OR_LAST_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"incomplete packet received\n"

	.comm	_EMAC_BUFFER_SIZE,4,2           ## @EMAC_BUFFER_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"cannot allocate skb\n"

	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.2:                               ## @.str.2
	.asciz	"cannot map dma buffer\n"

	.comm	_len,4,2                        ## @len
	.comm	_LEN_MASK,4,2                   ## @LEN_MASK
	.no_dead_strip	_arc_emac_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arc_emac_rx
_arc_emac_rx:                           ; @arc_emac_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x19, x0
	bl	_netdev_priv
	str	w20, [sp, #28]                  ; 4-byte Folded Spill
	cbz	w20, LBB0_18
; %bb.1:
	mov	x22, x0
	mov	w20, #0
Lloh0:
	adrp	x28, _EMAC_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _EMAC_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x21, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh4:
	adrp	x8, _FOR_EMAC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FOR_EMAC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [x24]
	ldr	d0, [x19, #16]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	str	d0, [x19, #16]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w8, w20
	b.eq	LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x22]
	ldp	x26, x23, [x22, #8]
	add	x24, x26, x25, lsl #4
	ldr	x0, [x24]
	bl	_le32_to_cpu
	mov	x27, x0
Lloh7:
	adrp	x8, _OWN_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OWN_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh10:
	adrp	x9, _FOR_EMAC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FOR_EMAC@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_18
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	add	w8, w8, #1
Lloh13:
	adrp	x9, _RX_BD_NUM@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RX_BD_NUM@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	udiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x22]
Lloh16:
	adrp	x8, _FIRST_OR_LAST_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FIRST_OR_LAST_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bics	wzr, w8, w27
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_net_ratelimit
	cbz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_netdev_alloc_skb_ip_align
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_net_ratelimit
	cbz	x0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x1, [x8, #16]
Lloh23:
	adrp	x8, _EMAC_BUFFER_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EMAC_BUFFER_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_dma_map_single
	mov	x1, x0
	mov	x0, x19
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	bl	_dma_mapping_error
	cbz	x0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	bl	_net_ratelimit
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_dev_kfree_skb
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh28:
	adrp	x8, _FOR_EMAC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FOR_EMAC@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [x24]
	ldur	d0, [x19, #12]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x19, #12]
	b	LBB0_3
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, x25, lsl #3
	mov	x0, x23
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	mov	x1, x28
	bl	_dma_unmap_addr
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
Lloh31:
	adrp	x8, _len@GOTPAGE
Lloh32:
	ldr	x8, [x8, _len@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_dma_unmap_len
	mov	x2, x0
Lloh34:
	adrp	x21, _DMA_FROM_DEVICE@GOTPAGE
Lloh35:
	ldr	x21, [x21, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	_dma_unmap_single
Lloh36:
	adrp	x8, _LEN_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _LEN_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	and	w1, w8, w27
	ldur	d0, [x19, #4]
	movi.2s	v1, #1
	mov.s	v1[0], w1
	add.2s	v0, v0, v1
	stur	d0, [x19, #4]
	ldr	x0, [x23]
	bl	_skb_put
	ldr	x0, [x23]
	str	x19, [x0, #8]
	mov	x1, x19
	bl	_eth_type_trans
	ldr	x8, [x23]
	str	w0, [x8]
	mov	x0, x8
	bl	_netif_receive_skb
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x8, [x23]
	mov	x0, x23
	mov	x27, x28
	mov	x1, x28
	mov	x2, x28
	bl	_dma_unmap_addr_set
Lloh39:
	adrp	x8, _len@GOTPAGE
Lloh40:
	ldr	x8, [x8, _len@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x28, _EMAC_BUFFER_SIZE@GOTPAGE
Lloh43:
	ldr	x28, [x28, _EMAC_BUFFER_SIZE@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x23
	bl	_dma_unmap_len_set
	mov	x0, x27
	bl	_cpu_to_le32
	add	x8, x26, x25, lsl #4
	str	x0, [x8, #8]
	bl	_wmb
Lloh44:
	adrp	x8, _FOR_EMAC@GOTPAGE
Lloh45:
	ldr	x8, [x8, _FOR_EMAC@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [x24]
	b	LBB0_3
LBB0_17:
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_OWN_MASK,4,2                   ; @OWN_MASK
	.comm	_FOR_EMAC,4,2                   ; @FOR_EMAC
	.comm	_RX_BD_NUM,4,2                  ; @RX_BD_NUM
	.comm	_FIRST_OR_LAST_MASK,4,2         ; @FIRST_OR_LAST_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"incomplete packet received\n"

	.comm	_EMAC_BUFFER_SIZE,4,2           ; @EMAC_BUFFER_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"cannot allocate skb\n"

	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.2:                               ; @.str.2
	.asciz	"cannot map dma buffer\n"

	.comm	_len,4,2                        ; @len
	.comm	_LEN_MASK,4,2                   ; @LEN_MASK
	.no_dead_strip	_arc_emac_rx
.subsections_via_symbols
