	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cy8ctmg110_touch_pos
_cy8ctmg110_touch_pos:                  ## @cy8ctmg110_touch_pos
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r14
	movq	_CY8CTMG110_REG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	_CY8CTMG110_TOUCH_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$9, %edx
	callq	_cy8ctmg110_read_regs
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	cmpb	$0, 8(%r13)
	je	LBB0_3
## %bb.4:
	movzwl	(%r13), %eax
	movzwl	2(%r13), %ecx
	rolw	$8, %ax
	rolw	$8, %cx
	movzwl	%ax, %ebx
	movzwl	%cx, %r15d
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_input_report_key
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_input_report_abs
	jmp	LBB0_5
LBB0_3:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
LBB0_5:
	movq	%r14, %rdi
	callq	_input_sync
	xorl	%r15d, %r15d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CY8CTMG110_REG_MAX,4,2         ## @CY8CTMG110_REG_MAX
	.comm	_CY8CTMG110_TOUCH_X1,4,2        ## @CY8CTMG110_TOUCH_X1
	.comm	_EIO,4,2                        ## @EIO
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.no_dead_strip	_cy8ctmg110_touch_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cy8ctmg110_touch_pos
_cy8ctmg110_touch_pos:                  ; @cy8ctmg110_touch_pos
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x19, [x0]
Lloh3:
	adrp	x8, _CY8CTMG110_REG_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CY8CTMG110_REG_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	mov	x0, x20
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
Lloh8:
	adrp	x8, _CY8CTMG110_TOUCH_X1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CY8CTMG110_TOUCH_X1@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #9
	bl	_cy8ctmg110_read_regs
	cbz	x0, LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	ldrb	w8, [x20, #8]
	cbz	w8, LBB0_4
; %bb.3:
	ldrh	w8, [x20]
	rev16	w21, w8
	ldrh	w8, [x20, #2]
	rev16	w20, w8
Lloh14:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_input_report_key
Lloh17:
	adrp	x8, _ABS_X@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
Lloh20:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_input_report_abs
	b	LBB0_5
LBB0_4:
Lloh23:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_input_report_key
LBB0_5:
	mov	x0, x19
	bl	_input_sync
	mov	w0, #0
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CY8CTMG110_REG_MAX,4,2         ; @CY8CTMG110_REG_MAX
	.comm	_CY8CTMG110_TOUCH_X1,4,2        ; @CY8CTMG110_TOUCH_X1
	.comm	_EIO,4,2                        ; @EIO
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.no_dead_strip	_cy8ctmg110_touch_pos
.subsections_via_symbols
