	.file	"720421.c"
	.intel_syntax noprefix
	.text
	.data
	.align 32
	.type	hiddevFileTemplates, @object
	.size	hiddevFileTemplates, 128
hiddevFileTemplates:
	.string	"/dev/usb/hiddev0"
	.zero	47
	.string	"/dev/hiddev0"
	.zero	51
	.local	hiddevFileName
	.comm	hiddevFileName,64,32
	.local	fdWeDo
	.comm	fdWeDo,4,4
	.text
	.globl	libConWeDo
	.type	libConWeDo, @function
libConWeDo:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	libConWeDo, .-libConWeDo
	.section	.init_array,"aw"
	.align 8
	.quad	libConWeDo
	.text
	.globl	libDesWeDo
	.type	libDesWeDo, @function
libDesWeDo:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	WeDoClosePort
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	libDesWeDo, .-libDesWeDo
	.section	.fini_array,"aw"
	.align 8
	.quad	libDesWeDo
	.text
	.globl	delay
	.type	delay, @function
delay:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -52[rbp]
	imul	eax, eax, 1000
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1125899907
	shr	rdx, 32
	sar	edx, 18
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1125899907
	shr	rdx, 32
	sar	edx, 18
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000000
	sub	eax, ecx
	mov	edx, eax
	movsx	rax, edx
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	r8, rax
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	edi, 0
	call	select@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	delay, .-delay
	.globl	scanForWeDo
	.type	scanForWeDo, @function
scanForWeDo:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	mov	DWORD PTR -72[rbp], 0
	jmp	.L6
.L9:
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rax
	lea	rdi, hiddevFileName[rip]
	call	strcpy@PLT
	mov	eax, DWORD PTR -72[rbp]
	lea	ebx, 48[rax]
	lea	rdi, hiddevFileName[rip]
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	ecx, ebx
	lea	rax, hiddevFileName[rip]
	mov	BYTE PTR [rdx+rax], cl
	mov	esi, 2
	lea	rdi, hiddevFileName[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], -1
	je	.L7
	lea	rdx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, 2149337091
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	je	.L7
	movzx	eax, WORD PTR -48[rbp]
	cmp	ax, 1684
	sete	dl
	movzx	eax, WORD PTR -46[rbp]
	cmp	ax, 3
	sete	al
	and	eax, edx
	test	al, al
	je	.L7
	mov	eax, DWORD PTR -68[rbp]
	jmp	.L10
.L7:
	add	DWORD PTR -72[rbp], 1
.L6:
	cmp	DWORD PTR -72[rbp], 9
	jle	.L9
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	scanForWeDo, .-scanForWeDo
	.globl	isWeDoAvailable
	.type	isWeDoAvailable, @function
isWeDoAvailable:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR fdWeDo[rip]
	test	eax, eax
	jne	.L13
	mov	eax, 0
	jmp	.L16
.L13:
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, hiddevFileName[rip]
	call	stat@PLT
	cmp	eax, -1
	jne	.L15
	call	WeDoClosePort
	mov	eax, 0
	jmp	.L16
.L15:
	mov	eax, 1
.L16:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	isWeDoAvailable, .-isWeDoAvailable
	.globl	WeDoOpenPort
	.type	WeDoOpenPort, @function
WeDoOpenPort:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, DWORD PTR fdWeDo[rip]
	test	eax, eax
	je	.L19
	mov	eax, 1
	jmp	.L20
.L19:
	mov	DWORD PTR fdWeDo[rip], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L21
.L24:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 6
	mov	rdx, rax
	lea	rax, hiddevFileTemplates[rip]
	add	rax, rdx
	mov	rdi, rax
	call	scanForWeDo
	mov	DWORD PTR fdWeDo[rip], eax
	mov	eax, DWORD PTR fdWeDo[rip]
	test	eax, eax
	jne	.L26
	add	DWORD PTR -4[rbp], 1
.L21:
	cmp	DWORD PTR -4[rbp], 1
	jle	.L24
	jmp	.L23
.L26:
	nop
.L23:
	mov	eax, DWORD PTR fdWeDo[rip]
	test	eax, eax
	jne	.L25
	mov	eax, 0
	jmp	.L20
.L25:
	mov	edi, 100
	call	delay
	mov	eax, 1
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	WeDoOpenPort, .-WeDoOpenPort
	.globl	WeDoClosePort
	.type	WeDoClosePort, @function
WeDoClosePort:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR fdWeDo[rip]
	test	eax, eax
	jne	.L28
	mov	eax, 1
	jmp	.L29
.L28:
	mov	eax, DWORD PTR fdWeDo[rip]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	DWORD PTR fdWeDo[rip], 0
	mov	eax, 1
.L29:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	WeDoClosePort, .-WeDoClosePort
	.globl	WeDoRead
	.type	WeDoRead, @function
WeDoRead:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	jne	.L31
	mov	eax, 8
	jmp	.L38
.L31:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L33
.L37:
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 256
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -12[rbp], 0
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	je	.L34
	mov	eax, DWORD PTR fdWeDo[rip]
	lea	rdx, -32[rbp]
	mov	esi, 3222816781
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	js	.L40
.L34:
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	je	.L36
	mov	eax, DWORD PTR fdWeDo[rip]
	lea	rdx, -32[rbp]
	mov	esi, 3222816779
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	js	.L41
.L36:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	jmp	.L35
.L40:
	nop
	jmp	.L35
.L41:
	nop
.L35:
	add	DWORD PTR -36[rbp], 1
.L33:
	cmp	DWORD PTR -36[rbp], 7
	jle	.L37
	mov	eax, 8
.L38:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	WeDoRead, .-WeDoRead
	.globl	WeDoWrite
	.type	WeDoWrite, @function
WeDoWrite:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	jne	.L43
	mov	eax, 8
	jmp	.L44
.L43:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L45
.L47:
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	je	.L46
	mov	DWORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR fdWeDo[rip]
	lea	rdx, -32[rbp]
	mov	esi, 1075333132
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L46:
	add	DWORD PTR -36[rbp], 1
.L45:
	cmp	DWORD PTR -36[rbp], 7
	jle	.L47
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	je	.L48
	mov	DWORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR fdWeDo[rip]
	lea	rdx, -32[rbp]
	mov	esi, 1074546696
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L48:
	mov	eax, 0
	call	isWeDoAvailable
	test	eax, eax
	je	.L49
	mov	DWORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR fdWeDo[rip]
	lea	rdx, -32[rbp]
	mov	esi, 1074546696
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L49:
	mov	eax, 8
.L44:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	WeDoWrite, .-WeDoWrite
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"720421.c"
	.text
	.data
	.align	2
	.type	hiddevFileTemplates, %object
	.size	hiddevFileTemplates, 128
hiddevFileTemplates:
	.ascii	"/dev/usb/hiddev0\000"
	.space	47
	.ascii	"/dev/hiddev0\000"
	.space	51
	.local	hiddevFileName
	.comm	hiddevFileName,64,4
	.local	fdWeDo
	.comm	fdWeDo,4,4
	.text
	.align	2
	.global	libConWeDo
	.syntax unified
	.arm
	.fpu softvfp
	.type	libConWeDo, %function
libConWeDo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	libConWeDo, .-libConWeDo
	.section	.init_array,"aw",%init_array
	.align	2
	.word	libConWeDo(target1)
	.text
	.align	2
	.global	libDesWeDo
	.syntax unified
	.arm
	.fpu softvfp
	.type	libDesWeDo, %function
libDesWeDo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	WeDoClosePort
	nop
	pop	{fp, pc}
	.size	libDesWeDo, .-libDesWeDo
	.section	.fini_array,"aw",%fini_array
	.align	2
	.word	libDesWeDo(target1)
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	delay
	.syntax unified
	.arm
	.fpu softvfp
	.type	delay, %function
delay:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r2, .L5+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #18
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-20]
	ldr	r3, .L5+4
	smull	r2, r3, r0, r3
	asr	r2, r3, #18
	asr	r3, r0, #31
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	sub	r1, r0, r3
	str	r1, [fp, #-12]
	sub	r3, fp, #16
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	mov	r0, #0
	bl	select
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	1125899907
	.size	delay, .-delay
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	scanForWeDo
	.syntax unified
	.arm
	.fpu softvfp
	.type	scanForWeDo, %function
scanForWeDo:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L8
.L11:
	ldr	r1, [fp, #-56]
	ldr	r0, .L14+4
	bl	strcpy
	ldr	r3, [fp, #-52]
	and	r4, r3, #255
	ldr	r0, .L14+4
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	add	r2, r4, #48
	and	r1, r2, #255
	ldr	r2, .L14+4
	strb	r1, [r2, r3]
	mov	r1, #2
	ldr	r0, .L14+4
	bl	open
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmn	r3, #1
	beq	.L9
	sub	r3, fp, #44
	mov	r2, r3
	ldr	r1, .L14+8
	ldr	r0, [fp, #-48]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	beq	.L9
	ldrsh	r3, [fp, #-28]
	ldr	r2, .L14+12
	cmp	r3, r2
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldrsh	r3, [fp, #-26]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-48]
	b	.L12
.L9:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L8:
	ldr	r3, [fp, #-52]
	cmp	r3, #9
	ble	.L11
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	hiddevFileName
	.word	-2145630205
	.word	1684
	.size	scanForWeDo, .-scanForWeDo
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	isWeDoAvailable
	.syntax unified
	.arm
	.fpu softvfp
	.type	isWeDoAvailable, %function
isWeDoAvailable:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L22+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L17
	mov	r3, #0
	b	.L20
.L17:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L22+8
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	bl	WeDoClosePort
	mov	r3, #0
	b	.L20
.L19:
	mov	r3, #1
.L20:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	fdWeDo
	.word	hiddevFileName
	.size	isWeDoAvailable, .-isWeDoAvailable
	.align	2
	.global	WeDoOpenPort
	.syntax unified
	.arm
	.fpu softvfp
	.type	WeDoOpenPort, %function
WeDoOpenPort:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L33
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L25
	mov	r3, #1
	b	.L26
.L25:
	ldr	r3, .L33
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L27
.L30:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #6
	ldr	r2, .L33+4
	add	r3, r3, r2
	mov	r0, r3
	bl	scanForWeDo
	mov	r3, r0
	ldr	r2, .L33
	str	r3, [r2]
	ldr	r3, .L33
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L32
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L27:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L30
	b	.L29
.L32:
	nop
.L29:
	ldr	r3, .L33
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
	b	.L26
.L31:
	mov	r0, #100
	bl	delay
	mov	r3, #1
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	fdWeDo
	.word	hiddevFileTemplates
	.size	WeDoOpenPort, .-WeDoOpenPort
	.align	2
	.global	WeDoClosePort
	.syntax unified
	.arm
	.fpu softvfp
	.type	WeDoClosePort, %function
WeDoClosePort:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L38
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L36
	mov	r3, #1
	b	.L37
.L36:
	ldr	r3, .L38
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L38
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
.L37:
	mov	r0, r3
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	fdWeDo
	.size	WeDoClosePort, .-WeDoClosePort
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WeDoRead
	.syntax unified
	.arm
	.fpu softvfp
	.type	WeDoRead, %function
WeDoRead:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	bne	.L41
	mov	r3, #8
	b	.L48
.L41:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L43
.L47:
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #256
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	ldr	r3, .L52+4
	ldr	r3, [r3]
	sub	r2, fp, #32
	ldr	r1, .L52+8
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	blt	.L50
.L44:
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	ldr	r3, .L52+4
	ldr	r3, [r3]
	sub	r2, fp, #32
	ldr	r1, .L52+12
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	blt	.L51
.L46:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-40]
	add	r3, r1, r3
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L45
.L50:
	nop
	b	.L45
.L51:
	nop
.L45:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L43:
	ldr	r3, [fp, #-36]
	cmp	r3, #7
	ble	.L47
	mov	r3, #8
.L48:
	ldr	r2, .L52
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L49
	bl	__stack_chk_fail
.L49:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC4
	.word	fdWeDo
	.word	-1072150515
	.word	-1072150517
	.size	WeDoRead, .-WeDoRead
	.section	.rodata
	.align	2
.LC0:
	.word	2
	.word	0
	.word	1
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WeDoWrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	WeDoWrite, %function
WeDoWrite:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L63
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
	mov	r3, #8
	b	.L56
.L55:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L57
.L59:
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L58
	ldr	r3, .L63+4
	ldr	r0, [r3]
	mov	r3, #2
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-12]
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L63+8
	bl	ioctl
.L58:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L57:
	ldr	r3, [fp, #-36]
	cmp	r3, #7
	ble	.L59
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L60
	ldr	r3, .L63+4
	ldr	ip, [r3]
	ldr	r2, .L63+12
	sub	r3, fp, #32
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L63+16
	mov	r0, ip
	bl	ioctl
.L60:
	bl	isWeDoAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	ldr	r3, .L63+4
	ldr	ip, [r3]
	ldr	r2, .L63+12
	sub	r3, fp, #32
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L63+16
	mov	r0, ip
	bl	ioctl
.L61:
	mov	r3, #8
.L56:
	ldr	r2, .L63
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L62
	bl	__stack_chk_fail
.L62:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	.LC5
	.word	fdWeDo
	.word	1075333132
	.word	.LC0
	.word	1074546696
	.size	WeDoWrite, .-WeDoWrite
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
