	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_irq_dma_err
_ivtv_irq_dma_err:                      ## @ivtv_irq_dma_err
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CX2341X_MBOX_MAX_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	24(%r13), %r14
	movq	%r14, %rdi
	callq	_del_timer
	leaq	40(%r13), %rdi
	movq	_IVTV_MBOX_DMA_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	movq	%rbx, %rcx
	callq	_ivtv_api_get_data
	movq	_IVTV_REG_DMASTATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_read_reg
	movl	%eax, %r12d
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	(%r13), %r8
	leaq	L_.str(%rip), %rdi
	movl	%eax, %ecx
	callq	_IVTV_DEBUG_WARN
	movl	%r12d, %eax
	notl	%eax
	testb	$3, %al
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %esi
	movl	$3, %edi
	callq	_write_reg
LBB0_2:
	movq	_IVTV_F_I_UDMA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	16(%r13), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	(%r13), %rax
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_10
## %bb.4:
	movq	32(%r13), %rcx
	shlq	$4, %rax
	leaq	(%rcx,%rax), %rdi
	movq	(%rcx,%rax), %rdx
	movq	_IVTV_DEC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jge	LBB0_5
## %bb.6:
	testb	$2, %r12b
	jne	LBB0_8
## %bb.7:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$600, %edi                      ## imm = 0x258
	callq	_msecs_to_jiffies
	addq	%rbx, %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_add_timer
	jmp	LBB0_13
LBB0_5:
	callq	_ivtv_dma_dec_start
	jmp	LBB0_13
LBB0_8:
	movl	8(%r13), %edx
	cmpl	$2, %edx
	jg	LBB0_10
## %bb.9:
	movq	$0, 8(%rcx,%rax)
	incl	%edx
	movl	%edx, 8(%r13)
	callq	_ivtv_dma_enc_start_xfer
	jmp	LBB0_13
LBB0_10:
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	callq	_ivtv_udma_start
	jmp	LBB0_13
LBB0_12:
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_IVTV_F_I_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	$-1, (%r13)
	addq	$12, %r13
	movq	%r13, %rdi
	callq	_wake_up
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CX2341X_MBOX_MAX_DATA,4,2      ## @CX2341X_MBOX_MAX_DATA
	.comm	_IVTV_MBOX_DMA_END,4,2          ## @IVTV_MBOX_DMA_END
	.comm	_IVTV_REG_DMASTATUS,4,2         ## @IVTV_REG_DMASTATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA ERROR %08x %08x %08x %d\n"

	.comm	_IVTV_F_I_UDMA,4,2              ## @IVTV_F_I_UDMA
	.comm	_IVTV_MAX_STREAMS,8,3           ## @IVTV_MAX_STREAMS
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ## @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_IVTV_F_I_DMA,4,2               ## @IVTV_F_I_DMA
	.no_dead_strip	_ivtv_irq_dma_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_irq_dma_err
_ivtv_irq_dma_err:                      ; @ivtv_irq_dma_err
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _CX2341X_MBOX_MAX_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CX2341X_MBOX_MAX_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	add	x20, x0, #24
	mov	x0, x20
	bl	_del_timer
	add	x0, x19, #40
Lloh8:
	adrp	x8, _IVTV_MBOX_DMA_END@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IVTV_MBOX_DMA_END@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #2
	mov	x3, x21
	bl	_ivtv_api_get_data
Lloh11:
	adrp	x23, _IVTV_REG_DMASTATUS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _IVTV_REG_DMASTATUS@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_read_reg
	mov	x22, x0
	mvn	w24, w0
	ldp	w1, w2, [x21]
	ldr	x4, [x19]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x22
	bl	_IVTV_DEBUG_WARN
	tst	w24, #0x3
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x23]
	mov	w0, #3
	bl	_write_reg
LBB0_2:
Lloh15:
	adrp	x23, _IVTV_F_I_UDMA@GOTPAGE
Lloh16:
	ldr	x23, [x23, _IVTV_F_I_UDMA@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x21, x19, #16
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_10
; %bb.3:
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _IVTV_MAX_STREAMS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IVTV_MAX_STREAMS@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_10
; %bb.4:
	ldr	x9, [x19, #32]
	add	x0, x9, x8, lsl #4
	ldr	x10, [x0]
Lloh20:
	adrp	x11, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGE
Lloh21:
	ldr	x11, [x11, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh22:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ge	LBB0_7
; %bb.5:
	tbnz	w22, #1, LBB0_8
; %bb.6:
Lloh23:
	adrp	x8, _jiffies@GOTPAGE
Lloh24:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh25:
	ldr	x19, [x8]
	mov	w0, #600
	bl	_msecs_to_jiffies
	add	x8, x0, x19
	str	x8, [x20]
	mov	x0, x20
	bl	_add_timer
	b	LBB0_13
LBB0_7:
	bl	_ivtv_dma_dec_start
	b	LBB0_13
LBB0_8:
	ldr	w10, [x19, #8]
	cmp	w10, #2
	b.gt	LBB0_10
; %bb.9:
	add	x8, x9, x8, lsl #4
	str	xzr, [x8, #8]
	add	w8, w10, #1
	str	w8, [x19, #8]
	bl	_ivtv_dma_enc_start_xfer
	b	LBB0_13
LBB0_10:
	ldr	w0, [x23]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_ivtv_udma_start
	b	LBB0_13
LBB0_12:
	ldr	w0, [x23]
	mov	x1, x21
	bl	_clear_bit
Lloh26:
	adrp	x8, _IVTV_F_I_DMA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IVTV_F_I_DMA@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
	mov	x8, #-1
	str	x8, [x19], #12
	mov	x0, x19
	bl	_wake_up
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_CX2341X_MBOX_MAX_DATA,4,2      ; @CX2341X_MBOX_MAX_DATA
	.comm	_IVTV_MBOX_DMA_END,4,2          ; @IVTV_MBOX_DMA_END
	.comm	_IVTV_REG_DMASTATUS,4,2         ; @IVTV_REG_DMASTATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA ERROR %08x %08x %08x %d\n"

	.comm	_IVTV_F_I_UDMA,4,2              ; @IVTV_F_I_UDMA
	.comm	_IVTV_MAX_STREAMS,8,3           ; @IVTV_MAX_STREAMS
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ; @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_IVTV_F_I_DMA,4,2               ; @IVTV_F_I_DMA
	.no_dead_strip	_ivtv_irq_dma_err
.subsections_via_symbols
