	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htcpen_interrupt
_htcpen_interrupt:                      ## @htcpen_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	_TOUCH_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HTCPEN_PORT_INDEX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_outb_p
	movq	_HTCPEN_PORT_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_inb_p
	testw	%ax, %ax
	je	LBB0_2
## %bb.1:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
	jmp	LBB0_5
LBB0_2:
	movq	_X_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_outb_p
	movl	(%rbx), %edi
	callq	_inb_p
	movl	%eax, %r15d
	movq	_Y_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_outb_p
	movl	(%rbx), %edi
	callq	_inb_p
	movl	%eax, %r14d
	movq	_LSB_XY_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_outb_p
	movl	(%rbx), %edi
	callq	_inb_p
                                        ## kill: def $ax killed $ax def $rax
	movq	_X_AXIS_MAX@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	movl	%eax, %edx
	shrl	$4, %edx
	andl	$15, %edx
	leal	(%rdx,%r15,8), %edx
	movl	%ecx, %ebx
	subl	%edx, %ebx
	movq	_invert_x@GOTPCREL(%rip), %rsi
	cmpq	$0, (%rsi)
	cmovnel	%edx, %ebx
	cmpw	%cx, %bx
	je	LBB0_5
## %bb.3:
	testw	%bx, %bx
	je	LBB0_5
## %bb.4:
	movq	_invert_y@GOTPCREL(%rip), %rcx
	andl	$15, %eax
	leal	(%rax,%r14,8), %eax
	movq	_Y_AXIS_MAX@GOTPCREL(%rip), %rdx
	movzwl	(%rdx), %r14d
	subl	%eax, %r14d
	cmpq	$0, (%rcx)
	cmovel	%eax, %r14d
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_input_report_key
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%bx, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
LBB0_5:
	movq	%r12, %rdi
	callq	_input_sync
	movq	_HTCPEN_PORT_IRQ_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inb_p
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TOUCH_INDEX,4,2                ## @TOUCH_INDEX
	.comm	_HTCPEN_PORT_INDEX,4,2          ## @HTCPEN_PORT_INDEX
	.comm	_HTCPEN_PORT_DATA,4,2           ## @HTCPEN_PORT_DATA
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_X_INDEX,4,2                    ## @X_INDEX
	.comm	_Y_INDEX,4,2                    ## @Y_INDEX
	.comm	_LSB_XY_INDEX,4,2               ## @LSB_XY_INDEX
	.comm	_X_AXIS_MAX,2,1                 ## @X_AXIS_MAX
	.comm	_invert_x,8,3                   ## @invert_x
	.comm	_invert_y,8,3                   ## @invert_y
	.comm	_Y_AXIS_MAX,2,1                 ## @Y_AXIS_MAX
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_HTCPEN_PORT_IRQ_CLEAR,4,2      ## @HTCPEN_PORT_IRQ_CLEAR
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_htcpen_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htcpen_interrupt
_htcpen_interrupt:                      ; @htcpen_interrupt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _TOUCH_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TOUCH_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x22, _HTCPEN_PORT_INDEX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HTCPEN_PORT_INDEX@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_outb_p
Lloh5:
	adrp	x23, _HTCPEN_PORT_DATA@GOTPAGE
Lloh6:
	ldr	x23, [x23, _HTCPEN_PORT_DATA@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_inb_p
	cbz	w0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_input_report_key
	b	LBB0_4
LBB0_2:
Lloh10:
	adrp	x8, _X_INDEX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _X_INDEX@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_outb_p
	ldr	w0, [x23]
	bl	_inb_p
	mov	x21, x0
Lloh13:
	adrp	x8, _Y_INDEX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _Y_INDEX@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_outb_p
	ldr	w0, [x23]
	bl	_inb_p
	mov	x20, x0
Lloh16:
	adrp	x8, _LSB_XY_INDEX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LSB_XY_INDEX@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_outb_p
	ldr	w0, [x23]
	bl	_inb_p
Lloh19:
	adrp	x8, _X_AXIS_MAX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _X_AXIS_MAX@GOTPAGEOFF]
	ldrh	w8, [x8]
	ubfx	w9, w0, #4, #4
	add	w9, w9, w21, lsl #3
	sub	w10, w8, w9
Lloh21:
	adrp	x11, _invert_x@GOTPAGE
Lloh22:
	ldr	x11, [x11, _invert_x@GOTPAGEOFF]
Lloh23:
	ldr	x11, [x11]
	cmp	x11, #0
	csel	w9, w10, w9, eq
	cmp	w8, w9, uxth
	and	w21, w9, #0xffff
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_4
; %bb.3:
Lloh24:
	adrp	x8, _invert_y@GOTPAGE
Lloh25:
	ldr	x8, [x8, _invert_y@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	and	w9, w0, #0xf
	add	w9, w9, w20, lsl #3
Lloh27:
	adrp	x10, _Y_AXIS_MAX@GOTPAGE
Lloh28:
	ldr	x10, [x10, _Y_AXIS_MAX@GOTPAGEOFF]
	ldrh	w10, [x10]
	sub	w10, w10, w9
	cmp	x8, #0
	csel	w20, w9, w10, eq
Lloh29:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_input_report_key
Lloh32:
	adrp	x8, _ABS_X@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_abs
Lloh35:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	and	w2, w20, #0xffff
	mov	x0, x19
	bl	_input_report_abs
LBB0_4:
	mov	x0, x19
	bl	_input_sync
Lloh38:
	adrp	x8, _HTCPEN_PORT_IRQ_CLEAR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _HTCPEN_PORT_IRQ_CLEAR@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_inb_p
Lloh41:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_TOUCH_INDEX,4,2                ; @TOUCH_INDEX
	.comm	_HTCPEN_PORT_INDEX,4,2          ; @HTCPEN_PORT_INDEX
	.comm	_HTCPEN_PORT_DATA,4,2           ; @HTCPEN_PORT_DATA
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_X_INDEX,4,2                    ; @X_INDEX
	.comm	_Y_INDEX,4,2                    ; @Y_INDEX
	.comm	_LSB_XY_INDEX,4,2               ; @LSB_XY_INDEX
	.comm	_X_AXIS_MAX,2,1                 ; @X_AXIS_MAX
	.comm	_invert_x,8,3                   ; @invert_x
	.comm	_invert_y,8,3                   ; @invert_y
	.comm	_Y_AXIS_MAX,2,1                 ; @Y_AXIS_MAX
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_HTCPEN_PORT_IRQ_CLEAR,4,2      ; @HTCPEN_PORT_IRQ_CLEAR
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_htcpen_interrupt
.subsections_via_symbols
