	.file	"extr_dt3000.c_dt3k_interrupt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dt3k_interrupt, @function
dt3k_interrupt:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR 8[rsi]
	test	eax, eax
	jne	.L2
	mov	eax, DWORD PTR IRQ_NONE[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rdi, QWORD PTR DPR_INTR_FLAG[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	add	rdi, QWORD PTR [rsi]
	mov	r12, QWORD PTR 16[rsi]
	call	readw@PLT
	mov	ebx, eax
	test	DWORD PTR DPR_INTR_ADFULL[rip], eax
	jne	.L17
.L4:
	mov	eax, DWORD PTR DPR_INTR_ADSWERR[rip]
	or	eax, DWORD PTR DPR_INTR_ADHWERR[rip]
	test	eax, ebx
	je	.L5
	mov	rax, QWORD PTR [r12]
	mov	edx, DWORD PTR COMEDI_CB_ERROR[rip]
	or	DWORD PTR [rax], edx
.L5:
	mov	eax, DWORD PTR debug_n_ints[rip]
	add	eax, 1
	mov	DWORD PTR debug_n_ints[rip], eax
	cmp	eax, 9
	jle	.L6
	mov	rax, QWORD PTR [r12]
	mov	edx, DWORD PTR COMEDI_CB_EOA[rip]
	or	DWORD PTR [rax], edx
.L6:
	mov	rsi, r12
	mov	rdi, rbp
	call	comedi_handle_events@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, rbp
	call	dt3k_ai_empty_fifo@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	dt3k_interrupt, .-dt3k_interrupt
	.comm	debug_n_ints,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	DPR_INTR_FLAG,8,8
	.comm	DPR_INTR_ADSWERR,4,4
	.comm	DPR_INTR_ADHWERR,4,4
	.comm	DPR_INTR_ADFULL,4,4
	.comm	COMEDI_CB_ERROR,4,4
	.comm	COMEDI_CB_EOA,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_dt3000.c_dt3k_interrupt.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dt3k_interrupt, %function
dt3k_interrupt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1, #4]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L18
	ldr	r0, [r3]
	bx	lr
.L2:
	ldr	r3, .L18+4
	ldr	r0, [r1]
	ldr	r3, [r3]
	push	{r4, r5, r6, lr}
	add	r0, r0, r3
	mov	r4, r1
	ldr	r6, [r1, #8]
	bl	readw
	ldr	r3, .L18+8
	mov	r5, r0
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L17
.L4:
	ldr	r3, .L18+12
	ldr	r2, .L18+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	tst	r3, r5
	beq	.L5
	ldr	r2, [r6]
	ldr	r1, .L18+20
	ldr	r3, [r2]
	ldr	r1, [r1]
	orr	r3, r3, r1
	str	r3, [r2]
.L5:
	ldr	r2, .L18+24
	ldr	r3, [r2]
	add	r3, r3, #1
	cmp	r3, #9
	str	r3, [r2]
	ble	.L6
	ldr	r2, [r6]
	ldr	r1, .L18+28
	ldr	r3, [r2]
	ldr	r1, [r1]
	orr	r3, r3, r1
	str	r3, [r2]
.L6:
	mov	r1, r6
	mov	r0, r4
	bl	comedi_handle_events
	ldr	r3, .L18+32
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L17:
	mov	r1, r6
	mov	r0, r4
	bl	dt3k_ai_empty_fifo
	b	.L4
.L19:
	.align	2
.L18:
	.word	IRQ_NONE
	.word	DPR_INTR_FLAG
	.word	DPR_INTR_ADFULL
	.word	DPR_INTR_ADSWERR
	.word	DPR_INTR_ADHWERR
	.word	COMEDI_CB_ERROR
	.word	debug_n_ints
	.word	COMEDI_CB_EOA
	.word	IRQ_HANDLED
	.size	dt3k_interrupt, .-dt3k_interrupt
	.comm	debug_n_ints,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	DPR_INTR_FLAG,4,4
	.comm	DPR_INTR_ADSWERR,4,4
	.comm	DPR_INTR_ADHWERR,4,4
	.comm	DPR_INTR_ADFULL,4,4
	.comm	COMEDI_CB_ERROR,4,4
	.comm	COMEDI_CB_EOA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
