	.file	"extr_xhci-mem.c_xhci_free_or_cache_endpoint_ring.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"s"
.LC1:
	.string	""
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Cached old ring, %d ring%s cached\n"
	.align 8
.LC3:
	.string	"Ring cache full (%d rings), freeing ring\n"
	.text
	.p2align 4
	.globl	xhci_free_or_cache_endpoint_ring
	.type	xhci_free_or_cache_endpoint_ring, @function
xhci_free_or_cache_endpoint_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 8[rsi]
	mov	edx, DWORD PTR [rsi]
	cmp	DWORD PTR XHCI_MAX_RINGS_CACHED[rip], edx
	mov	rsi, QWORD PTR [rax+rbp*8]
	jle	.L2
	mov	rax, QWORD PTR 16[rbx]
	movsx	rcx, edx
	add	edx, 1
	cmp	edx, 1
	mov	QWORD PTR [rax+rcx*8], rsi
	lea	rax, .LC1[rip]
	lea	rcx, .LC0[rip]
	mov	DWORD PTR [rbx], edx
	cmovle	rcx, rax
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	xhci_dbg@PLT
.L4:
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR [rax+rbp*8], 0
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	QWORD PTR 8[rsp], rdi
	call	xhci_ring_free@PLT
	mov	edx, DWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rsp]
	xor	eax, eax
	lea	rsi, .LC3[rip]
	call	xhci_dbg@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	xhci_free_or_cache_endpoint_ring, .-xhci_free_or_cache_endpoint_ring
	.comm	XHCI_MAX_RINGS_CACHED,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_xhci-mem.c_xhci_free_or_cache_endpoint_ring.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"s\000"
	.align	2
.LC1:
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"Cached old ring, %d ring%s cached\012\000"
	.align	2
.LC3:
	.ascii	"Ring cache full (%d rings), freeing ring\012\000"
	.text
	.align	2
	.global	xhci_free_or_cache_endpoint_ring
	.syntax unified
	.arm
	.fpu softvfp
	.type	xhci_free_or_cache_endpoint_ring, %function
xhci_free_or_cache_endpoint_ring:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r2
	ldr	r3, .L8
	ldr	ip, [r1]
	ldr	r2, [r3]
	ldr	r3, [r1, #4]
	cmp	r2, ip
	mov	r4, r1
	ldr	r1, [r3, r5, lsl #2]
	ble	.L2
	ldr	r3, [r4, #8]
	add	r2, ip, #1
	ldr	lr, .L8+4
	cmp	r2, #1
	str	r1, [r3, ip, lsl #2]
	ldr	r3, .L8+8
	ldr	r1, .L8+12
	movgt	r3, lr
	str	r2, [r4]
	bl	xhci_dbg
.L4:
	mov	r2, #0
	ldr	r3, [r4, #4]
	str	r2, [r3, r5, lsl #2]
	pop	{r4, r5, r6, pc}
.L2:
	mov	r6, r0
	bl	xhci_ring_free
	mov	r0, r6
	ldr	r2, [r4]
	ldr	r1, .L8+16
	bl	xhci_dbg
	b	.L4
.L9:
	.align	2
.L8:
	.word	XHCI_MAX_RINGS_CACHED
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	xhci_free_or_cache_endpoint_ring, .-xhci_free_or_cache_endpoint_ring
	.comm	XHCI_MAX_RINGS_CACHED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
