	.file	"extr_mainstone-wm97xx.c_wm97xx_acc_pen_down.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Raw coordinates: x=%x, y=%x, p=%x\n"
	.text
	.p2align 4
	.type	wm97xx_acc_pen_down, @function
wm97xx_acc_pen_down:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, DWORD PTR WM97XX_ADCSEL_PRES[rip]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	edi, 1
	call	schedule_timeout_uninterruptible@PLT
	mov	eax, DWORD PTR tries[rip]
	cmp	eax, 5
	jg	.L12
	mov	r12d, DWORD PTR MODR[rip]
	cmp	DWORD PTR last[rip], r12d
	je	.L13
	mov	DWORD PTR last[rip], r12d
	or	r13d, 256
	xor	r14d, r14d
	lea	r15, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	edx, DWORD PTR WM97XX_ADCSEL_Y[rip]
	jne	.L8
	and	eax, r13d
	cmp	eax, DWORD PTR WM97XX_ADCSEL_PRES[rip]
	jne	.L8
	and	r12d, 4095
	mov	esi, DWORD PTR ABS_X[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	DWORD PTR tries[rip], 0
	mov	edx, r12d
	call	input_report_abs@PLT
	mov	esi, DWORD PTR ABS_Y[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r12d
	call	input_report_abs@PLT
	mov	esi, DWORD PTR ABS_PRESSURE[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r13d
	and	edx, 4095
	call	input_report_abs@PLT
	mov	esi, DWORD PTR BTN_TOUCH[rip]
	mov	edi, DWORD PTR 0[rbp]
	xor	edx, edx
	test	r13d, r13d
	setne	dl
	add	r14d, 1
	call	input_report_key@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	input_sync@PLT
	mov	rdx, QWORD PTR sp_idx[rip]
	mov	rax, QWORD PTR cinfo[rip]
	cmp	DWORD PTR [rax+rdx*4], r14d
	jle	.L8
	mov	r12d, DWORD PTR MODR[rip]
.L5:
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, r12d
	mov	ecx, r12d
	mov	rsi, r15
	cmp	QWORD PTR pressure[rip], 0
	cmovne	r13d, r12d
	mov	r8d, r13d
	call	dev_dbg@PLT
	mov	eax, DWORD PTR WM97XX_ADCSEL_MASK[rip]
	mov	edx, eax
	and	edx, r12d
	cmp	edx, DWORD PTR WM97XX_ADCSEL_X[rip]
	je	.L7
.L8:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR RC_PENDOWN[rip]
	pop	r12
	.cfi_def_cfa_offset 32
	or	eax, DWORD PTR RC_AGAIN[rip]
	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
.L12:
	.cfi_restore_state
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR RC_PENUP[rip]
	mov	DWORD PTR tries[rip], 0
	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
.L13:
	.cfi_restore_state
	add	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	mov	DWORD PTR tries[rip], eax
	pop	r13
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR RC_AGAIN[rip]
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	wm97xx_acc_pen_down, .-wm97xx_acc_pen_down
	.comm	tries,4,4
	.comm	sp_idx,8,8
	.comm	pressure,8,8
	.comm	last,4,4
	.comm	cinfo,8,8
	.comm	WM97XX_ADCSEL_Y,4,4
	.comm	WM97XX_ADCSEL_X,4,4
	.comm	WM97XX_ADCSEL_PRES,4,4
	.comm	WM97XX_ADCSEL_MASK,4,4
	.comm	RC_PENUP,4,4
	.comm	RC_PENDOWN,4,4
	.comm	RC_AGAIN,4,4
	.comm	MODR,4,4
	.comm	BTN_TOUCH,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,4,4
	.comm	ABS_PRESSURE,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_mainstone-wm97xx.c_wm97xx_acc_pen_down.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Raw coordinates: x=%x, y=%x, p=%x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wm97xx_acc_pen_down, %function
wm97xx_acc_pen_down:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L16
	mov	r5, r0
	sub	sp, sp, #20
	mov	r0, #1
	ldr	r4, [r9]
	bl	schedule_timeout_uninterruptible
	ldr	r3, .L16+4
	ldr	r2, [r3]
	cmp	r2, #5
	bgt	.L14
	ldr	r1, .L16+8
	ldr	r3, .L16+12
	ldr	r0, [r1]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L15
	mov	r6, #0
	ldr	fp, .L16+16
	ldr	r10, .L16+20
	orr	r4, r4, #256
	str	r3, [r1]
	b	.L5
.L7:
	ldr	r2, .L16+24
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L8
	ldr	r3, [r9]
	cmp	r1, r3
	bne	.L8
	mov	r3, #0
	ldr	r1, .L16+28
	ldr	ip, .L16+4
	mov	r2, r8
	ldr	r1, [r1]
	ldr	r0, [r5]
	str	r3, [ip]
	bl	input_report_abs
	ldr	r3, .L16+32
	mov	r2, r8
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	input_report_abs
	ldr	r3, .L16+36
	and	r2, r4, r7
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	input_report_abs
	ldr	r3, .L16+40
	subs	r2, r4, #0
	movne	r2, #1
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	input_report_key
	ldr	r0, [r5]
	bl	input_sync
	ldr	r2, .L16+44
	ldr	r3, .L16+48
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, r6
	ble	.L8
	ldr	r3, .L16+12
	ldr	r3, [r3]
.L5:
	ldr	r2, [fp]
	ldr	r7, .L16+52
	cmp	r2, #0
	movne	r4, r3
	str	r4, [sp]
	mov	r2, r3
	ldr	r1, .L16+56
	ldr	r0, [r5, #4]
	and	r8, r3, r7
	str	r3, [sp, #12]
	bl	dev_dbg
	ldr	r3, .L16+60
	ldr	r1, [r10]
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	add	r6, r6, #1
	and	r3, r3, r1
	cmp	r3, r2
	and	r1, r1, r4
	beq	.L7
.L8:
	ldr	r2, .L16+64
	ldr	r3, .L16+68
	ldr	r0, [r2]
	ldr	r3, [r3]
	orr	r0, r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r2, #0
	ldr	r1, .L16+4
	ldr	r3, .L16+72
	str	r2, [r1]
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r1, .L16+4
	ldr	r3, .L16+68
	add	r2, r2, #1
	str	r2, [r1]
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	WM97XX_ADCSEL_PRES
	.word	tries
	.word	last
	.word	MODR
	.word	pressure
	.word	WM97XX_ADCSEL_MASK
	.word	WM97XX_ADCSEL_Y
	.word	ABS_X
	.word	ABS_Y
	.word	ABS_PRESSURE
	.word	BTN_TOUCH
	.word	sp_idx
	.word	cinfo
	.word	4095
	.word	.LC0
	.word	WM97XX_ADCSEL_X
	.word	RC_PENDOWN
	.word	RC_AGAIN
	.word	RC_PENUP
	.size	wm97xx_acc_pen_down, .-wm97xx_acc_pen_down
	.comm	tries,4,4
	.comm	sp_idx,4,4
	.comm	pressure,4,4
	.comm	last,4,4
	.comm	cinfo,4,4
	.comm	WM97XX_ADCSEL_Y,4,4
	.comm	WM97XX_ADCSEL_X,4,4
	.comm	WM97XX_ADCSEL_PRES,4,4
	.comm	WM97XX_ADCSEL_MASK,4,4
	.comm	RC_PENUP,4,4
	.comm	RC_PENDOWN,4,4
	.comm	RC_AGAIN,4,4
	.comm	MODR,4,4
	.comm	BTN_TOUCH,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,4,4
	.comm	ABS_PRESSURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
