	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_engine_stalled
_dma_engine_stalled:                    ## @dma_engine_stalled
	.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
	addq	$48, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	40(%rbx), %r12
	movq	_SW_CMD_IDX@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	movq	%rax, %r14
	movq	8(%rbx), %rdi
	callq	_CARD_TO_DEV
	cmpq	%r14, %r12
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	8(%rbx), %rax
	movl	$1, (%rax)
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	leaq	20(%rbx), %rsi
	movq	_COMPLETE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rsxx_cleanup_dma_queue
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_rsxx_dma_cancel
	movq	%rax, %r14
	addl	%r15d, %r14d
	je	LBB0_4
## %bb.6:
	movq	8(%rbx), %rdi
	callq	_CARD_TO_DEV
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	40(%rbx), %rdi
	movq	(%r15), %rsi
	addq	32(%rbx), %rsi
	callq	_iowrite32
	addq	$24, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_DMA_ACTIVITY_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mod_timer                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SW_CMD_IDX,8,3                 ## @SW_CMD_IDX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SW_CMD_IDX write was lost, re-writing...\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_DMA_ACTIVITY_TIMEOUT,8,3       ## @DMA_ACTIVITY_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"DMA channel %d has stalled, faulting interface.\n"

	.comm	_COMPLETE_DMA,4,2               ## @COMPLETE_DMA
L_.str.2:                               ## @.str.2
	.asciz	"Freed %d queued DMAs on channel %d\n"

	.no_dead_strip	_dma_engine_stalled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_engine_stalled
_dma_engine_stalled:                    ; @dma_engine_stalled
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x0, x0, #48
	bl	_atomic_read
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_2:
	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
	add	sp, sp, #64
	ret
LBB0_3:
	ldp	x8, x22, [x19, #32]
Lloh0:
	adrp	x21, _SW_CMD_IDX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SW_CMD_IDX@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_CARD_TO_DEV
	cmp	x22, x20
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldr	x8, [x19, #8]
	mov	w9, #1
	str	w9, [x8]
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock
	add	x1, x19, #20
Lloh4:
	adrp	x8, _COMPLETE_DMA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _COMPLETE_DMA@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rsxx_cleanup_dma_queue
	mov	x21, x0
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_rsxx_dma_cancel
	adds	w20, w21, w0
	b.eq	LBB0_2
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_CARD_TO_DEV
	ldr	w3, [x19]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	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
	add	sp, sp, #64
	b	_dev_info
LBB0_6:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	ldp	x8, x0, [x19, #32]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_iowrite32
	add	x0, x19, #24
Lloh11:
	adrp	x8, _jiffies@GOTPAGE
Lloh12:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _DMA_ACTIVITY_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMA_ACTIVITY_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	add	sp, sp, #64
	b	_mod_timer
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SW_CMD_IDX,8,3                 ; @SW_CMD_IDX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SW_CMD_IDX write was lost, re-writing...\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_DMA_ACTIVITY_TIMEOUT,8,3       ; @DMA_ACTIVITY_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"DMA channel %d has stalled, faulting interface.\n"

	.comm	_COMPLETE_DMA,4,2               ; @COMPLETE_DMA
l_.str.2:                               ; @.str.2
	.asciz	"Freed %d queued DMAs on channel %d\n"

	.no_dead_strip	_dma_engine_stalled
.subsections_via_symbols
