	.file	"extr_cobalt-irq.c_cobalt_irq_handler.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"full rx FIFO %d\n"
	.text
	.p2align 4
	.globl	cobalt_irq_handler
	.type	cobalt_irq_handler, @function
cobalt_irq_handler:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	rdi, r15
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR DMA_INTERRUPT_STATUS_REG[rip]
	call	cobalt_read_bar0@PLT
	mov	esi, DWORD PTR COBALT_SYS_STAT_MASK[rip]
	mov	rdi, r15
	movzx	r13d, ax
	call	cobalt_read_bar1@PLT
	mov	esi, DWORD PTR COBALT_SYS_STAT_EDGE[rip]
	mov	rdi, r15
	mov	ebx, eax
	mov	DWORD PTR 8[rsp], eax
	call	cobalt_read_bar1@PLT
	mov	esi, DWORD PTR DMA_INTERRUPT_STATUS_REG[rip]
	mov	edx, r13d
	mov	rdi, r15
	mov	ebp, eax
	call	cobalt_write_bar0@PLT
	mov	edx, ebp
	mov	esi, DWORD PTR COBALT_SYS_STAT_MASK[rip]
	mov	rdi, r15
	not	edx
	and	edx, ebx
	call	cobalt_write_bar1@PLT
	mov	esi, DWORD PTR COBALT_SYS_STAT_EDGE[rip]
	mov	edx, ebp
	mov	rdi, r15
	call	cobalt_write_bar1@PLT
	mov	eax, DWORD PTR COBALT_NUM_STREAMS[rip]
	test	eax, eax
	jle	.L2
	xor	r12d, r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	QWORD PTR 24[rbx], 0
	jne	.L4
	test	DWORD PTR 8[rbx], ebp
	jne	.L34
.L5:
	mov	eax, DWORD PTR 8[rsp]
	and	eax, ebp
	test	eax, r14d
	jne	.L35
.L4:
	add	r12, 1
	cmp	DWORD PTR COBALT_NUM_STREAMS[rip], r12d
	jle	.L2
.L6:
	mov	rbx, r12
	mov	DWORD PTR 12[rsp], r12d
	sal	rbx, 5
	add	rbx, QWORD PTR 40[r15]
	mov	eax, DWORD PTR 4[rbx]
	mov	r14d, DWORD PTR [rbx]
	bt	r13d, eax
	jnc	.L3
	mov	rax, QWORD PTR 32[r15]
	mov	rdi, rbx
	add	DWORD PTR [rax+r12*4], 1
	call	cobalt_dma_stream_queue_handler@PLT
	cmp	QWORD PTR 24[rbx], 0
	jne	.L4
	mov	eax, r14d
	mov	esi, DWORD PTR COBALT_SYS_STAT_MASK[rip]
	mov	rdi, r15
	not	eax
	and	ebp, eax
	mov	edx, ebp
	not	edx
	and	edx, DWORD PTR 8[rsp]
	call	cobalt_write_bar1@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rdi, 12[rbx]
	call	vb2_is_streaming@PLT
	test	rax, rax
	je	.L4
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	add	r12, 1
	call	cobalt_info@PLT
	add	DWORD PTR 28[r15], 1
	cmp	DWORD PTR COBALT_NUM_STREAMS[rip], r12d
	jg	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 24[r15]
	lea	rsi, 20[r15]
	call	queue_work@PLT
	mov	edx, DWORD PTR COBALT_SYSSTAT_VOHSMA_INT1_MSK[rip]
	mov	eax, DWORD PTR COBALT_SYSSTAT_VI0_INT1_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI1_INT1_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI2_INT1_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI3_INT1_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VIHSMA_INT1_MSK[rip]
	and	ebp, DWORD PTR 8[rsp]
	or	eax, edx
	test	eax, ebp
	je	.L7
	add	DWORD PTR 16[r15], 1
.L7:
	mov	eax, DWORD PTR COBALT_SYSSTAT_VI0_INT2_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI1_INT2_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI2_INT2_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VI3_INT2_MSK[rip]
	or	eax, DWORD PTR COBALT_SYSSTAT_VIHSMA_INT2_MSK[rip]
	test	eax, ebp
	je	.L8
	add	DWORD PTR 12[r15], 1
.L8:
	test	ebp, edx
	je	.L9
	add	DWORD PTR 8[r15], 1
	test	r13d, r13d
	je	.L11
.L10:
	add	DWORD PTR 4[r15], 1
.L11:
	mov	esi, DWORD PTR DMA_INTERRUPT_STATUS_REG[rip]
	mov	rdi, r15
	call	cobalt_read_bar0@PLT
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	mov	edi, DWORD PTR COBALT_STREAM_FL_ADV_IRQ[rip]
	lea	rsi, 16[rbx]
	call	set_bit@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	test	r13d, r13d
	jne	.L10
	test	ebp, ebp
	jne	.L11
	add	DWORD PTR [r15], 1
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	cobalt_irq_handler, .-cobalt_irq_handler
	.comm	IRQ_HANDLED,4,4
	.comm	DMA_INTERRUPT_STATUS_REG,4,4
	.comm	COBALT_SYS_STAT_MASK,4,4
	.comm	COBALT_SYS_STAT_EDGE,4,4
	.comm	COBALT_SYSSTAT_VOHSMA_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VIHSMA_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VIHSMA_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI3_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI3_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI2_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI2_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI1_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI1_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI0_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI0_INT1_MSK,4,4
	.comm	COBALT_STREAM_FL_ADV_IRQ,4,4
	.comm	COBALT_NUM_STREAMS,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_cobalt-irq.c_cobalt_irq_handler.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"full rx FIFO %d\012\000"
	.text
	.align	2
	.global	cobalt_irq_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	cobalt_irq_handler, %function
cobalt_irq_handler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, .L36
	mov	r6, r1
	mov	r0, r1
	ldr	r1, [r5]
	bl	cobalt_read_bar0
	ldr	r9, .L36+4
	mov	r8, r0
	ldr	r1, [r9]
	mov	r0, r6
	bl	cobalt_read_bar1
	ldr	r4, .L36+8
	mov	r10, r0
	ldr	r1, [r4]
	mov	r0, r6
	bl	cobalt_read_bar1
	mov	r7, r0
	lsl	r8, r8, #16
	lsr	r8, r8, #16
	mov	r2, r8
	ldr	r1, [r5]
	mov	r0, r6
	bl	cobalt_write_bar0
	ldr	fp, .L36+12
	ldr	r1, [r9]
	bic	r2, r10, r7
	mov	r0, r6
	bl	cobalt_write_bar1
	mov	r2, r7
	mov	r0, r6
	ldr	r1, [r4]
	bl	cobalt_write_bar1
	ldr	r2, [fp]
	cmp	r2, #0
	ble	.L2
	mov	r4, #0
	b	.L6
.L3:
	ldr	r3, [r5, #20]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [r5, #8]
	tst	r7, r3
	bne	.L34
.L5:
	and	r3, r7, r10
	tst	r3, r9
	bne	.L35
.L4:
	ldr	r3, [fp]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L6:
	ldr	r2, [r6, #36]
	add	r1, r4, r4, lsl #1
	add	r5, r2, r1, lsl #3
	ldr	r3, [r5, #4]
	ldr	r9, [r2, r1, lsl #3]
	asr	r3, r8, r3
	tst	r3, #1
	beq	.L3
	ldr	r2, [r6, #32]
	mov	r0, r5
	ldr	r3, [r2, r4, lsl #2]
	add	r3, r3, #1
	str	r3, [r2, r4, lsl #2]
	bl	cobalt_dma_stream_queue_handler
	ldr	r3, [r5, #20]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L36+4
	bic	r7, r7, r9
	mov	r0, r6
	ldr	r1, [r3]
	bic	r2, r10, r7
	bl	cobalt_write_bar1
	b	.L3
.L35:
	add	r0, r5, #12
	bl	vb2_is_streaming
	cmp	r0, #0
	beq	.L4
	mov	r1, r4
	ldr	r0, .L36+16
	bl	cobalt_info
	ldr	r3, [r6, #28]
	add	r4, r4, #1
	add	r3, r3, #1
	str	r3, [r6, #28]
	ldr	r3, [fp]
	cmp	r3, r4
	bgt	.L6
.L2:
	add	r1, r6, #20
	ldr	r0, [r6, #24]
	bl	queue_work
	ldr	r3, .L36+20
	ldr	r2, .L36+24
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L36+28
	orr	r3, r3, r2
	ldr	r2, .L36+32
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	ldr	r1, .L36+36
	orr	r3, r3, r2
	ldr	r2, .L36+40
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	and	r7, r7, r10
	tst	r3, r7
	ldrne	r3, [r6, #16]
	ldr	r0, .L36+44
	addne	r3, r3, #1
	strne	r3, [r6, #16]
	ldr	r3, .L36+48
	ldr	r1, .L36+52
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r0
	ldr	r0, .L36+56
	orr	r3, r3, r1
	ldr	r1, .L36+60
	ldr	r0, [r0]
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r1
	tst	r3, r7
	ldrne	r3, [r6, #12]
	addne	r3, r3, #1
	strne	r3, [r6, #12]
	tst	r7, r2
	beq	.L9
	ldr	r3, [r6, #8]
	cmp	r8, #0
	add	r3, r3, #1
	str	r3, [r6, #8]
	beq	.L11
.L10:
	ldr	r3, [r6, #4]
	add	r3, r3, #1
	str	r3, [r6, #4]
.L11:
	ldr	r3, .L36
	mov	r0, r6
	ldr	r1, [r3]
	bl	cobalt_read_bar0
	ldr	r3, .L36+64
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	ldr	r3, .L36+68
	add	r1, r5, #16
	ldr	r0, [r3]
	bl	set_bit
	b	.L5
.L9:
	cmp	r8, #0
	bne	.L10
	cmp	r7, #0
	ldreq	r3, [r6]
	addeq	r3, r3, #1
	streq	r3, [r6]
	b	.L11
.L37:
	.align	2
.L36:
	.word	DMA_INTERRUPT_STATUS_REG
	.word	COBALT_SYS_STAT_MASK
	.word	COBALT_SYS_STAT_EDGE
	.word	COBALT_NUM_STREAMS
	.word	.LC0
	.word	COBALT_SYSSTAT_VI0_INT1_MSK
	.word	COBALT_SYSSTAT_VI1_INT1_MSK
	.word	COBALT_SYSSTAT_VI2_INT1_MSK
	.word	COBALT_SYSSTAT_VI3_INT1_MSK
	.word	COBALT_SYSSTAT_VIHSMA_INT1_MSK
	.word	COBALT_SYSSTAT_VOHSMA_INT1_MSK
	.word	COBALT_SYSSTAT_VI1_INT2_MSK
	.word	COBALT_SYSSTAT_VI0_INT2_MSK
	.word	COBALT_SYSSTAT_VI2_INT2_MSK
	.word	COBALT_SYSSTAT_VI3_INT2_MSK
	.word	COBALT_SYSSTAT_VIHSMA_INT2_MSK
	.word	IRQ_HANDLED
	.word	COBALT_STREAM_FL_ADV_IRQ
	.size	cobalt_irq_handler, .-cobalt_irq_handler
	.comm	IRQ_HANDLED,4,4
	.comm	DMA_INTERRUPT_STATUS_REG,4,4
	.comm	COBALT_SYS_STAT_MASK,4,4
	.comm	COBALT_SYS_STAT_EDGE,4,4
	.comm	COBALT_SYSSTAT_VOHSMA_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VIHSMA_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VIHSMA_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI3_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI3_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI2_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI2_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI1_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI1_INT1_MSK,4,4
	.comm	COBALT_SYSSTAT_VI0_INT2_MSK,4,4
	.comm	COBALT_SYSSTAT_VI0_INT1_MSK,4,4
	.comm	COBALT_STREAM_FL_ADV_IRQ,4,4
	.comm	COBALT_NUM_STREAMS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
