	.file	"extr_pci_xhci.c_pci_xhci_cmd_reset_ep.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pci_xhci_cmd_reset_ep, @function
pci_xhci_cmd_reset_ep:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR [rdx]
	call	XHCI_TRB_3_EP_GET@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	DPRINTF@PLT
	mov	edi, DWORD PTR [r12]
	mov	r13, QWORD PTR XHCI_TRB_ERROR_SUCCESS[rip]
	call	XHCI_TRB_3_TYPE_GET@PLT
	mov	rsi, rbp
	mov	rdi, r14
	mov	r12, rax
	call	XHCI_SLOTDEV_PTR@PLT
	xor	edi, edi
	test	rax, rax
	mov	rbp, rax
	setne	dil
	call	assert@PLT
	lea	rax, -1[rbx]
	cmp	rax, 30
	ja	.L13
	mov	r15, QWORD PTR 24[rbp]
	sal	rbx, 4
	add	r15, rbx
	mov	rdi, QWORD PTR 8[r15]
	test	rdi, rdi
	je	.L4
	call	USB_DATA_XFER_RESET@PLT
.L4:
	mov	r14, QWORD PTR 16[rbp]
	xor	edi, edi
	test	r14, r14
	setne	dil
	call	assert@PLT
	add	rbx, QWORD PTR [r14]
	mov	edi, DWORD PTR [rbx]
	and	edi, -8
	or	edi, DWORD PTR XHCI_ST_EPCTX_STOPPED[rip]
	mov	DWORD PTR [rbx], edi
	call	XHCI_EPCTX_0_MAXP_STREAMS_GET@PLT
	test	rax, rax
	je	.L14
.L5:
	movsx	rdi, DWORD PTR 8[rbx]
	call	DPRINTF@PLT
	cmp	QWORD PTR XHCI_TRB_TYPE_RESET_EP[rip], r12
	je	.L15
.L3:
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR [r15]
	or	eax, DWORD PTR 4[r15]
	mov	DWORD PTR 4[rbx], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L7
	mov	edi, DWORD PTR 0[rbp]
	call	rax
	test	rax, rax
	jns	.L1
.L7:
	mov	r13, QWORD PTR XHCI_TRB_ERROR_ENDP_NOT_ON[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, rbx
	call	DPRINTF@PLT
	mov	r13, QWORD PTR XHCI_TRB_ERROR_TRB[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	pci_xhci_cmd_reset_ep, .-pci_xhci_cmd_reset_ep
	.comm	XHCI_TRB_TYPE_STOP_EP,8,8
	.comm	XHCI_TRB_TYPE_RESET_EP,8,8
	.comm	XHCI_TRB_ERROR_TRB,8,8
	.comm	XHCI_TRB_ERROR_SUCCESS,8,8
	.comm	XHCI_TRB_ERROR_ENDP_NOT_ON,8,8
	.comm	XHCI_TRB_3_SUSP_EP_BIT,4,4
	.comm	XHCI_ST_EPCTX_STOPPED,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_pci_xhci.c_pci_xhci_cmd_reset_ep.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_xhci_cmd_reset_ep, %function
pci_xhci_cmd_reset_ep:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	r0, [r2]
	mov	r6, r2
	mov	r5, r1
	bl	XHCI_TRB_3_EP_GET
	mov	r4, r0
	mov	r0, r5
	bl	DPRINTF
	ldr	r3, .L15
	ldr	r0, [r6]
	ldr	r8, [r3]
	bl	XHCI_TRB_3_TYPE_GET
	mov	r1, r5
	mov	r6, r0
	mov	r0, r7
	bl	XHCI_SLOTDEV_PTR
	mov	r5, r0
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	sub	r3, r4, #1
	cmp	r3, #30
	bhi	.L13
	ldr	r10, [r5, #12]
	add	r7, r4, r4, lsl #1
	add	r9, r10, r7, lsl #2
	ldr	r0, [r9, #8]
	lsl	r7, r7, #2
	cmp	r0, #0
	beq	.L4
	bl	USB_DATA_XFER_RESET
.L4:
	ldr	fp, [r5, #8]
	subs	r0, fp, #0
	movne	r0, #1
	bl	assert
	ldr	r3, [fp]
	ldr	r2, .L15+4
	ldr	r0, [r3, r4, lsl #4]
	ldr	r2, [r2]
	bic	r0, r0, #7
	orr	r0, r0, r2
	str	r0, [r3, r4, lsl #4]
	add	r4, r3, r4, lsl #4
	bl	XHCI_EPCTX_0_MAXP_STREAMS_GET
	cmp	r0, #0
	ldreq	r3, [r10, r7]
	ldreq	r2, [r9, #4]
	ldr	r0, [r4, #8]
	orreq	r3, r3, r2
	streq	r3, [r4, #4]
	bl	DPRINTF
	ldr	r3, .L15+8
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L14
.L3:
.L1:
	mov	r0, r8
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, [r5, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r0, [r5]
	blx	r3
	cmp	r0, #0
	bge	.L1
.L7:
	ldr	r3, .L15+12
	ldr	r8, [r3]
	mov	r0, r8
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r4
	bl	DPRINTF
	ldr	r3, .L15+16
	ldr	r8, [r3]
	mov	r0, r8
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	XHCI_TRB_ERROR_SUCCESS
	.word	XHCI_ST_EPCTX_STOPPED
	.word	XHCI_TRB_TYPE_RESET_EP
	.word	XHCI_TRB_ERROR_ENDP_NOT_ON
	.word	XHCI_TRB_ERROR_TRB
	.size	pci_xhci_cmd_reset_ep, .-pci_xhci_cmd_reset_ep
	.comm	XHCI_TRB_TYPE_STOP_EP,4,4
	.comm	XHCI_TRB_TYPE_RESET_EP,4,4
	.comm	XHCI_TRB_ERROR_TRB,4,4
	.comm	XHCI_TRB_ERROR_SUCCESS,4,4
	.comm	XHCI_TRB_ERROR_ENDP_NOT_ON,4,4
	.comm	XHCI_TRB_3_SUSP_EP_BIT,4,4
	.comm	XHCI_ST_EPCTX_STOPPED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
