	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpsw_fill_rx_channels          ## -- Begin function cpsw_fill_rx_channels
	.p2align	4, 0x90
_cpsw_fill_rx_channels:                 ## @cpsw_fill_rx_channels
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r14
	cmpl	$0, (%r14)
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rdx
	movl	%ebx, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_cpsw_info
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_4
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%r14), %rax
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rbx,4), %edi
	callq	_cpdma_chan_get_rx_buf_num
	movl	%eax, %r12d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_page_pool_dev_alloc_pages
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_page_address
	movq	_CPSW_XMETA_OFFSET@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edx
	movl	%edx, 4(%rax,%rcx,8)
	movl	%ebx, (%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_page_pool_get_dma_addr
	movq	_CPSW_HEADROOM@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	8(%r14), %rcx
	movl	(%rcx,%rbx,4), %edi
	movl	4(%r14), %ecx
	movq	%r15, %rsi
	movq	%rax, %rdx
	xorl	%r8d, %r8d
	callq	_cpdma_chan_idle_submit_mapped
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=2
	decl	%r12d
	jne	LBB0_6
	jmp	LBB0_3
LBB0_4:
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_7:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_cpsw_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r13d
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_cpsw_err
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_page_pool_recycle_direct
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocate rx page err\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CPSW_XMETA_OFFSET,4,2          ## @CPSW_XMETA_OFFSET
	.comm	_CPSW_HEADROOM,8,3              ## @CPSW_HEADROOM
L_.str.1:                               ## @.str.1
	.asciz	"cannot submit page to channel %d rx, error %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"ch %d rx, submitted %d descriptors\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpsw_fill_rx_channels          ; -- Begin function cpsw_fill_rx_channels
	.p2align	2
_cpsw_fill_rx_channels:                 ; @cpsw_fill_rx_channels
	.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
	ldr	x26, [x0, #8]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x28, _CPSW_XMETA_OFFSET@GOTPAGE
Lloh1:
	ldr	x28, [x28, _CPSW_XMETA_OFFSET@GOTPAGEOFF]
Lloh2:
	adrp	x21, _CPSW_HEADROOM@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CPSW_HEADROOM@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh4:
	adrp	x8, _ifup@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x20
	mov	x4, x27
	bl	_cpsw_info
	add	x20, x20, #1
	ldrsw	x8, [x26]
	cmp	x20, x8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldp	x9, x8, [x26, #8]
	ldr	x22, [x8, x20, lsl #3]
	ldr	w0, [x9, x20, lsl #2]
	bl	_cpdma_chan_get_rx_buf_num
	mov	x27, x0
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x27
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_page_pool_dev_alloc_pages
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x24, x0
	bl	_page_address
	ldrsw	x8, [x28]
	ldr	w9, [x19]
	add	x8, x0, x8, lsl #3
	stp	w20, w9, [x8]
	mov	x0, x24
	bl	_page_pool_get_dma_addr
	ldr	x8, [x21]
	add	x2, x8, x0
	ldr	x8, [x26, #8]
	ldr	w0, [x8, x20, lsl #2]
	ldr	w3, [x26, #4]
	mov	x1, x24
	mov	w4, #0
	bl	_cpdma_chan_idle_submit_mapped
	tbnz	w0, #31, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	subs	w23, w23, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_8:
	mov	w25, #0
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x8, _ifup@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_cpsw_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_11
LBB0_10:
	mov	x25, x0
Lloh17:
	adrp	x8, _ifup@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	stp	x20, x25, [sp]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_cpsw_err
	mov	x0, x22
	mov	x1, x24
	bl	_page_pool_recycle_direct
LBB0_11:
	mov	x0, x25
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocate rx page err\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CPSW_XMETA_OFFSET,4,2          ; @CPSW_XMETA_OFFSET
	.comm	_CPSW_HEADROOM,8,3              ; @CPSW_HEADROOM
l_.str.1:                               ; @.str.1
	.asciz	"cannot submit page to channel %d rx, error %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"ch %d rx, submitted %d descriptors\n"

.subsections_via_symbols
