	.file	"extr_ivtv-irq.c_ivtv_irq_dma_err.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DMA ERROR %08x %08x %08x %d\n"
	.text
	.p2align 4
	.type	ivtv_irq_dma_err, @function
ivtv_irq_dma_err:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR CX2341X_MBOX_MAX_DATA[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L18:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L18
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L19
.L4:
	lea	rcx, 3[rsp]
	lea	r15, 24[r12]
	mov	r9, rcx
	mov	rdi, r15
	and	rcx, -4
	shr	r9, 2
	mov	r13, rcx
	mov	QWORD PTR -72[rbp], r9
	call	del_timer@PLT
	mov	esi, DWORD PTR IVTV_MBOX_DMA_END[rip]
	mov	rcx, r13
	mov	edx, 2
	lea	rdi, 40[r12]
	call	ivtv_api_get_data@PLT
	mov	edi, DWORD PTR IVTV_REG_DMASTATUS[rip]
	call	read_reg@PLT
	mov	r9, QWORD PTR -72[rbp]
	mov	r8, QWORD PTR [r12]
	lea	rdi, .LC0[rip]
	mov	r14d, eax
	mov	ecx, eax
	mov	edx, DWORD PTR 4[0+r9*4]
	mov	esi, DWORD PTR 0[0+r9*4]
	call	IVTV_DEBUG_WARN@PLT
	mov	eax, r14d
	and	eax, 3
	cmp	eax, 3
	jne	.L5
	mov	esi, DWORD PTR IVTV_REG_DMASTATUS[rip]
	mov	edi, 3
	call	write_reg@PLT
.L5:
	lea	r13, 16[r12]
	mov	edi, DWORD PTR IVTV_F_I_UDMA[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L6
	mov	rdi, QWORD PTR [r12]
	cmp	rdi, QWORD PTR IVTV_MAX_STREAMS[rip]
	jnb	.L6
	sal	rdi, 4
	add	rdi, QWORD PTR 32[r12]
	mov	rax, QWORD PTR IVTV_DEC_STREAM_TYPE_MPG[rip]
	cmp	QWORD PTR [rdi], rax
	jge	.L20
	and	r14d, 2
	je	.L21
	mov	eax, DWORD PTR 8[r12]
	cmp	eax, 2
	jle	.L22
.L6:
	mov	edi, DWORD PTR IVTV_F_I_UDMA[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L23
	mov	edi, DWORD PTR IVTV_F_I_UDMA[rip]
	mov	rsi, r13
	call	clear_bit@PLT
	mov	edi, DWORD PTR IVTV_F_I_DMA[rip]
	mov	rsi, r13
	call	clear_bit@PLT
	mov	QWORD PTR [r12], -1
	lea	rdi, 12[r12]
	call	wake_up@PLT
	mov	rsp, rbx
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	rdi, r12
	call	ivtv_udma_start@PLT
.L8:
	mov	rsp, rbx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	call	ivtv_dma_dec_start@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, 600
	call	msecs_to_jiffies@PLT
	add	rax, QWORD PTR jiffies[rip]
	mov	rdi, r15
	mov	QWORD PTR 24[r12], rax
	call	add_timer@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	add	eax, 1
	mov	QWORD PTR 8[rdi], 0
	mov	DWORD PTR 8[r12], eax
	call	ivtv_dma_enc_start_xfer@PLT
	jmp	.L8
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ivtv_irq_dma_err, .-ivtv_irq_dma_err
	.comm	jiffies,8,8
	.comm	IVTV_REG_DMASTATUS,4,4
	.comm	IVTV_MBOX_DMA_END,4,4
	.comm	IVTV_MAX_STREAMS,8,8
	.comm	IVTV_F_I_UDMA,4,4
	.comm	IVTV_F_I_DMA,4,4
	.comm	IVTV_DEC_STREAM_TYPE_MPG,8,8
	.comm	CX2341X_MBOX_MAX_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ivtv-irq.c_ivtv_irq_dma_err.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"DMA ERROR %08x %08x %08x %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivtv_irq_dma_err, %function
ivtv_irq_dma_err:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	mov	r4, r0
	ldr	r3, .L18
	mov	r5, sp
	ldr	r3, [r3]
	add	r6, r0, #16
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L18+4
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	del_timer
	ldr	r2, .L18+8
	add	r8, sp, #8
	ldr	r9, .L18+12
	ldr	r1, [r2]
	mov	r3, r8
	mov	r2, #2
	add	r0, r4, #24
	bl	ivtv_api_get_data
	ldr	r0, [r9]
	bl	read_reg
	ldm	r8, {r1, r2}
	mov	r7, r0
	ldr	r3, [r4]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L18+16
	bl	IVTV_DEBUG_WARN
	and	r0, r7, #3
	cmp	r0, #3
	beq	.L12
.L2:
	ldr	r8, .L18+20
	add	r9, r4, #12
	mov	r1, r9
	ldr	r0, [r8]
	bl	test_bit
	subs	r3, r0, #0
	bne	.L3
	ldr	r2, .L18+24
	ldr	r0, [r4]
	ldr	r2, [r2]
	cmp	r0, r2
	bcc	.L13
.L3:
	mov	r1, r9
	ldr	r0, [r8]
	bl	test_bit
	cmp	r0, #0
	bne	.L14
	mov	r1, r9
	ldr	r0, [r8]
	bl	clear_bit
	ldr	r3, .L18+28
	mov	r1, r9
	ldr	r0, [r3]
	bl	clear_bit
	mov	r0, r4
	mvn	r3, #0
	str	r3, [r0], #8
	bl	wake_up
	mov	sp, r5
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L13:
	ldr	r2, [r4, #20]
	ldr	r1, .L18+32
	ldr	ip, [r2, r0, lsl #3]
	ldr	r1, [r1]
	add	r0, r2, r0, lsl #3
	cmp	ip, r1
	bge	.L16
	tst	r7, #2
	beq	.L17
	ldr	r2, [r4, #4]
	cmp	r2, #2
	bgt	.L3
	add	r2, r2, #1
	str	r3, [r0, #4]
	str	r2, [r4, #4]
	bl	ivtv_dma_enc_start_xfer
	b	.L5
.L14:
	mov	r0, r4
	bl	ivtv_udma_start
.L5:
	mov	sp, r5
	b	.L1
.L12:
	ldr	r1, [r9]
	bl	write_reg
	b	.L2
.L16:
	bl	ivtv_dma_dec_start
	b	.L5
.L17:
	mov	r0, #600
	bl	msecs_to_jiffies
	mov	r2, r0
	ldr	r3, .L18+36
	mov	r0, r6
	ldr	r3, [r3]
	add	r3, r3, r2
	str	r3, [r4, #16]
	bl	add_timer
	b	.L5
.L15:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	CX2341X_MBOX_MAX_DATA
	.word	.LC1
	.word	IVTV_MBOX_DMA_END
	.word	IVTV_REG_DMASTATUS
	.word	.LC0
	.word	IVTV_F_I_UDMA
	.word	IVTV_MAX_STREAMS
	.word	IVTV_F_I_DMA
	.word	IVTV_DEC_STREAM_TYPE_MPG
	.word	jiffies
	.size	ivtv_irq_dma_err, .-ivtv_irq_dma_err
	.comm	jiffies,4,4
	.comm	IVTV_REG_DMASTATUS,4,4
	.comm	IVTV_MBOX_DMA_END,4,4
	.comm	IVTV_MAX_STREAMS,4,4
	.comm	IVTV_F_I_UDMA,4,4
	.comm	IVTV_F_I_DMA,4,4
	.comm	IVTV_DEC_STREAM_TYPE_MPG,4,4
	.comm	CX2341X_MBOX_MAX_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
