	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function egalax_ts_interrupt
_egalax_ts_interrupt:                   ## @egalax_ts_interrupt
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %r15
	movq	8(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_MAX_I2C_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_i2c_master_recv
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	movl	%eax, %ecx
	addl	(%r14), %ecx
	jne	LBB0_5
## %bb.1:
	movq	_EGALAX_MAX_TRIES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.2:
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MAX_I2C_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i2c_master_recv
	movl	%eax, %ecx
	addl	(%r14), %ecx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%r12), %ecx
	cmpl	(%r13), %r12d
	movl	%ecx, %r12d
	jl	LBB0_3
LBB0_5:
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	(%rbx), %eax
	movq	_REPORT_MODE_MTTOUCH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.7:
	movl	4(%rbx), %edx
	movq	_EVENT_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%edx, %r12d
	movq	_EVENT_ID_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	movq	_EVENT_VALID_MASK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_MAX_SUPPORT_POINTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jg	LBB0_9
## %bb.10:
	movl	12(%rbx), %eax
	shll	$8, %eax
	orl	8(%rbx), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	20(%rbx), %r13d
	shll	$8, %r13d
	orl	16(%rbx), %r13d
	movl	28(%rbx), %r14d
	shll	$8, %r14d
	orl	24(%rbx), %r14d
	movq	_EVENT_DOWN_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%edx, %ebx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rbx
	cmoveq	%rax, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_mt_report_slot_state
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	xorl	%eax, %eax
	pushq	%r14
	callq	_dev_dbg
	addq	$16, %rsp
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	andl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_input_report_abs
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_report_abs
	movq	_ABS_MT_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_input_report_abs
LBB0_12:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_input_mt_report_pointer_emulation
	movq	%rbx, %rdi
	callq	_input_sync
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_13:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_I2C_DATA_LEN,4,2           ## @MAX_I2C_DATA_LEN
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EGALAX_MAX_TRIES,4,2           ## @EGALAX_MAX_TRIES
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_REPORT_MODE_MTTOUCH,4,2        ## @REPORT_MODE_MTTOUCH
	.comm	_EVENT_VALID_MASK,4,2           ## @EVENT_VALID_MASK
	.comm	_EVENT_ID_MASK,4,2              ## @EVENT_ID_MASK
	.comm	_EVENT_ID_OFFSET,4,2            ## @EVENT_ID_OFFSET
	.comm	_EVENT_DOWN_UP,4,2              ## @EVENT_DOWN_UP
	.comm	_MAX_SUPPORT_POINTS,4,2         ## @MAX_SUPPORT_POINTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"point invalid\n"

	.comm	_MT_TOOL_FINGER,4,2             ## @MT_TOOL_FINGER
L_.str.1:                               ## @.str.1
	.asciz	"%s id:%d x:%d y:%d z:%d"

L_.str.2:                               ## @.str.2
	.asciz	"down"

L_.str.3:                               ## @.str.3
	.asciz	"up"

	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ## @ABS_MT_PRESSURE
	.no_dead_strip	_egalax_ts_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function egalax_ts_interrupt
_egalax_ts_interrupt:                   ; @egalax_ts_interrupt
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldp	x20, x19, [x1]
Lloh3:
	adrp	x22, _MAX_I2C_DATA_LEN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_I2C_DATA_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	lsl	x8, x2, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_i2c_master_recv
Lloh7:
	adrp	x23, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x23, [x23, _EAGAIN@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh9:
	adrp	x24, _EGALAX_MAX_TRIES@GOTPAGE
Lloh10:
	ldr	x24, [x24, _EGALAX_MAX_TRIES@GOTPAGEOFF]
	ldr	w9, [x24]
	cmn	w0, w8
	ccmp	w9, #1, #8, eq
	b.lt	LBB0_3
; %bb.1:
	mov	w25, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_master_recv
	ldr	w8, [x23]
	ldr	w9, [x24]
	cmn	w0, w8
	ccmp	w25, w9, #0, eq
	add	w25, w25, #1
	b.lt	LBB0_2
LBB0_3:
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _REPORT_MODE_MTTOUCH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _REPORT_MODE_MTTOUCH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.5:
	ldr	w25, [x21, #4]
Lloh14:
	adrp	x8, _EVENT_VALID_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EVENT_VALID_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _EVENT_ID_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EVENT_ID_MASK@GOTPAGEOFF]
	and	w8, w8, w25
Lloh19:
	ldr	w9, [x9]
	and	w9, w9, w25
Lloh20:
	adrp	x10, _EVENT_ID_OFFSET@GOTPAGE
Lloh21:
	ldr	x10, [x10, _EVENT_ID_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	asr	w24, w9, w10
Lloh23:
	adrp	x9, _MAX_SUPPORT_POINTS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MAX_SUPPORT_POINTS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w24, w9, #0, ne
	b.le	LBB0_7
; %bb.6:
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	b	LBB0_10
LBB0_7:
	ldp	w9, w8, [x21, #8]
	orr	w23, w9, w8, lsl #8
	ldp	w9, w8, [x21, #16]
	orr	w22, w9, w8, lsl #8
	ldp	w9, w8, [x21, #24]
	orr	w21, w9, w8, lsl #8
Lloh28:
	adrp	x8, _EVENT_DOWN_UP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EVENT_DOWN_UP@GOTPAGEOFF]
Lloh30:
	ldr	w26, [x8]
	mov	x0, x19
	mov	x1, x24
	bl	_input_mt_slot
Lloh31:
	adrp	x8, _MT_TOOL_FINGER@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, l_.str.2@PAGE
Lloh35:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh36:
	adrp	x9, l_.str.3@PAGE
Lloh37:
	add	x9, x9, l_.str.3@PAGEOFF
	ands	w25, w26, w25
	csel	x26, x9, x8, eq
	mov	x0, x19
	mov	x2, x25
	bl	_input_mt_report_slot_state
	sub	sp, sp, #48
	stp	x22, x21, [sp, #24]
	stp	x24, x23, [sp, #8]
	str	x26, [sp]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	add	sp, sp, #48
	cbz	w25, LBB0_9
; %bb.8:
Lloh40:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_abs
Lloh43:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_abs
Lloh46:
	adrp	x8, _ABS_MT_PRESSURE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ABS_MT_PRESSURE@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
LBB0_9:
	mov	x0, x19
	mov	w1, #1
	bl	_input_mt_report_pointer_emulation
	mov	x0, x19
	bl	_input_sync
LBB0_10:
Lloh49:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	ldur	x8, [x29, #-72]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #64
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_I2C_DATA_LEN,4,2           ; @MAX_I2C_DATA_LEN
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EGALAX_MAX_TRIES,4,2           ; @EGALAX_MAX_TRIES
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_REPORT_MODE_MTTOUCH,4,2        ; @REPORT_MODE_MTTOUCH
	.comm	_EVENT_VALID_MASK,4,2           ; @EVENT_VALID_MASK
	.comm	_EVENT_ID_MASK,4,2              ; @EVENT_ID_MASK
	.comm	_EVENT_ID_OFFSET,4,2            ; @EVENT_ID_OFFSET
	.comm	_EVENT_DOWN_UP,4,2              ; @EVENT_DOWN_UP
	.comm	_MAX_SUPPORT_POINTS,4,2         ; @MAX_SUPPORT_POINTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"point invalid\n"

	.comm	_MT_TOOL_FINGER,4,2             ; @MT_TOOL_FINGER
l_.str.1:                               ; @.str.1
	.asciz	"%s id:%d x:%d y:%d z:%d"

l_.str.2:                               ; @.str.2
	.asciz	"down"

l_.str.3:                               ; @.str.3
	.asciz	"up"

	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ; @ABS_MT_PRESSURE
	.no_dead_strip	_egalax_ts_interrupt
.subsections_via_symbols
