	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mk712_interrupt
_mk712_interrupt:                       ## @mk712_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_mk712_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_mk712_io@GOTPCREL(%rip), %rbx
	movq	_MK712_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_inb
	movzbl	%al, %eax
	notl	%eax
	movq	_MK712_CONVERSION_COMPLETE@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_2
## %bb.1:
	movb	$0, _mk712_interrupt.debounce(%rip)
	jmp	LBB0_7
LBB0_2:
	movq	_MK712_STATUS_TOUCH@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	movb	$0, _mk712_interrupt.debounce(%rip)
	movq	_mk712_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_input_report_key
	jmp	LBB0_7
LBB0_4:
	cmpb	$0, _mk712_interrupt.debounce(%rip)
	je	LBB0_5
## %bb.6:
	movq	_mk712_dev@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_input_report_key
	movl	(%r14), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	_mk712_interrupt.last_x(%rip), %edx
	callq	_input_report_abs
	movl	(%r14), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	_mk712_interrupt.last_y(%rip), %edx
	callq	_input_report_abs
	jmp	LBB0_7
LBB0_5:
	movb	$1, _mk712_interrupt.debounce(%rip)
LBB0_7:
	movq	_MK712_X@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_inw
	andl	$4095, %eax                     ## imm = 0xFFF
	movw	%ax, _mk712_interrupt.last_x(%rip)
	movq	_MK712_Y@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_inw
	andl	$4095, %eax                     ## imm = 0xFFF
	movw	%ax, _mk712_interrupt.last_y(%rip)
	movq	_mk712_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_input_sync
	movq	_mk712_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_mk712_interrupt.debounce,1,2 ## @mk712_interrupt.debounce
.zerofill __DATA,__bss,_mk712_interrupt.last_x,2,1 ## @mk712_interrupt.last_x
.zerofill __DATA,__bss,_mk712_interrupt.last_y,2,1 ## @mk712_interrupt.last_y
	.comm	_mk712_lock,4,2                 ## @mk712_lock
	.comm	_mk712_io,8,3                   ## @mk712_io
	.comm	_MK712_STATUS,8,3               ## @MK712_STATUS
	.comm	_MK712_CONVERSION_COMPLETE,1,0  ## @MK712_CONVERSION_COMPLETE
	.comm	_MK712_STATUS_TOUCH,1,0         ## @MK712_STATUS_TOUCH
	.comm	_mk712_dev,4,2                  ## @mk712_dev
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_MK712_X,8,3                    ## @MK712_X
	.comm	_MK712_Y,8,3                    ## @MK712_Y
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mk712_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mk712_interrupt
_mk712_interrupt:                       ; @mk712_interrupt
	.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
Lloh0:
	adrp	x0, _mk712_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _mk712_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh2:
	adrp	x19, _mk712_io@GOTPAGE
Lloh3:
	ldr	x19, [x19, _mk712_io@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _MK712_STATUS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MK712_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
Lloh7:
	adrp	x8, _MK712_CONVERSION_COMPLETE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MK712_CONVERSION_COMPLETE@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh9:
	adrp	x20, _mk712_dev@GOTPAGE
Lloh10:
	ldr	x20, [x20, _mk712_dev@GOTPAGEOFF]
	adrp	x22, _mk712_interrupt.last_x@PAGE
	adrp	x21, _mk712_interrupt.last_y@PAGE
	bics	wzr, w8, w0
	b.eq	LBB0_2
; %bb.1:
	adrp	x8, _mk712_interrupt.debounce@PAGE
	strb	wzr, [x8, _mk712_interrupt.debounce@PAGEOFF]
	b	LBB0_7
LBB0_2:
	mvn	w8, w0
Lloh11:
	adrp	x9, _MK712_STATUS_TOUCH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MK712_STATUS_TOUCH@GOTPAGEOFF]
	ldrb	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _mk712_interrupt.debounce@PAGE
	strb	wzr, [x8, _mk712_interrupt.debounce@PAGEOFF]
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_input_report_key
	b	LBB0_7
LBB0_4:
	adrp	x8, _mk712_interrupt.debounce@PAGE
	ldrb	w9, [x8, _mk712_interrupt.debounce@PAGEOFF]
	tbz	w9, #0, LBB0_6
; %bb.5:
	ldr	w0, [x20]
Lloh17:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_input_report_key
	ldr	w0, [x20]
Lloh20:
	adrp	x8, _ABS_X@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldrh	w2, [x22, _mk712_interrupt.last_x@PAGEOFF]
	bl	_input_report_abs
	ldr	w0, [x20]
Lloh23:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldrh	w2, [x21, _mk712_interrupt.last_y@PAGEOFF]
	bl	_input_report_abs
	b	LBB0_7
LBB0_6:
	mov	w9, #1
	strb	w9, [x8, _mk712_interrupt.debounce@PAGEOFF]
LBB0_7:
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _MK712_X@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MK712_X@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inw
	and	w8, w0, #0xfff
	strh	w8, [x22, _mk712_interrupt.last_x@PAGEOFF]
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _MK712_Y@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MK712_Y@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inw
	and	w8, w0, #0xfff
	strh	w8, [x21, _mk712_interrupt.last_y@PAGEOFF]
	ldr	w0, [x20]
	bl	_input_sync
Lloh32:
	adrp	x0, _mk712_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _mk712_lock@GOTPAGEOFF]
	bl	_spin_unlock
Lloh34:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh36:
	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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdrp	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_mk712_interrupt.debounce,1,2 ; @mk712_interrupt.debounce
.zerofill __DATA,__bss,_mk712_interrupt.last_x,2,1 ; @mk712_interrupt.last_x
.zerofill __DATA,__bss,_mk712_interrupt.last_y,2,1 ; @mk712_interrupt.last_y
	.comm	_mk712_lock,4,2                 ; @mk712_lock
	.comm	_mk712_io,8,3                   ; @mk712_io
	.comm	_MK712_STATUS,8,3               ; @MK712_STATUS
	.comm	_MK712_CONVERSION_COMPLETE,1,0  ; @MK712_CONVERSION_COMPLETE
	.comm	_MK712_STATUS_TOUCH,1,0         ; @MK712_STATUS_TOUCH
	.comm	_mk712_dev,4,2                  ; @mk712_dev
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_MK712_X,8,3                    ; @MK712_X
	.comm	_MK712_Y,8,3                    ; @MK712_Y
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mk712_interrupt
.subsections_via_symbols
