	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsxx_handle_dma_error
_rsxx_handle_dma_error:                 ## @rsxx_handle_dma_error
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_CARD_TO_DEV
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %r8d
	callq	_dev_dbg
	movq	_HW_STATUS_CRC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	incl	32(%r15)
LBB0_2:
	movq	_HW_STATUS_HARD_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	incl	28(%r15)
LBB0_4:
	movq	_HW_STATUS_SOFT_ERR@GOTPCREL(%rip), %rdx
	testl	%ebx, (%rdx)
	je	LBB0_6
## %bb.5:
	incl	24(%r15)
LBB0_6:
	movl	(%r14), %edx
	addl	$-128, %edx
	cmpl	$3, %edx
	ja	LBB0_9
## %bb.7:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_8:
	movq	_DMA_HW_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	12(%r15)
	jmp	LBB0_18
LBB0_9:
	movq	(%r15), %rdi
	callq	_CARD_TO_DEV
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %r8d
	callq	_dev_err
	movq	_DMA_SW_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_18
LBB0_10:
	orl	%eax, %ecx
	testl	%ebx, %ecx
	jne	LBB0_17
	jmp	LBB0_19
LBB0_12:
	orl	%eax, %ecx
	testl	%ebx, %ecx
	je	LBB0_16
## %bb.13:
	movq	(%r15), %rax
	cmpl	$0, (%rax)
	je	LBB0_17
## %bb.14:
	movl	$129, (%r14)
	incl	20(%r15)
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rsxx_requeue_dma               ## TAILCALL
LBB0_15:
	movq	_DMA_HW_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	8(%r15)
	jmp	LBB0_18
LBB0_16:
	movq	_HW_STATUS_FAULT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_19
LBB0_17:
	movq	_DMA_HW_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	16(%r15)
	jmp	LBB0_18
LBB0_19:
	xorl	%edx, %edx
LBB0_18:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rsxx_complete_dma              ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Handling DMA error(cmd x%02x, laddr x%08x st:x%02x)\n"

	.comm	_HW_STATUS_CRC,4,2              ## @HW_STATUS_CRC
	.comm	_HW_STATUS_HARD_ERR,4,2         ## @HW_STATUS_HARD_ERR
	.comm	_HW_STATUS_SOFT_ERR,4,2         ## @HW_STATUS_SOFT_ERR
	.comm	_DMA_HW_FAULT,4,2               ## @DMA_HW_FAULT
	.comm	_HW_STATUS_FAULT,4,2            ## @HW_STATUS_FAULT
L_.str.1:                               ## @.str.1
	.asciz	"Unknown command in DMA!(cmd: x%02x laddr x%08x st: x%02x\n"

	.comm	_DMA_SW_ERR,4,2                 ## @DMA_SW_ERR
	.no_dead_strip	_rsxx_handle_dma_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsxx_handle_dma_error
_rsxx_handle_dma_error:                 ; @rsxx_handle_dma_error
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0]
	bl	_CARD_TO_DEV
	ldp	w2, w3, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x21
	bl	_dev_dbg
Lloh2:
	adrp	x8, _HW_STATUS_CRC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HW_STATUS_CRC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x20, #32]
	add	w9, w9, #1
	str	w9, [x20, #32]
LBB0_2:
Lloh5:
	adrp	x9, _HW_STATUS_HARD_ERR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HW_STATUS_HARD_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_4
; %bb.3:
	ldr	w10, [x20, #28]
	add	w10, w10, #1
	str	w10, [x20, #28]
LBB0_4:
Lloh8:
	adrp	x10, _HW_STATUS_SOFT_ERR@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HW_STATUS_SOFT_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w21
	b.eq	LBB0_6
; %bb.5:
	ldr	w10, [x20, #24]
	add	w10, w10, #1
	str	w10, [x20, #24]
LBB0_6:
	ldr	w10, [x19]
	sub	w10, w10, #128
	cmp	w10, #3
	b.hi	LBB0_9
; %bb.7:
Lloh11:
	adrp	x11, lJTI0_0@PAGE
Lloh12:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_8
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_8:
Lloh13:
	adrp	x8, _DMA_HW_FAULT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_HW_FAULT@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
	b	LBB0_18
LBB0_9:
	ldr	x0, [x20]
	bl	_CARD_TO_DEV
	ldp	w2, w3, [x19]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x21
	bl	_dev_err
Lloh18:
	adrp	x8, _DMA_SW_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMA_SW_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	b	LBB0_18
LBB0_10:
	orr	w8, w9, w8
	tst	w8, w21
	b.ne	LBB0_16
	b	LBB0_17
LBB0_11:
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_15
; %bb.12:
	ldr	x8, [x20]
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.13:
	mov	w8, #129
	str	w8, [x19]
	ldr	w8, [x20, #20]
	add	w8, w8, #1
	str	w8, [x20, #20]
	mov	x0, x20
	mov	x1, x19
	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
	b	_rsxx_requeue_dma
LBB0_14:
Lloh21:
	adrp	x8, _DMA_HW_FAULT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DMA_HW_FAULT@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	b	LBB0_18
LBB0_15:
Lloh24:
	adrp	x8, _HW_STATUS_FAULT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HW_STATUS_FAULT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
LBB0_16:
Lloh27:
	adrp	x8, _DMA_HW_FAULT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DMA_HW_FAULT@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
	b	LBB0_18
LBB0_17:
	mov	w2, #0
LBB0_18:
	mov	x0, x20
	mov	x1, x19
	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
	b	_rsxx_complete_dma
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Handling DMA error(cmd x%02x, laddr x%08x st:x%02x)\n"

	.comm	_HW_STATUS_CRC,4,2              ; @HW_STATUS_CRC
	.comm	_HW_STATUS_HARD_ERR,4,2         ; @HW_STATUS_HARD_ERR
	.comm	_HW_STATUS_SOFT_ERR,4,2         ; @HW_STATUS_SOFT_ERR
	.comm	_DMA_HW_FAULT,4,2               ; @DMA_HW_FAULT
	.comm	_HW_STATUS_FAULT,4,2            ; @HW_STATUS_FAULT
l_.str.1:                               ; @.str.1
	.asciz	"Unknown command in DMA!(cmd: x%02x laddr x%08x st: x%02x\n"

	.comm	_DMA_SW_ERR,4,2                 ; @DMA_SW_ERR
	.no_dead_strip	_rsxx_handle_dma_error
.subsections_via_symbols
