	.file	"extr_sdla.c_sdla_z80_poll.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sdla_z80_poll, @function
sdla_z80_poll:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r9, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	not	ebp
	mov	ebx, r8d
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR SDLA_ADDR_MASK[rip]
	movsx	r15, DWORD PTR jiffies[rip]
	mov	DWORD PTR 28[rsp], esi
	and	eax, esi
	mov	BYTE PTR 27[rsp], cl
	add	edx, r15d
	mov	r13, r15
	cdqe
	add	rax, QWORD PTR [r9]
	mov	QWORD PTR 16[rsp], rdi
	movsx	r14, edx
	mov	QWORD PTR 8[rsp], rax
	mov	rdi, r15
.L2:
	cmp	bpl, BYTE PTR 27[rsp]
	setne	r12b
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	test	r12b, r12b
	je	.L6
	test	bl, bl
	je	.L7
	cmp	bpl, bl
	je	.L6
.L7:
	movsx	rax, edi
	cmp	r13, rax
	jne	.L17
.L3:
	mov	rsi, r14
	call	time_before@PLT
	mov	edi, DWORD PTR jiffies[rip]
	test	rax, rax
	jne	.L18
.L6:
	mov	rsi, r14
	call	time_before@PLT
	test	rax, rax
	je	.L9
	mov	eax, DWORD PTR jiffies[rip]
	sub	eax, r15d
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR 28[rsp]
	call	SDLA_WINDOW@PLT
	movsx	r13, DWORD PTR jiffies[rip]
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, r13
	movzx	ebp, BYTE PTR [rax]
	jmp	.L2
.L9:
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sdla_z80_poll, .-sdla_z80_poll
	.comm	jiffies,4,4
	.comm	SDLA_ADDR_MASK,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_sdla.c_sdla_z80_poll.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdla_z80_poll, %function
sdla_z80_poll:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L13
	sub	sp, sp, #20
	mov	ip, r1
	mov	fp, r0
	str	r1, [sp, #12]
	ldr	r1, [r0]
	ldr	r0, [r7]
	mvn	r6, r3
	mov	r9, r0
	mov	r10, r3
	ldr	r3, .L13+4
	ldrb	r4, [sp, #56]	@ zero_extendqisi2
	ldr	r3, [r3]
	and	r6, r6, #255
	and	r3, r3, ip
	add	r3, r1, r3
	str	r3, [sp, #8]
	add	r5, r0, r2
	str	r0, [sp, #4]
.L2:
	subs	r8, r6, r10
	movne	r8, #1
	b	.L3
.L4:
	subs	r3, r6, r4
	movne	r3, #1
	cmp	r4, #0
	moveq	r3, #1
	cmp	r3, #0
	ldr	r0, [r7]
	beq	.L5
	cmp	r9, r0
	bne	.L12
.L3:
	mov	r1, r5
	bl	time_before
	cmp	r0, #0
	movne	r0, r8
	moveq	r0, #0
	cmp	r0, #0
	bne	.L4
	ldr	r0, [r7]
.L5:
	mov	r1, r5
	bl	time_before
	cmp	r0, #0
	mvneq	r0, #0
	ldrne	r0, [r7]
	ldrne	r3, [sp, #4]
	subne	r0, r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r0, fp
	ldr	r1, [sp, #12]
	bl	SDLA_WINDOW
	ldr	r0, [r7]
	ldr	r3, [sp, #8]
	mov	r9, r0
	ldrb	r6, [r3]	@ zero_extendqisi2
	b	.L2
.L14:
	.align	2
.L13:
	.word	jiffies
	.word	SDLA_ADDR_MASK
	.size	sdla_z80_poll, .-sdla_z80_poll
	.comm	jiffies,4,4
	.comm	SDLA_ADDR_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
