	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function imon_mouse_event
LCPI0_0:
	.byte	8                               ## 0x8
	.byte	8                               ## 0x8
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_1:
	.byte	4                               ## 0x4
	.byte	4                               ## 0x4
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_2:
	.byte	2                               ## 0x2
	.byte	2                               ## 0x2
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_3:
	.byte	1                               ## 0x1
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_4:
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_5:
	.space	16,1
LCPI0_6:
	.space	16,127
LCPI0_7:
	.space	16,64
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_imon_mouse_event:                      ## @imon_mouse_event
	.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
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$65500, (%r12)                  ## imm = 0xFFDC
	movzbl	(%r15), %edx
	jne	LBB0_1
## %bb.4:
	testb	$64, %dl
	je	LBB0_7
## %bb.5:
	movb	1(%r15), %bl
	testb	$5, %bl
	je	LBB0_6
LBB0_7:
	cmpb	$104, %dl
	jne	LBB0_10
## %bb.8:
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	jmp	LBB0_9
LBB0_1:
	cmpl	$5, %ebx
	jne	LBB0_10
## %bb.2:
	andb	$1, %dl
	je	LBB0_10
## %bb.3:
	movzwl	2(%r15), %eax
	movd	%eax, %xmm0
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	movb	$1, -41(%rbp)                   ## 1-byte Folded Spill
	xorl	%r13d, %r13d
	movb	$1, %bl
	jmp	LBB0_16
LBB0_10:
	movq	8(%r12), %rax
	movq	_KEY_CHANNELUP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.11:
	testb	$64, 2(%r15)
	jne	LBB0_13
## %bb.12:
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	movb	$1, -41(%rbp)                   ## 1-byte Folded Spill
	xorl	%ebx, %ebx
	movb	$1, %r13b
	jmp	LBB0_16
LBB0_13:
	movq	_KEY_CHANNELDOWN@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.14:
	xorl	%ebx, %ebx
	testb	$64, 2(%r15)
	jne	LBB0_22
## %bb.15:
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	movb	$-1, %r13b
	movb	$1, -41(%rbp)                   ## 1-byte Folded Spill
	jmp	LBB0_16
LBB0_6:
	xorl	%eax, %eax
	testb	$2, %dl
	sete	%al
	xorl	%ecx, %ecx
	testb	$1, %dl
	sete	%cl
	movzbl	%bl, %edx
	movd	%edx, %xmm1
	pinsrb	$1, 2(%r15), %xmm1
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <8,8,u,u,u,u,u,u,u,u,u,u,u,u,u,u>
	pand	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	psrlw	$2, %xmm2
	pand	LCPI0_1(%rip), %xmm2
	por	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrlw	$4, %xmm0
	pand	LCPI0_2(%rip), %xmm0
	psrlw	$6, %xmm1
	pand	LCPI0_3(%rip), %xmm1
	por	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	LCPI0_4(%rip), %xmm2            ## xmm2 = <240,240,u,u,u,u,u,u,u,u,u,u,u,u,u,u>
	movd	%eax, %xmm0
	pinsrb	$1, %ecx, %xmm0
	por	%xmm1, %xmm2
	psllw	$7, %xmm0
	pblendvb	%xmm0, %xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrlw	$7, %xmm1
	pand	LCPI0_5(%rip), %xmm1
	paddb	%xmm2, %xmm1
	psrlw	$1, %xmm1
	pand	LCPI0_6(%rip), %xmm1
	movdqa	LCPI0_7(%rip), %xmm0            ## xmm0 = [64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64]
	pxor	%xmm0, %xmm1
	paddb	%xmm2, %xmm1
	psubb	%xmm0, %xmm1
	movdqa	%xmm1, -64(%rbp)                ## 16-byte Spill
LBB0_9:
	movb	$1, %bl
	movb	$2, -41(%rbp)                   ## 1-byte Folded Spill
	xorl	%r13d, %r13d
LBB0_16:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	32(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	testb	%bl, %bl
	je	LBB0_17
## %bb.18:
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
	movd	%xmm0, %eax
	pextrb	$1, %xmm0, %ebx
	movl	28(%r12), %edi
	movl	%eax, %ecx
	orb	%bl, %cl
	je	LBB0_20
## %bb.19:
	movq	_REL_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	%al, %edx
	callq	_input_report_rel
	movl	28(%r12), %edi
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	%bl, %edx
	callq	_input_report_rel
	jmp	LBB0_21
LBB0_17:
	movl	28(%r12), %edi
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	%r13b, %edx
	callq	_input_report_rel
	jmp	LBB0_21
LBB0_20:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	1(%r15), %edx
	andl	$1, %edx
	callq	_input_report_key
	movl	28(%r12), %edi
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	-41(%rbp), %eax                 ## 1-byte Folded Reload
	movzbl	1(%r15), %ecx
	xorl	%edx, %edx
	btl	%eax, %ecx
	setb	%dl
	callq	_input_report_key
LBB0_21:
	movl	28(%r12), %edi
	callq	_input_sync
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r12), %rax
	movq	%rax, 16(%r12)
	movl	$1, %ebx
LBB0_22:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_CHANNELUP,8,3              ## @KEY_CHANNELUP
	.comm	_KEY_CHANNELDOWN,8,3            ## @KEY_CHANNELDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending mouse data via input subsystem\n"

	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.no_dead_strip	_imon_mouse_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imon_mouse_event
_imon_mouse_event:                      ; @imon_mouse_event
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w9, [x20]
	ldrb	w8, [x21]
	mov	w10, #65500
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.1:
	tbz	w8, #6, LBB0_3
; %bb.2:
	ldrb	w9, [x21, #1]
	mov	w10, #5
	tst	w9, w10
	b.eq	LBB0_15
LBB0_3:
	cmp	w8, #104
	b.ne	LBB0_8
; %bb.4:
	mov	w22, #0
	mov	w24, #0
	mov	w23, #0
	b	LBB0_16
LBB0_5:
	cmp	w22, #5
	b.ne	LBB0_8
; %bb.6:
	tbz	w8, #0, LBB0_8
; %bb.7:
	mov	w23, #0
	ldrb	w22, [x21, #2]
	ldrb	w24, [x21, #3]
	mov	w25, #1
	mov	w26, #1
	b	LBB0_17
LBB0_8:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _KEY_CHANNELUP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KEY_CHANNELUP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	ldrb	w9, [x21, #2]
	tbnz	w9, #6, LBB0_11
; %bb.10:
	mov	w22, #0
	mov	w24, #0
	mov	w26, #0
	mov	w25, #1
	mov	w23, #1
	b	LBB0_17
LBB0_11:
Lloh3:
	adrp	x9, _KEY_CHANNELDOWN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KEY_CHANNELDOWN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	mov	w22, #0
	ldrb	w8, [x21, #2]
	tbnz	w8, #6, LBB0_23
; %bb.13:
	mov	w22, #0
	mov	w24, #0
	mov	w26, #0
	mov	w23, #255
	mov	w25, #1
	b	LBB0_17
LBB0_14:
	mov	w22, #0
	b	LBB0_23
LBB0_15:
	mov	w23, #0
	and	w10, w9, #0x8
	bfxil	w10, w9, #2, #3
	bfxil	w10, w9, #4, #2
	bfxil	w10, w9, #6, #1
	orr	w9, w10, #0xfffffff0
	tst	w8, #0x2
	csel	w9, w10, w9, eq
	and	w10, w9, #0x80
	add	w10, w9, w10, lsr #7
	add	w22, w9, w10, asr #1
	ldrb	w9, [x21, #2]
	and	w10, w9, #0x8
	bfxil	w10, w9, #2, #3
	bfxil	w10, w9, #4, #2
	bfxil	w10, w9, #6, #1
	orr	w9, w10, #0xfffffff0
	tst	w8, #0x1
	csel	w8, w10, w9, eq
	and	w9, w8, #0x80
	add	w9, w8, w9, lsr #7
	add	w24, w8, w9, asr #1
LBB0_16:
	mov	w26, #1
	mov	w25, #2
LBB0_17:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	w0, [x20, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	tbz	w26, #0, LBB0_20
; %bb.18:
	orr	w8, w22, w24
	ldr	w0, [x20, #28]
	tst	w8, #0xff
	b.eq	LBB0_21
; %bb.19:
Lloh8:
	adrp	x8, _REL_X@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	sxtb	w2, w22
	bl	_input_report_rel
	ldr	w0, [x20, #28]
Lloh11:
	adrp	x8, _REL_Y@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	sxtb	w2, w24
	bl	_input_report_rel
	b	LBB0_22
LBB0_20:
	ldr	w0, [x20, #28]
Lloh14:
	adrp	x8, _REL_WHEEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REL_WHEEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	sxtb	w2, w23
	bl	_input_report_rel
	b	LBB0_22
LBB0_21:
Lloh17:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldrb	w8, [x21, #1]
	and	w2, w8, #0x1
	bl	_input_report_key
	ldr	w0, [x20, #28]
Lloh20:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldrb	w8, [x21, #1]
	lsr	w8, w8, w25
	and	w2, w8, #0x1
	bl	_input_report_key
LBB0_22:
	ldr	w0, [x20, #28]
	bl	_input_sync
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	str	x8, [x20, #16]
	mov	w22, #1
LBB0_23:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_CHANNELUP,8,3              ; @KEY_CHANNELUP
	.comm	_KEY_CHANNELDOWN,8,3            ; @KEY_CHANNELDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending mouse data via input subsystem\n"

	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.no_dead_strip	_imon_mouse_event
.subsections_via_symbols
