	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ndesc_init_rx_desc
_ndesc_init_rx_desc:                    ## @ndesc_init_rx_desc
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_RDES0_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	orl	%eax, 4(%rbx)
	movq	_BUF_SIZE_2KiB@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	movl	%r12d, %edi
	callq	_min
	movq	_RDES1_BUFFER1_SIZE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, %edi
	callq	_cpu_to_le32
	orl	%eax, (%rbx)
	movq	_STMMAC_CHAIN_MODE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ndesc_rx_set_on_chain
	testl	%r14d, %r14d
	jne	LBB0_4
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_ndesc_rx_set_on_ring
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_4:
	movq	_RDES1_DISABLE_IC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	orl	%eax, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RDES0_OWN,4,2                  ## @RDES0_OWN
	.comm	_BUF_SIZE_2KiB,8,3              ## @BUF_SIZE_2KiB
	.comm	_RDES1_BUFFER1_SIZE_MASK,4,2    ## @RDES1_BUFFER1_SIZE_MASK
	.comm	_STMMAC_CHAIN_MODE,4,2          ## @STMMAC_CHAIN_MODE
	.comm	_RDES1_DISABLE_IC,4,2           ## @RDES1_DISABLE_IC
	.no_dead_strip	_ndesc_init_rx_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ndesc_init_rx_desc
_ndesc_init_rx_desc:                    ; @ndesc_init_rx_desc
	.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	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RDES0_OWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RDES0_OWN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
Lloh3:
	adrp	x8, _BUF_SIZE_2KiB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUF_SIZE_2KiB@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sub	x1, x8, #1
	mov	x0, x22
	bl	_min
Lloh6:
	adrp	x8, _RDES1_BUFFER1_SIZE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDES1_BUFFER1_SIZE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w0, w8, w0
	bl	_cpu_to_le32
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
Lloh9:
	adrp	x8, _STMMAC_CHAIN_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STMMAC_CHAIN_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	x0, x19
	mov	x1, x21
	cmp	w8, w23
	b.ne	LBB0_2
; %bb.1:
	bl	_ndesc_rx_set_on_chain
	cbnz	w20, LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x2, x22
	bl	_ndesc_rx_set_on_ring
	cbz	w20, LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _RDES1_DISABLE_IC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RDES1_DISABLE_IC@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_4:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RDES0_OWN,4,2                  ; @RDES0_OWN
	.comm	_BUF_SIZE_2KiB,8,3              ; @BUF_SIZE_2KiB
	.comm	_RDES1_BUFFER1_SIZE_MASK,4,2    ; @RDES1_BUFFER1_SIZE_MASK
	.comm	_STMMAC_CHAIN_MODE,4,2          ; @STMMAC_CHAIN_MODE
	.comm	_RDES1_DISABLE_IC,4,2           ; @RDES1_DISABLE_IC
	.no_dead_strip	_ndesc_init_rx_desc
.subsections_via_symbols
