	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmdc_parse_packet
_tmdc_parse_packet:                     ## @tmdc_parse_packet
	.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	_TMDC_BYTE_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rsi,%rax), %al
	movl	$-1, %r15d
	cmpb	(%rdi), %al
	jne	LBB0_25
## %bb.1:
	movq	%rsi, %r13
	movq	%rdi, %r14
	cmpl	$0, 4(%rdi)
	jle	LBB0_6
## %bb.2:
	xorl	%r15d, %r15d
	movq	_tmdc_byte_a@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	js	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	32(%r14), %edi
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movzbl	(%r13,%rax), %edx
	callq	_input_report_abs
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
## %bb.5:
	movb	(%r14), %al
LBB0_6:
	cmpb	$-127, %al
	je	LBB0_9
## %bb.7:
	cmpb	$-128, %al
	jne	LBB0_11
## %bb.8:
	movq	_tmdc_byte_d@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax), %rbx
	movl	32(%r14), %edi
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movzbl	(%r13,%rbx), %eax
	movl	%eax, %ecx
	shll	$30, %ecx
	sarl	$31, %ecx
	btl	$3, %eax
	adcl	$0, %ecx
	movzbl	%cl, %edx
	callq	_input_report_abs
	movl	32(%r14), %edi
	movq	_ABS_HAT0Y@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movzbl	(%r13,%rbx), %eax
	movl	%eax, %ecx
	andb	$1, %cl
	btl	$2, %eax
	sbbb	$0, %cl
	negb	%cl
	movzbl	%cl, %edx
	jmp	LBB0_10
LBB0_9:
	movq	_tmdc_byte_a@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	24(%rax), %rbx
	movl	32(%r14), %edi
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_tmdc_hat_to_axis@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movzbl	(%r13,%rbx), %ecx
	imull	$5243, %ecx, %ecx               ## imm = 0x147B
	addl	$-739263, %ecx                  ## imm = 0xFFF4B841
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$17, %ecx
	addl	%edx, %ecx
	movslq	%ecx, %rcx
	movzbl	(%rax,%rcx,2), %edx
	callq	_input_report_abs
	movl	32(%r14), %edi
	movq	_ABS_HAT0Y@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%r15), %rax
	movzbl	(%r13,%rbx), %ecx
	imull	$5243, %ecx, %ecx               ## imm = 0x147B
	addl	$-739263, %ecx                  ## imm = 0xFFF4B841
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$17, %ecx
	addl	%edx, %ecx
	movslq	%ecx, %rcx
	movzbl	1(%rax,%rcx,2), %edx
LBB0_10:
	callq	_input_report_abs
LBB0_11:
	movq	16(%r14), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jle	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	movq	_tmdc_byte_d@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movq	(%r15), %rax
	movq	(%rax), %rax
	movzbl	(%r13,%rax), %eax
	movq	24(%r14), %rcx
	movl	(%rcx), %ecx
	addl	%ebx, %ecx
	xorl	%edx, %edx
	btl	%ecx, %eax
	setb	%dl
	callq	_input_report_key
	incq	%rbx
	movq	16(%r14), %rax
	movslq	(%rax), %r12
	cmpq	%r12, %rbx
	jl	LBB0_13
LBB0_14:
	movl	4(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_18
## %bb.15:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movslq	%r12d, %r13
	shlq	$2, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	addq	%r13, %rax
	movl	(%rax,%rbx,4), %esi
	movq	_tmdc_byte_d@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movzbl	(%rcx,%rax), %eax
	movq	24(%r14), %rcx
	movl	4(%rcx), %ecx
	addl	%ebx, %ecx
	xorl	%edx, %edx
	btl	%ecx, %eax
	setb	%dl
	callq	_input_report_key
	incq	%rbx
	movq	16(%r14), %rax
	movslq	4(%rax), %r15
	cmpq	%r15, %rbx
	jl	LBB0_16
## %bb.17:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_18:
	addl	%r12d, %r15d
	movl	8(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.19:
	movslq	%r15d, %r12
	shlq	$2, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	addq	%r12, %rax
	movl	(%rax,%rbx,4), %esi
	movq	_tmdc_byte_d@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movzbl	(%r13,%rax), %eax
	movq	24(%r14), %rcx
	movl	8(%rcx), %ecx
	addl	%ebx, %ecx
	xorl	%edx, %edx
	btl	%ecx, %eax
	setb	%dl
	callq	_input_report_key
	incq	%rbx
	movq	16(%r14), %rax
	movslq	8(%rax), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_20
LBB0_21:
	cmpl	$0, 12(%rax)
	jle	LBB0_24
## %bb.22:
	addl	%r15d, %ecx
	movslq	%ecx, %r15
	shlq	$2, %r15
	xorl	%ebx, %ebx
	movq	_tmdc_byte_d@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	addq	%r15, %rax
	movl	(%rax,%rbx,4), %esi
	movq	(%r12), %rax
	movq	24(%rax), %rax
	movzbl	(%r13,%rax), %eax
	movq	24(%r14), %rcx
	movl	12(%rcx), %ecx
	addl	%ebx, %ecx
	xorl	%edx, %edx
	btl	%ecx, %eax
	setb	%dl
	callq	_input_report_key
	incq	%rbx
	movq	16(%r14), %rax
	movslq	12(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_23
LBB0_24:
	movl	32(%r14), %edi
	callq	_input_sync
	xorl	%r15d, %r15d
LBB0_25:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TMDC_BYTE_ID,8,3               ## @TMDC_BYTE_ID
	.comm	_tmdc_byte_a,8,3                ## @tmdc_byte_a
	.comm	_tmdc_byte_d,8,3                ## @tmdc_byte_d
	.comm	_ABS_HAT0X,8,3                  ## @ABS_HAT0X
	.comm	_ABS_HAT0Y,8,3                  ## @ABS_HAT0Y
	.comm	_tmdc_hat_to_axis,8,3           ## @tmdc_hat_to_axis
	.no_dead_strip	_tmdc_parse_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmdc_parse_packet
_tmdc_parse_packet:                     ; @tmdc_parse_packet
	.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
Lloh0:
	adrp	x8, _TMDC_BYTE_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TMDC_BYTE_ID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrb	w8, [x1, x8]
	ldrb	w9, [x0]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	w9, [x0, #4]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x21, #0
Lloh3:
	adrp	x22, _tmdc_byte_a@GOTPAGE
Lloh4:
	ldr	x22, [x22, _tmdc_byte_a@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x21, lsl #3]
	tbnz	x1, #63, LBB0_25
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #32]
	ldr	x8, [x22]
	ldr	x8, [x8, x21, lsl #3]
	ldrb	w2, [x20, x8]
	bl	_input_report_abs
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.lt	LBB0_3
; %bb.5:
	ldrb	w8, [x19]
LBB0_6:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.8:
Lloh5:
	adrp	x8, _tmdc_byte_d@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tmdc_byte_d@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldrsw	x21, [x8]
	ldr	w0, [x19, #32]
Lloh8:
	adrp	x8, _ABS_HAT0X@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_HAT0X@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	ldrb	w8, [x20, x21]
	ubfx	w9, w8, #3, #1
	lsl	w8, w8, #30
	add	w8, w9, w8, asr #31
	and	w2, w8, #0xff
	bl	_input_report_abs
	ldr	w0, [x19, #32]
Lloh11:
	adrp	x8, _ABS_HAT0Y@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ABS_HAT0Y@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	ldrb	w8, [x20, x21]
	ubfx	w9, w8, #2, #1
	and	w8, w8, #0x1
	sub	w8, w9, w8
	and	w2, w8, #0xff
	b	LBB0_11
LBB0_9:
	mov	w0, #-1
	b	LBB0_26
LBB0_10:
Lloh14:
	adrp	x8, _tmdc_byte_a@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tmdc_byte_a@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldrsw	x21, [x8, #24]
	ldr	w0, [x19, #32]
Lloh17:
	adrp	x8, _ABS_HAT0X@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_HAT0X@GOTPAGEOFF]
Lloh19:
	adrp	x22, _tmdc_hat_to_axis@GOTPAGE
Lloh20:
	ldr	x22, [x22, _tmdc_hat_to_axis@GOTPAGEOFF]
Lloh21:
	ldr	x1, [x8]
	ldr	x8, [x22]
	ldrb	w9, [x20, x21]
	sub	w9, w9, #141
	mov	w23, #5243
	mul	w9, w9, w23
	asr	w10, w9, #17
	add	w9, w10, w9, lsr #31
	sbfiz	x9, x9, #1, #32
	ldrb	w2, [x8, x9]
	bl	_input_report_abs
	ldr	w0, [x19, #32]
Lloh22:
	adrp	x8, _ABS_HAT0Y@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ABS_HAT0Y@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x8]
	ldr	x8, [x22]
	ldrb	w9, [x20, x21]
	sub	w9, w9, #141
	mul	w9, w9, w23
	asr	w10, w9, #17
	add	w9, w10, w9, lsr #31
	add	x8, x8, w9, sxtw #1
	ldrb	w2, [x8, #1]
LBB0_11:
	bl	_input_report_abs
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	w21, [x8]
	cmp	w21, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x22, #0
Lloh25:
	adrp	x23, _tmdc_byte_d@GOTPAGE
Lloh26:
	ldr	x23, [x23, _tmdc_byte_d@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x22, lsl #2]
	ldr	x8, [x23]
	ldr	x8, [x8]
	ldrb	w8, [x20, x8]
	ldr	w0, [x19, #32]
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	add	w9, w22, w9
	lsr	w8, w8, w9
	and	w2, w8, #0x1
	bl	_input_report_key
	add	x22, x22, #1
	ldr	x8, [x19, #16]
	ldrsw	x21, [x8]
	cmp	x22, x21
	b.lt	LBB0_14
LBB0_15:
	ldr	w9, [x8, #4]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x22, #0
	mov	x8, x21
	sbfiz	x23, x8, #2, #32
Lloh27:
	adrp	x24, _tmdc_byte_d@GOTPAGE
Lloh28:
	ldr	x24, [x24, _tmdc_byte_d@GOTPAGEOFF]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x8, x8, x23
	ldr	w1, [x8, x22, lsl #2]
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	ldrb	w8, [x20, x8]
	ldr	w0, [x19, #32]
	ldr	x9, [x19, #24]
	ldr	w9, [x9, #4]
	add	w9, w22, w9
	lsr	w8, w8, w9
	and	w2, w8, #0x1
	bl	_input_report_key
	add	x22, x22, #1
	ldr	x8, [x19, #16]
	ldrsw	x9, [x8, #4]
	cmp	x22, x9
	b.lt	LBB0_17
LBB0_18:
	add	w21, w9, w21
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.19:
	mov	x22, #0
	sbfiz	x23, x21, #2, #32
Lloh29:
	adrp	x24, _tmdc_byte_d@GOTPAGE
Lloh30:
	ldr	x24, [x24, _tmdc_byte_d@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x8, x8, x23
	ldr	w1, [x8, x22, lsl #2]
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	ldrb	w8, [x20, x8]
	ldr	w0, [x19, #32]
	ldr	x9, [x19, #24]
	ldr	w9, [x9, #8]
	add	w9, w22, w9
	lsr	w8, w8, w9
	and	w2, w8, #0x1
	bl	_input_report_key
	add	x22, x22, #1
	ldr	x8, [x19, #16]
	ldrsw	x9, [x8, #8]
	cmp	x22, x9
	b.lt	LBB0_20
LBB0_21:
	ldr	w8, [x8, #12]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.22:
	mov	x22, #0
	add	w8, w9, w21
	sbfiz	x21, x8, #2, #32
Lloh31:
	adrp	x23, _tmdc_byte_d@GOTPAGE
Lloh32:
	ldr	x23, [x23, _tmdc_byte_d@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x8, x8, x21
	ldr	w1, [x8, x22, lsl #2]
	ldr	x8, [x23]
	ldr	x8, [x8, #24]
	ldrb	w8, [x20, x8]
	ldr	w0, [x19, #32]
	ldr	x9, [x19, #24]
	ldr	w9, [x9, #12]
	add	w9, w22, w9
	lsr	w8, w8, w9
	and	w2, w8, #0x1
	bl	_input_report_key
	add	x22, x22, #1
	ldr	x8, [x19, #16]
	ldrsw	x8, [x8, #12]
	cmp	x22, x8
	b.lt	LBB0_23
LBB0_24:
	ldr	w0, [x19, #32]
	bl	_input_sync
LBB0_25:
	mov	w0, #0
LBB0_26:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_TMDC_BYTE_ID,8,3               ; @TMDC_BYTE_ID
	.comm	_tmdc_byte_a,8,3                ; @tmdc_byte_a
	.comm	_tmdc_byte_d,8,3                ; @tmdc_byte_d
	.comm	_ABS_HAT0X,8,3                  ; @ABS_HAT0X
	.comm	_ABS_HAT0Y,8,3                  ; @ABS_HAT0Y
	.comm	_tmdc_hat_to_axis,8,3           ; @tmdc_hat_to_axis
	.no_dead_strip	_tmdc_parse_packet
.subsections_via_symbols
