	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpad_retrode_packet_handler
_hidpad_retrode_packet_handler:         ## @hidpad_retrode_packet_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	_port_device@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%rsi), %rcx
	movq	-8(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.2:
	movq	(%rbx), %rdi
	callq	_memcpy
	movl	$0, 8(%rbx)
	movq	_NO_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-128(%rax), %ecx
	cmpl	$7, %ecx
	ja	LBB0_6
## %bb.3:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	movl	$0, 8(%rbx)
LBB0_5:
	movl	$0, 8(%rbx)
LBB0_6:
	movl	$0, 8(%rbx)
	movl	%eax, %ecx
	orl	$4, %ecx
	cmpl	$133, %ecx
	je	LBB0_9
	jmp	LBB0_8
LBB0_7:
	movl	$0, 8(%rbx)
LBB0_8:
	movl	$0, 8(%rbx)
	cmpl	$132, %eax
	je	LBB0_10
LBB0_9:
	movl	$0, 8(%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_port_device,8,3                ## @port_device
	.comm	_NO_BTN,4,2                     ## @NO_BTN
	.no_dead_strip	_hidpad_retrode_packet_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpad_retrode_packet_handler
_hidpad_retrode_packet_handler:         ; @hidpad_retrode_packet_handler
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _port_device@GOTPAGE
Lloh1:
	ldr	x8, [x8, _port_device@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrsw	x9, [x1, #4]
	add	x8, x8, x9, lsl #3
	ldur	x19, [x8, #-8]
	cbz	x19, LBB0_10
; %bb.2:
	ldr	x0, [x19]
	bl	_memcpy
	str	wzr, [x19, #8]
Lloh3:
	adrp	x8, _NO_BTN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NO_BTN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w9, w8, #128
	cmp	w9, #7
	b.hi	LBB0_6
; %bb.3:
Lloh6:
	adrp	x10, lJTI0_0@PAGE
Lloh7:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	str	wzr, [x19, #8]
LBB0_5:
	str	wzr, [x19, #8]
LBB0_6:
	str	wzr, [x19, #8]
	orr	w9, w8, #0x4
	cmp	w9, #133
	b.eq	LBB0_9
	b	LBB0_8
LBB0_7:
	str	wzr, [x19, #8]
LBB0_8:
	str	wzr, [x19, #8]
	cmp	w8, #132
	b.eq	LBB0_10
LBB0_9:
	str	wzr, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
                                        ; -- End function
	.comm	_port_device,8,3                ; @port_device
	.comm	_NO_BTN,4,2                     ; @NO_BTN
	.no_dead_strip	_hidpad_retrode_packet_handler
.subsections_via_symbols
