	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_refill_bufpool
_xgene_enet_refill_bufpool:             ## @xgene_enet_refill_bufpool
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movl	(%rdi), %r13d
	movl	4(%rdi), %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_ndev_to_dev
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_netdev_priv
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_BUF_LEN_CODE_2K@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SKB_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$11, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	testl	%r12d, %r12d
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	jle	LBB0_1
## %bb.2:
	decl	%r14d
	andl	%r15d, %eax
	orl	%ebx, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_XGENE_ENET_STD_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %r14
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_netdev_alloc_skb_ip_align
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movl	(%r12), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	%r12, (%rax,%r13,8)
	movq	_DATAADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_SET_VAL
	movl	%eax, %r14d
	movq	_BUFDATALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_SET_VAL
	movl	%eax, %ebx
	movq	_COHERENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SET_BIT
	orl	%eax, %ebx
	orl	%r14d, %ebx
	movl	%ebx, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	callq	_cpu_to_le64
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	incl	%r13d
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	andl	%r14d, %r13d
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	decl	%r15d
	jne	LBB0_3
	jmp	LBB0_9
LBB0_1:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_9:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	*(%rax)
	movl	%r13d, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	%r12, %rdi
	callq	_dev_kfree_skb_any
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUF_LEN_CODE_2K,4,2            ## @BUF_LEN_CODE_2K
	.comm	_SKB_BUFFER_SIZE,4,2            ## @SKB_BUFFER_SIZE
	.comm	_XGENE_ENET_STD_MTU,4,2         ## @XGENE_ENET_STD_MTU
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA mapping error\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DATAADDR,4,2                   ## @DATAADDR
	.comm	_BUFDATALEN,4,2                 ## @BUFDATALEN
	.comm	_COHERENT,4,2                   ## @COHERENT
	.no_dead_strip	_xgene_enet_refill_bufpool
.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_bufpool
_xgene_enet_refill_bufpool:             ; @xgene_enet_refill_bufpool
	.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	x26, x1
	mov	x19, x0
	ldp	w28, w20, [x0]
	ldr	x21, [x0, #24]
	mov	x0, x21
	bl	_ndev_to_dev
	mov	x23, x0
	mov	x0, x21
	bl	_netdev_priv
	str	x0, [sp]                        ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _BUF_LEN_CODE_2K@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUF_LEN_CODE_2K@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _SKB_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SKB_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	w0, #11
	mov	w1, #0
	bl	_GENMASK
	cmp	w26, #1
	str	w26, [sp, #8]                   ; 4-byte Folded Spill
	b.lt	LBB0_5
; %bb.1:
	sub	w8, w20, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	and	w8, w0, w24
	orr	w24, w8, w22
Lloh6:
	adrp	x8, _XGENE_ENET_STD_MTU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XGENE_ENET_STD_MTU@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
	mov	x20, x26
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x19, #16]
	mov	x0, x21
	mov	x1, x25
	bl	_netdev_alloc_skb_ip_align
	mov	x26, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x26]
Lloh9:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x2, x25
	bl	_dma_map_single
	mov	x27, x0
	mov	x0, x23
	mov	x1, x27
	bl	_dma_mapping_error
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x28, w28
	ldr	x8, [x19, #8]
	str	x26, [x8, x28, lsl #3]
Lloh12:
	adrp	x8, _DATAADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DATAADDR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x27
	bl	_SET_VAL
	mov	x26, x0
Lloh15:
	adrp	x8, _BUFDATALEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BUFDATALEN@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_SET_VAL
	orr	w26, w0, w26
Lloh18:
	adrp	x8, _COHERENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COHERENT@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_SET_BIT
	orr	w0, w26, w0
	bl	_cpu_to_le64
	str	w0, [x22, x28, lsl #2]
	add	w8, w28, #1
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	and	w28, w8, w9
	subs	w20, w20, #1
	b.ne	LBB0_2
LBB0_5:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	blr	x8
	mov	w0, #0
	str	w28, [x19]
	b	LBB0_9
LBB0_6:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netdev_err
	mov	x0, x26
	bl	_dev_kfree_skb_any
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BUF_LEN_CODE_2K,4,2            ; @BUF_LEN_CODE_2K
	.comm	_SKB_BUFFER_SIZE,4,2            ; @SKB_BUFFER_SIZE
	.comm	_XGENE_ENET_STD_MTU,4,2         ; @XGENE_ENET_STD_MTU
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA mapping error\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DATAADDR,4,2                   ; @DATAADDR
	.comm	_BUFDATALEN,4,2                 ; @BUFDATALEN
	.comm	_COHERENT,4,2                   ; @COHERENT
	.no_dead_strip	_xgene_enet_refill_bufpool
.subsections_via_symbols
