	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_net_tx_rings_prepare
_nfp_net_tx_rings_prepare:              ## @nfp_net_tx_rings_prepare
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.2:
	movq	(%r14), %rsi
	xorl	%r12d, %r12d
	movq	%rax, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_nfp_net_tx_ring_init
	movq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_nfp_net_tx_ring_alloc
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movl	$4, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	leaq	(%rax,%r13), %rsi
	addq	$-4, %rsi
	movq	%r15, %rdi
	callq	_nfp_net_tx_ring_bufs_alloc
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rbx), %r12
	movl	(%r15), %eax
	cmpq	%rax, %r12
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r15), %ecx
	cmpq	%rcx, %r12
	movl	$0, %eax
	cmovbl	%eax, %ecx
	movq	8(%r15), %rdi
	addq	%r13, %rdi
	subl	%ecx, %ebx
	incl	%ebx
	shlq	$2, %rbx
	addq	(%r14), %rbx
	movq	%rbx, %rsi
	movl	%r12d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_nfp_net_tx_ring_init
	movq	8(%r15), %rsi
	addq	%r13, %rsi
	movq	%r15, %rdi
	callq	_nfp_net_tx_ring_alloc
	addq	$4, %r13
	movq	%r12, %rbx
	testq	%rax, %rax
	je	LBB0_4
	jmp	LBB0_10
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_8:
	movl	%ebx, %r12d
	jmp	LBB0_12
LBB0_10:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.11:
	decl	%r12d
	leaq	(,%r12,4), %rsi
	addq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_nfp_net_tx_ring_bufs_free
LBB0_12:
	movl	%r12d, %edi
	shlq	$2, %rdi
	addq	8(%r15), %rdi
	callq	_nfp_net_tx_ring_free
	jmp	LBB0_10
LBB0_13:
	movq	8(%r15), %rdi
	callq	_kfree
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_nfp_net_tx_rings_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_net_tx_rings_prepare
_nfp_net_tx_rings_prepare:              ; @nfp_net_tx_rings_prepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.2:
	ldr	x1, [x20]
	mov	w2, #0
	mov	w3, #0
	bl	_nfp_net_tx_ring_init
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_nfp_net_tx_ring_alloc
	mov	w21, #0
	cbnz	x0, LBB0_9
; %bb.3:
	mov	x23, #0
	mov	w22, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	sub	x1, x8, #4
	mov	x0, x19
	bl	_nfp_net_tx_ring_bufs_alloc
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x23, #1
	ldr	w8, [x19]
	cmp	x21, x8
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x19, #4]
	cmp	x21, x9
	csel	w3, wzr, w9, lo
	add	x0, x8, x22
	ldr	x8, [x20]
	sub	w9, w23, w3
	add	w9, w9, #1
	add	x1, x8, w9, uxtw #2
	mov	x2, x21
	bl	_nfp_net_tx_ring_init
	ldr	x8, [x19, #8]
	add	x1, x8, x22
	mov	x0, x19
	bl	_nfp_net_tx_ring_alloc
	add	x22, x22, #4
	mov	x23, x21
	cbz	x0, LBB0_4
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_14
LBB0_8:
	mov	x21, x23
	b	LBB0_11
LBB0_9:
	cbz	w21, LBB0_12
; %bb.10:
	sub	w21, w21, #1
	ldr	x8, [x19, #8]
	add	x1, x8, w21, uxtw #2
	mov	x0, x19
	bl	_nfp_net_tx_ring_bufs_free
LBB0_11:
	ldr	x8, [x19, #8]
	add	x0, x8, w21, uxtw #2
	bl	_nfp_net_tx_ring_free
	b	LBB0_9
LBB0_12:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_13:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_nfp_net_tx_rings_prepare
.subsections_via_symbols
