	.file	"extr_oxu210hp-hcd.c_qh_link_periodic.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"link qh%d-%04x/%p start %d [%d/%d us]\n"
	.text
	.p2align 4
	.type	qh_link_periodic, @function
qh_link_periodic:
.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
	mov	r14, rdi
	lea	rdi, 40[rsi]
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13d, DWORD PTR 12[rsi]
	mov	ebp, DWORD PTR 8[rsi]
	mov	r15d, DWORD PTR [rsi]
	mov	ebx, DWORD PTR 4[rsi]
	call	le32_to_cpup@PLT
	push	r13
	.cfi_def_cfa_offset 88
	mov	ecx, DWORD PTR QH_CMASK[rip]
	mov	r8, r12
	push	rbp
	.cfi_def_cfa_offset 96
	or	ecx, DWORD PTR QH_SMASK[rip]
	mov	edx, r15d
	mov	r9d, ebx
	mov	rdi, QWORD PTR 48[r12]
	and	ecx, eax
	lea	rsi, .LC0[rip]
	call	dev_dbg@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	test	r15d, r15d
	mov	eax, 1
	cmovne	eax, r15d
	pop	rdx
	.cfi_def_cfa_offset 80
	mov	r13d, DWORD PTR 4[r12]
	mov	DWORD PTR 12[rsp], eax
	cmp	DWORD PTR [r14], r13d
	jbe	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rbp, QWORD PTR 24[r14]
	mov	edx, r13d
	sal	rdx, 3
	add	rbp, rdx
	add	rdx, QWORD PTR 8[r14]
	mov	rbx, QWORD PTR 0[rbp]
	mov	r15, rdx
	test	rbx, rbx
	jne	.L7
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	lea	r15, 16[rbx]
	call	periodic_next_shadow@PLT
	mov	rbx, QWORD PTR [rax]
	mov	rbp, rax
	test	rbx, rbx
	je	.L3
.L7:
	mov	rdi, QWORD PTR [r15]
	call	Q_NEXT_TYPE@PLT
	cmp	QWORD PTR Q_TYPE_QH[rip], rax
	mov	rsi, rax
	jne	.L4
	cmp	r12, rbx
	je	.L6
	mov	eax, DWORD PTR [r12]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rbp, 32[rbx]
	lea	r15, 16[rbx]
	mov	rbx, QWORD PTR 32[rbx]
	test	rbx, rbx
	je	.L3
	cmp	rbx, r12
	je	.L6
.L11:
	cmp	eax, DWORD PTR [rbx]
	jbe	.L26
	cmp	r12, rbx
	je	.L6
	mov	QWORD PTR 32[r12], rbx
	mov	rax, QWORD PTR [r15]
	mov	QWORD PTR 16[r12], rax
.L10:
	xor	eax, eax
	call	wmb@PLT
	mov	QWORD PTR 0[rbp], r12
	mov	edi, DWORD PTR 28[r12]
	call	QH_NEXT@PLT
	mov	QWORD PTR [r15], rax
.L6:
	add	r13d, DWORD PTR 12[rsp]
	cmp	DWORD PTR [r14], r13d
	ja	.L12
.L2:
	mov	eax, DWORD PTR QH_STATE_LINKED[rip]
	mov	rdi, r12
	mov	DWORD PTR 24[r12], eax
	call	qh_get@PLT
	mov	rdi, r14
	call	oxu_to_hcd@PLT
	mov	edi, DWORD PTR [r12]
	mov	esi, DWORD PTR [rax]
	mov	rcx, rax
	test	edi, edi
	je	.L13
	mov	eax, DWORD PTR 12[r12]
	xor	edx, edx
	add	eax, DWORD PTR 8[r12]
	div	edi
.L14:
	add	eax, esi
	mov	DWORD PTR [rcx], eax
	mov	eax, DWORD PTR 16[r14]
	lea	edx, 1[rax]
	mov	DWORD PTR 16[r14], edx
	test	eax, eax
	je	.L27
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L3:
	.cfi_restore_state
	mov	QWORD PTR 32[r12], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR 8[r12]
	sal	eax, 3
	jmp	.L14
.L27:
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	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
	jmp	enable_periodic@PLT
	.cfi_endproc
.LFE0:
	.size	qh_link_periodic, .-qh_link_periodic
	.comm	Q_TYPE_QH,8,8
	.comm	QH_STATE_LINKED,4,4
	.comm	QH_SMASK,4,4
	.comm	QH_CMASK,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_oxu210hp-hcd.c_qh_link_periodic.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"link qh%d-%04x/%p start %d [%d/%d us]\012\000"
	.global	__aeabi_uidiv
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qh_link_periodic, %function
qh_link_periodic:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, r0
	sub	sp, sp, #20
	add	r0, r1, #32
	mov	r6, r1
	ldr	r10, [r1]
	ldr	r4, [r1, #36]
	bl	le32_to_cpup
	mov	r2, r0
	ldr	r3, .L28
	ldr	r1, .L28+4
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	lr, [r6, #12]
	ldr	ip, [r6, #8]
	str	r6, [sp]
	orr	r3, r3, r1
	ldr	r1, [r6, #4]
	and	r3, r3, r2
	stmib	sp, {r1, ip, lr}
	mov	r2, r10
	mov	r0, r4
	ldr	r1, .L28+8
	bl	dev_dbg
	ldr	r8, [r6, #4]
	ldr	r3, [r9]
	cmp	r10, #1
	movcc	r10, #1
	cmp	r3, r8
	bls	.L2
	ldr	r7, .L28+12
.L12:
	ldr	r5, [r9, #12]
	ldr	r3, [r9, #4]
	ldr	r4, [r5, r8, lsl #2]
	add	fp, r3, r8, lsl #2
	cmp	r4, #0
	add	r5, r5, r8, lsl #2
	bne	.L7
	b	.L3
.L4:
	mov	r0, r5
	bl	periodic_next_shadow
	add	fp, r4, #16
	ldr	r4, [r0]
	mov	r5, r0
	cmp	r4, #0
	beq	.L3
.L7:
	ldr	r0, [fp]
	bl	Q_NEXT_TYPE
	ldr	r2, [r7]
	mov	r1, r0
	cmp	r2, r0
	bne	.L4
	cmp	r6, r4
	ldrne	r1, [r6]
	bne	.L11
	b	.L6
.L26:
	add	r5, r4, #28
	add	fp, r4, #16
	ldr	r4, [r4, #28]
	cmp	r4, #0
	beq	.L3
	cmp	r4, r6
	beq	.L6
.L11:
	ldr	r2, [r4]
	cmp	r1, r2
	bls	.L26
	cmp	r6, r4
	beq	.L6
	str	r4, [r6, #28]
	ldr	r2, [fp]
	str	r2, [r6, #16]
.L10:
	bl	wmb
	ldr	r0, [r6, #24]
	str	r6, [r5]
	bl	QH_NEXT
	str	r0, [fp]
.L6:
	ldr	r3, [r9]
	add	r8, r8, r10
	cmp	r3, r8
	bhi	.L12
.L2:
	ldr	r3, .L28+16
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [r6, #20]
	bl	qh_get
	mov	r0, r9
	bl	oxu_to_hcd
	ldr	r1, [r6]
	mov	r4, r0
	ldr	r5, [r0]
	ldr	r0, [r6, #8]
	cmp	r1, #0
	lsleq	r0, r0, #3
	beq	.L14
	ldr	r3, [r6, #12]
	add	r0, r0, r3
	bl	__aeabi_uidiv
.L14:
	ldr	r3, [r9, #8]
	add	r5, r5, r0
	cmp	r3, #0
	add	r3, r3, #1
	str	r5, [r4]
	str	r3, [r9, #8]
	beq	.L27
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r3, #0
	str	r3, [r6, #28]
	b	.L10
.L27:
	mov	r0, r9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	enable_periodic
.L29:
	.align	2
.L28:
	.word	QH_CMASK
	.word	QH_SMASK
	.word	.LC0
	.word	Q_TYPE_QH
	.word	QH_STATE_LINKED
	.size	qh_link_periodic, .-qh_link_periodic
	.comm	Q_TYPE_QH,4,4
	.comm	QH_STATE_LINKED,4,4
	.comm	QH_SMASK,4,4
	.comm	QH_CMASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
