	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sermouse_process_msc
_sermouse_process_msc:                  ## @sermouse_process_msc
	.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	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	8(%rdi), %eax
	cmpq	$4, %rax
	ja	LBB0_6
## %bb.1:
	movl	%esi, %r15d
	movq	(%rbx), %r13
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %eax
	shrb	$7, %al
	addb	%r15b, %al
	sarb	%al
	movsbl	%al, %r12d
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_input_report_rel
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	subb	1(%r13), %al
	movsbl	%al, %edx
	movq	%r14, %rdi
	callq	_input_report_rel
	subb	%r12b, %r15b
	movb	%r15b, (%r13)
	jmp	LBB0_6
LBB0_5:
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	(%r13), %edx
	movq	%r14, %rdi
	callq	_input_report_rel
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	1(%r13), %al
	subb	%r15b, %al
	movsbl	%al, %edx
	movq	%r14, %rdi
	callq	_input_report_rel
	movl	%r15d, %eax
	shrb	$7, %al
	addb	%r15b, %al
	sarb	%al
	movb	%al, 1(%r13)
	jmp	LBB0_6
LBB0_2:
	movzbl	%r15b, %r12d
	movl	%r12d, %eax
	andl	$-8, %eax
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.3:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%r12d
	xorl	%edx, %edx
	testb	$4, %r15b
	sete	%dl
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$1, %r12d
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_MIDDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testb	$2, %r15b
	sete	%dl
	movq	%r14, %rdi
	callq	_input_report_key
LBB0_6:
	movq	%r14, %rdi
	callq	_input_sync
	movl	8(%rbx), %eax
	incl	%eax
	xorl	%ecx, %ecx
	cmpl	$5, %eax
	cmovnel	%eax, %ecx
	movl	%ecx, 8(%rbx)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_BTN_MIDDLE,4,2                 ## @BTN_MIDDLE
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.no_dead_strip	_sermouse_process_msc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sermouse_process_msc
_sermouse_process_msc:                  ; @sermouse_process_msc
	.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, x0
	ldr	x20, [x0, #16]
	ldr	w8, [x0, #8]
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.1:
	mov	x21, x1
	ldr	x23, [x19]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _REL_X@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	and	w8, w21, #0x80
	add	w8, w21, w8, lsr #7
	sbfx	w22, w8, #1, #7
	mov	x0, x20
	mov	x2, x22
	bl	_input_report_rel
Lloh5:
	adrp	x8, _REL_Y@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldrb	w8, [x23, #1]
	neg	w8, w8
	sxtb	w2, w8
	mov	x0, x20
	bl	_input_report_rel
	sub	w8, w21, w22
	strb	w8, [x23]
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _REL_X@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldrsb	w2, [x23]
	mov	x0, x20
	bl	_input_report_rel
Lloh11:
	adrp	x8, _REL_Y@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldrb	w8, [x23, #1]
	sub	w8, w8, w21
	and	w22, w21, #0x80
	sxtb	w2, w8
	mov	x0, x20
	bl	_input_report_rel
	add	w8, w21, w22, lsr #7
	sxtb	w8, w8
	lsr	w8, w8, #1
	strb	w8, [x23, #1]
	b	LBB0_6
LBB0_4:
	and	w8, w21, #0xf8
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.5:
	and	w21, w21, #0xff
Lloh14:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mvn	w22, w21
	mov	w23, #1
	bic	w2, w23, w21, lsr #2
	mov	x0, x20
	bl	_input_report_key
Lloh17:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	and	w2, w22, #0x1
	mov	x0, x20
	bl	_input_report_key
Lloh20:
	adrp	x8, _BTN_MIDDLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTN_MIDDLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bic	w2, w23, w21, lsr #1
	mov	x0, x20
	bl	_input_report_key
LBB0_6:
	mov	x0, x20
	bl	_input_sync
	ldr	w8, [x19, #8]
	add	w9, w8, #1
	cmp	w9, #5
	csinc	w8, wzr, w8, eq
	str	w8, [x19, #8]
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_BTN_MIDDLE,4,2                 ; @BTN_MIDDLE
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.no_dead_strip	_sermouse_process_msc
.subsections_via_symbols
