	.file	"extr_musb_gadget.c_stop_activity.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stop_activity, @function
stop_activity:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR USB_SPEED_UNKNOWN[rip]
	mov	rdx, QWORD PTR 32[rdi]
	cmp	QWORD PTR 8[rdi], rax
	je	.L2
	mov	QWORD PTR 8[rdi], rax
	mov	r13, rsi
	test	rdx, rdx
	jne	.L20
.L3:
	mov	rdi, r12
	call	musb_stop@PLT
	test	r13, r13
	je	.L1
	mov	edx, DWORD PTR [r12]
	mov	rbx, QWORD PTR 24[r12]
	xor	ebp, ebp
	test	edx, edx
	jg	.L5
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	QWORD PTR 24[rbx], 0
	jne	.L21
.L8:
	cmp	QWORD PTR 8[rbx], 0
	jne	.L22
.L7:
	add	ebp, 1
	add	rbx, 40
	cmp	DWORD PTR [r12], ebp
	jle	.L9
.L5:
	mov	edi, DWORD PTR 16[r12]
	mov	esi, ebp
	call	musb_ep_select@PLT
	cmp	QWORD PTR 32[rbx], 0
	je	.L6
	mov	esi, DWORD PTR ESHUTDOWN[rip]
	lea	rdi, 16[rbx]
	add	ebp, 1
	add	rbx, 40
	neg	esi
	call	nuke@PLT
	cmp	DWORD PTR [r12], ebp
	jg	.L5
.L9:
	lea	rbp, 4[r12]
	mov	rdi, rbp
	call	spin_unlock@PLT
	lea	rdi, 8[r12]
	call	[QWORD PTR 0[r13]]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	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
	jmp	spin_lock@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR ESHUTDOWN[rip]
	mov	rdi, rbx
	neg	esi
	call	nuke@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	mov	esi, DWORD PTR ESHUTDOWN[rip]
	lea	rdi, 16[rbx]
	neg	esi
	call	nuke@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	QWORD PTR 32[rdi], 0
	xor	esi, esi
	call	musb_pullup@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	test	rdx, rdx
	jne	.L23
.L18:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, 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
	jmp	musb_stop@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	QWORD PTR 32[rdi], 0
	xor	esi, esi
	call	musb_pullup@PLT
	jmp	.L18
.L1:
	pop	rax
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	stop_activity, .-stop_activity
	.comm	USB_SPEED_UNKNOWN,8,8
	.comm	ESHUTDOWN,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_musb_gadget.c_stop_activity.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stop_activity, %function
stop_activity:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L29
	ldr	r2, [r0, #8]
	ldr	r3, [r3]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r2, r3
	mov	r6, r0
	ldr	r2, [r0, #20]
	beq	.L2
	cmp	r2, #0
	mov	r8, r1
	str	r3, [r0, #8]
	bne	.L25
.L3:
	mov	r0, r6
	bl	musb_stop
	cmp	r8, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r6]
	ldr	r4, [r6, #16]
	cmp	r3, #0
	movgt	r5, #0
	ldrgt	r7, .L29+4
	bgt	.L5
	b	.L9
.L6:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L26
.L8:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L27
.L7:
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	add	r4, r4, #20
	ble	.L9
.L5:
	mov	r1, r5
	ldr	r0, [r6, #12]
	bl	musb_ep_select
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L6
	ldr	r1, [r7]
	add	r0, r4, #8
	rsb	r1, r1, #0
	bl	nuke
	b	.L7
.L27:
	ldr	r1, [r7]
	mov	r0, r4
	rsb	r1, r1, #0
	bl	nuke
	b	.L7
.L26:
	ldr	r1, [r7]
	add	r0, r4, #8
	rsb	r1, r1, #0
	bl	nuke
	b	.L8
.L9:
	add	r4, r6, #4
	mov	r0, r4
	bl	spin_unlock
	ldr	r3, [r8]
	add	r0, r6, #8
	blx	r3
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	spin_lock
.L25:
	mov	r1, #0
	str	r1, [r0, #20]
	bl	musb_pullup
	b	.L3
.L2:
	cmp	r2, #0
	bne	.L28
	pop	{r4, r5, r6, r7, r8, lr}
	b	musb_stop
.L28:
	mov	r1, #0
	str	r1, [r0, #20]
	bl	musb_pullup
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	musb_stop
.L30:
	.align	2
.L29:
	.word	USB_SPEED_UNKNOWN
	.word	ESHUTDOWN
	.size	stop_activity, .-stop_activity
	.comm	USB_SPEED_UNKNOWN,4,4
	.comm	ESHUTDOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
