	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_set_ring_id
_xgene_enet_set_ring_id:                ## @xgene_enet_set_ring_id
	.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	%rdi, %r12
	movl	(%rdi), %edi
	callq	_xgene_enet_ring_owner
	movq	_RING_OWNER_CPU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r12), %edi
	callq	_xgene_enet_is_bufpool
	movl	%eax, %r14d
	movl	(%r12), %ebx
	movl	$9, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r15d
	andl	%ebx, %r15d
	movq	_OVERWRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	4(%r12), %r13d
	shll	$9, %r13d
	movl	$18, %edi
	movl	$9, %esi
	callq	_GENMASK
	movl	%eax, %ebx
	andl	%r13d, %ebx
	movq	_PREFETCH_BUF_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_IS_BUFFER_POOL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_3:
	orl	%r14d, %ebx
	movq	_CSR_RING_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_xgene_enet_ring_wr32
	movq	_CSR_RING_ID_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xgene_enet_ring_wr32           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_OWNER_CPU,8,3             ## @RING_OWNER_CPU
	.comm	_OVERWRITE,4,2                  ## @OVERWRITE
	.comm	_PREFETCH_BUF_EN,4,2            ## @PREFETCH_BUF_EN
	.comm	_IS_BUFFER_POOL,4,2             ## @IS_BUFFER_POOL
	.comm	_CSR_RING_ID,4,2                ## @CSR_RING_ID
	.comm	_CSR_RING_ID_BUF,4,2            ## @CSR_RING_ID_BUF
	.no_dead_strip	_xgene_enet_set_ring_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_enet_set_ring_id
_xgene_enet_set_ring_id:                ; @xgene_enet_set_ring_id
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0]
	bl	_xgene_enet_ring_owner
Lloh0:
	adrp	x8, _RING_OWNER_CPU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RING_OWNER_CPU@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w0, [x19]
	bl	_xgene_enet_is_bufpool
	mov	x20, x0
	ldr	w21, [x19]
	mov	w0, #9
	mov	w1, #0
	bl	_GENMASK
	and	w8, w0, w21
Lloh3:
	adrp	x9, _OVERWRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OVERWRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	w22, [x19, #4]
	mov	w0, #18
	mov	w1, #9
	bl	_GENMASK
Lloh6:
	adrp	x8, _PREFETCH_BUF_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PREFETCH_BUF_EN@GOTPAGEOFF]
	and	w9, w0, w22, lsl #9
Lloh8:
	ldr	w8, [x8]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _IS_BUFFER_POOL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IS_BUFFER_POOL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w20, w8, w9
Lloh12:
	adrp	x8, _CSR_RING_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CSR_RING_ID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_xgene_enet_ring_wr32
Lloh15:
	adrp	x8, _CSR_RING_ID_BUF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CSR_RING_ID_BUF@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_xgene_enet_ring_wr32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_OWNER_CPU,8,3             ; @RING_OWNER_CPU
	.comm	_OVERWRITE,4,2                  ; @OVERWRITE
	.comm	_PREFETCH_BUF_EN,4,2            ; @PREFETCH_BUF_EN
	.comm	_IS_BUFFER_POOL,4,2             ; @IS_BUFFER_POOL
	.comm	_CSR_RING_ID,4,2                ; @CSR_RING_ID
	.comm	_CSR_RING_ID_BUF,4,2            ; @CSR_RING_ID_BUF
	.no_dead_strip	_xgene_enet_set_ring_id
.subsections_via_symbols
