	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_bufs
_add_bufs:                              ## @add_bufs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_DPAA2_ETH_BUFS_PER_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	testl	%r14d, %r14d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_dev_alloc_pages
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r12
	movq	_DPAA2_ETH_RX_BUF_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax,%r13,4)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DPAA2_ETH_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rsi
	movl	%r15d, %ecx
	movl	%ebx, %r9d
	callq	_trace_dpaa2_eth_buf_seed
	incq	%r13
	movq	_DPAA2_ETH_BUFS_PER_CMD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jl	LBB0_3
## %bb.6:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_14:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	___free_pages
LBB0_15:
	testl	%r13d, %r13d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_16
## %bb.19:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_7:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_8:
	movl	(%r12), %edi
	movl	%ebx, %esi
	movl	%r13d, %ecx
	callq	_dpaa2_io_service_release
	movq	_EBUSY@GOTPCREL(%rip), %r14
	movl	%eax, %ecx
	addl	(%r14), %ecx
	jne	LBB0_12
## %bb.9:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	(%r12), %edi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_dpaa2_io_service_release
	movl	(%r14), %ecx
	addl	%eax, %ecx
	je	LBB0_10
## %bb.11:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_free_bufs
LBB0_16:
	xorl	%r13d, %r13d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DPAA2_ETH_BUFS_PER_CMD,4,2     ## @DPAA2_ETH_BUFS_PER_CMD
	.comm	_DPAA2_ETH_RX_BUF_SIZE,4,2      ## @DPAA2_ETH_RX_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DPAA2_ETH_RX_BUF_RAW_SIZE,4,2  ## @DPAA2_ETH_RX_BUF_RAW_SIZE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_add_bufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_bufs
_add_bufs:                              ; @add_bufs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
	ldr	x24, [x8]
Lloh3:
	adrp	x8, _DPAA2_ETH_BUFS_PER_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DPAA2_ETH_BUFS_PER_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	cmp	w12, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
Lloh8:
	adrp	x28, _DPAA2_ETH_RX_BUF_SIZE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _DPAA2_ETH_RX_BUF_SIZE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh11:
	ldr	x27, [x27, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_dev_alloc_pages
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	w3, [x28]
	ldr	w4, [x27]
	mov	x0, x24
	mov	x1, x25
	mov	w2, #0
	bl	_dma_map_page
	mov	x26, x0
	mov	x0, x24
	mov	x1, x26
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w26, [x23, x22, lsl #2]
	ldr	x0, [x19]
Lloh12:
	adrp	x8, _DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DPAA2_ETH_RX_BUF_RAW_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldr	w4, [x28]
	mov	x1, x25
	mov	x3, x26
	mov	x5, x20
	bl	_trace_dpaa2_eth_buf_seed
	add	x22, x22, #1
Lloh15:
	adrp	x8, _DPAA2_ETH_BUFS_PER_CMD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DPAA2_ETH_BUFS_PER_CMD@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
	cmp	x22, x8
	b.lt	LBB0_2
	b	LBB0_8
LBB0_5:
	mov	w22, #0
	b	LBB0_8
LBB0_6:
	mov	x0, x25
	mov	w1, #0
	bl	___free_pages
LBB0_7:
	cbz	w22, LBB0_13
LBB0_8:
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_dpaa2_io_service_release
Lloh18:
	adrp	x24, _EBUSY@GOTPAGE
Lloh19:
	ldr	x24, [x24, _EBUSY@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmn	w0, w8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_cpu_relax
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_dpaa2_io_service_release
	b	LBB0_9
LBB0_11:
	cbz	w0, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_free_bufs
	mov	w22, #0
LBB0_13:
	ldur	x8, [x29, #-88]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x22
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DPAA2_ETH_BUFS_PER_CMD,4,2     ; @DPAA2_ETH_BUFS_PER_CMD
	.comm	_DPAA2_ETH_RX_BUF_SIZE,4,2      ; @DPAA2_ETH_RX_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DPAA2_ETH_RX_BUF_RAW_SIZE,4,2  ; @DPAA2_ETH_RX_BUF_RAW_SIZE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_add_bufs
.subsections_via_symbols
