	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adi_decode
_adi_decode:                            ## @adi_decode
	.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
	movq	16(%rdi), %rax
	movl	$-1, %ebx
	cmpq	24(%rdi), %rax
	jl	LBB0_23
## %bb.1:
	movq	%rdi, %r13
	movq	56(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r15
	movq	(%rdi), %r12
	movl	32(%rdi), %r14d
	movl	$4, %esi
	callq	_adi_get_bits
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_adi_get_bits
	shll	$4, %eax
	orl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	cmpl	%eax, %r14d
	jne	LBB0_23
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, 36(%r13)
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r12,%rbx), %r14d
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_adi_get_bits
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	incq	%rbx
	cmpl	36(%r13), %ebx
	jl	LBB0_4
## %bb.5:
	addq	%rbx, %r12
LBB0_6:
	movq	%r12, %rax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	cmpl	$0, 40(%r13)
	jle	LBB0_7
## %bb.13:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%rax,%rbx), %r14d
	movq	%r13, %rdi
	movl	$8, %esi
	movq	%rax, %r12
	callq	_adi_get_bits
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	%r12, %rax
	incq	%rbx
	cmpl	40(%r13), %ebx
	jl	LBB0_14
## %bb.8:
	addq	%rbx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_7:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_9:
	movl	44(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.10:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	48(%r13), %r14d
	jne	LBB0_12
## %bb.24:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_adi_get_bits
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movsbl	(%rbx), %esi
	movl	%eax, %edx
	andl	$1, %edx
	btl	$2, %eax
	sbbl	$0, %edx
	negl	%edx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_input_report_abs
	movsbl	1(%rbx), %esi
	addq	$2, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edx
	shll	$28, %edx
	sarl	$31, %edx
	btl	$1, %r12d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	adcl	$0, %edx
	movq	%r15, %rdi
	callq	_input_report_abs
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_25:                                ##   in Loop: Header=BB0_11 Depth=1
	movswl	(%r12), %ebx
	addq	$2, %r12
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_adi_get_bits
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_input_report_key
	movl	44(%r13), %eax
	cmpl	$61, %r14d
	ja	LBB0_15
## %bb.26:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	%r14d
	cmpl	%eax, %r14d
	jl	LBB0_11
LBB0_15:
	cmpl	$0, 52(%r13)
	jle	LBB0_19
## %bb.16:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_adi_get_bits
	cmpl	$9, %eax
	movl	$0, %ecx
	cmovgel	%ecx, %eax
	movq	%r13, %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movsbl	(%r13,%r14,2), %esi
	movq	_adi_hat_to_axis@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,8), %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movsbl	1(%r13,%r14,2), %esi
	movq	%r15, %r13
	movq	_adi_hat_to_axis@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%rbx,8), %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	incq	%r14
	cmpl	52(%r15), %r14d
	jl	LBB0_17
## %bb.18:
	movl	44(%r13), %eax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_19:
	cmpl	$64, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jl	LBB0_22
## %bb.20:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movswl	(%r12,%rbx,2), %r14d
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_adi_get_bits
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_input_report_key
	incq	%rbx
	leal	63(%rbx), %eax
	cmpl	44(%r13), %eax
	jl	LBB0_21
LBB0_22:
	movq	%r15, %rdi
	callq	_input_sync
	xorl	%ebx, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adi_hat_to_axis,8,3            ## @adi_hat_to_axis
	.no_dead_strip	_adi_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adi_decode
_adi_decode:                            ; @adi_decode
	.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
	ldp	x8, x9, [x0, #16]
	cmp	x8, x9
	b.lt	LBB0_24
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #56]
	ldp	x23, x22, [x0]
	ldr	w24, [x0, #32]
	mov	w1, #4
	bl	_adi_get_bits
	mov	x21, x0
	mov	x0, x19
	mov	w1, #4
	bl	_adi_get_bits
	orr	w8, w21, w0, lsl #4
	cmp	w24, w8
	b.ne	LBB0_24
; %bb.2:
	ldr	w8, [x19, #36]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w21, [x23, x24]
	mov	x0, x19
	mov	w1, #10
	bl	_adi_get_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	w8, [x19, #36]
	add	x24, x24, #1
	cmp	w24, w8
	b.lt	LBB0_4
; %bb.5:
	add	x23, x23, x24
LBB0_6:
	ldr	w8, [x19, #40]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x24, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w21, [x23, x24]
	mov	x0, x19
	mov	w1, #8
	bl	_adi_get_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	w8, [x19, #40]
	add	x24, x24, #1
	cmp	w24, w8
	b.lt	LBB0_8
; %bb.9:
	add	x23, x23, x24
LBB0_10:
	ldr	w8, [x19, #44]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.11:
	mov	w24, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #48]
	cmp	w24, w8
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	w1, #4
	bl	_adi_get_bits
	mov	x21, x0
	ldrsb	w1, [x23]
	ubfx	w8, w0, #2, #1
	and	w9, w0, #0x1
	sub	w2, w8, w9
	mov	x0, x20
	bl	_input_report_abs
	add	x25, x23, #2
	ldrsb	w1, [x23, #1]
	ubfx	w8, w21, #1, #1
	lsl	w9, w21, #28
	add	w2, w8, w9, asr #31
	mov	x0, x20
	bl	_input_report_abs
	mov	x23, x25
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldrsh	w21, [x22], #2
	mov	x0, x19
	mov	w1, #1
	bl	_adi_get_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_key
	ldr	w8, [x19, #44]
	cmp	w24, #61
	b.hi	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	cmp	w24, w8
	b.lt	LBB0_12
LBB0_16:
	ldr	w9, [x19, #52]
	cmp	w9, #1
	b.lt	LBB0_20
; %bb.17:
	mov	w21, #0
Lloh0:
	adrp	x24, _adi_hat_to_axis@GOTPAGE
Lloh1:
	ldr	x24, [x24, _adi_hat_to_axis@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #4
	bl	_adi_get_bits
	cmp	w0, #8
	csel	w8, wzr, w0, gt
	ldrsb	w1, [x23]
	ldr	x9, [x24]
	sbfiz	x25, x8, #3, #32
	ldr	w2, [x9, x25]
	mov	x0, x20
	bl	_input_report_abs
	ldrsb	w1, [x23, #1]
	ldr	x8, [x24]
	add	x8, x8, x25
	ldr	w2, [x8, #4]
	mov	x0, x20
	bl	_input_report_abs
	add	w21, w21, #1
	ldr	w8, [x19, #52]
	add	x23, x23, #2
	cmp	w21, w8
	b.lt	LBB0_18
; %bb.19:
	ldr	w8, [x19, #44]
LBB0_20:
	cmp	w8, #64
	b.lt	LBB0_23
; %bb.21:
	mov	x23, #0
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldrsh	w21, [x22, x23, lsl #1]
	mov	x0, x19
	mov	w1, #1
	bl	_adi_get_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_key
	ldr	w8, [x19, #44]
	add	x23, x23, #1
	add	w9, w23, #63
	cmp	w9, w8
	b.lt	LBB0_22
LBB0_23:
	mov	x0, x20
	bl	_input_sync
	mov	w0, #0
	b	LBB0_25
LBB0_24:
	mov	w0, #-1
LBB0_25:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_adi_hat_to_axis,8,3            ; @adi_hat_to_axis
	.no_dead_strip	_adi_decode
.subsections_via_symbols
