	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mx25_tcq_create_event_for_4wire
_mx25_tcq_create_event_for_4wire:       ## @mx25_tcq_create_event_for_4wire
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	leaq	LJTI0_0(%rip), %r14
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ecx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %r15d
	movl	(%r13,%r12,4), %edi
	callq	_MX25_ADCQ_FIFO_ID
	movl	%eax, %ebx
	movl	(%r13,%r12,4), %edi
	callq	_MX25_ADCQ_FIFO_DATA
	leal	-1(%rbx), %ecx
	cmpl	$4, %ecx
	ja	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r14,%rcx,4), %rdx
	addq	%r14, %rdx
	movl	%eax, %ecx
	jmpq	*%rdx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %ecx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
LBB0_9:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	cmpl	%eax, %ecx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jae	LBB0_12
## %bb.10:
	cmpl	%eax, %edx
	jae	LBB0_12
## %bb.11:
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r14d
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edx
	callq	_input_report_abs
	movl	8(%rbx), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_input_report_abs
	movl	8(%rbx), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_input_report_key
	movl	8(%rbx), %edi
	callq	_input_sync
	jmp	LBB0_14
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	cmpl	%eax, %ecx
	jb	LBB0_14
## %bb.13:
	cmpl	%eax, %edx
	jb	LBB0_14
## %bb.16:
	movl	8(%rbx), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movl	8(%rbx), %edi
	callq	_input_sync
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mx25_tcq_re_enable_touch_detection ## TAILCALL
LBB0_14:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mx25_tcq_enable_fifo_irq       ## TAILCALL
LBB0_6:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Dropped samples because of invalid index %d\n"

	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.no_dead_strip	_mx25_tcq_create_event_for_4wire
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mx25_tcq_create_event_for_4wire
_mx25_tcq_create_event_for_4wire:       ; @mx25_tcq_create_event_for_4wire
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	w2, LBB0_11
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	w23, #0
	mov	w22, #0
	mov	w24, #0
	mov	w8, #0
	mov	w25, w2
Lloh0:
	adrp	x26, lJTI0_0@PAGE
Lloh1:
	add	x26, x26, lJTI0_0@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x27
	mov	x23, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #4
	subs	x25, x25, #1
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x27, x8
	ldr	w0, [x20]
	bl	_MX25_ADCQ_FIFO_ID
	mov	x21, x0
	ldr	w0, [x20]
	bl	_MX25_ADCQ_FIFO_DATA
	sub	w8, w21, #1
	cmp	w8, #4
	b.hi	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x26, x8]
	add	x9, x9, x10, lsl #2
	mov	x8, x0
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x27
	mov	x22, x0
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, x27
	mov	x24, x0
	b	LBB0_3
LBB0_8:
	ldr	w9, [x19]
	cmp	w8, w9
	ccmp	w24, w9, #2, lo
	b.lo	LBB0_12
; %bb.9:
	cmp	w8, w9
	ccmp	w24, w9, #0, hs
	b.lo	LBB0_13
; %bb.10:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_input_report_key
	ldr	w0, [x19, #8]
	bl	_input_sync
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mx25_tcq_re_enable_touch_detection
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldp	w8, w0, [x19, #4]
	udiv	w2, w23, w8
Lloh5:
	adrp	x9, _ABS_X@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ABS_X@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	udiv	w20, w22, w8
	bl	_input_report_abs
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_input_report_abs
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_input_report_key
	ldr	w0, [x19, #8]
	bl	_input_sync
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mx25_tcq_enable_fifo_irq
LBB0_14:
	ldr	w0, [x19, #12]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_dbg
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Dropped samples because of invalid index %d\n"

	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.no_dead_strip	_mx25_tcq_create_event_for_4wire
.subsections_via_symbols
