	.file	"extr_ivtv-irq.c_ivtv_irq_enc_start_cap.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ENC START CAP %d: %08x %08x\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Unknown input: %08x %08x %08x\n"
	.text
	.p2align 4
	.type	ivtv_irq_enc_start_cap, @function
ivtv_irq_enc_start_cap:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR CX2341X_MBOX_MAX_DATA[rip]
	mov	rsi, rsp
	mov	r13, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L21:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L21
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L22
.L4:
	lea	rax, 3[rsp]
	mov	esi, DWORD PTR IVTV_MBOX_DMA[rip]
	lea	rdi, 8[rbx]
	mov	edx, 7
	mov	r12, rax
	and	rax, -4
	shr	r12, 2
	mov	rcx, rax
	mov	r14, rax
	call	ivtv_api_get_data@PLT
	mov	ecx, DWORD PTR 8[0+r12*4]
	mov	edx, DWORD PTR 4[0+r12*4]
	lea	rdi, .LC0[rip]
	mov	esi, DWORD PTR 0[0+r12*4]
	call	IVTV_DEBUG_HI_IRQ@PLT
	movsx	rsi, DWORD PTR 0[0+r12*4]
	mov	edx, DWORD PTR 4[0+r12*4]
	mov	ecx, DWORD PTR 8[0+r12*4]
	cmp	esi, 2
	jg	.L6
	test	edx, edx
	je	.L6
	test	ecx, ecx
	je	.L6
	mov	rax, QWORD PTR ivtv_stream_map[rip]
	mov	rdx, QWORD PTR [rax+rsi*8]
	mov	rax, QWORD PTR [rbx]
	mov	rsi, r14
	lea	r12, [rax+rdx*4]
	mov	rdi, r12
	call	stream_enc_dma_append@PLT
	test	eax, eax
	je	.L23
.L9:
	mov	rsp, r13
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	IVTV_DEBUG_WARN@PLT
	mov	rsp, r13
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, r12
	call	ivtv_use_pio@PLT
	mov	edi, DWORD PTR IVTV_F_S_PIO_PENDING[rip]
	mov	rsi, r12
	test	rax, rax
	cmove	edi, DWORD PTR IVTV_F_S_DMA_PENDING[rip]
	call	set_bit@PLT
	jmp	.L9
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ivtv_irq_enc_start_cap, .-ivtv_irq_enc_start_cap
	.comm	ivtv_stream_map,8,8
	.comm	IVTV_MBOX_DMA,4,4
	.comm	IVTV_F_S_PIO_PENDING,4,4
	.comm	IVTV_F_S_DMA_PENDING,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
	.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_enc_start_cap.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ENC START CAP %d: %08x %08x\012\000"
	.align	2
.LC1:
	.ascii	"Unknown input: %08x %08x %08x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivtv_irq_enc_start_cap, %function
ivtv_irq_enc_start_cap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	ldr	r3, .L17
	mov	r6, sp
	ldr	r3, [r3]
	ldr	r2, .L17+4
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r4, sp
	ldr	ip, .L17+8
	ldr	r1, [r2]
	mov	r3, r4
	mov	r2, #7
	mov	r5, r0
	add	r0, r0, #4
	ldr	ip, [ip]
	str	ip, [fp, #-24]
	mov	ip,#0
	bl	ivtv_api_get_data
	ldm	r4, {r1, r2, r3}
	ldr	r0, .L17+12
	bl	IVTV_DEBUG_HI_IRQ
	ldmib	r4, {r2, r3}
	ldr	ip, [r4]
	cmp	ip, #2
	bgt	.L3
	cmp	r2, #0
	beq	.L3
	cmp	r3, #0
	bne	.L4
.L3:
	mov	r1, ip
	ldr	r0, .L17+16
	bl	IVTV_DEBUG_WARN
	mov	sp, r6
.L1:
	ldr	r3, .L17+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L4:
	ldr	r2, .L17+20
	mov	r1, r4
	ldr	r2, [r2]
	ldr	r3, [r5]
	ldr	r4, [r2, ip, lsl #2]
	add	r4, r3, r4, lsl #2
	mov	r0, r4
	bl	stream_enc_dma_append
	cmp	r0, #0
	beq	.L16
.L6:
	mov	sp, r6
	b	.L1
.L16:
	mov	r0, r4
	bl	ivtv_use_pio
	cmp	r0, #0
	ldrne	r3, .L17+24
	ldreq	r3, .L17+28
	mov	r1, r4
	ldr	r0, [r3]
	bl	set_bit
	b	.L6
.L15:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	CX2341X_MBOX_MAX_DATA
	.word	IVTV_MBOX_DMA
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	ivtv_stream_map
	.word	IVTV_F_S_PIO_PENDING
	.word	IVTV_F_S_DMA_PENDING
	.size	ivtv_irq_enc_start_cap, .-ivtv_irq_enc_start_cap
	.comm	ivtv_stream_map,4,4
	.comm	IVTV_MBOX_DMA,4,4
	.comm	IVTV_F_S_PIO_PENDING,4,4
	.comm	IVTV_F_S_DMA_PENDING,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
