	.file	"extr_max11801_ts.c_max11801_ts_interrupt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	max11801_ts_interrupt, @function
max11801_ts_interrupt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rsi
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	r13, QWORD PTR 8[rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR XY_BUFSIZE[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L22:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L22
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L23
.L4:
	lea	rax, 3[rsp]
	mov	esi, DWORD PTR GENERNAL_STATUS_REG[rip]
	mov	rdi, rax
	and	rax, -4
	shr	rdi, 2
	mov	rbx, rax
	mov	QWORD PTR -72[rbp], rdi
	mov	rdi, r13
	call	read_register@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR MAX11801_FIFO_INT[rip]
	or	eax, DWORD PTR MAX11801_FIFO_OVERFLOW[rip]
	test	eax, r8d
	jne	.L24
.L6:
	mov	rdi, QWORD PTR -56[rbp]
	xor	rdi, QWORD PTR fs:40
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	jne	.L25
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[r12]
	mov	esi, DWORD PTR GENERNAL_STATUS_REG[rip]
	call	read_register@PLT
	mov	edx, DWORD PTR XY_BUFSIZE[rip]
	mov	rdi, r13
	mov	rcx, rbx
	mov	esi, DWORD PTR FIFO_RD_CMD[rip]
	call	i2c_smbus_read_i2c_block_data@PLT
	mov	edi, DWORD PTR XY_BUFSIZE[rip]
	cmp	edi, eax
	jg	.L6
	test	edi, edi
	jle	.L14
	mov	r10d, edi
	mov	r14d, DWORD PTR MEASURE_TAG_MASK[rip]
	mov	rax, rbx
	xor	esi, esi
	sar	r10d
	mov	r11d, DWORD PTR MEASURE_X_TAG[rip]
	mov	r15d, DWORD PTR MEASURE_Y_TAG[rip]
	mov	r8d, -1
	movsx	r9, r10d
	mov	ecx, DWORD PTR XY_BUF_OFFSET[rip]
	mov	r13d, -1
	sal	r9, 2
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	ebx, r15d
	jne	.L10
	mov	r13d, DWORD PTR [rax]
	sar	edx, cl
	sal	r13d, cl
	add	r13d, edx
.L10:
	add	esi, r10d
	add	rax, r9
	cmp	edi, esi
	jle	.L8
.L11:
	mov	edx, DWORD PTR 4[rax]
	mov	ebx, edx
	and	ebx, r14d
	cmp	ebx, r11d
	jne	.L9
	mov	r8d, DWORD PTR [rax]
	sar	edx, cl
	add	esi, r10d
	add	rax, r9
	sal	r8d, cl
	add	r8d, edx
	cmp	edi, esi
	jg	.L11
.L8:
	mov	rcx, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR EVENT_TAG_MASK[rip]
	mov	eax, DWORD PTR 4[0+rcx*4]
	mov	ecx, DWORD PTR 12[0+rcx*4]
	xor	ecx, eax
	test	ecx, edx
	jne	.L6
	and	eax, edx
	cmp	eax, 128
	je	.L12
	sub	eax, 129
	cmp	eax, 1
	ja	.L6
	mov	esi, DWORD PTR ABS_X[rip]
	mov	edi, DWORD PTR [r12]
	mov	edx, r8d
	call	input_report_abs@PLT
	mov	esi, DWORD PTR ABS_Y[rip]
	mov	edi, DWORD PTR [r12]
	mov	edx, r13d
	call	input_report_abs@PLT
	mov	ecx, 1
.L20:
	mov	edi, DWORD PTR [r12]
	mov	edx, DWORD PTR BTN_TOUCH[rip]
	mov	esi, DWORD PTR EV_KEY[rip]
	call	input_event@PLT
	mov	edi, DWORD PTR [r12]
	call	input_sync@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r8d, -1
	mov	r13d, -1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	xor	ecx, ecx
	jmp	.L20
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	max11801_ts_interrupt, .-max11801_ts_interrupt
	.comm	XY_BUF_OFFSET,4,4
	.comm	XY_BUFSIZE,4,4
	.comm	MEASURE_Y_TAG,4,4
	.comm	MEASURE_X_TAG,4,4
	.comm	MEASURE_TAG_MASK,4,4
	.comm	MAX11801_FIFO_OVERFLOW,4,4
	.comm	MAX11801_FIFO_INT,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	GENERNAL_STATUS_REG,4,4
	.comm	FIFO_RD_CMD,4,4
	.comm	EV_KEY,4,4
	.comm	EVENT_TAG_MASK,4,4
	.comm	BTN_TOUCH,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,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_max11801_ts.c_max11801_ts_interrupt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	max11801_ts_interrupt, %function
max11801_ts_interrupt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r6, .L17
	ldr	r7, [r1, #4]
	ldr	r3, [r6]
	ldr	r8, .L17+4
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L17+8
	mov	r4, r1
	mov	r0, r7
	ldr	r1, [r8]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	read_register
	ldr	r3, .L17+12
	ldr	r2, .L17+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L15
.L3:
	ldr	r3, .L17+20
	ldr	r0, [r3]
	ldr	r3, .L17+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r5, sp
	ldr	r1, [r8]
	ldr	r0, [r4, #4]
	bl	read_register
	ldr	r3, .L17+24
	mov	r0, r7
	ldr	r1, [r3]
	ldr	r2, [r6]
	mov	r3, r5
	bl	i2c_smbus_read_i2c_block_data
	ldr	r3, [r6]
	cmp	r3, r0
	bgt	.L3
	cmp	r3, #0
	mvn	r2, #0
	ble	.L11
	ldr	r6, .L17+28
	ldr	lr, .L17+32
	ldr	ip, .L17+36
	ldr	r1, .L17+40
	ldr	r9, [r6]
	ldr	r8, [lr]
	mov	r0, #0
	ldr	r10, [ip]
	ldr	lr, [r1]
	str	r2, [fp, #-48]
	asr	r7, r3, #1
	add	r6, r5, #4
	b	.L8
.L6:
	cmp	r1, r10
	ldreq	r1, [r5, r0, lsl #2]
	asreq	ip, ip, lr
	addeq	r1, ip, r1, lsl lr
	add	r0, r0, r7
	streq	r1, [fp, #-48]
	cmp	r3, r0
	ble	.L5
.L8:
	ldr	ip, [r6, r0, lsl #2]
	and	r1, ip, r9
	cmp	r1, r8
	bne	.L6
	ldr	r2, [r5, r0, lsl #2]
	add	r0, r0, r7
	asr	ip, ip, lr
	cmp	r3, r0
	add	r2, ip, r2, lsl lr
	bgt	.L8
.L5:
	ldr	r0, .L17+44
	ldr	r1, [r5, #4]
	ldr	r3, [r5, #12]
	ldr	r0, [r0]
	eor	r3, r3, r1
	ands	r3, r3, r0
	bne	.L3
	and	r1, r1, r0
	cmp	r1, #128
	beq	.L9
	sub	r1, r1, #129
	cmp	r1, #1
	bhi	.L3
	ldr	r3, .L17+48
	ldr	r0, [r4]
	ldr	r1, [r3]
	bl	input_report_abs
	ldr	r3, .L17+52
	ldr	r2, [fp, #-48]
	ldr	r1, [r3]
	ldr	r0, [r4]
	bl	input_report_abs
	ldr	r3, .L17+56
	ldr	r2, .L17+60
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #1
	ldr	r0, [r4]
	bl	input_event
	ldr	r0, [r4]
	bl	input_sync
	b	.L3
.L11:
	str	r2, [fp, #-48]
	b	.L5
.L9:
	ldr	r2, .L17+60
	ldr	r1, .L17+56
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r4]
	bl	input_event
	ldr	r0, [r4]
	bl	input_sync
	b	.L3
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	XY_BUFSIZE
	.word	GENERNAL_STATUS_REG
	.word	.LC0
	.word	MAX11801_FIFO_INT
	.word	MAX11801_FIFO_OVERFLOW
	.word	IRQ_HANDLED
	.word	FIFO_RD_CMD
	.word	MEASURE_TAG_MASK
	.word	MEASURE_X_TAG
	.word	MEASURE_Y_TAG
	.word	XY_BUF_OFFSET
	.word	EVENT_TAG_MASK
	.word	ABS_X
	.word	ABS_Y
	.word	EV_KEY
	.word	BTN_TOUCH
	.size	max11801_ts_interrupt, .-max11801_ts_interrupt
	.comm	XY_BUF_OFFSET,4,4
	.comm	XY_BUFSIZE,4,4
	.comm	MEASURE_Y_TAG,4,4
	.comm	MEASURE_X_TAG,4,4
	.comm	MEASURE_TAG_MASK,4,4
	.comm	MAX11801_FIFO_OVERFLOW,4,4
	.comm	MAX11801_FIFO_INT,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	GENERNAL_STATUS_REG,4,4
	.comm	FIFO_RD_CMD,4,4
	.comm	EV_KEY,4,4
	.comm	EVENT_TAG_MASK,4,4
	.comm	BTN_TOUCH,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
