	.file	"extr_usb_driver.c_qmkusbStop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"invalid state"
	.text
	.p2align 4
	.globl	qmkusbStop
	.type	qmkusbStop, @function
qmkusbStop:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, 1
	mov	rbp, QWORD PTR 16[rax]
	call	osalDbgCheck@PLT
	xor	eax, eax
	call	osalSysLock@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR QMKUSB_STOP[rip]
	mov	edi, 1
	je	.L2
	xor	edi, edi
	cmp	QWORD PTR QMKUSB_READY[rip], rax
	sete	dil
.L2:
	lea	rsi, .LC0[rip]
	call	osalDbgAssert@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rdx, QWORD PTR 0[rbp]
	mov	ecx, DWORD PTR [rax]
	sub	ecx, 1
	mov	QWORD PTR [rdx+rcx*8], 0
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR 8[rax]
	lea	esi, -1[rcx]
	mov	rcx, QWORD PTR 8[rbp]
	mov	QWORD PTR [rcx+rsi*8], 0
	test	eax, eax
	je	.L3
	sub	eax, 1
	mov	QWORD PTR [rdx+rax*8], 0
.L3:
	mov	rax, QWORD PTR QMKUSB_STOP[rip]
	mov	QWORD PTR 16[rbx], 0
	mov	rdi, rbx
	mov	esi, DWORD PTR CHN_DISCONNECTED[rip]
	mov	QWORD PTR [rbx], rax
	call	chnAddFlagsI@PLT
	lea	rdi, 12[rbx]
	call	ibqResetI@PLT
	lea	rdi, 8[rbx]
	call	obqResetI@PLT
	xor	eax, eax
	call	osalOsRescheduleS@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	osalSysUnlock@PLT
	.cfi_endproc
.LFE0:
	.size	qmkusbStop, .-qmkusbStop
	.comm	QMKUSB_STOP,8,8
	.comm	QMKUSB_READY,8,8
	.comm	CHN_DISCONNECTED,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_usb_driver.c_qmkusbStop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid state\000"
	.text
	.align	2
	.global	qmkusbStop
	.syntax unified
	.arm
	.fpu softvfp
	.type	qmkusbStop, %function
qmkusbStop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, [r0, #12]
	mov	r0, #1
	ldr	r6, [r3, #12]
	bl	osalDbgCheck
	bl	osalSysLock
	ldr	r5, .L10
	ldr	r3, [r4]
	ldr	r2, [r5]
	ldr	r1, .L10+4
	cmp	r3, r2
	ldrne	r2, .L10+8
	moveq	r0, #1
	ldrne	r0, [r2]
	subne	r0, r0, r3
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	osalDbgAssert
	mov	r0, #0
	ldr	r1, [r4, #12]
	ldr	ip, [r6]
	ldm	r1, {r2, r3}
	sub	r2, r2, #-1073741823
	ldr	lr, [r6, #4]
	ldr	r1, [r1, #8]
	str	r0, [ip, r2, lsl #2]
	mov	r2, #0
	cmp	r1, r0
	subne	r1, r1, #-1073741823
	sub	r3, r3, #-1073741823
	str	r0, [lr, r3, lsl #2]
	strne	r0, [ip, r1, lsl #2]
	ldr	r3, .L10+12
	ldr	r1, [r5]
	str	r2, [r4, #12]
	str	r1, [r4]
	mov	r0, r4
	ldr	r1, [r3]
	bl	chnAddFlagsI
	add	r0, r4, #8
	bl	ibqResetI
	add	r0, r4, #4
	bl	obqResetI
	bl	osalOsRescheduleS
	pop	{r4, r5, r6, lr}
	b	osalSysUnlock
.L11:
	.align	2
.L10:
	.word	QMKUSB_STOP
	.word	.LC0
	.word	QMKUSB_READY
	.word	CHN_DISCONNECTED
	.size	qmkusbStop, .-qmkusbStop
	.comm	QMKUSB_STOP,4,4
	.comm	QMKUSB_READY,4,4
	.comm	CHN_DISCONNECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
