	.file	"extr_sidewinder.c_sw_init_digital.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sw_init_digital, @function
sw_init_digital:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, seq.1934[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, 140
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	local_irq_save@PLT
.L5:
	mov	rdi, rbp
	call	gameport_trigger@PLT
	mov	rdi, rbp
	imul	esi, DWORD PTR SW_TIMEOUT[rip], 1000
	call	gameport_time@PLT
	mov	ebx, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	test	al, 1
	je	.L6
	sub	ebx, 1
.L2:
	mov	rdi, rbp
	call	gameport_read@PLT
	test	ebx, ebx
	jne	.L13
.L6:
	mov	edi, r12d
	add	r13, 4
	call	udelay@PLT
	mov	r12d, DWORD PTR 0[r13]
	test	r12d, r12d
	jne	.L5
	mov	rdi, rbp
	call	gameport_trigger@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	edi, edi
	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	local_irq_restore@PLT
	.cfi_endproc
.LFE0:
	.size	sw_init_digital, .-sw_init_digital
	.section	.rodata
	.align 16
	.type	seq.1934, @object
	.size	seq.1934, 16
seq.1934:
	.long	140
	.long	865
	.long	440
	.long	0
	.comm	SW_TIMEOUT,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_sidewinder.c_sw_init_digital.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sw_init_digital, %function
sw_init_digital:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r0, #0
	mov	r6, #140
	bl	local_irq_save
	ldr	r7, .L8
	ldr	r8, .L8+4
.L4:
	mov	r0, r5
	bl	gameport_trigger
	ldr	r1, [r8]
	mov	r0, r5
	rsb	r3, r1, r1, lsl #5
	add	r1, r1, r3, lsl #2
	lsl	r1, r1, #3
	bl	gameport_time
	mov	r4, r0
	b	.L2
.L3:
	sub	r4, r4, #1
.L2:
	mov	r0, r5
	bl	gameport_read
	cmp	r4, #0
	moveq	r0, #0
	andne	r0, r0, #1
	cmp	r0, #0
	bne	.L3
	mov	r0, r6
	bl	udelay
	ldr	r6, [r7], #4
	cmp	r6, #0
	bne	.L4
	mov	r0, r5
	bl	gameport_trigger
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r0, #0
	b	local_irq_restore
.L9:
	.align	2
.L8:
	.word	.LANCHOR0+4
	.word	SW_TIMEOUT
	.size	sw_init_digital, .-sw_init_digital
	.comm	SW_TIMEOUT,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	seq.4218, %object
	.size	seq.4218, 16
seq.4218:
	.word	140
	.word	865
	.word	440
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
