	.file	"extr_adl_pci9118.c_pci9118_ai_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"range/channel list is too long for actual configuration!\n"
	.align 8
.LC1:
	.string	"cmd->scan_begin_src=TRIG_TIMER works only with bus mastering!\n"
	.align 8
.LC2:
	.string	"Unable to determine acquisition mode! BUG in (*do_cmdtest)?\n"
	.text
	.p2align 4
	.type	pci9118_ai_cmd, @function
pci9118_ai_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 8[rsi]
	mov	rbx, QWORD PTR 24[rdi]
	mov	r13, QWORD PTR 16[rdi]
	mov	rdx, QWORD PTR TRIG_EXT[rip]
	mov	r9d, DWORD PTR 8[rbp]
	mov	DWORD PTR 88[rbx], 0
	mov	QWORD PTR 4[rbx], 0
	mov	DWORD PTR [rbx], r9d
	cmp	QWORD PTR 16[rbp], rdx
	jne	.L2
	mov	eax, DWORD PTR START_AI_EXT[rip]
	mov	DWORD PTR 88[rbx], eax
.L2:
	mov	rax, QWORD PTR 24[rbp]
	cmp	rdx, rax
	jne	.L3
	mov	edx, DWORD PTR STOP_AI_EXT[rip]
	or	DWORD PTR 88[rbx], edx
	mov	DWORD PTR 12[rbx], 1
.L3:
	cmp	rax, QWORD PTR TRIG_NONE[rip]
	jne	.L4
	mov	DWORD PTR 12[rbx], 1
.L4:
	cmp	rax, QWORD PTR TRIG_COUNT[rip]
	jne	.L5
	mov	DWORD PTR 12[rbx], 0
.L5:
	cmp	QWORD PTR 80[rbx], 0
	mov	ecx, DWORD PTR 32[rbp]
	mov	rax, QWORD PTR 40[rbp]
	mov	rdx, QWORD PTR TRIG_NOW[rip]
	je	.L6
	mov	DWORD PTR 16[rbx], 1
	and	r9d, DWORD PTR CMDF_WAKE_EOS[rip]
	jne	.L68
.L7:
	mov	r10d, DWORD PTR 60[rbp]
	cmp	rax, rdx
	je	.L12
.L65:
	lea	esi, [r9+r10]
	xor	r8d, r8d
.L13:
	mov	eax, ecx
	cdq
	idiv	r10d
	imul	eax, esi
	mov	DWORD PTR 28[rbx], eax
	cmp	DWORD PTR [r14], esi
	jb	.L69
	mov	ecx, DWORD PTR 68[rbp]
	mov	edx, r10d
	mov	rsi, r14
	mov	rdi, r12
	call	pci9118_set_chanlist@PLT
	mov	rax, QWORD PTR 48[rbp]
	mov	rdx, QWORD PTR TRIG_TIMER[rip]
	mov	DWORD PTR 32[rbx], 0
	cmp	rax, rdx
	je	.L28
	cmp	rdx, QWORD PTR 40[rbp]
	je	.L70
	cmp	rax, QWORD PTR TRIG_FOLLOW[rip]
	jne	.L44
.L43:
	mov	rax, QWORD PTR TRIG_EXT[rip]
	cmp	QWORD PTR 40[rbp], rax
	je	.L42
.L32:
	mov	ecx, DWORD PTR 32[rbx]
	test	ecx, ecx
	je	.L44
.L33:
	mov	edx, DWORD PTR 16[rbx]
	test	edx, edx
	je	.L34
	mov	eax, DWORD PTR PCI9118_AI_CTRL_DMA[rip]
	or	DWORD PTR 56[rbx], eax
.L34:
	mov	edi, DWORD PTR PCI9118_AI_CFG_PDTRG[rip]
	or	edi, DWORD PTR PCI9118_AI_CFG_PETRG[rip]
	mov	DWORD PTR 36[rbx], edi
	mov	rsi, QWORD PTR PCI9118_AI_CFG_REG[rip]
	add	rsi, QWORD PTR [r12]
	call	outl@PLT
	mov	edi, 1
	call	udelay@PLT
	mov	rdi, r12
	call	pci9118_ai_reset_fifo@PLT
	mov	rdi, QWORD PTR PCI9118_AI_STATUS_REG[rip]
	add	rdi, QWORD PTR [r12]
	call	inl@PLT
	mov	rdi, QWORD PTR PCI9118_INT_CTRL_REG[rip]
	add	rdi, QWORD PTR [r12]
	call	inl@PLT
	mov	eax, DWORD PTR 16[rbx]
	mov	QWORD PTR 48[rbx], 0
	test	eax, eax
	je	.L35
	mov	rsi, r14
	mov	rdi, r12
	call	pci9118_ai_setup_dma@PLT
	mov	edi, DWORD PTR AINT_WRITE_COMPL[rip]
	mov	rsi, QWORD PTR AMCC_OP_REG_INTCSR[rip]
	add	rsi, QWORD PTR 40[rbx]
	or	edi, 33554432
	call	outl@PLT
.L36:
	mov	rax, QWORD PTR 16[rbp]
	cmp	rax, QWORD PTR TRIG_NOW[rip]
	je	.L71
	cmp	rax, QWORD PTR TRIG_INT[rip]
	jne	.L38
	mov	rdx, QWORD PTR 8[r14]
	mov	ecx, DWORD PTR pci9118_ai_inttrig[rip]
	mov	DWORD PTR [rdx], ecx
.L38:
	mov	rdx, QWORD PTR TRIG_EXT[rip]
	cmp	rdx, rax
	je	.L39
	xor	eax, eax
	cmp	rdx, QWORD PTR 24[rbp]
	jne	.L1
.L39:
	mov	rdi, r12
	mov	esi, 1
	call	pci9118_exttrg_enable@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L68:
	.cfi_restore_state
	cmp	ecx, 1
	je	.L72
	jle	.L64
	test	cl, 1
	je	.L64
	mov	rsi, QWORD PTR TRIG_FOLLOW[rip]
	cmp	QWORD PTR 48[rbp], rsi
	jne	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	mov	DWORD PTR 16[rbx], 0
.L64:
	mov	r10d, DWORD PTR 60[rbp]
	xor	r9d, r9d
	cmp	rax, rdx
	jne	.L65
.L12:
	mov	eax, DWORD PTR 20[rbx]
	test	eax, eax
	je	.L65
	mov	edi, DWORD PTR 16[rbx]
	mov	DWORD PTR 4[rbx], 2
	mov	esi, 1
	mov	r8d, 2
	cmp	edi, 1
	je	.L73
.L15:
	mov	r11d, DWORD PTR 56[rbp]
	mov	edx, DWORD PTR 24[rbx]
	cmp	r11d, edx
	jnb	.L16
	mov	DWORD PTR 56[rbp], edx
	mov	r11d, edx
.L16:
	xor	edx, edx
	div	r11d
	cmp	edx, 1
	sbb	eax, -1
	cmp	eax, esi
	jbe	.L66
	lea	r8d, 1[rax]
	lea	esi, [r8+r10]
	mov	DWORD PTR 4[rbx], r8d
	add	esi, r9d
	cmp	edi, 1
	jne	.L13
	test	sil, 1
	je	.L13
	lea	r8d, 2[rax]
	mov	DWORD PTR 4[rbx], r8d
	.p2align 4,,10
	.p2align 3
.L66:
	lea	esi, [r8+r10]
	add	esi, r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L70:
	cmp	rax, QWORD PTR TRIG_EXT[rip]
	mov	edx, DWORD PTR [rbx]
	lea	rsi, 56[rbp]
	mov	rdi, r13
	sete	al
	and	edx, DWORD PTR CMDF_ROUND_NEAREST[rip]
	movzx	eax, al
	lea	eax, 1[rax+rax*2]
	mov	DWORD PTR 32[rbx], eax
	call	comedi_8254_cascade_ns_to_timer@PLT
	mov	rdi, r13
	call	comedi_8254_update_divisors@PLT
	mov	r8d, DWORD PTR 16[rbx]
	mov	eax, DWORD PTR 56[rbx]
	or	eax, DWORD PTR PCI9118_AI_CTRL_TMRTR[rip]
	mov	DWORD PTR 56[rbx], eax
	test	r8d, r8d
	jne	.L26
	or	eax, DWORD PTR PCI9118_AI_CTRL_INT[rip]
	mov	DWORD PTR 56[rbx], eax
	mov	eax, DWORD PTR PCI9118_INT_CTRL_TIMER[rip]
	or	DWORD PTR 72[rbx], eax
.L26:
	mov	rax, QWORD PTR 48[rbp]
	cmp	rax, QWORD PTR TRIG_EXT[rip]
	je	.L74
.L27:
	cmp	QWORD PTR TRIG_TIMER[rip], rax
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rax, QWORD PTR TRIG_EXT[rip]
	cmp	QWORD PTR 40[rbp], rax
	je	.L75
	mov	edi, DWORD PTR 16[rbx]
	test	edi, edi
	je	.L76
	mov	eax, DWORD PTR 4[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	r9d, DWORD PTR 28[rbx]
	lea	rcx, 56[rbp]
	mov	DWORD PTR 32[rbx], 2
	lea	rdx, 64[rbp]
	mov	rsi, r14
	mov	rdi, r12
	push	rax
	.cfi_def_cfa_offset 80
	mov	r8d, DWORD PTR [rbx]
	push	r13
	.cfi_def_cfa_offset 88
	add	r13, 4
	push	r13
	.cfi_def_cfa_offset 96
	call	pci9118_calc_divisors@PLT
	mov	eax, DWORD PTR PCI9118_AI_CTRL_TMRTR[rip]
	or	DWORD PTR 56[rbx], eax
	add	rsp, 32
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR PCI9118_AI_CFG_BM[rip]
	or	eax, DWORD PTR PCI9118_AI_CFG_BS[rip]
	or	eax, DWORD PTR 36[rbx]
	mov	rcx, QWORD PTR TRIG_NOW[rip]
	mov	DWORD PTR 36[rbx], eax
	cmp	QWORD PTR 40[rbp], rcx
	je	.L77
.L31:
	mov	edi, DWORD PTR 28[rbx]
	mov	rsi, QWORD PTR PCI9118_AI_BURST_NUM_REG[rip]
	add	rsi, QWORD PTR [r12]
	call	outl@PLT
	mov	rax, QWORD PTR 48[rbp]
.L29:
	cmp	QWORD PTR TRIG_FOLLOW[rip], rax
	jne	.L32
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L69:
	mov	edi, DWORD PTR 8[r12]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	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
.L44:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[r12]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[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
	neg	eax
	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
.L72:
	.cfi_restore_state
	xor	r9d, r9d
	cmp	rax, rdx
	jne	.L9
	mov	DWORD PTR 8[rbx], 1
	mov	r9d, 1
.L9:
	cmp	QWORD PTR TRIG_TIMER[rip], rax
	jne	.L7
	mov	DWORD PTR 16[rbx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L75:
	mov	rax, QWORD PTR 48[rbp]
	cmp	QWORD PTR TRIG_FOLLOW[rip], rax
	jne	.L32
.L42:
	mov	eax, DWORD PTR PCI9118_AI_CTRL_EXTM[rip]
	mov	DWORD PTR 32[rbx], 3
	or	DWORD PTR 56[rbx], eax
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L35:
	mov	esi, 1
	mov	rdi, r12
	call	pci9118_amcc_int_ena@PLT
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L71:
	mov	rdi, r12
	call	pci9118_ai_cmd_start@PLT
	mov	rax, QWORD PTR 16[rbp]
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L73:
	mov	esi, edi
	cmp	r9d, 1
	jne	.L15
	mov	QWORD PTR 4[rbx], 3
	xor	r9d, r9d
	mov	esi, 2
	mov	r8d, 3
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L76:
	mov	edi, DWORD PTR 8[r12]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	DWORD PTR 8[rbx], 1
	mov	r9d, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L77:
	mov	esi, DWORD PTR 20[rbx]
	test	esi, esi
	jne	.L31
	or	eax, DWORD PTR PCI9118_AI_CFG_BSSH[rip]
	mov	DWORD PTR 36[rbx], eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L74:
	mov	edi, DWORD PTR 36[rbx]
	or	edi, DWORD PTR PCI9118_AI_CFG_AM[rip]
	mov	r15, QWORD PTR 64[rbx]
	mov	rsi, QWORD PTR PCI9118_AI_CFG_REG[rip]
	mov	DWORD PTR 36[rbx], edi
	add	rsi, QWORD PTR [r12]
	call	outl@PLT
	mov	edx, DWORD PTR [r15]
	mov	ecx, DWORD PTR I8254_MODE0[rip]
	xor	esi, esi
	or	ecx, DWORD PTR I8254_BINARY[rip]
	mov	rdi, r13
	sar	edx
	call	comedi_8254_load@PLT
	mov	eax, DWORD PTR PCI9118_AI_CFG_START[rip]
	or	DWORD PTR 36[rbx], eax
	mov	rax, QWORD PTR 48[rbp]
	jmp	.L27
	.cfi_endproc
.LFE0:
	.size	pci9118_ai_cmd, .-pci9118_ai_cmd
	.comm	pci9118_ai_inttrig,4,4
	.comm	TRIG_TIMER,8,8
	.comm	TRIG_NOW,8,8
	.comm	TRIG_NONE,8,8
	.comm	TRIG_INT,8,8
	.comm	TRIG_FOLLOW,8,8
	.comm	TRIG_EXT,8,8
	.comm	TRIG_COUNT,8,8
	.comm	STOP_AI_EXT,4,4
	.comm	START_AI_EXT,4,4
	.comm	PCI9118_INT_CTRL_TIMER,4,4
	.comm	PCI9118_INT_CTRL_REG,8,8
	.comm	PCI9118_AI_STATUS_REG,8,8
	.comm	PCI9118_AI_CTRL_TMRTR,4,4
	.comm	PCI9118_AI_CTRL_INT,4,4
	.comm	PCI9118_AI_CTRL_EXTM,4,4
	.comm	PCI9118_AI_CTRL_DMA,4,4
	.comm	PCI9118_AI_CFG_START,4,4
	.comm	PCI9118_AI_CFG_REG,8,8
	.comm	PCI9118_AI_CFG_PETRG,4,4
	.comm	PCI9118_AI_CFG_PDTRG,4,4
	.comm	PCI9118_AI_CFG_BSSH,4,4
	.comm	PCI9118_AI_CFG_BS,4,4
	.comm	PCI9118_AI_CFG_BM,4,4
	.comm	PCI9118_AI_CFG_AM,4,4
	.comm	PCI9118_AI_BURST_NUM_REG,8,8
	.comm	I8254_MODE0,4,4
	.comm	I8254_BINARY,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	CMDF_WAKE_EOS,4,4
	.comm	CMDF_ROUND_NEAREST,4,4
	.comm	AMCC_OP_REG_INTCSR,8,8
	.comm	AINT_WRITE_COMPL,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_adl_pci9118.c_pci9118_ai_cmd.c"
	.text
	.global	__aeabi_uidivmod
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"range/channel list is too long for actual configura"
	.ascii	"tion!\012\000"
	.align	2
.LC1:
	.ascii	"cmd->scan_begin_src=TRIG_TIMER works only with bus "
	.ascii	"mastering!\012\000"
	.align	2
.LC2:
	.ascii	"Unable to determine acquisition mode! BUG in (*do_c"
	.ascii	"mdtest)?\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci9118_ai_cmd, %function
pci9118_ai_cmd:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r3, #0
	ldr	r5, [r1, #4]
	ldr	r10, .L73
	ldr	r0, [r5, #8]
	ldr	r2, [r10]
	ldr	r4, [r6, #12]
	cmp	r0, r2
	mov	r8, r1
	ldr	r0, [r6, #8]
	ldr	r1, [r5, #4]
	str	r3, [r4, #64]
	str	r3, [r4, #4]
	str	r3, [r4, #8]
	ldreq	r3, .L73+4
	sub	sp, sp, #52
	ldreq	r3, [r3]
	str	r0, [sp, #36]
	streq	r3, [r4, #64]
	ldr	r3, [r5, #12]
	str	r1, [r4]
	cmp	r2, r3
	bne	.L3
	mov	ip, #1
	ldr	r0, .L73+8
	ldr	r2, [r4, #64]
	ldr	r0, [r0]
	str	ip, [r4, #12]
	orr	r2, r2, r0
	str	r2, [r4, #64]
.L3:
	ldr	r2, .L73+12
	ldr	r7, [r4, #60]
	ldr	r2, [r2]
	ldr	fp, .L73+16
	cmp	r3, r2
	moveq	r2, #1
	streq	r2, [r4, #12]
	ldr	r2, .L73+20
	ldr	r0, [fp]
	ldr	r2, [r2]
	cmp	r3, r2
	moveq	r3, #0
	streq	r3, [r4, #12]
	cmp	r7, #0
	ldr	r2, [r5, #16]
	ldr	r3, [r5, #20]
	streq	r7, [r4, #16]
	beq	.L7
	mov	ip, #1
	ldr	lr, .L73+24
	str	ip, [r4, #16]
	ldr	r7, [lr]
	ands	r7, r1, r7
	bne	.L64
.L7:
	cmp	r3, r0
	ldr	r9, [r5, #32]
	beq	.L12
	mov	r1, #0
	add	r3, r7, r9
	str	r1, [sp, #32]
.L13:
	mov	r0, r2
	mov	r1, r9
	str	r3, [sp, #28]
	bl	__aeabi_idiv
	ldr	r3, [sp, #28]
	ldr	r2, [r8]
	mul	r0, r3, r0
	cmp	r2, r3
	str	r0, [r4, #28]
	bcc	.L65
	ldr	r1, [sp, #32]
	ldr	r3, [r5, #40]
	mov	r2, r9
	str	r7, [sp, #4]
	str	r1, [sp]
	mov	r0, r6
	mov	r1, r8
	bl	pci9118_set_chanlist
	mov	r1, #0
	ldr	r7, .L73+28
	ldr	r3, [r5, #24]
	ldr	r2, [r7]
	str	r1, [r4, #32]
	cmp	r3, r2
	beq	.L28
	ldr	r1, [r5, #20]
	cmp	r2, r1
	beq	.L66
	ldr	r2, .L73+32
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L43
.L42:
	ldr	r3, [r10]
	cmp	r1, r3
	beq	.L41
.L32:
	ldr	r3, [r4, #32]
	cmp	r3, #0
	beq	.L43
.L33:
	ldr	r3, [r4, #16]
	ldr	r1, .L73+36
	cmp	r3, #0
	ldrne	r2, .L73+40
	ldrne	r3, [r4, #48]
	ldrne	r2, [r2]
	ldr	r0, [r1]
	orrne	r3, r3, r2
	ldr	r2, .L73+44
	strne	r3, [r4, #48]
	ldr	r3, .L73+48
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r6]
	orr	r0, r0, r2
	add	r1, r1, r3
	str	r0, [r4, #36]
	bl	outl
	mov	r0, #1
	bl	udelay
	mov	r0, r6
	bl	pci9118_ai_reset_fifo
	ldr	r3, .L73+52
	ldr	r0, [r6]
	ldr	r3, [r3]
	add	r0, r0, r3
	bl	inl
	ldr	r3, .L73+56
	ldr	r0, [r6]
	ldr	r3, [r3]
	add	r0, r0, r3
	bl	inl
	mov	r2, #0
	ldr	r3, [r4, #16]
	str	r2, [r4, #44]
	cmp	r3, r2
	beq	.L35
	mov	r1, r8
	mov	r0, r6
	bl	pci9118_ai_setup_dma
	ldr	r3, .L73+60
	ldr	r2, .L73+64
	ldr	r1, [r4, #40]
	ldr	r3, [r3]
	ldr	r0, [r2]
	add	r1, r1, r3
	orr	r0, r0, #33554432
	bl	outl
.L36:
	ldr	r2, [fp]
	ldr	r3, [r5, #8]
	cmp	r3, r2
	beq	.L67
	ldr	r2, .L73+68
	ldr	r2, [r2]
	cmp	r3, r2
	ldreq	r1, .L73+72
	ldreq	r2, [r8, #4]
	ldreq	r1, [r1]
	streq	r1, [r2]
.L38:
	ldr	r2, [r10]
	cmp	r2, r3
	beq	.L39
	ldr	r3, [r5, #12]
	cmp	r2, r3
	movne	r0, #0
	bne	.L1
.L39:
	mov	r0, r6
	mov	r1, #1
	bl	pci9118_exttrg_enable
	mov	r0, #0
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L64:
	cmp	r2, ip
	beq	.L68
	movle	r7, #0
	andgt	r7, r2, #1
	cmp	r7, #0
	beq	.L7
	ldr	r1, .L73+32
	ldr	lr, [r5, #24]
	ldr	r1, [r1]
	cmp	lr, r1
	moveq	r7, #0
	movne	r7, ip
	streq	r7, [r4, #16]
	strne	ip, [r4, #8]
	b	.L7
.L66:
	ldr	r2, [r10]
	ldr	r1, .L73+76
	cmp	r3, r2
	moveq	r3, #4
	movne	r3, #1
	ldr	r2, [r1]
	ldr	r9, [sp, #36]
	ldr	r1, [r4]
	str	r3, [r4, #32]
	and	r2, r2, r1
	mov	r0, r9
	add	r1, r5, #28
	bl	comedi_8254_cascade_ns_to_timer
	mov	r0, r9
	bl	comedi_8254_update_divisors
	ldr	r2, .L73+80
	ldr	r3, [r4, #48]
	ldr	r1, [r2]
	ldr	r2, [r4, #16]
	orr	r3, r3, r1
	cmp	r2, #0
	str	r3, [r4, #48]
	bne	.L26
	ldr	r2, .L73+84
	ldr	r1, .L73+88
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r3
	ldr	r3, [r4, #56]
	str	r2, [r4, #48]
	orr	r3, r3, r1
	str	r3, [r4, #56]
.L26:
	ldr	r3, [r5, #24]
	ldr	r1, [r10]
	mov	r2, r3
	cmp	r3, r1
	beq	.L69
.L27:
	ldr	r1, [r7]
	cmp	r1, r3
	bne	.L29
.L28:
	ldr	r1, [r5, #20]
	ldr	r2, [r10]
	cmp	r1, r2
	beq	.L70
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L71
	mov	r1, #2
	ldr	r0, [sp, #36]
	ldr	r2, [r4, #4]
	add	r3, r0, #4
	str	r1, [r4, #32]
	str	r0, [sp, #12]
	str	r3, [sp, #8]
	str	r2, [sp, #16]
	ldr	r2, [r4, #28]
	add	r3, r5, #28
	str	r2, [sp, #4]
	ldr	r1, [r4]
	add	r2, r5, #36
	str	r1, [sp]
	mov	r0, r6
	mov	r1, r8
	bl	pci9118_calc_divisors
	ldr	r1, .L73+92
	ldr	r3, .L73+96
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, [r4, #36]
	ldr	r2, .L73+80
	orr	r3, r3, r0
	ldr	ip, [r2]
	ldr	r0, [r5, #20]
	ldr	r2, [r4, #48]
	orr	r3, r3, r1
	ldr	r1, [fp]
	orr	r2, r2, ip
	cmp	r0, r1
	str	r3, [r4, #36]
	str	r2, [r4, #48]
	bne	.L31
	ldr	r2, [r4, #20]
	cmp	r2, #0
	ldreq	r2, .L73+100
	ldreq	r2, [r2]
	orreq	r3, r2, r3
	streq	r3, [r4, #36]
.L31:
	ldr	r3, .L73+104
	ldr	r1, [r6]
	ldr	r3, [r3]
	ldr	r0, [r4, #28]
	add	r1, r1, r3
	bl	outl
	ldr	r2, [r5, #24]
.L29:
	ldr	r3, .L73+32
	ldr	r3, [r3]
	cmp	r3, r2
	bne	.L32
	ldr	r1, [r5, #20]
	b	.L42
.L65:
	ldr	r0, [r6, #4]
	ldr	r1, .L73+108
	bl	dev_err
	ldr	r3, .L73+112
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	ldr	r0, [r4, #20]
	cmp	r0, #0
	streq	r0, [sp, #32]
	addeq	r3, r7, r9
	beq	.L13
	mov	r1, #2
	ldr	r3, [r4, #16]
	str	r1, [r4, #4]
	cmp	r3, #1
	strne	r1, [sp, #32]
	movne	r1, #1
	strne	r1, [sp, #44]
	beq	.L72
.L15:
	ldr	r1, [r5, #28]
	ldr	ip, [r4, #24]
	str	r2, [sp, #40]
	cmp	r1, ip
	movcc	r1, ip
	strcc	ip, [r5, #28]
	str	r3, [sp, #28]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	ldr	r1, [sp, #44]
	addne	r0, r0, #1
	cmp	r0, r1
	ldr	r3, [sp, #28]
	ldr	r2, [sp, #40]
	bhi	.L18
	ldr	r3, [sp, #32]
	add	r3, r3, r9
	add	r3, r3, r7
	b	.L13
.L43:
	ldr	r0, [r6, #4]
	ldr	r1, .L73+116
	bl	dev_err
	ldr	r3, .L73+112
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L68:
	ldr	r1, .L73+28
	cmp	r3, r0
	ldr	r1, [r1]
	moveq	r7, r2
	movne	r7, #0
	streq	r2, [r4, #8]
	cmp	r1, r3
	moveq	r1, #0
	streq	r1, [r4, #16]
	b	.L7
.L70:
	ldr	r2, .L73+32
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L32
.L41:
	mov	r1, #3
	ldr	r2, .L73+120
	ldr	r3, [r4, #48]
	ldr	r2, [r2]
	str	r1, [r4, #32]
	orr	r3, r3, r2
	str	r3, [r4, #48]
	b	.L33
.L35:
	mov	r1, #1
	mov	r0, r6
	bl	pci9118_amcc_int_ena
	b	.L36
.L67:
	mov	r0, r6
	bl	pci9118_ai_cmd_start
	ldr	r3, [r5, #8]
	b	.L38
.L18:
	add	r1, r0, #1
	cmp	r3, #1
	add	r3, r1, r9
	str	r1, [sp, #32]
	str	r1, [r4, #4]
	add	r3, r3, r7
	bne	.L13
	tst	r3, #1
	addne	r1, r0, #2
	addne	r3, r1, r9
	strne	r1, [sp, #32]
	strne	r1, [r4, #4]
	addne	r3, r3, r7
	b	.L13
.L72:
	cmp	r7, #1
	strne	r1, [sp, #32]
	strne	r3, [sp, #44]
	bne	.L15
	mov	ip, #3
	mov	r7, #0
	str	r1, [sp, #44]
	str	ip, [r4, #4]
	str	ip, [sp, #32]
	str	r7, [r4, #8]
	b	.L15
.L71:
	ldr	r0, [r6, #4]
	ldr	r1, .L73+124
	bl	dev_err
	ldr	r3, .L73+128
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L69:
	ldr	r2, .L73+132
	ldr	r3, .L73+48
	ldr	r2, [r2]
	ldr	r0, [r4, #36]
	ldr	r3, [r3]
	ldr	r1, [r6]
	orr	r0, r0, r2
	add	r1, r1, r3
	str	r0, [r4, #36]
	ldr	r9, [r4, #52]
	bl	outl
	ldr	r1, .L73+136
	ldr	r3, .L73+140
	ldr	r1, [r1]
	ldr	r2, [r9]
	ldr	r3, [r3]
	asr	r2, r2, #1
	orr	r3, r1, r3
	ldr	r0, [sp, #36]
	mov	r1, #0
	bl	comedi_8254_load
	ldr	r1, .L73+144
	ldr	r3, [r5, #24]
	ldr	r0, [r1]
	ldr	r1, [r4, #36]
	mov	r2, r3
	orr	r1, r1, r0
	str	r1, [r4, #36]
	b	.L27
.L74:
	.align	2
.L73:
	.word	TRIG_EXT
	.word	START_AI_EXT
	.word	STOP_AI_EXT
	.word	TRIG_NONE
	.word	TRIG_NOW
	.word	TRIG_COUNT
	.word	CMDF_WAKE_EOS
	.word	TRIG_TIMER
	.word	TRIG_FOLLOW
	.word	PCI9118_AI_CFG_PDTRG
	.word	PCI9118_AI_CTRL_DMA
	.word	PCI9118_AI_CFG_PETRG
	.word	PCI9118_AI_CFG_REG
	.word	PCI9118_AI_STATUS_REG
	.word	PCI9118_INT_CTRL_REG
	.word	AMCC_OP_REG_INTCSR
	.word	AINT_WRITE_COMPL
	.word	TRIG_INT
	.word	pci9118_ai_inttrig
	.word	CMDF_ROUND_NEAREST
	.word	PCI9118_AI_CTRL_TMRTR
	.word	PCI9118_AI_CTRL_INT
	.word	PCI9118_INT_CTRL_TIMER
	.word	PCI9118_AI_CFG_BS
	.word	PCI9118_AI_CFG_BM
	.word	PCI9118_AI_CFG_BSSH
	.word	PCI9118_AI_BURST_NUM_REG
	.word	.LC0
	.word	EINVAL
	.word	.LC2
	.word	PCI9118_AI_CTRL_EXTM
	.word	.LC1
	.word	EIO
	.word	PCI9118_AI_CFG_AM
	.word	I8254_MODE0
	.word	I8254_BINARY
	.word	PCI9118_AI_CFG_START
	.size	pci9118_ai_cmd, .-pci9118_ai_cmd
	.comm	pci9118_ai_inttrig,4,4
	.comm	TRIG_TIMER,4,4
	.comm	TRIG_NOW,4,4
	.comm	TRIG_NONE,4,4
	.comm	TRIG_INT,4,4
	.comm	TRIG_FOLLOW,4,4
	.comm	TRIG_EXT,4,4
	.comm	TRIG_COUNT,4,4
	.comm	STOP_AI_EXT,4,4
	.comm	START_AI_EXT,4,4
	.comm	PCI9118_INT_CTRL_TIMER,4,4
	.comm	PCI9118_INT_CTRL_REG,4,4
	.comm	PCI9118_AI_STATUS_REG,4,4
	.comm	PCI9118_AI_CTRL_TMRTR,4,4
	.comm	PCI9118_AI_CTRL_INT,4,4
	.comm	PCI9118_AI_CTRL_EXTM,4,4
	.comm	PCI9118_AI_CTRL_DMA,4,4
	.comm	PCI9118_AI_CFG_START,4,4
	.comm	PCI9118_AI_CFG_REG,4,4
	.comm	PCI9118_AI_CFG_PETRG,4,4
	.comm	PCI9118_AI_CFG_PDTRG,4,4
	.comm	PCI9118_AI_CFG_BSSH,4,4
	.comm	PCI9118_AI_CFG_BS,4,4
	.comm	PCI9118_AI_CFG_BM,4,4
	.comm	PCI9118_AI_CFG_AM,4,4
	.comm	PCI9118_AI_BURST_NUM_REG,4,4
	.comm	I8254_MODE0,4,4
	.comm	I8254_BINARY,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.comm	CMDF_WAKE_EOS,4,4
	.comm	CMDF_ROUND_NEAREST,4,4
	.comm	AMCC_OP_REG_INTCSR,4,4
	.comm	AINT_WRITE_COMPL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
