	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7877_process_data
_ad7877_process_data:                   ## @ad7877_process_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	24(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_AD7877_SEQ_XPOS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_MAX_12BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r13d
	movq	_AD7877_SEQ_YPOS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rax,%rdx,4), %edx
	andl	%r13d, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rax,%rcx,4), %r12d
	andl	%r13d, %r12d
	movq	_AD7877_SEQ_Z1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	setne	%dl
	movl	(%rax,%rcx,4), %r15d
	andl	%r13d, %r15d
	movq	_AD7877_SEQ_Z2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ebx
	setne	%al
	andb	%dl, %al
	movzbl	%al, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	andl	%r13d, %ebx
	subl	%r15d, %ebx
	imull	%r12d, %ebx
	imull	8(%r14), %ebx
	xorl	%ecx, %ecx
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %r13d
	addl	$2047, %r13d                    ## imm = 0x7FF
	shrl	$12, %r13d
	cmpl	12(%r14), %r13d
	jbe	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
LBB0_7:
	subl	(%rax), %ecx
	jmp	LBB0_8
LBB0_3:
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_timer_pending
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_5
## %bb.4:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_input_report_key
LBB0_5:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_report_abs
	movq	%rbx, %rdi
	callq	_input_sync
	xorl	%ecx, %ecx
LBB0_8:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7877_SEQ_XPOS,8,3            ## @AD7877_SEQ_XPOS
	.comm	_MAX_12BIT,4,2                  ## @MAX_12BIT
	.comm	_AD7877_SEQ_YPOS,8,3            ## @AD7877_SEQ_YPOS
	.comm	_AD7877_SEQ_Z1,8,3              ## @AD7877_SEQ_Z1
	.comm	_AD7877_SEQ_Z2,8,3              ## @AD7877_SEQ_Z2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.no_dead_strip	_ad7877_process_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7877_process_data
_ad7877_process_data:                   ; @ad7877_process_data
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AD7877_SEQ_XPOS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AD7877_SEQ_XPOS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
	ldr	x19, [x0, #24]
Lloh3:
	adrp	x10, _MAX_12BIT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_12BIT@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x10]
Lloh6:
	adrp	x10, _AD7877_SEQ_YPOS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AD7877_SEQ_YPOS@GOTPAGEOFF]
	ands	w20, w23, w9
Lloh8:
	ldr	x9, [x10]
	ldr	w24, [x8, x9, lsl #2]
Lloh9:
	adrp	x9, _AD7877_SEQ_Z1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AD7877_SEQ_Z1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
	cset	w10, ne
Lloh12:
	adrp	x11, _AD7877_SEQ_Z2@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AD7877_SEQ_Z2@GOTPAGEOFF]
	ands	w21, w9, w23
Lloh14:
	ldr	x9, [x11]
	ldr	w25, [x8, x9, lsl #2]
	cset	w8, ne
	and	w0, w10, w8
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
	and	w8, w25, w23
	sub	w8, w8, w21
	mul	w8, w8, w20
	ldp	w9, w10, [x22, #8]
	mul	w8, w8, w9
	udiv	w8, w8, w21
	add	w8, w8, #2047
	lsr	w21, w8, #12
	cmp	w21, w10
	b.ls	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	and	w23, w24, w23
	add	x0, x22, #16
	bl	_timer_pending
	cbnz	w0, LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_input_report_key
LBB0_5:
Lloh21:
	adrp	x8, _ABS_X@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_input_report_abs
Lloh24:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_abs
Lloh27:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
	mov	x0, x19
	bl	_input_sync
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7877_SEQ_XPOS,8,3            ; @AD7877_SEQ_XPOS
	.comm	_MAX_12BIT,4,2                  ; @MAX_12BIT
	.comm	_AD7877_SEQ_YPOS,8,3            ; @AD7877_SEQ_YPOS
	.comm	_AD7877_SEQ_Z1,8,3              ; @AD7877_SEQ_Z1
	.comm	_AD7877_SEQ_Z2,8,3              ; @AD7877_SEQ_Z2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.no_dead_strip	_ad7877_process_data
.subsections_via_symbols
