	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cp_alloc_rings
_cp_alloc_rings:                        ## @cp_alloc_rings
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	_CP_RING_BYTES@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, 8(%rbx)
	movq	_CP_RX_RING_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_cp_init_rings
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movl	(%r12), %esi
	movq	8(%rbx), %rdx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CP_RING_BYTES,4,2              ## @CP_RING_BYTES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CP_RX_RING_SIZE,8,3            ## @CP_RX_RING_SIZE
	.no_dead_strip	_cp_alloc_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cp_alloc_rings
_cp_alloc_rings:                        ; @cp_alloc_rings
	.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	x20, x0
	ldr	x19, [x0, #24]
Lloh0:
	adrp	x22, _CP_RING_BYTES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CP_RING_BYTES@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _CP_RX_RING_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CP_RX_RING_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x8, x0, x8, lsl #2
	stp	x0, x8, [x20, #8]
	mov	x0, x20
	bl	_cp_init_rings
	mov	x21, x0
	tbz	w0, #31, LBB0_4
; %bb.2:
	ldr	w1, [x22]
	ldr	x2, [x20, #8]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_dma_free_coherent
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CP_RING_BYTES,4,2              ; @CP_RING_BYTES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CP_RX_RING_SIZE,8,3            ; @CP_RX_RING_SIZE
	.no_dead_strip	_cp_alloc_rings
.subsections_via_symbols
