	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsc_irq_fn
_tsc_irq_fn:                            ## @tsc_irq_fn
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_REG_TSC_INT_STATUS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%rsi), %rdi
	callq	_readl
	movq	_MEASURE_SIGNAL@GOTPCREL(%rip), %r12
	movq	_DETECT_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%r12), %edi
	movl	%eax, %r14d
	movq	(%rbx), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	_REG_TSC_FLOW_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	_START_SENSE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_writel
	testl	%r14d, (%r12)
	je	LBB0_6
## %bb.1:
	movq	_REG_TSC_MEASURE_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_tsc_wait_detect_mode
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	4(%r15), %edi
	callq	_gpiod_get_value_cansleep
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movl	%r14d, %ebx
	shrl	$16, %ebx
	andl	$4095, %ebx                     ## imm = 0xFFF
	andl	$4095, %r14d                    ## imm = 0xFFF
	movl	(%r15), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_input_report_key
	movl	(%r15), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_input_report_abs
	movl	(%r15), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_input_report_abs
	jmp	LBB0_5
LBB0_4:
	movl	(%r15), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_input_report_key
LBB0_5:
	movl	(%r15), %edi
	callq	_input_sync
LBB0_6:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TSC_INT_STATUS,8,3         ## @REG_TSC_INT_STATUS
	.comm	_MEASURE_SIGNAL,4,2             ## @MEASURE_SIGNAL
	.comm	_DETECT_SIGNAL,4,2              ## @DETECT_SIGNAL
	.comm	_REG_TSC_FLOW_CONTROL,8,3       ## @REG_TSC_FLOW_CONTROL
	.comm	_START_SENSE,4,2                ## @START_SENSE
	.comm	_REG_TSC_MEASURE_VALUE,8,3      ## @REG_TSC_MEASURE_VALUE
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_tsc_irq_fn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsc_irq_fn
_tsc_irq_fn:                            ; @tsc_irq_fn
	.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
	mov	x19, x1
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x21, _REG_TSC_INT_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_TSC_INT_STATUS@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
Lloh2:
	adrp	x22, _MEASURE_SIGNAL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MEASURE_SIGNAL@GOTPAGEOFF]
Lloh4:
	adrp	x8, _DETECT_SIGNAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DETECT_SIGNAL@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh6:
	ldr	w8, [x8]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x21, _REG_TSC_FLOW_CONTROL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _REG_TSC_FLOW_CONTROL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh9:
	adrp	x8, _START_SENSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _START_SENSE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _REG_TSC_MEASURE_VALUE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REG_TSC_MEASURE_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	mov	x0, x19
	bl	_tsc_wait_detect_mode
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_gpiod_get_value_cansleep
	cbz	x0, LBB0_4
LBB0_3:
	ubfx	w21, w20, #16, #12
	and	w20, w20, #0xfff
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_input_report_key
	ldr	w0, [x19]
Lloh18:
	adrp	x8, _ABS_X@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_input_report_abs
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh24:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_input_report_key
LBB0_5:
	ldr	w0, [x19]
	bl	_input_sync
LBB0_6:
Lloh27:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TSC_INT_STATUS,8,3         ; @REG_TSC_INT_STATUS
	.comm	_MEASURE_SIGNAL,4,2             ; @MEASURE_SIGNAL
	.comm	_DETECT_SIGNAL,4,2              ; @DETECT_SIGNAL
	.comm	_REG_TSC_FLOW_CONTROL,8,3       ; @REG_TSC_FLOW_CONTROL
	.comm	_START_SENSE,4,2                ; @START_SENSE
	.comm	_REG_TSC_MEASURE_VALUE,8,3      ; @REG_TSC_MEASURE_VALUE
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_tsc_irq_fn
.subsections_via_symbols
