	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_refill_pagepool
_xgene_enet_refill_pagepool:            ## @xgene_enet_refill_pagepool
	.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, %rax
	xorl	%edi, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_netdev_priv
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_ndev_to_dev
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %r13d
	testl	%r14d, %r14d
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	jle	LBB0_8
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	decl	%eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rbx
	xorl	%eax, %eax
	callq	_dev_alloc_page
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r13
	movl	(%r14), %edi
	callq	_xgene_enet_set_data_len
	movl	%eax, %r14d
	movq	_DATAADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_SET_VAL
	movl	%eax, %ebx
	movq	_BUFDATALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_SET_VAL
	orl	%eax, %ebx
	movq	_COHERENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SET_BIT
	orl	%eax, %ebx
	movl	%ebx, %edi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	callq	_cpu_to_le64
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	movq	8(%r15), %rax
	movq	%r12, (%rax,%r13,8)
	incl	%r13d
	andl	-56(%rbp), %r13d                ## 4-byte Folded Reload
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	decl	%r14d
	jne	LBB0_3
LBB0_8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	*(%rax)
	movl	%r13d, 4(%rbx)
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_6:
	movq	%r12, %rdi
	callq	_put_page
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_9:
	movl	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DATAADDR,4,2                   ## @DATAADDR
	.comm	_BUFDATALEN,4,2                 ## @BUFDATALEN
	.comm	_COHERENT,4,2                   ## @COHERENT
	.no_dead_strip	_xgene_enet_refill_pagepool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_enet_refill_pagepool
_xgene_enet_refill_pagepool:            ; @xgene_enet_refill_pagepool
	.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	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	ldr	x22, [x19, #24]
	mov	x0, x22
	bl	_netdev_priv
	str	x0, [sp]                        ; 8-byte Folded Spill
	mov	x0, x22
	bl	_ndev_to_dev
	ldr	w25, [x19, #4]
	cmp	w20, #1
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	b.lt	LBB0_7
; %bb.3:
	mov	x22, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	sub	w21, w8, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19, #16]
	bl	_dev_alloc_page
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x26]
Lloh2:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_dma_map_page
	mov	x24, x0
	mov	x0, x22
	mov	x1, x24
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x28, w25
	ldr	w0, [x26]
	bl	_xgene_enet_set_data_len
	mov	x25, x0
Lloh5:
	adrp	x8, _DATAADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DATAADDR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_SET_VAL
	mov	x24, x0
Lloh8:
	adrp	x8, _BUFDATALEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUFDATALEN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x25
	bl	_SET_VAL
	orr	w24, w0, w24
Lloh11:
	adrp	x8, _COHERENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _COHERENT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_SET_BIT
	orr	w0, w24, w0
	bl	_cpu_to_le64
	str	w0, [x27, x28, lsl #2]
	ldr	x8, [x19, #8]
	str	x23, [x8, x28, lsl #3]
	add	w8, w28, #1
	and	w25, w8, w21
	subs	w20, w20, #1
	b.ne	LBB0_4
LBB0_7:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	blr	x8
	mov	w0, #0
	str	w25, [x19, #4]
	b	LBB0_10
LBB0_8:
	mov	x0, x23
	bl	_put_page
LBB0_9:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DATAADDR,4,2                   ; @DATAADDR
	.comm	_BUFDATALEN,4,2                 ; @BUFDATALEN
	.comm	_COHERENT,4,2                   ; @COHERENT
	.no_dead_strip	_xgene_enet_refill_pagepool
.subsections_via_symbols
