	.file	"extr_hwdrv_apci3xxx.c_i_APCI3XXX_InsnReadAnalogInput.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Channel %d range %d selection error\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Channel %d selection error\n"
.LC2:
	.string	"Any conversion started\n"
.LC3:
	.string	"Buffer size error\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"Operating mode not configured\n"
	.text
	.p2align 4
	.globl	i_APCI3XXX_InsnReadAnalogInput
	.type	i_APCI3XXX_InsnReadAnalogInput, @function
i_APCI3XXX_InsnReadAnalogInput:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 4[rdx]
	mov	r13d, DWORD PTR [rdx]
	call	CR_RANGE@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	rbx, rax
	call	CR_CHAN@PLT
	mov	r14, rax
	mov	rax, QWORD PTR devpriv[rip]
	cmp	QWORD PTR 32[rax], 0
	je	.L2
	mov	rdx, QWORD PTR 24[rax]
	cmp	BYTE PTR [rdx], r14b
	ja	.L16
.L3:
	cmp	BYTE PTR 1[rdx], r14b
	jbe	.L5
	mov	rcx, QWORD PTR APCI3XXX_DIFF[rip]
	cmp	QWORD PTR [rax], rcx
	jne	.L5
.L4:
	cmp	bl, 7
	ja	.L17
	test	r13d, r13d
	js	.L1
	mov	ecx, DWORD PTR 0[rbp]
	test	ecx, ecx
	jle	.L8
	mov	rdi, r15
	call	i_APCI3XXX_TestConversionStarted@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR devpriv[rip]
	mov	edi, 65536
	mov	rsi, QWORD PTR 16[rax]
	add	rsi, 12
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR 16[rax]
	add	rdi, 4
	call	readl@PLT
	and	eax, -272
	mov	r15d, eax
	mov	rax, QWORD PTR devpriv[rip]
	mov	edi, r15d
	mov	rsi, QWORD PTR 16[rax]
	add	rsi, 4
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR [rax]
	mov	rsi, QWORD PTR 16[rax]
	mov	eax, ebx
	shr	bl, 2
	and	eax, 3
	sal	edi, 7
	or	eax, edi
	movzx	edi, bl
	sal	edi, 6
	or	edi, eax
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	edi, r15d
	or	edi, 256
	mov	rsi, QWORD PTR 16[rax]
	add	rsi, 4
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	movzx	edi, r14b
	mov	rsi, QWORD PTR 16[rax]
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	edi, r15d
	mov	rsi, QWORD PTR 16[rax]
	add	rsi, 4
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	edi, 1
	mov	rsi, QWORD PTR 16[rax]
	add	rsi, 48
	call	writel@PLT
	mov	rax, QWORD PTR devpriv[rip]
	mov	BYTE PTR 8[rax], 0
	mov	edx, DWORD PTR 0[rbp]
	mov	DWORD PTR 12[rax], 1
	test	edx, edx
	je	.L1
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, QWORD PTR 16[rax]
	mov	edi, 524288
	add	rsi, 8
	call	writel@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR 16[rax]
	add	rdi, 20
	call	readl@PLT
	test	al, 1
	je	.L10
	mov	eax, ebx
	add	ebx, 1
	lea	r14, [r12+rax*4]
	mov	rax, QWORD PTR devpriv[rip]
	mov	rdi, QWORD PTR 16[rax]
	add	rdi, 28
	call	readl@PLT
	mov	DWORD PTR [r14], eax
	cmp	DWORD PTR 0[rbp], ebx
	jbe	.L1
	mov	rax, QWORD PTR devpriv[rip]
	jmp	.L11
.L2:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	mov	r13d, -1
	call	printk@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L16:
	.cfi_restore_state
	mov	rcx, QWORD PTR APCI3XXX_SINGLE[rip]
	cmp	QWORD PTR [rax], rcx
	jne	.L3
	jmp	.L4
.L5:
	movzx	esi, r14b
	lea	rdi, .LC1[rip]
	xor	eax, eax
	mov	r13d, -3
	call	printk@PLT
	jmp	.L1
.L9:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	mov	r13d, -10
	call	printk@PLT
	jmp	.L1
.L17:
	movzx	edx, bl
	movzx	esi, r14b
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	printk@PLT
	mov	r13d, -4
	jmp	.L1
.L8:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	mov	r13d, -101
	call	printk@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	i_APCI3XXX_InsnReadAnalogInput, .-i_APCI3XXX_InsnReadAnalogInput
	.comm	devpriv,8,8
	.comm	APCI3XXX_SINGLE,8,8
	.comm	APCI3XXX_DIFF,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_hwdrv_apci3xxx.c_i_APCI3XXX_InsnReadAnalogInput.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Channel %d range %d selection error\012\000"
	.align	2
.LC1:
	.ascii	"Channel %d selection error\012\000"
	.align	2
.LC2:
	.ascii	"Any conversion started\012\000"
	.align	2
.LC3:
	.ascii	"Buffer size error\012\000"
	.align	2
.LC4:
	.ascii	"Operating mode not configured\012\000"
	.text
	.align	2
	.global	i_APCI3XXX_InsnReadAnalogInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	i_APCI3XXX_InsnReadAnalogInput, %function
i_APCI3XXX_InsnReadAnalogInput:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #12
	ldr	r0, [r2, #4]
	mov	r7, r2
	str	r3, [sp, #4]
	ldr	r8, [r2]
	bl	CR_RANGE
	ldr	r4, .L21
	mov	r9, r0
	ldr	r0, [r7, #4]
	bl	CR_CHAN
	ldr	r3, [r4]
	ldr	r1, [r3, #20]
	cmp	r1, #0
	beq	.L2
	ldr	r1, [r3, #16]
	and	r10, r0, #255
	ldrb	r0, [r1]	@ zero_extendqisi2
	and	r6, r9, #255
	cmp	r0, r10
	bhi	.L19
.L3:
	ldrb	r1, [r1, #1]	@ zero_extendqisi2
	cmp	r1, r10
	bls	.L5
	ldr	r0, .L21+4
	ldr	r1, [r3]
	ldr	r3, [r0]
	cmp	r1, r3
	bne	.L5
.L4:
	cmp	r6, #7
	bhi	.L20
	cmp	r8, #0
	blt	.L1
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L8
	mov	r0, r5
	bl	i_APCI3XXX_TestConversionStarted
	subs	r5, r0, #0
	bne	.L9
	ldr	r3, [r4]
	mov	r0, #65536
	ldr	r1, [r3, #12]
	and	r9, r9, #3
	add	r1, r1, #12
	bl	writel
	ldr	r3, [r4]
	ldr	r0, [r3, #12]
	add	r0, r0, #4
	bl	readl
	ldr	r3, [r4]
	bic	fp, r0, #268
	ldr	r1, [r3, #12]
	bic	fp, fp, #3
	add	r1, r1, #4
	mov	r0, fp
	bl	writel
	ldr	r3, [r4]
	lsr	r2, r6, #2
	ldr	r1, [r3]
	orr	r9, r9, r1, lsl #7
	orr	r0, r9, r2, lsl #6
	ldr	r1, [r3, #12]
	bl	writel
	ldr	r3, [r4]
	orr	r0, fp, #256
	ldr	r1, [r3, #12]
	add	r1, r1, #4
	bl	writel
	ldr	r3, [r4]
	mov	r0, r10
	ldr	r1, [r3, #12]
	bl	writel
	ldr	r3, [r4]
	mov	r0, fp
	ldr	r1, [r3, #12]
	add	r1, r1, #4
	bl	writel
	ldr	r3, [r4]
	mov	r0, #1
	ldr	r1, [r3, #12]
	add	r1, r1, #48
	bl	writel
	mov	r1, #1
	ldr	r2, [r4]
	strb	r5, [r2, #4]
	ldr	r3, [r7]
	str	r1, [r2, #8]
	cmp	r3, #0
	beq	.L1
	ldr	r3, [sp, #4]
	sub	r6, r3, #4
.L11:
	ldr	r1, [r2, #12]
	mov	r0, #524288
	add	r1, r1, #8
	bl	writel
.L10:
	ldr	r3, [r4]
	ldr	r0, [r3, #12]
	add	r0, r0, #20
	bl	readl
	tst	r0, #1
	beq	.L10
	ldr	r3, [r4]
	add	r5, r5, #1
	ldr	r0, [r3, #12]
	add	r0, r0, #28
	bl	readl
	str	r0, [r6, #4]!
	ldr	r3, [r7]
	cmp	r3, r5
	bls	.L1
	ldr	r2, [r4]
	b	.L11
.L2:
	ldr	r0, .L21+8
	bl	printk
	mvn	r8, #0
.L1:
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r0, .L21+12
	ldr	ip, [r3]
	ldr	r0, [r0]
	cmp	ip, r0
	bne	.L3
	b	.L4
.L5:
	mov	r1, r10
	ldr	r0, .L21+16
	bl	printk
	mvn	r8, #2
	b	.L1
.L9:
	ldr	r0, .L21+20
	bl	printk
	mvn	r8, #9
	b	.L1
.L20:
	mov	r2, r6
	mov	r1, r10
	ldr	r0, .L21+24
	bl	printk
	mvn	r8, #3
	b	.L1
.L8:
	ldr	r0, .L21+28
	bl	printk
	mvn	r8, #100
	b	.L1
.L22:
	.align	2
.L21:
	.word	devpriv
	.word	APCI3XXX_DIFF
	.word	.LC4
	.word	APCI3XXX_SINGLE
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.size	i_APCI3XXX_InsnReadAnalogInput, .-i_APCI3XXX_InsnReadAnalogInput
	.comm	devpriv,4,4
	.comm	APCI3XXX_SINGLE,4,4
	.comm	APCI3XXX_DIFF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
