	.file	"extr_cb_pcidas.c_cb_pcidas_interrupt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"bug! encountered end of aquisition interrupt?"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"fifo overflow"
	.text
	.p2align 4
	.type	cb_pcidas_interrupt, @function
cb_pcidas_interrupt:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR [rsi], 0
	jne	.L2
	mov	eax, DWORD PTR IRQ_NONE[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 16[rsi]
	mov	rax, QWORD PTR thisboard[rip]
	mov	rdi, QWORD PTR AMCC_OP_REG_INTCSR[rip]
	mov	r13, QWORD PTR [r12]
	mov	ebx, DWORD PTR [rax]
	mov	rax, QWORD PTR devpriv[rip]
	mov	DWORD PTR 0[r13], 0
	add	rdi, QWORD PTR 40[rax]
	call	inl@PLT
	test	DWORD PTR INTCSR_INTR_ASSERTED[rip], eax
	jne	.L4
	mov	eax, DWORD PTR IRQ_NONE[rip]
	add	rsp, 8
	.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
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR AMCC_OP_REG_IMB4[rip]
	add	rdi, QWORD PTR 40[rax]
	call	inl_p@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rsi, QWORD PTR AMCC_OP_REG_INTCSR[rip]
	mov	edi, DWORD PTR [rax]
	add	rsi, QWORD PTR 40[rax]
	or	edi, DWORD PTR INTCSR_INBOX_INTR_STATUS[rip]
	call	outl@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR INT_ADCFIFO[rip]
	add	rdi, QWORD PTR 16[rax]
	call	inw@PLT
	mov	r14d, eax
	mov	eax, DWORD PTR DAHFI[rip]
	or	eax, DWORD PTR DAEMI[rip]
	test	eax, r14d
	jne	.L37
.L5:
	test	DWORD PTR ADHFI[rip], r14d
	jne	.L38
	mov	eax, DWORD PTR ADNEI[rip]
	or	eax, DWORD PTR EOBI[rip]
	test	eax, r14d
	je	.L10
	mov	ebx, 10000
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	sub	ebx, 1
	je	.L12
.L14:
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR INT_ADCFIFO[rip]
	add	rdi, QWORD PTR 16[rax]
	call	inw@PLT
	test	DWORD PTR ADNE[rip], eax
	je	.L12
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR 24[rax]
	call	inw@PLT
	mov	rdi, r12
	mov	esi, eax
	call	cfc_write_to_buffer@PLT
	mov	rax, QWORD PTR TRIG_COUNT[rip]
	cmp	QWORD PTR 8[r13], rax
	jne	.L13
	mov	rdx, QWORD PTR devpriv[rip]
	sub	DWORD PTR 4[rdx], 1
	jne	.L13
	mov	rsi, r12
	mov	rdi, rbp
	call	cb_pcidas_cancel@PLT
	mov	eax, DWORD PTR COMEDI_CB_EOA[rip]
	or	DWORD PTR 0[r13], eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	mov	eax, ebx
	mov	rcx, QWORD PTR TRIG_COUNT[rip]
	shr	eax, 31
	add	ebx, eax
	mov	rax, QWORD PTR devpriv[rip]
	sar	ebx
	cmp	QWORD PTR 8[r13], rcx
	jne	.L7
	mov	edx, DWORD PTR 4[rax]
	cmp	ebx, edx
	cmova	ebx, edx
.L7:
	mov	esi, DWORD PTR 32[rax]
	mov	rdi, QWORD PTR ADCDATA[rip]
	mov	edx, ebx
	add	rdi, QWORD PTR 24[rax]
	call	insw@PLT
	mov	rax, QWORD PTR devpriv[rip]
	lea	edx, [rbx+rbx]
	mov	rdi, r12
	mov	esi, DWORD PTR 32[rax]
	call	cfc_write_array_to_buffer@PLT
	mov	rdx, QWORD PTR devpriv[rip]
	mov	rcx, QWORD PTR TRIG_COUNT[rip]
	mov	eax, DWORD PTR 4[rdx]
	sub	eax, ebx
	mov	DWORD PTR 4[rdx], eax
	cmp	QWORD PTR 8[r13], rcx
	jne	.L12
	test	eax, eax
	je	.L39
.L12:
	lea	rbx, 8[rbp]
	xor	r15d, r15d
	mov	rsi, r15
	mov	rdi, rbx
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rsi, QWORD PTR INT_ADCFIFO[rip]
	mov	edi, DWORD PTR 8[rax]
	add	rsi, QWORD PTR 16[rax]
	or	edi, DWORD PTR INT[rip]
	call	outw@PLT
	mov	rsi, r15
	mov	rdi, rbx
	call	spin_unlock_irqrestore@PLT
.L9:
	test	DWORD PTR LADFUL[rip], r14d
	jne	.L40
.L16:
	mov	rsi, r12
	mov	rdi, rbp
	call	comedi_event@PLT
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	add	rsp, 8
	.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
.L37:
	.cfi_restore_state
	mov	esi, r14d
	mov	rdi, rbp
	call	handle_ao_interrupt@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L40:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	lea	r14, 8[rbp]
	xor	r15d, r15d
	call	comedi_error@PLT
	mov	rsi, r15
	mov	rdi, r14
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rsi, QWORD PTR INT_ADCFIFO[rip]
	mov	edi, DWORD PTR 8[rax]
	add	rsi, QWORD PTR 16[rax]
	or	edi, DWORD PTR LADFUL[rip]
	call	outw@PLT
	mov	rsi, r15
	mov	rdi, r14
	call	spin_unlock_irqrestore@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	cb_pcidas_cancel@PLT
	mov	eax, DWORD PTR COMEDI_CB_EOA[rip]
	or	eax, DWORD PTR COMEDI_CB_ERROR[rip]
	or	DWORD PTR 0[r13], eax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L10:
	test	DWORD PTR EOAI[rip], r14d
	je	.L9
	mov	rdi, rbp
	lea	rbx, 8[rbp]
	xor	r15d, r15d
	lea	rsi, .LC0[rip]
	call	comedi_error@PLT
	mov	rsi, r15
	mov	rdi, rbx
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rsi, QWORD PTR INT_ADCFIFO[rip]
	mov	edi, DWORD PTR 8[rax]
	add	rsi, QWORD PTR 16[rax]
	or	edi, DWORD PTR EOAI[rip]
	call	outw@PLT
	mov	rsi, r15
	mov	rdi, rbx
	call	spin_unlock_irqrestore@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L39:
	mov	eax, DWORD PTR COMEDI_CB_EOA[rip]
	or	DWORD PTR 0[r13], eax
	mov	rsi, r12
	mov	rdi, rbp
	call	cb_pcidas_cancel@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	cb_pcidas_interrupt, .-cb_pcidas_interrupt
	.comm	thisboard,8,8
	.comm	devpriv,8,8
	.comm	TRIG_COUNT,8,8
	.comm	LADFUL,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	INT_ADCFIFO,8,8
	.comm	INTCSR_INTR_ASSERTED,4,4
	.comm	INTCSR_INBOX_INTR_STATUS,4,4
	.comm	INT,4,4
	.comm	EOBI,4,4
	.comm	EOAI,4,4
	.comm	DAHFI,4,4
	.comm	DAEMI,4,4
	.comm	COMEDI_CB_ERROR,4,4
	.comm	COMEDI_CB_EOA,4,4
	.comm	AMCC_OP_REG_MBEF,8,8
	.comm	AMCC_OP_REG_INTCSR,8,8
	.comm	AMCC_OP_REG_IMB4,8,8
	.comm	ADNEI,4,4
	.comm	ADNE,4,4
	.comm	ADHFI,4,4
	.comm	ADCDATA,8,8
	.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_cb_pcidas.c_cb_pcidas_interrupt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bug! encountered end of aquisition interrupt?\000"
	.align	2
.LC1:
	.ascii	"fifo overflow\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cb_pcidas_interrupt, %function
cb_pcidas_interrupt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L38
	ldr	r0, [r3]
	bx	lr
.L2:
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	mov	r2, #0
	ldr	fp, .L38+4
	ldr	r6, [r4, #8]
	ldr	r0, [fp]
	ldr	r9, .L38+8
	ldr	r1, .L38+12
	ldr	ip, [r0, #24]
	ldr	r1, [r1]
	ldr	r0, [r9]
	ldr	r7, [r6]
	ldr	r5, [r1]
	sub	sp, sp, #12
	str	r2, [r7]
	add	r0, ip, r0
	bl	inl
	ldr	r2, .L38+16
	ldr	r2, [r2]
	tst	r0, r2
	bne	.L4
	ldr	r3, .L38
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r1, [fp]
	ldr	r2, .L38+20
	ldr	r0, [r1, #24]
	ldr	r2, [r2]
	ldr	r8, .L38+24
	add	r0, r0, r2
	bl	inl_p
	ldr	r2, [fp]
	ldr	lr, .L38+28
	ldr	ip, [r2, #24]
	ldr	r0, [r2]
	ldr	r1, [r9]
	ldr	r2, [lr]
	add	r1, ip, r1
	orr	r0, r0, r2
	bl	outl
	ldr	r1, [fp]
	ldr	r2, [r8]
	ldr	r0, [r1, #12]
	add	r0, r0, r2
	bl	inw
	ldr	r2, .L38+32
	ldr	r1, .L38+36
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r0, [sp, #4]
	orr	r2, r2, r1
	tst	r2, r0
	bne	.L34
.L5:
	ldr	r2, .L38+40
	ldr	r3, [sp, #4]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L35
	ldr	r2, .L38+44
	ldr	r1, .L38+48
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r3, [sp, #4]
	orr	r2, r2, r1
	tst	r2, r3
	beq	.L10
	ldr	r5, .L38+52
	ldr	r10, .L38+56
	ldr	r9, .L38+60
	b	.L14
.L13:
	subs	r5, r5, #1
	beq	.L12
.L14:
	ldr	r1, [fp]
	ldr	r2, [r8]
	ldr	r0, [r1, #12]
	add	r0, r0, r2
	bl	inw
	ldr	r2, [r10]
	tst	r0, r2
	beq	.L12
	ldr	r2, [fp]
	ldr	r0, [r2, #16]
	bl	inw
	mov	r1, r0
	mov	r0, r6
	bl	cfc_write_to_buffer
	ldr	r1, [r7, #4]
	ldr	r2, [r9]
	cmp	r1, r2
	bne	.L13
	ldr	r1, [fp]
	ldr	r2, [r1, #4]
	sub	r2, r2, #1
	cmp	r2, #0
	str	r2, [r1, #4]
	bne	.L13
	mov	r1, r6
	mov	r0, r4
	bl	cb_pcidas_cancel
	ldr	r1, .L38+64
	ldr	r2, [r7]
	ldr	r1, [r1]
	orr	r2, r2, r1
	str	r2, [r7]
	b	.L12
.L35:
	ldr	r10, .L38+60
	ldr	r1, [r7, #4]
	ldr	r2, [r10]
	add	r5, r5, r5, lsr #31
	cmp	r1, r2
	asr	r5, r5, #1
	ldr	r2, [fp]
	bne	.L7
	ldr	r1, [r2, #4]
	cmp	r5, r1
	movcs	r5, r1
.L7:
	ldr	r1, .L38+68
	ldr	ip, [r2, #16]
	ldr	r0, [r1]
	ldr	r1, [r2, #20]
	add	r0, ip, r0
	mov	r2, r5
	bl	insw
	ldr	r1, [fp]
	lsl	r2, r5, #1
	ldr	r1, [r1, #20]
	mov	r0, r6
	bl	cfc_write_array_to_buffer
	ldr	r1, [fp]
	ldr	ip, [r7, #4]
	ldr	r2, [r1, #4]
	ldr	r0, [r10]
	sub	r5, r2, r5
	cmp	ip, r0
	cmpeq	r5, #0
	str	r5, [r1, #4]
	beq	.L36
.L12:
	mov	r5, #0
	add	r10, r4, #4
	mov	r1, r5
	mov	r0, r10
	bl	spin_lock_irqsave
	ldr	r2, [fp]
	ldr	lr, .L38+72
	ldr	ip, [r2, #12]
	ldr	r0, [r2, #8]
	ldr	r1, [r8]
	ldr	r2, [lr]
	add	r1, ip, r1
	orr	r0, r0, r2
	bl	outw
	mov	r1, r5
	mov	r0, r10
	bl	spin_unlock_irqrestore
.L9:
	ldr	r10, .L38+76
	ldr	r3, [sp, #4]
	ldr	r2, [r10]
	tst	r3, r2
	bne	.L37
.L16:
	mov	r1, r6
	mov	r0, r4
	bl	comedi_event
	ldr	r3, .L38+80
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	mov	r1, r0
	mov	r0, r4
	bl	handle_ao_interrupt
	b	.L5
.L37:
	mov	r5, #0
	ldr	r1, .L38+84
	add	r9, r4, #4
	mov	r0, r4
	bl	comedi_error
	mov	r1, r5
	mov	r0, r9
	bl	spin_lock_irqsave
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	ip, [r3, #12]
	ldr	r0, [r3, #8]
	ldr	r1, [r8]
	orr	r0, r0, r2
	add	r1, ip, r1
	bl	outw
	mov	r1, r5
	mov	r0, r9
	bl	spin_unlock_irqrestore
	mov	r1, r6
	mov	r0, r4
	bl	cb_pcidas_cancel
	ldr	r3, .L38+88
	ldr	r2, .L38+64
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r7]
	orr	r2, r2, r1
	orr	r3, r3, r2
	str	r3, [r7]
	b	.L16
.L10:
	ldr	r10, .L38+92
	ldr	r3, [sp, #4]
	ldr	r2, [r10]
	tst	r3, r2
	beq	.L9
	mov	r5, #0
	add	r9, r4, #4
	mov	r0, r4
	ldr	r1, .L38+96
	bl	comedi_error
	mov	r1, r5
	mov	r0, r9
	bl	spin_lock_irqsave
	ldr	r2, [fp]
	ldr	r0, [r10]
	ldr	ip, [r2, #8]
	ldr	r1, [r2, #12]
	ldr	r2, [r8]
	orr	r0, ip, r0
	add	r1, r1, r2
	bl	outw
	mov	r1, r5
	mov	r0, r9
	bl	spin_unlock_irqrestore
	b	.L9
.L36:
	ldr	r1, .L38+64
	ldr	r2, [r7]
	ldr	r0, [r1]
	mov	r1, r6
	orr	r2, r2, r0
	str	r2, [r7]
	mov	r0, r4
	bl	cb_pcidas_cancel
	b	.L12
.L39:
	.align	2
.L38:
	.word	IRQ_NONE
	.word	devpriv
	.word	AMCC_OP_REG_INTCSR
	.word	thisboard
	.word	INTCSR_INTR_ASSERTED
	.word	AMCC_OP_REG_IMB4
	.word	INT_ADCFIFO
	.word	INTCSR_INBOX_INTR_STATUS
	.word	DAHFI
	.word	DAEMI
	.word	ADHFI
	.word	ADNEI
	.word	EOBI
	.word	10000
	.word	ADNE
	.word	TRIG_COUNT
	.word	COMEDI_CB_EOA
	.word	ADCDATA
	.word	INT
	.word	LADFUL
	.word	IRQ_HANDLED
	.word	.LC1
	.word	COMEDI_CB_ERROR
	.word	EOAI
	.word	.LC0
	.size	cb_pcidas_interrupt, .-cb_pcidas_interrupt
	.comm	thisboard,4,4
	.comm	devpriv,4,4
	.comm	TRIG_COUNT,4,4
	.comm	LADFUL,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	INT_ADCFIFO,4,4
	.comm	INTCSR_INTR_ASSERTED,4,4
	.comm	INTCSR_INBOX_INTR_STATUS,4,4
	.comm	INT,4,4
	.comm	EOBI,4,4
	.comm	EOAI,4,4
	.comm	DAHFI,4,4
	.comm	DAEMI,4,4
	.comm	COMEDI_CB_ERROR,4,4
	.comm	COMEDI_CB_EOA,4,4
	.comm	AMCC_OP_REG_MBEF,4,4
	.comm	AMCC_OP_REG_INTCSR,4,4
	.comm	AMCC_OP_REG_IMB4,4,4
	.comm	ADNEI,4,4
	.comm	ADNE,4,4
	.comm	ADHFI,4,4
	.comm	ADCDATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
