	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_dma_create_chan_rings
_xgene_dma_create_chan_rings:           ## @xgene_dma_create_chan_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	_XGENE_DMA_RING_OWNER_CPU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rdi)
	movq	_XGENE_DMA_CPU_BUFNUM@GOTPCREL(%rip), %rax
	movq	8(%rdi), %rcx
	addq	(%rax), %rcx
	leaq	56(%rdi), %r14
	movq	%rcx, 80(%rdi)
	movq	_XGENE_DMA_RING_CFG_SIZE_64KB@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_xgene_dma_create_ring_one
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	leaq	16(%rbx), %r15
	movl	68(%rbx), %edx
	movl	60(%rbx), %r8d
	movl	64(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_chan_dbg
	movq	_XGENE_DMA_RING_OWNER_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_XGENE_DMA_BUFNUM@GOTPCREL(%rip), %rax
	movq	8(%rbx), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 40(%rbx)
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_xgene_dma_create_ring_one
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_xgene_dma_delete_ring_one
	jmp	LBB0_4
LBB0_3:
	movl	64(%rbx), %edi
	callq	_XGENE_DMA_RING_DST_ID
	movl	%eax, 32(%rbx)
	movl	28(%rbx), %edx
	movl	20(%rbx), %r8d
	movl	24(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_chan_dbg
	movl	16(%rbx), %eax
	movl	%eax, (%rbx)
	xorl	%r15d, %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGENE_DMA_RING_OWNER_CPU,4,2   ## @XGENE_DMA_RING_OWNER_CPU
	.comm	_XGENE_DMA_CPU_BUFNUM,8,3       ## @XGENE_DMA_CPU_BUFNUM
	.comm	_XGENE_DMA_RING_CFG_SIZE_64KB,4,2 ## @XGENE_DMA_RING_CFG_SIZE_64KB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Rx ring id 0x%X num %d desc 0x%p\n"

	.comm	_XGENE_DMA_RING_OWNER_DMA,4,2   ## @XGENE_DMA_RING_OWNER_DMA
	.comm	_XGENE_DMA_BUFNUM,8,3           ## @XGENE_DMA_BUFNUM
L_.str.1:                               ## @.str.1
	.asciz	"Tx ring id 0x%X num %d desc 0x%p\n"

	.no_dead_strip	_xgene_dma_create_chan_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_dma_create_chan_rings
_xgene_dma_create_chan_rings:           ; @xgene_dma_create_chan_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	x19, x0
Lloh0:
	adrp	x8, _XGENE_DMA_RING_OWNER_CPU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XGENE_DMA_RING_OWNER_CPU@GOTPAGEOFF]
	add	x20, x0, #56
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #88]
Lloh3:
	adrp	x8, _XGENE_DMA_CPU_BUFNUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XGENE_DMA_CPU_BUFNUM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x0, #8]
	add	x8, x9, x8
	str	x8, [x0, #80]
Lloh6:
	adrp	x22, _XGENE_DMA_RING_CFG_SIZE_64KB@GOTPAGE
Lloh7:
	ldr	x22, [x22, _XGENE_DMA_RING_CFG_SIZE_64KB@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x1, x20
	bl	_xgene_dma_create_ring_one
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.1:
	add	x21, x19, #16
	ldp	w3, w2, [x19, #64]
	ldr	w4, [x19, #60]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_chan_dbg
Lloh10:
	adrp	x8, _XGENE_DMA_RING_OWNER_DMA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XGENE_DMA_RING_OWNER_DMA@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _XGENE_DMA_BUFNUM@GOTPAGE
Lloh14:
	ldr	x9, [x9, _XGENE_DMA_BUFNUM@GOTPAGEOFF]
	str	w8, [x19, #48]
Lloh15:
	ldr	x8, [x9]
	ldr	x9, [x19, #8]
	add	x8, x9, x8
	str	x8, [x19, #40]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_xgene_dma_create_ring_one
	mov	x21, x0
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_xgene_dma_delete_ring_one
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #64]
	bl	_XGENE_DMA_RING_DST_ID
	str	w0, [x19, #32]
	ldp	w3, w2, [x19, #24]
	ldr	w4, [x19, #20]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_chan_dbg
	ldr	w8, [x19, #16]
	str	w8, [x19]
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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_XGENE_DMA_RING_OWNER_CPU,4,2   ; @XGENE_DMA_RING_OWNER_CPU
	.comm	_XGENE_DMA_CPU_BUFNUM,8,3       ; @XGENE_DMA_CPU_BUFNUM
	.comm	_XGENE_DMA_RING_CFG_SIZE_64KB,4,2 ; @XGENE_DMA_RING_CFG_SIZE_64KB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Rx ring id 0x%X num %d desc 0x%p\n"

	.comm	_XGENE_DMA_RING_OWNER_DMA,4,2   ; @XGENE_DMA_RING_OWNER_DMA
	.comm	_XGENE_DMA_BUFNUM,8,3           ; @XGENE_DMA_BUFNUM
l_.str.1:                               ; @.str.1
	.asciz	"Tx ring id 0x%X num %d desc 0x%p\n"

	.no_dead_strip	_xgene_dma_create_chan_rings
.subsections_via_symbols
