	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_dma_init_ring_mngr
_xgene_dma_init_ring_mngr:              ## @xgene_dma_init_ring_mngr
	.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, %rbx
	movq	_XGENE_DMA_RING_CLKEN@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_XGENE_DMA_RING_SRST@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	movl	$3, %edi
	callq	_iowrite32
	movq	_XGENE_DMA_RING_SRST@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_XGENE_DMA_RING_MEM_RAM_SHUTDOWN@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1100, %esi                     ## imm = 0x44C
	callq	_usleep_range
	movq	_XGENE_DMA_RING_BLK_MEM_RDY@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	movq	_XGENE_DMA_RING_BLK_MEM_RDY_VAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_XGENE_DMA_RING_THRESLD0_SET1_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XGENE_DMA_RING_THRESLD0_SET1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	_XGENE_DMA_RING_THRESLD1_SET1_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XGENE_DMA_RING_THRESLD1_SET1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	_XGENE_DMA_RING_HYSTERESIS_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XGENE_DMA_RING_HYSTERESIS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	_XGENE_DMA_RING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XGENE_DMA_RING_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	jmp	LBB0_6
LBB0_4:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGENE_DMA_RING_CLKEN,8,3       ## @XGENE_DMA_RING_CLKEN
	.comm	_XGENE_DMA_RING_SRST,8,3        ## @XGENE_DMA_RING_SRST
	.comm	_XGENE_DMA_RING_MEM_RAM_SHUTDOWN,8,3 ## @XGENE_DMA_RING_MEM_RAM_SHUTDOWN
	.comm	_XGENE_DMA_RING_BLK_MEM_RDY,8,3 ## @XGENE_DMA_RING_BLK_MEM_RDY
	.comm	_XGENE_DMA_RING_BLK_MEM_RDY_VAL,8,3 ## @XGENE_DMA_RING_BLK_MEM_RDY_VAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to release ring mngr memory from shutdown\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_XGENE_DMA_RING_THRESLD0_SET1_VAL,4,2 ## @XGENE_DMA_RING_THRESLD0_SET1_VAL
	.comm	_XGENE_DMA_RING_THRESLD0_SET1,8,3 ## @XGENE_DMA_RING_THRESLD0_SET1
	.comm	_XGENE_DMA_RING_THRESLD1_SET1_VAL,4,2 ## @XGENE_DMA_RING_THRESLD1_SET1_VAL
	.comm	_XGENE_DMA_RING_THRESLD1_SET1,8,3 ## @XGENE_DMA_RING_THRESLD1_SET1
	.comm	_XGENE_DMA_RING_HYSTERESIS_VAL,4,2 ## @XGENE_DMA_RING_HYSTERESIS_VAL
	.comm	_XGENE_DMA_RING_HYSTERESIS,8,3  ## @XGENE_DMA_RING_HYSTERESIS
	.comm	_XGENE_DMA_RING_ENABLE,4,2      ## @XGENE_DMA_RING_ENABLE
	.comm	_XGENE_DMA_RING_CONFIG,8,3      ## @XGENE_DMA_RING_CONFIG
	.no_dead_strip	_xgene_dma_init_ring_mngr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_dma_init_ring_mngr
_xgene_dma_init_ring_mngr:              ; @xgene_dma_init_ring_mngr
	.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	x8, [x0]
Lloh0:
	adrp	x21, _XGENE_DMA_RING_CLKEN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _XGENE_DMA_RING_CLKEN@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh2:
	adrp	x20, _XGENE_DMA_RING_SRST@GOTPAGE
Lloh3:
	ldr	x20, [x20, _XGENE_DMA_RING_SRST@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread32
	cbz	x0, LBB0_5
LBB0_2:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #3
	bl	_iowrite32
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x19]
Lloh4:
	adrp	x20, _XGENE_DMA_RING_MEM_RAM_SHUTDOWN@GOTPAGE
Lloh5:
	ldr	x20, [x20, _XGENE_DMA_RING_MEM_RAM_SHUTDOWN@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread32
	mov	w0, #1000
	mov	w1, #1100
	bl	_usleep_range
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _XGENE_DMA_RING_BLK_MEM_RDY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XGENE_DMA_RING_BLK_MEM_RDY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
Lloh9:
	adrp	x8, _XGENE_DMA_RING_BLK_MEM_RDY_VAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XGENE_DMA_RING_BLK_MEM_RDY_VAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _XGENE_DMA_RING_THRESLD0_SET1_VAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XGENE_DMA_RING_THRESLD0_SET1_VAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _XGENE_DMA_RING_THRESLD0_SET1@GOTPAGE
Lloh16:
	ldr	x9, [x9, _XGENE_DMA_RING_THRESLD0_SET1@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
Lloh18:
	adrp	x8, _XGENE_DMA_RING_THRESLD1_SET1_VAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _XGENE_DMA_RING_THRESLD1_SET1_VAL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh21:
	adrp	x9, _XGENE_DMA_RING_THRESLD1_SET1@GOTPAGE
Lloh22:
	ldr	x9, [x9, _XGENE_DMA_RING_THRESLD1_SET1@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
Lloh24:
	adrp	x8, _XGENE_DMA_RING_HYSTERESIS_VAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XGENE_DMA_RING_HYSTERESIS_VAL@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh27:
	adrp	x9, _XGENE_DMA_RING_HYSTERESIS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _XGENE_DMA_RING_HYSTERESIS@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
Lloh30:
	adrp	x8, _XGENE_DMA_RING_ENABLE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _XGENE_DMA_RING_ENABLE@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh33:
	adrp	x9, _XGENE_DMA_RING_CONFIG@GOTPAGE
Lloh34:
	ldr	x9, [x9, _XGENE_DMA_RING_CONFIG@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #8]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh38:
	adrp	x8, _ENODEV@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_XGENE_DMA_RING_CLKEN,8,3       ; @XGENE_DMA_RING_CLKEN
	.comm	_XGENE_DMA_RING_SRST,8,3        ; @XGENE_DMA_RING_SRST
	.comm	_XGENE_DMA_RING_MEM_RAM_SHUTDOWN,8,3 ; @XGENE_DMA_RING_MEM_RAM_SHUTDOWN
	.comm	_XGENE_DMA_RING_BLK_MEM_RDY,8,3 ; @XGENE_DMA_RING_BLK_MEM_RDY
	.comm	_XGENE_DMA_RING_BLK_MEM_RDY_VAL,8,3 ; @XGENE_DMA_RING_BLK_MEM_RDY_VAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to release ring mngr memory from shutdown\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_XGENE_DMA_RING_THRESLD0_SET1_VAL,4,2 ; @XGENE_DMA_RING_THRESLD0_SET1_VAL
	.comm	_XGENE_DMA_RING_THRESLD0_SET1,8,3 ; @XGENE_DMA_RING_THRESLD0_SET1
	.comm	_XGENE_DMA_RING_THRESLD1_SET1_VAL,4,2 ; @XGENE_DMA_RING_THRESLD1_SET1_VAL
	.comm	_XGENE_DMA_RING_THRESLD1_SET1,8,3 ; @XGENE_DMA_RING_THRESLD1_SET1
	.comm	_XGENE_DMA_RING_HYSTERESIS_VAL,4,2 ; @XGENE_DMA_RING_HYSTERESIS_VAL
	.comm	_XGENE_DMA_RING_HYSTERESIS,8,3  ; @XGENE_DMA_RING_HYSTERESIS
	.comm	_XGENE_DMA_RING_ENABLE,4,2      ; @XGENE_DMA_RING_ENABLE
	.comm	_XGENE_DMA_RING_CONFIG,8,3      ; @XGENE_DMA_RING_CONFIG
	.no_dead_strip	_xgene_dma_init_ring_mngr
.subsections_via_symbols
