	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safexcel_init_ring_descriptors ## -- Begin function safexcel_init_ring_descriptors
	.p2align	4, 0x90
_safexcel_init_ring_descriptors:        ## @safexcel_init_ring_descriptors
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	4(%rdi), %esi
	shll	$2, %esi
	movl	%esi, (%rbx)
	movq	_EIP197_DEFAULT_RING_SIZE@GOTPCREL(%rip), %r12
	imull	(%r12), %esi
	movl	(%rdi), %edi
	leaq	40(%rbx), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	callq	_dmam_alloc_coherent
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, 32(%rbx)
	movslq	(%rbx), %rcx
	movslq	(%r12), %rdx
	decq	%rdx
	imulq	%rcx, %rdx
	addq	%rax, %rdx
	movq	%rdx, 24(%rbx)
	movq	%rax, 16(%rbx)
	movl	8(%r15), %esi
	shll	$2, %esi
	movl	%esi, (%r14)
	movl	(%r15), %edi
	imull	(%r12), %esi
	leaq	40(%r14), %rdx
	movl	(%r13), %ecx
	callq	_dmam_alloc_coherent
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, 32(%r14)
	movslq	(%r14), %rcx
	movslq	(%r12), %rdx
	decq	%rdx
	imulq	%rcx, %rdx
	addq	%rax, %rdx
	movq	%rdx, 24(%r14)
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIP197_DEFAULT_RING_SIZE,4,2   ## @EIP197_DEFAULT_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safexcel_init_ring_descriptors ; -- Begin function safexcel_init_ring_descriptors
	.p2align	2
_safexcel_init_ring_descriptors:        ; @safexcel_init_ring_descriptors
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldp	w0, w8, [x0]
	lsl	w8, w8, #2
	str	w8, [x1]
Lloh0:
	adrp	x22, _EIP197_DEFAULT_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EIP197_DEFAULT_RING_SIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	mul	w1, w9, w8
	add	x2, x21, #40
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	bl	_dmam_alloc_coherent
	str	x0, [x21, #8]
	cbz	x0, LBB0_3
; %bb.1:
	ldrsw	x8, [x21]
	ldrsw	x9, [x22]
	sub	x9, x9, #1
	madd	x8, x9, x8, x0
	stp	x8, x0, [x21, #24]
	str	x0, [x21, #16]
	ldr	w8, [x20, #8]
	lsl	w8, w8, #2
	str	w8, [x19]
	ldr	w0, [x20]
	ldr	w9, [x22]
	mul	w1, w9, w8
	add	x2, x19, #40
	ldr	w3, [x23]
	bl	_dmam_alloc_coherent
	str	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x8, x0
	mov	w0, #0
	ldrsw	x9, [x19]
	ldrsw	x10, [x22]
	sub	x10, x10, #1
	madd	x9, x10, x9, x8
	stp	x9, x8, [x19, #24]
	str	x8, [x19, #16]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EIP197_DEFAULT_RING_SIZE,4,2   ; @EIP197_DEFAULT_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
