	.file	"extr_dt2811.c_dt2811_ns_to_timer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dt2811_ns_to_timer, @function
dt2811_ns_to_timer:
.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	ebp, DWORD PTR COMEDI_MIN_SPEED[rip]
	mov	QWORD PTR 8[rsp], rdi
	mov	DWORD PTR 28[rsp], esi
	mov	QWORD PTR 16[rsp], 0
	mov	DWORD PTR 24[rsp], 0
	mov	DWORD PTR [rsp], 0
	mov	DWORD PTR 4[rsp], 0
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 16[rsp]
	xor	r15d, r15d
	mov	r13d, eax
	lea	r12, 0[0+rax*4]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r9d, DWORD PTR 4[rsp]
	mov	ebx, DWORD PTR [rsp]
	cmp	r9, rcx
	mov	rsi, r9
	cmovb	esi, ecx
	cmovb	ebx, eax
	mov	DWORD PTR 4[rsp], esi
	mov	DWORD PTR [rsp], ebx
	cmp	r8, rcx
	je	.L4
.L3:
	add	r15, 1
	cmp	r15, 8
	je	.L18
.L6:
	mov	rax, QWORD PTR dt2811_clk_multipliers[rip]
	mov	edi, r13d
	mov	ecx, DWORD PTR [rax+r15*4]
	mov	rax, QWORD PTR dt2811_clk_dividers[rip]
	mov	r14d, ecx
	imul	r14d, DWORD PTR [rax+r12]
	call	DT2811_TMRCTR_MANTISSA@PLT
	mov	edi, r15d
	mov	ebx, eax
	call	DT2811_TMRCTR_EXPONENT@PLT
	mov	rcx, QWORD PTR DT2811_OSC_BASE[rip]
	mov	rdx, QWORD PTR COMEDI_MIN_SPEED[rip]
	mov	edi, ebp
	imul	rcx, r14
	cmp	rdx, rcx
	jb	.L3
	mov	rsi, QWORD PTR 8[rsp]
	or	eax, ebx
	mov	r8d, DWORD PTR [rsi]
	cmp	r8, rcx
	jnb	.L19
.L4:
	cmp	rcx, rdi
	jnb	.L3
	add	r15, 1
	mov	DWORD PTR 24[rsp], eax
	mov	ebp, ecx
	mov	rdi, rcx
	cmp	r15, 8
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	add	QWORD PTR 16[rsp], 1
	mov	rax, QWORD PTR 16[rsp]
	cmp	rax, 8
	jne	.L2
	cmp	rdx, rdi
	mov	eax, DWORD PTR 24[rsp]
	mov	edx, DWORD PTR 4[rsp]
	cmove	eax, DWORD PTR [rsp]
	cmove	ebp, edx
	mov	DWORD PTR 24[rsp], eax
	test	edx, edx
	je	.L20
.L9:
	mov	esi, DWORD PTR 28[rsp]
	and	esi, DWORD PTR CMDF_ROUND_MASK[rip]
	mov	rax, QWORD PTR 8[rsp]
	cmp	esi, 128
	je	.L16
	cmp	esi, 130
	jne	.L21
.L11:
	mov	edx, DWORD PTR 4[rsp]
	mov	DWORD PTR [rax], edx
.L1:
	mov	eax, DWORD PTR [rsp]
	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
.L20:
	.cfi_restore_state
	mov	DWORD PTR [rsp], eax
	mov	DWORD PTR 4[rsp], ebp
	jmp	.L9
.L21:
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR 4[rsp]
	sub	edx, eax
	sub	eax, ebp
	cmp	edx, eax
	mov	rax, QWORD PTR 8[rsp]
	jnb	.L11
.L16:
	mov	DWORD PTR [rax], ebp
	mov	eax, DWORD PTR 24[rsp]
	mov	DWORD PTR [rsp], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	dt2811_ns_to_timer, .-dt2811_ns_to_timer
	.comm	dt2811_clk_multipliers,8,8
	.comm	dt2811_clk_dividers,8,8
	.comm	DT2811_OSC_BASE,8,8
	.comm	COMEDI_MIN_SPEED,8,8
	.comm	CMDF_ROUND_MASK,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_dt2811.c_dt2811_ns_to_timer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dt2811_ns_to_timer, %function
dt2811_ns_to_timer:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, #0
	mov	r9, r0
	ldr	r3, .L20
	sub	sp, sp, #52
	ldr	r3, [r3]
	ldr	r8, .L20+4
	ldr	r5, .L20+8
	ldr	r10, .L20+12
	str	r1, [sp, #44]
	str	fp, [sp, #40]
	str	fp, [sp, #32]
	str	fp, [sp, #36]
	str	r3, [sp, #24]
.L2:
	lsl	r3, fp, #2
	mov	r4, #0
	str	r3, [sp, #28]
	str	fp, [sp, #20]
	b	.L6
.L18:
	mov	r1, #0
	ldr	lr, [sp, #36]
	cmp	r1, ip
	cmpeq	lr, fp
	movcc	lr, fp
	ldr	r1, [sp, #32]
	movcc	r1, r7
	cmp	r3, ip
	cmpeq	r2, fp
	str	lr, [sp, #36]
	str	r1, [sp, #32]
	beq	.L4
.L3:
	cmp	r4, #8
	beq	.L17
.L6:
	ldr	r1, [sp, #28]
	ldr	r3, [r8]
	ldr	r2, [r5]
	ldr	r3, [r3, r4, lsl #2]
	ldr	r2, [r2, r1]
	ldr	r0, [sp, #20]
	mul	r6, r2, r3
	bl	DT2811_TMRCTR_MANTISSA
	mov	r7, r0
	mov	r0, r4
	bl	DT2811_TMRCTR_EXPONENT
	ldr	r3, .L20
	ldr	r1, [r10, #4]
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	ldr	r2, [r10]
	add	r4, r4, #1
	umull	fp, ip, r2, r6
	ldmia	sp, {r2-r3}
	mla	ip, r6, r1, ip
	cmp	r3, ip
	mov	r3, #0
	cmpeq	r2, fp
	ldr	r2, [sp, #24]
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	bcc	.L3
	mov	r3, #0
	ldr	r2, [r9]
	cmp	r3, ip
	cmpeq	r2, fp
	orr	r7, r7, r0
	bcs	.L18
.L4:
	add	r3, sp, #8
	ldmia	r3, {r2-r3}
	cmp	ip, r3
	cmpeq	fp, r2
	bcs	.L3
	cmp	r4, #8
	str	fp, [sp, #8]
	str	ip, [sp, #12]
	str	r7, [sp, #40]
	str	fp, [sp, #24]
	bne	.L6
.L17:
	ldr	fp, [sp, #20]
	add	fp, fp, #1
	cmp	fp, #8
	bne	.L2
	add	r2, sp, #8
	ldmia	r2, {r1-r2}
	ldmia	sp, {r3-r4}
	ldr	lr, [sp, #32]
	cmp	r4, r2
	cmpeq	r3, r1
	ldr	r1, [sp, #40]
	moveq	r1, lr
	ldr	ip, [sp, #36]
	ldr	r2, .L20+16
	ldr	r3, [sp, #24]
	moveq	r3, ip
	cmp	ip, #0
	ldr	r0, [r2]
	movne	r2, ip
	ldr	ip, [sp, #44]
	moveq	r2, r3
	and	ip, ip, r0
	mov	r0, ip
	movne	ip, lr
	moveq	ip, r1
	cmp	r0, #128
	str	ip, [sp, #32]
	beq	.L10
	cmp	r0, #130
	bne	.L19
.L11:
	ldr	r0, [sp, #32]
	str	r2, [r9]
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r0, [r9]
	sub	ip, r2, r0
	sub	r0, r0, r3
	cmp	ip, r0
	bcs	.L11
.L10:
	str	r1, [sp, #32]
	ldr	r0, [sp, #32]
	str	r3, [r9]
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	.align	2
.L20:
	.word	COMEDI_MIN_SPEED
	.word	dt2811_clk_multipliers
	.word	dt2811_clk_dividers
	.word	DT2811_OSC_BASE
	.word	CMDF_ROUND_MASK
	.size	dt2811_ns_to_timer, .-dt2811_ns_to_timer
	.comm	dt2811_clk_multipliers,4,4
	.comm	dt2811_clk_dividers,4,4
	.comm	DT2811_OSC_BASE,8,8
	.comm	COMEDI_MIN_SPEED,8,8
	.comm	CMDF_ROUND_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
