	.file	"extr_alps.c_alps_poll.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alps_poll, @function
alps_poll:
.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
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR ALPS_PASS[rip], eax
	jne	.L18
.L2:
	mov	edx, DWORD PTR [rbx]
	lea	r14, 12[rbx]
	lea	r13, 4[rsp]
	mov	rsi, r13
	mov	rdi, r14
	sal	edx, 8
	or	edx, DWORD PTR PSMOUSE_CMD_POLL[rip]
	call	ps2_command@PLT
	mov	r12, rax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR ALPS_PASS[rip], eax
	jne	.L19
.L3:
	test	r12, r12
	js	.L6
	movzx	eax, BYTE PTR 4[rsp]
	and	al, BYTE PTR 4[rbp]
	cmp	al, BYTE PTR 5[rbp]
	jne	.L6
	mov	eax, DWORD PTR 4[rbx]
	and	eax, 200
	cmp	eax, 8
	je	.L7
.L8:
	mov	edi, DWORD PTR 8[rbx]
	mov	edx, 4
	mov	rsi, r13
	call	memcpy@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L20
	add	rsp, 16
	.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
.L7:
	.cfi_restore_state
	mov	edx, DWORD PTR PSMOUSE_CMD_POLL[rip]
	mov	rsi, r13
	mov	rdi, r14
	or	dh, 3
	call	ps2_command@PLT
	test	rax, rax
	je	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	xor	esi, esi
	mov	rdi, rbx
	call	alps_passthrough_mode_v2@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, 1
	call	alps_passthrough_mode_v2@PLT
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	alps_poll, .-alps_poll
	.comm	PSMOUSE_CMD_POLL,4,4
	.comm	ALPS_PASS,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_alps.c_alps_poll.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alps_poll, %function
alps_poll:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L21
	ldr	r5, [r0, #16]
	ldr	r3, [r7]
	ldr	r2, [r5]
	ldr	r1, .L21+4
	sub	sp, sp, #8
	tst	r2, r3
	mov	r4, r0
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	bne	.L18
.L2:
	mov	r6, r4
	ldr	r8, .L21+8
	ldr	r2, [r6], #12
	ldr	r3, [r8]
	mov	r0, r6
	orr	r2, r3, r2, lsl #8
	mov	r1, sp
	bl	ps2_command
	ldr	r3, [r7]
	ldr	r2, [r5]
	mov	r7, r0
	tst	r2, r3
	bne	.L19
.L3:
	cmp	r7, #0
	blt	.L6
	ldrb	r3, [sp]	@ zero_extendqisi2
	ldrb	r1, [r5, #4]	@ zero_extendqisi2
	ldrb	r2, [r5, #5]	@ zero_extendqisi2
	and	r3, r3, r1
	cmp	r2, r3
	bne	.L6
	ldr	r3, [r4, #4]
	and	r3, r3, #200
	cmp	r3, #8
	beq	.L7
.L8:
	mov	r1, sp
	mov	r2, #4
	ldr	r0, [r4, #8]
	bl	memcpy
	mov	r0, #0
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r2, [r8]
	mov	r0, r6
	mov	r1, sp
	orr	r2, r2, #768
	bl	ps2_command
	cmp	r0, #0
	beq	.L8
.L6:
	mvn	r0, #0
	b	.L1
.L19:
	mov	r1, #0
	mov	r0, r4
	bl	alps_passthrough_mode_v2
	b	.L3
.L18:
	mov	r1, #1
	bl	alps_passthrough_mode_v2
	b	.L2
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	ALPS_PASS
	.word	.LC0
	.word	PSMOUSE_CMD_POLL
	.size	alps_poll, .-alps_poll
	.comm	PSMOUSE_CMD_POLL,4,4
	.comm	ALPS_PASS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
