	.file	"extr_psmouse-base.c_im_explorer_detect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Generic"
.LC1:
	.string	"Explorer Mouse"
	.text
	.p2align 4
	.type	im_explorer_detect, @function
im_explorer_detect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, 32[rdi]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	call	intellimouse_detect@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 200
	call	ps2_command@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 200
	call	ps2_command@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 80
	call	ps2_command@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_GETID[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	ps2_command@PLT
	cmp	DWORD PTR [rsp], 4
	je	.L2
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 200
	call	ps2_command@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 80
	call	ps2_command@PLT
	mov	edx, DWORD PTR PSMOUSE_CMD_SETRATE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 40
	call	ps2_command@PLT
	xor	eax, eax
	test	r13d, r13d
	je	.L1
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR BTN_MIDDLE[rip]
	mov	esi, DWORD PTR [rax]
	call	__set_bit@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR REL_WHEEL[rip]
	mov	esi, DWORD PTR 4[rax]
	call	__set_bit@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR REL_HWHEEL[rip]
	mov	esi, DWORD PTR 4[rax]
	call	__set_bit@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR BTN_SIDE[rip]
	mov	esi, DWORD PTR [rax]
	call	__set_bit@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR BTN_EXTRA[rip]
	mov	esi, DWORD PTR [rax]
	call	__set_bit@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L12
.L4:
	cmp	QWORD PTR 8[rbx], 0
	je	.L13
.L5:
	mov	DWORD PTR 16[rbx], 4
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rax, .LC0[rip]
	mov	QWORD PTR [rbx], rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rax, .LC1[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L5
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	im_explorer_detect, .-im_explorer_detect
	.comm	REL_WHEEL,4,4
	.comm	REL_HWHEEL,4,4
	.comm	PSMOUSE_CMD_SETRATE,4,4
	.comm	PSMOUSE_CMD_GETID,4,4
	.comm	ENODEV,4,4
	.comm	BTN_SIDE,4,4
	.comm	BTN_MIDDLE,4,4
	.comm	BTN_EXTRA,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_psmouse-base.c_im_explorer_detect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Generic\000"
	.align	2
.LC1:
	.ascii	"Explorer Mouse\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	im_explorer_detect, %function
im_explorer_detect:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, #200
	mov	r8, #80
	ldr	r3, .L11
	ldr	r5, .L11+4
	sub	sp, sp, #20
	add	r4, r0, #16
	mov	r9, r1
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r6, r0
	bl	intellimouse_detect
	ldr	r2, [r5]
	add	r1, sp, #4
	mov	r0, r4
	str	r7, [sp, #4]
	bl	ps2_command
	ldr	r2, [r5]
	add	r1, sp, #4
	mov	r0, r4
	str	r7, [sp, #4]
	bl	ps2_command
	ldr	r2, [r5]
	add	r1, sp, #4
	mov	r0, r4
	str	r8, [sp, #4]
	bl	ps2_command
	ldr	r3, .L11+8
	mov	r0, r4
	ldr	r2, [r3]
	add	r1, sp, #4
	bl	ps2_command
	ldr	r3, [sp, #4]
	cmp	r3, #4
	beq	.L2
	ldr	r3, .L11+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r2, [r5]
	add	r1, sp, #4
	mov	r0, r4
	str	r7, [sp, #4]
	bl	ps2_command
	ldr	r2, [r5]
	add	r1, sp, #4
	mov	r0, r4
	str	r8, [sp, #4]
	bl	ps2_command
	mov	r3, #40
	mov	r0, r4
	ldr	r2, [r5]
	add	r1, sp, #4
	str	r3, [sp, #4]
	bl	ps2_command
	cmp	r9, #0
	moveq	r0, r9
	beq	.L1
	ldr	r2, [r6, #12]
	ldr	r3, .L11+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r2, [r6, #12]
	ldr	r3, .L11+20
	ldr	r1, [r2, #4]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r2, [r6, #12]
	ldr	r3, .L11+24
	ldr	r1, [r2, #4]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r2, [r6, #12]
	ldr	r3, .L11+28
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r3, .L11+32
	ldr	r2, [r6, #12]
	ldr	r0, [r3]
	ldr	r1, [r2]
	bl	__set_bit
	ldr	r3, [r6]
	mov	r0, #0
	cmp	r3, #0
	ldreq	r3, .L11+36
	streq	r3, [r6]
	ldr	r3, [r6, #4]
	cmp	r3, #0
	ldreq	r3, .L11+40
	streq	r3, [r6, #4]
	mov	r3, #4
	str	r3, [r6, #8]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC2
	.word	PSMOUSE_CMD_SETRATE
	.word	PSMOUSE_CMD_GETID
	.word	ENODEV
	.word	BTN_MIDDLE
	.word	REL_WHEEL
	.word	REL_HWHEEL
	.word	BTN_SIDE
	.word	BTN_EXTRA
	.word	.LC0
	.word	.LC1
	.size	im_explorer_detect, .-im_explorer_detect
	.comm	REL_WHEEL,4,4
	.comm	REL_HWHEEL,4,4
	.comm	PSMOUSE_CMD_SETRATE,4,4
	.comm	PSMOUSE_CMD_GETID,4,4
	.comm	ENODEV,4,4
	.comm	BTN_SIDE,4,4
	.comm	BTN_MIDDLE,4,4
	.comm	BTN_EXTRA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
