	.file	"extr_8253.h_i8253_cascade_ns_to_timer_2div_old.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	i8253_cascade_ns_to_timer_2div_old, @function
i8253_cascade_ns_to_timer_2div_old:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, edi
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	shr	eax, 31
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	xor	edx, edx
	add	eax, edi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, DWORD PTR [rcx]
	sar	eax
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r11d, eax
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	add	r11d, r13d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, -1
	mov	eax, r11d
	div	edi
	test	eax, eax
	lea	r8d, 65535[rax]
	mov	r11d, eax
	cmovns	r8d, eax
	xor	ebp, ebp
	xor	r12d, r12d
	sar	r8d, 16
	add	r8d, 1
	mov	r10d, r8d
	imul	r10d, edi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8d, edx
.L4:
	mov	eax, r11d
	cdq
	idiv	r8d
	lea	r9d, 1[rax]
	cmp	r9d, 65536
	jg	.L2
	mov	edx, r10d
	imul	edx, r9d
	cmp	edx, ebx
	jge	.L2
	cmp	r13d, edx
	setb	r15b
	cmovb	ebx, edx
	test	r15b, r15b
	cmovne	ebp, r9d
	cmovne	r12d, r8d
.L2:
	lea	edx, 1[r8]
	add	r10d, edi
	cmp	eax, r8d
	jg	.L6
	mov	eax, r12d
	and	r12d, 65535
	pop	rbx
	.cfi_def_cfa_offset 48
	imul	eax, ebp
	and	ebp, 65535
	imul	edi, eax
	mov	DWORD PTR [rcx], edi
	mov	DWORD PTR [rsi], r12d
	mov	DWORD PTR [r14], ebp
	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
	.cfi_endproc
.LFE0:
	.size	i8253_cascade_ns_to_timer_2div_old, .-i8253_cascade_ns_to_timer_2div_old
	.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_8253.h_i8253_cascade_ns_to_timer_2div_old.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i8253_cascade_ns_to_timer_2div_old, %function
i8253_cascade_ns_to_timer_2div_old:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	fp, r1
	ldr	r9, [r3]
	add	r0, r0, r0, lsr #31
	sub	sp, sp, #20
	mov	r1, r5
	add	r0, r9, r0, asr #1
	str	fp, [sp, #4]
	str	r3, [sp, #12]
	str	r2, [sp, #8]
	bl	__aeabi_uidiv
	mov	r6, #0
	add	r4, r0, #65280
	cmp	r0, #0
	add	r4, r4, #255
	movge	r4, r0
	mov	r10, r0
	mov	r8, r6
	mvn	r7, #0
	asr	r4, r4, #16
	add	r4, r4, #1
	mul	fp, r5, r4
.L3:
	mov	r1, r4
	mov	r0, r10
	bl	__aeabi_idiv
	add	r3, r0, #1
	cmp	r3, #65536
	bgt	.L2
	mul	r2, r3, fp
	cmp	r2, r7
	movge	r1, #0
	movlt	r1, #1
	cmp	r9, r2
	movcs	r1, #0
	cmp	r1, #0
	movne	r7, r2
	movne	r6, r3
	movne	r8, r4
.L2:
	cmp	r0, r4
	add	fp, fp, r5
	add	r4, r4, #1
	bgt	.L3
	mul	r0, r6, r8
	ldr	r3, .L8
	mul	r5, r0, r5
	and	r8, r8, r3
	and	r6, r6, r3
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #4]
	str	r5, [r2]
	str	r8, [r3]
	ldr	r3, [sp, #8]
	str	r6, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	.align	2
.L8:
	.word	65535
	.size	i8253_cascade_ns_to_timer_2div_old, .-i8253_cascade_ns_to_timer_2div_old
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
