	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netsec_setup_rx_dring
_netsec_setup_rx_dring:                 ## @netsec_setup_rx_dring
	.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
	movq	%rdi, %r14
	movq	16(%rdi), %r12
	movq	_NETSEC_RING_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	8(%rdi), %edi
	callq	_READ_ONCE
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movq	_PP_FLAG_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_node
	movl	%eax, -84(%rbp)
	movl	4(%r14), %eax
	movl	%eax, -88(%rbp)
	testq	%rbx, %rbx
	jne	LBB0_1
## %bb.2:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_page_pool_create
	leaq	(%r15,%r15,2), %r13
	leaq	(%r12,%r13,8), %r15
	addq	$8, %r15
	movq	%rax, 8(%r12,%r13,8)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	$0, (%r15)
	jmp	LBB0_5
LBB0_6:
	leaq	(%r12,%r13,8), %rdi
	addq	$16, %rdi
	movl	(%r14), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	callq	_xdp_rxq_info_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.7:
	movq	_MEM_TYPE_PAGE_POOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_xdp_rxq_info_reg_mem_model
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_5:
	movq	_NETSEC_RING_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_netsec_uninit_pkt_dring
LBB0_14:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_13
## %bb.9:
	leaq	(%r12,%r13,8), %r13
	movl	$16, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r12
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_netsec_alloc_rx_data
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-48(%rbp), %ecx
	movl	%ecx, (%r12,%rbx)
	movq	%rax, -8(%r12,%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, -16(%r12,%rbx)
	incq	%r15
	movq	_DESC_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	addq	$24, %rbx
	cmpq	%rdx, %r15
	jl	LBB0_10
LBB0_13:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_netsec_rx_fill
	jmp	LBB0_14
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_NETSEC_RING_RX,8,3             ## @NETSEC_RING_RX
	.comm	_PP_FLAG_DMA_MAP,4,2            ## @PP_FLAG_DMA_MAP
	.comm	_DESC_NUM,4,2                   ## @DESC_NUM
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_MEM_TYPE_PAGE_POOL,4,2         ## @MEM_TYPE_PAGE_POOL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_netsec_setup_rx_dring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netsec_setup_rx_dring
_netsec_setup_rx_dring:                 ; @netsec_setup_rx_dring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	x24, [x0, #16]
Lloh0:
	adrp	x22, _NETSEC_RING_RX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NETSEC_RING_RX@GOTPAGEOFF]
	ldr	x25, [x22]
	ldr	w0, [x0, #8]
	bl	_READ_ONCE
	mov	x20, x0
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #40]
Lloh2:
	adrp	x8, _PP_FLAG_DMA_MAP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PP_FLAG_DMA_MAP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh5:
	adrp	x23, _DESC_NUM@GOTPAGE
Lloh6:
	ldr	x23, [x23, _DESC_NUM@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp, #8]
	mov	w0, #0
	bl	_cpu_to_node
	ldr	w8, [x19, #4]
	stp	w8, w0, [sp, #16]
Lloh7:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh9:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
	cmp	x20, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #12]
	add	x0, sp, #8
	bl	_page_pool_create
	mov	w8, #24
	madd	x26, x25, x8, x24
	str	x0, [x26, #8]!
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x26]
	bl	_PTR_ERR
	mov	x20, x0
	str	xzr, [x26]
	b	LBB0_4
LBB0_2:
	mov	w8, #24
	madd	x8, x25, x8, x24
	add	x21, x8, #16
	ldr	w1, [x19]
	mov	x0, x21
	mov	w2, #0
	bl	_xdp_rxq_info_reg
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _MEM_TYPE_PAGE_POOL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MEM_TYPE_PAGE_POOL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x2, [x26]
	mov	x0, x21
	bl	_xdp_rxq_info_reg_mem_model
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_4:
	ldr	x1, [x22]
	mov	x0, x19
	bl	_netsec_uninit_pkt_dring
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldr	w2, [x23]
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x20, #0
	mov	x21, #0
	mov	w8, #24
	madd	x24, x25, x8, x24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x24]
	add	x1, sp, #4
	mov	x2, sp
	mov	x0, x19
	bl	_netsec_alloc_rx_data
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #4]
	add	x9, x25, x20
	str	w8, [x9, #16]
	str	x0, [x9, #8]
	ldr	w8, [sp]
	str	w8, [x9]
	add	x21, x21, #1
	ldrsw	x2, [x23]
	add	x20, x20, #24
	cmp	x21, x2
	b.lt	LBB0_8
LBB0_10:
	mov	x0, x19
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_netsec_rx_fill
	mov	w20, #0
	b	LBB0_5
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NETSEC_RING_RX,8,3             ; @NETSEC_RING_RX
	.comm	_PP_FLAG_DMA_MAP,4,2            ; @PP_FLAG_DMA_MAP
	.comm	_DESC_NUM,4,2                   ; @DESC_NUM
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_MEM_TYPE_PAGE_POOL,4,2         ; @MEM_TYPE_PAGE_POOL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_netsec_setup_rx_dring
.subsections_via_symbols
