	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsc2007_soft_irq
_tsc2007_soft_irq:                      ## @tsc2007_soft_irq
	.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	%rsi, %rbx
	movq	48(%rsi), %r14
	cmpl	$0, 28(%rsi)
	je	LBB0_1
LBB0_9:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_input_report_abs
	movq	%r14, %rdi
	callq	_input_sync
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	*%rcx
LBB0_11:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	40(%rbx), %r15
	leaq	-56(%rbp), %r12
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	32(%rbx), %edi
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	callq	_wait_event_timeout
	cmpl	$0, 28(%rbx)
	jne	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_tsc2007_is_pen_down
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_tsc2007_read_values
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_tsc2007_calculate_resistance
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 36(%rbx)
	je	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	cmpq	(%rbx), %r13
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %r8
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %r15
	movq	(%rbx), %r12
	subq	%r13, %r12
	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	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movq	%r15, %r12
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	callq	_input_report_abs
	movq	%r14, %rdi
	callq	_input_sync
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DOWN point(%4d,%4d), resistance (%4u)\n"

	.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
L_.str.1:                               ## @.str.1
	.asciz	"ignored pressure %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"UP\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_tsc2007_soft_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsc2007_soft_irq
_tsc2007_soft_irq:                      ; @tsc2007_soft_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x1
	ldr	x20, [x1, #48]
	ldr	w8, [x1, #28]
Lloh0:
	adrp	x26, _BTN_TOUCH@GOTPAGE
Lloh1:
	ldr	x26, [x26, _BTN_TOUCH@GOTPAGEOFF]
Lloh2:
	adrp	x25, _ABS_PRESSURE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ABS_PRESSURE@GOTPAGEOFF]
	cbz	w8, LBB0_4
LBB0_1:
	ldr	x0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #0
	bl	_input_report_key
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, #0
	bl	_input_report_abs
	mov	x0, x20
	bl	_input_sync
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	blr	x8
LBB0_3:
Lloh6:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	add	x21, x19, #40
Lloh9:
	adrp	x22, l_.str.1@PAGE
Lloh10:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh11:
	adrp	x27, _ABS_X@GOTPAGE
Lloh12:
	ldr	x27, [x27, _ABS_X@GOTPAGEOFF]
Lloh13:
	adrp	x28, _ABS_Y@GOTPAGE
Lloh14:
	ldr	x28, [x28, _ABS_Y@GOTPAGEOFF]
Lloh15:
	adrp	x23, l_.str@PAGE
Lloh16:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	x24, [sp]
	mov	x1, x22
	bl	_dev_dbg
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldp	w1, w0, [x19, #28]
	ldr	w2, [x19, #24]
	bl	_wait_event_timeout
	ldr	w8, [x19, #28]
	cbnz	w8, LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_tsc2007_is_pen_down
	cbz	x0, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_mutex_lock
	add	x1, sp, #32
	mov	x0, x19
	bl	_tsc2007_read_values
	mov	x0, x21
	bl	_mutex_unlock
	add	x1, sp, #32
	mov	x0, x19
	bl	_tsc2007_calculate_resistance
	mov	x24, x0
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_1
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19]
	ldr	x0, [x19, #16]
	cmp	x24, x8
	b.gt	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldp	x8, x9, [sp, #32]
	stp	x9, x24, [sp, #8]
	str	x8, [sp]
	mov	x1, x23
	bl	_dev_dbg
	ldr	x8, [x19]
	sub	x24, x8, x24
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #1
	bl	_input_report_key
	ldr	w1, [x27]
	ldr	x2, [sp, #32]
	mov	x0, x20
	bl	_input_report_abs
	ldr	w1, [x28]
	ldr	x2, [sp, #40]
	mov	x0, x20
	bl	_input_report_abs
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x24
	bl	_input_report_abs
	mov	x0, x20
	bl	_input_sync
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DOWN point(%4d,%4d), resistance (%4u)\n"

	.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
l_.str.1:                               ; @.str.1
	.asciz	"ignored pressure %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"UP\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_tsc2007_soft_irq
.subsections_via_symbols
