	.file	"extr_ni_mio_common.c_ni_ao_fifo_load.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ni_ao_fifo_load, @function
ni_ao_fifo_load:
.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
	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, 40
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR [rdi]
	mov	DWORD PTR 8[rsp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	edx, edx
	jle	.L1
	mov	r14, rdi
	mov	r12, rsi
	lea	r15, 22[rsp]
	xor	ebx, ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR 0[rbp]
	movzx	r8d, WORD PTR 22[rsp]
	test	eax, eax
	je	.L13
.L4:
	mov	edx, DWORD PTR NI611X_AO_FIFO_DATA_REG[rip]
	mov	esi, r8d
	mov	rdi, r14
	mov	ebx, r13d
	call	ni_writel@PLT
	cmp	DWORD PTR 8[rsp], r13d
	jle	.L1
.L2:
	mov	edx, 1
	mov	rsi, r15
	lea	r13d, 1[rbx]
	mov	rdi, r12
	call	comedi_buf_read_samples@PLT
	cmp	QWORD PTR 8[rbp], 0
	jne	.L14
	movzx	esi, WORD PTR 22[rsp]
	mov	edx, DWORD PTR NI_E_AO_FIFO_DATA_REG[rip]
	mov	rdi, r14
	mov	ebx, r13d
	call	ni_writew@PLT
	cmp	DWORD PTR 8[rsp], r13d
	jg	.L2
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 40
	.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
.L13:
	.cfi_restore_state
	mov	edx, 1
	mov	rsi, r15
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], r8d
	call	comedi_buf_read_samples@PLT
	movzx	eax, WORD PTR 22[rsp]
	mov	r8d, DWORD PTR 12[rsp]
	lea	r13d, 2[rbx]
	sal	eax, 16
	or	r8d, eax
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ni_ao_fifo_load, .-ni_ao_fifo_load
	.comm	NI_E_AO_FIFO_DATA_REG,4,4
	.comm	NI611X_AO_FIFO_DATA_REG,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_ni_mio_common.c_ni_ao_fifo_load.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ni_ao_fifo_load, %function
ni_ao_fifo_load:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L15
	sub	sp, sp, #12
	subs	r8, r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	ldr	r6, [r0]
	ble	.L1
	mov	r9, r0
	mov	r7, r1
	mov	r5, #0
	ldr	r10, .L15+4
	b	.L2
.L13:
	ldr	r2, [r6]
	ldrh	fp, [sp, #2]
	cmp	r2, #0
	beq	.L12
.L4:
	mov	r1, fp
	mov	r0, r9
	ldr	r2, [r10]
	bl	ni_writel
	cmp	r8, r4
	mov	r5, r4
	ble	.L1
.L2:
	mov	r2, #1
	mov	r0, r7
	add	r1, sp, #2
	bl	comedi_buf_read_samples
	ldr	r3, [r6, #4]
	add	r4, r5, #1
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L15+8
	mov	r0, r9
	ldr	r2, [r3]
	ldrh	r1, [sp, #2]
	bl	ni_writew
	cmp	r8, r4
	mov	r5, r4
	bgt	.L2
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r2, #1
	mov	r0, r7
	add	r1, sp, #2
	bl	comedi_buf_read_samples
	ldrh	r2, [sp, #2]
	add	r4, r5, #2
	orr	fp, fp, r2, lsl #16
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	NI611X_AO_FIFO_DATA_REG
	.word	NI_E_AO_FIFO_DATA_REG
	.size	ni_ao_fifo_load, .-ni_ao_fifo_load
	.comm	NI_E_AO_FIFO_DATA_REG,4,4
	.comm	NI611X_AO_FIFO_DATA_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
