	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltq_etop_hw_receive
_ltq_etop_hw_receive:                   ## @ltq_etop_hw_receive
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_netdev_priv
	movq	%rax, %rdi
	leaq	8(%rbx), %r13
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	24(%rbx), %rdx
	movq	(%rdx,%rax,8), %r14
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_LTQ_DMA_SIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_MAX_DMA_CRC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_ltq_etop_alloc_skb
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	%r13, %rdi
	callq	_ltq_dma_close
LBB0_2:
	andl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	subl	%r15d, %r12d
	movq	(%r13), %rax
	incq	%rax
	movq	_LTQ_DESC_NUM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_5
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	movq	%rdx, 8(%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_skb_put
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_eth_type_trans
	movl	%eax, (%r14)
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_receive_skb              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LTQ_DMA_SIZE_MASK,4,2          ## @LTQ_DMA_SIZE_MASK
	.comm	_MAX_DMA_CRC_LEN,4,2            ## @MAX_DMA_CRC_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate new rx buffer, stopping DMA\n"

	.comm	_LTQ_DESC_NUM,8,3               ## @LTQ_DESC_NUM
	.no_dead_strip	_ltq_etop_hw_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltq_etop_hw_receive
_ltq_etop_hw_receive:                   ; @ltq_etop_hw_receive
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0]
	bl	_netdev_priv
	mov	x21, x0
	mov	x22, x19
	ldr	x8, [x22, #8]!
	ldp	x9, x10, [x19, #16]
	ldr	x20, [x10, x8, lsl #3]
	ldr	w23, [x9, x8, lsl #2]
Lloh0:
	adrp	x8, _LTQ_DMA_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTQ_DMA_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _MAX_DMA_CRC_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_DMA_CRC_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_ltq_etop_alloc_skb
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	x0, x22
	bl	_ltq_dma_close
LBB0_2:
	and	w8, w24, w23
	sub	w22, w8, w25
	ldr	x8, [x19, #8]
	add	x8, x8, #1
Lloh8:
	adrp	x9, _LTQ_DESC_NUM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LTQ_DESC_NUM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	mov	x1, x22
	bl	_skb_put
	ldr	w1, [x19]
	mov	x0, x20
	bl	_eth_type_trans
	str	w0, [x20]
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_netif_receive_skb
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LTQ_DMA_SIZE_MASK,4,2          ; @LTQ_DMA_SIZE_MASK
	.comm	_MAX_DMA_CRC_LEN,4,2            ; @MAX_DMA_CRC_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate new rx buffer, stopping DMA\n"

	.comm	_LTQ_DESC_NUM,8,3               ; @LTQ_DESC_NUM
	.no_dead_strip	_ltq_etop_hw_receive
.subsections_via_symbols
