	.file	"extr_oxu210hp-hcd.c_ehci_qtd_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ehci_qtd_alloc, @function
ehci_qtd_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, 8[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	rdi, r13
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	spin_lock@PLT
	mov	edx, DWORD PTR QTD_NUM[rip]
	test	edx, edx
	jle	.L5
	sub	edx, 1
	mov	rax, QWORD PTR 0[rbp]
	xor	ebx, ebx
	lea	rdx, 4[0+rdx*4]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	add	rbx, 4
	cmp	rdx, rbx
	je	.L5
.L4:
	mov	ecx, DWORD PTR [rax+rbx]
	test	ecx, ecx
	jne	.L10
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, 32
	xor	esi, esi
	mov	r12, QWORD PTR [rax]
	add	r12, rbx
	mov	rdi, r12
	call	memset@PLT
	mov	edi, DWORD PTR QTD_STS_HALT[rip]
	call	cpu_to_le32@PLT
	lea	rdi, 4[r12]
	mov	DWORD PTR 24[r12], eax
	mov	rax, QWORD PTR EHCI_LIST_END[rip]
	mov	QWORD PTR 16[r12], rax
	mov	QWORD PTR 8[r12], rax
	call	INIT_LIST_HEAD@PLT
	mov	rdi, r12
	call	virt_to_phys@PLT
	mov	DWORD PTR [r12], eax
	mov	rax, QWORD PTR 0[rbp]
	mov	DWORD PTR [rax+rbx], 1
.L2:
	mov	rdi, r13
	call	spin_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L5:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ehci_qtd_alloc, .-ehci_qtd_alloc
	.comm	QTD_STS_HALT,4,4
	.comm	QTD_NUM,4,4
	.comm	EHCI_LIST_END,8,8
	.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_ehci_qtd_alloc.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ehci_qtd_alloc, %function
ehci_qtd_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	add	r7, r0, #4
	mov	r5, r0
	mov	r0, r7
	bl	spin_lock
	ldr	r3, .L11
	ldr	ip, [r3]
	cmp	ip, #0
	ble	.L5
	ldr	r2, [r5]
	mov	r3, #0
	sub	r2, r2, #4
	b	.L4
.L10:
	cmp	r3, ip
	beq	.L5
.L4:
	ldr	r1, [r2, #4]!
	lsl	r4, r3, #2
	cmp	r1, #0
	add	r3, r3, #1
	bne	.L10
	ldr	r3, [r5, #8]
	mov	r2, #20
	ldr	r8, [r3]
	add	r6, r8, r4
	mov	r0, r6
	bl	memset
	ldr	r3, .L11+4
	ldr	r0, [r3]
	bl	cpu_to_le32
	ldr	r3, .L11+8
	str	r0, [r6, #16]
	ldr	r3, [r3]
	add	r0, r6, #4
	str	r3, [r6, #12]
	str	r3, [r6, #8]
	bl	INIT_LIST_HEAD
	mov	r0, r6
	bl	virt_to_phys
	mov	r2, #1
	ldr	r3, [r5]
	str	r0, [r8, r4]
	str	r2, [r3, r4]
.L2:
	mov	r0, r7
	bl	spin_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r6, #0
	b	.L2
.L12:
	.align	2
.L11:
	.word	QTD_NUM
	.word	QTD_STS_HALT
	.word	EHCI_LIST_END
	.size	ehci_qtd_alloc, .-ehci_qtd_alloc
	.comm	QTD_STS_HALT,4,4
	.comm	QTD_NUM,4,4
	.comm	EHCI_LIST_END,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
