	.file	"extr_via8233.c_via_poll_ticks.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	via_poll_ticks, @function
via_poll_ticks:
.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
	mov	r13, rdi
	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, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR NDXSCHANS[rip]
	mov	esi, DWORD PTR NMSGDCHANS[rip]
	mov	r12d, DWORD PTR hz[rip]
	lea	eax, [rdi+rsi]
	test	eax, eax
	jle	.L2
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdx, QWORD PTR 8[r13]
	lea	rax, [r14+r14*2]
	lea	rbp, [rdx+rax*8]
	cmp	QWORD PTR 16[rbp], 0
	je	.L3
	cmp	QWORD PTR 0[rbp], 0
	je	.L3
	mov	edi, DWORD PTR 12[rbp]
	mov	ebx, DWORD PTR 8[rbp]
	imul	ebx, DWORD PTR hz[rip]
	call	sndbuf_getalign@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	r15, rax
	call	sndbuf_getspd@PLT
	mov	ecx, 1
	mov	edi, DWORD PTR NDXSCHANS[rip]
	mov	esi, DWORD PTR NMSGDCHANS[rip]
	imul	r15d, eax
	mov	eax, ebx
	cdq
	idiv	r15d
	sar	eax, 2
	cmp	DWORD PTR hz[rip], eax
	cmovle	eax, DWORD PTR hz[rip]
	test	eax, eax
	cmovle	eax, ecx
	cmp	r12d, eax
	cmovg	r12d, eax
.L3:
	add	r14, 1
	lea	eax, [rdi+rsi]
	cmp	eax, r14d
	jg	.L4
.L2:
	mov	eax, DWORD PTR NWRCHANS[rip]
	test	eax, eax
	jle	.L1
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR 0[r13]
	lea	rax, [r14+r14*2]
	lea	rbp, [rdx+rax*8]
	cmp	QWORD PTR 16[rbp], 0
	je	.L6
	cmp	QWORD PTR 0[rbp], 0
	je	.L6
	mov	edi, DWORD PTR 12[rbp]
	mov	ebx, DWORD PTR 8[rbp]
	imul	ebx, DWORD PTR hz[rip]
	call	sndbuf_getalign@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	r15, rax
	call	sndbuf_getspd@PLT
	mov	ecx, 1
	imul	r15d, eax
	mov	eax, ebx
	cdq
	idiv	r15d
	sar	eax, 2
	cmp	DWORD PTR hz[rip], eax
	cmovle	eax, DWORD PTR hz[rip]
	test	eax, eax
	cmovle	eax, ecx
	cmp	r12d, eax
	cmovg	r12d, eax
.L6:
	add	r14, 1
	cmp	DWORD PTR NWRCHANS[rip], r14d
	jg	.L7
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	via_poll_ticks, .-via_poll_ticks
	.comm	hz,4,4
	.comm	NWRCHANS,4,4
	.comm	NMSGDCHANS,4,4
	.comm	NDXSCHANS,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_via8233.c_via_poll_ticks.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	via_poll_ticks, %function
via_poll_ticks:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L24
	ldr	r8, .L24+4
	ldr	r3, [r9]
	ldr	r2, [r8]
	ldr	r7, .L24+8
	add	r3, r3, r2
	cmp	r3, #0
	mov	r6, r0
	ldr	r5, [r7]
	ble	.L2
	mov	r4, #0
.L4:
	ldr	r3, [r6, #4]
	add	r10, r3, r4, lsl #4
	ldr	r2, [r10, #12]
	cmp	r2, #0
	beq	.L3
	ldr	r3, [r3, r4, lsl #4]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [r7]
	ldr	fp, [r10, #4]
	ldr	r0, [r10, #8]
	mul	fp, r3, fp
	bl	sndbuf_getalign
	mov	r1, r0
	ldr	r0, [r10, #8]
	mov	r10, r1
	bl	sndbuf_getspd
	mov	r1, r0
	mov	r0, fp
	mul	r1, r10, r1
	bl	__aeabi_idiv
	ldr	r2, [r7]
	asr	r3, r0, #2
	cmp	r3, r2
	movge	r3, r2
	cmp	r3, #1
	movlt	r3, #1
	cmp	r5, r3
	movge	r5, r3
.L3:
	ldr	r3, [r9]
	ldr	r2, [r8]
	add	r4, r4, #1
	add	r3, r3, r2
	cmp	r3, r4
	bgt	.L4
.L2:
	ldr	r9, .L24+12
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L1
	mov	r4, #0
.L7:
	ldr	r3, [r6]
	add	r8, r3, r4, lsl #4
	ldr	r2, [r8, #12]
	cmp	r2, #0
	beq	.L6
	ldr	r3, [r3, r4, lsl #4]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [r7]
	ldr	r10, [r8, #4]
	ldr	r0, [r8, #8]
	mul	r10, r3, r10
	bl	sndbuf_getalign
	mov	r1, r0
	ldr	r0, [r8, #8]
	mov	r8, r1
	bl	sndbuf_getspd
	mov	r1, r0
	mov	r0, r10
	mul	r1, r8, r1
	bl	__aeabi_idiv
	ldr	r2, [r7]
	asr	r3, r0, #2
	cmp	r3, r2
	movge	r3, r2
	cmp	r3, #1
	movlt	r3, #1
	cmp	r5, r3
	movge	r5, r3
.L6:
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L7
.L1:
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	.align	2
.L24:
	.word	NDXSCHANS
	.word	NMSGDCHANS
	.word	hz
	.word	NWRCHANS
	.size	via_poll_ticks, .-via_poll_ticks
	.comm	hz,4,4
	.comm	NWRCHANS,4,4
	.comm	NMSGDCHANS,4,4
	.comm	NDXSCHANS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
