	.file	"extr_libusb_hid.c_adapter_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adapter_thread, @function
adapter_thread:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	lea	r11, -32768[rsp]
	.cfi_def_cfa 11, 32816
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	sub	rsp, 32
	.cfi_def_cfa_offset 32848
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 32792[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L1
	mov	edx, DWORD PTR 44[rdi]
	mov	rbp, QWORD PTR 48[rdi]
	mov	rbx, rdi
	test	edx, edx
	jne	.L1
	lea	r12, 4[rsp]
	lea	r13, 8[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 32[rbx]
	call	slock_unlock@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[rbx]
	mov	r8, r12
	mov	esi, DWORD PTR 24[rbx]
	mov	edi, DWORD PTR 28[rbx]
	mov	r9d, 1000
	lea	rdx, 8[rax]
	call	libusb_interrupt_transfer@PLT
	test	rbp, rbp
	je	.L7
	mov	rax, QWORD PTR 0[rbp]
	test	rax, rax
	je	.L7
	mov	ecx, DWORD PTR 4[rsp]
	test	ecx, ecx
	jne	.L25
.L7:
	mov	eax, DWORD PTR 44[rbx]
	test	eax, eax
	jne	.L1
.L8:
	mov	edi, DWORD PTR 32[rbx]
	mov	DWORD PTR 4[rsp], 0
	call	slock_lock@PLT
	mov	edi, DWORD PTR 40[rbx]
	call	fifo_read_avail@PLT
	cmp	eax, 7
	jbe	.L5
	mov	edi, DWORD PTR 40[rbx]
	mov	edx, 8
	mov	rsi, r13
	call	fifo_read@PLT
	mov	edi, DWORD PTR 40[rbx]
	call	fifo_read_avail@PLT
	cmp	eax, 7
	jbe	.L5
	mov	edi, DWORD PTR 40[rbx]
	mov	rdx, QWORD PTR 8[rsp]
	lea	r14, 16[rsp]
	mov	rsi, r14
	call	fifo_read@PLT
	mov	esi, DWORD PTR 36[rbx]
	mov	edi, DWORD PTR 28[rbx]
	mov	r8, rsp
	mov	rcx, QWORD PTR 8[rsp]
	mov	r9d, 1000
	mov	rdx, r14
	call	libusb_interrupt_transfer@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 32792[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	add	rsp, 32800
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	rsi, QWORD PTR 16[rbx]
	mov	rdx, QWORD PTR [rbx]
	add	ecx, 1
	lea	rdi, [rax+rsi*4]
	call	pad_connection_packet@PLT
	jmp	.L7
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	adapter_thread, .-adapter_thread
	.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_libusb_hid.c_adapter_thread.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adapter_thread, %function
adapter_thread:
	@ args = 0, pretend = 0, frame = 16400
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	sub	sp, sp, #16384
	sub	sp, sp, #28
	add	r3, sp, #16384
	ldr	r2, .L28
	subs	r4, r0, #0
	add	r3, r3, #20
	ldr	r2, [r2]
	str	r2, [r3]
	mov	r2,#0
	beq	.L1
	ldr	r6, [r4, #32]
	ldr	r5, [r4, #36]
	cmp	r6, #0
	bne	.L1
	mov	r7, #1000
	add	r9, sp, #8
	add	r8, sp, #16
	b	.L8
.L5:
	ldr	r0, [r4, #20]
	bl	slock_unlock
	ldr	r2, [r4]
	str	r7, [sp, #4]
	str	r8, [sp]
	ldr	r3, [r4, #4]
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #16]
	add	r2, r2, #4
	bl	libusb_interrupt_transfer
	cmp	r5, #0
	beq	.L7
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L7
	ldr	r3, [sp, #16]
	cmp	r3, #0
	bne	.L26
.L7:
	ldr	r3, [r4, #32]
	cmp	r3, #0
	bne	.L1
.L8:
	ldr	r0, [r4, #20]
	str	r6, [sp, #16]
	bl	slock_lock
	ldr	r0, [r4, #28]
	bl	fifo_read_avail
	cmp	r0, #3
	bls	.L5
	mov	r2, #4
	mov	r1, r9
	ldr	r0, [r4, #28]
	bl	fifo_read
	ldr	r0, [r4, #28]
	bl	fifo_read_avail
	cmp	r0, #3
	bls	.L5
	ldr	r2, [sp, #8]
	add	r1, sp, #20
	ldr	r0, [r4, #28]
	bl	fifo_read
	add	r3, sp, #12
	stm	sp, {r3, r7}
	add	r2, sp, #20
	ldr	r3, [sp, #8]
	ldr	r1, [r4, #24]
	ldr	r0, [r4, #16]
	bl	libusb_interrupt_transfer
	b	.L5
.L1:
	add	r3, sp, #16384
	ldr	r2, .L28
	add	r3, r3, #20
	ldr	r1, [r2]
	ldr	r2, [r3]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L27
	add	sp, sp, #16384
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L26:
	ldr	r1, [r4, #8]
	ldr	r2, [r4]
	add	r3, r3, #1
	add	r0, r0, r1, lsl #2
	bl	pad_connection_packet
	b	.L7
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC0
	.size	adapter_thread, .-adapter_thread
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
