	.file	"extr_ni_mio_common.c_ni_ao_prep_fifo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ni_ao_prep_fifo, @function
ni_ao_prep_fifo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	mov	esi, 1
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR [rdi]
	mov	edx, DWORD PTR NISTC_DAC_FIFO_CLR_REG[rip]
	mov	rbx, QWORD PTR 8[rdi]
	call	ni_stc_writew@PLT
	cmp	QWORD PTR 0[r13], 0
	jne	.L8
.L2:
	mov	rdi, r12
	call	comedi_buf_read_n_available@PLT
	mov	esi, eax
	xor	eax, eax
	test	esi, esi
	je	.L1
	mov	rdi, r12
	call	comedi_bytes_to_samples@PLT
	cmp	DWORD PTR [rbx], eax
	cmovbe	eax, DWORD PTR [rbx]
	mov	rsi, r12
	mov	rdi, rbp
	mov	ebx, eax
	mov	edx, eax
	call	ni_ao_fifo_load@PLT
	mov	eax, ebx
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, DWORD PTR NI611X_AO_FIFO_OFFSET_LOAD_REG[rip]
	mov	esi, 6
	mov	rdi, rbp
	call	ni_ao_win_outl@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ni_ao_prep_fifo, .-ni_ao_prep_fifo
	.comm	NISTC_DAC_FIFO_CLR_REG,4,4
	.comm	NI611X_AO_FIFO_OFFSET_LOAD_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_prep_fifo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ni_ao_prep_fifo, %function
ni_ao_prep_fifo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L12
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	ldr	r2, [r3]
	mov	r6, r1
	mov	r1, #1
	mov	r5, r0
	ldr	r7, [r0, #4]
	bl	ni_stc_writew
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L10
.L2:
	mov	r0, r6
	bl	comedi_buf_read_n_available
	subs	r1, r0, #0
	bne	.L11
	mov	r0, r1
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	mov	r0, r6
	bl	comedi_bytes_to_samples
	ldr	r4, [r7]
	mov	r1, r6
	cmp	r0, r4
	movcc	r4, r0
	mov	r0, r5
	mov	r2, r4
	bl	ni_ao_fifo_load
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r3, .L12+4
	mov	r1, #6
	mov	r0, r5
	ldr	r2, [r3]
	bl	ni_ao_win_outl
	b	.L2
.L13:
	.align	2
.L12:
	.word	NISTC_DAC_FIFO_CLR_REG
	.word	NI611X_AO_FIFO_OFFSET_LOAD_REG
	.size	ni_ao_prep_fifo, .-ni_ao_prep_fifo
	.comm	NISTC_DAC_FIFO_CLR_REG,4,4
	.comm	NI611X_AO_FIFO_OFFSET_LOAD_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
