	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_ring_set_type
_xgene_enet_ring_set_type:              ## @xgene_enet_ring_set_type
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movl	8(%rdi), %edi
	callq	_xgene_enet_is_bufpool
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_RING_REGULAR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_RING_BUFPOOL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_RINGTYPE_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	%cl, %ebx
	movq	_RINGTYPE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edi
	callq	_CREATE_MASK
	andl	%ebx, %eax
	orl	%eax, 16(%r14)
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movq	_BUFPOOL_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_RINGMODE_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	%cl, %ebx
	movq	_RINGMODE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edi
	callq	_CREATE_MASK
	andl	%ebx, %eax
	orl	%eax, 12(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_BUFPOOL,4,2               ## @RING_BUFPOOL
	.comm	_RING_REGULAR,4,2               ## @RING_REGULAR
	.comm	_RINGTYPE_POS,4,2               ## @RINGTYPE_POS
	.comm	_RINGTYPE_LEN,4,2               ## @RINGTYPE_LEN
	.comm	_BUFPOOL_MODE,4,2               ## @BUFPOOL_MODE
	.comm	_RINGMODE_POS,4,2               ## @RINGMODE_POS
	.comm	_RINGMODE_LEN,4,2               ## @RINGMODE_LEN
	.no_dead_strip	_xgene_enet_ring_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_enet_ring_set_type
_xgene_enet_ring_set_type:              ; @xgene_enet_ring_set_type
	.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
	ldr	x20, [x0]
	ldr	w0, [x0, #8]
	bl	_xgene_enet_is_bufpool
	mov	x19, x0
Lloh0:
	adrp	x8, _RING_BUFPOOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RING_BUFPOOL@GOTPAGEOFF]
Lloh2:
	adrp	x9, _RING_REGULAR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RING_REGULAR@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
Lloh4:
	adrp	x9, _RINGTYPE_POS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RINGTYPE_POS@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh6:
	ldr	w0, [x9]
	lsl	w21, w8, w0
Lloh7:
	adrp	x8, _RINGTYPE_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RINGTYPE_LEN@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_CREATE_MASK
	and	w8, w0, w21
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	cbz	w19, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _BUFPOOL_MODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BUFPOOL_MODE@GOTPAGEOFF]
Lloh12:
	adrp	x9, _RINGMODE_POS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RINGMODE_POS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w0, [x9]
	lsl	w19, w8, w0
Lloh16:
	adrp	x8, _RINGMODE_LEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RINGMODE_LEN@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_CREATE_MASK
	and	w8, w0, w19
	ldr	w9, [x20, #12]
	orr	w8, w9, w8
	str	w8, [x20, #12]
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_BUFPOOL,4,2               ; @RING_BUFPOOL
	.comm	_RING_REGULAR,4,2               ; @RING_REGULAR
	.comm	_RINGTYPE_POS,4,2               ; @RINGTYPE_POS
	.comm	_RINGTYPE_LEN,4,2               ; @RINGTYPE_LEN
	.comm	_BUFPOOL_MODE,4,2               ; @BUFPOOL_MODE
	.comm	_RINGMODE_POS,4,2               ; @RINGMODE_POS
	.comm	_RINGMODE_LEN,4,2               ; @RINGMODE_LEN
	.no_dead_strip	_xgene_enet_ring_set_type
.subsections_via_symbols
