	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h3600ts_process_packet
_h3600ts_process_packet:                ## @h3600ts_process_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	24(%rdi), %r14
	cmpl	$128, (%rdi)
	jne	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	cmpb	$0, _h3600ts_process_packet.touched(%rip)
	jne	LBB0_3
## %bb.2:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_input_report_key
	movb	$1, _h3600ts_process_packet.touched(%rip)
LBB0_3:
	cmpl	$0, 16(%rbx)
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	shll	$8, %ecx
	addl	4(%rax), %ecx
	movl	8(%rax), %ebx
	shll	$8, %ebx
	addl	12(%rax), %ebx
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%cx, %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%bx, %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	jmp	LBB0_6
LBB0_5:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
	movb	$0, _h3600ts_process_packet.touched(%rip)
LBB0_6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_h3600ts_process_packet.touched,1,2 ## @h3600ts_process_packet.touched
	.comm	_KEY_RECORD,4,2                 ## @KEY_RECORD
	.comm	_KEY_PROG1,4,2                  ## @KEY_PROG1
	.comm	_KEY_PROG2,4,2                  ## @KEY_PROG2
	.comm	_KEY_Q,4,2                      ## @KEY_Q
	.comm	_KEY_PROG3,4,2                  ## @KEY_PROG3
	.comm	_KEY_UP,4,2                     ## @KEY_UP
	.comm	_KEY_RIGHT,4,2                  ## @KEY_RIGHT
	.comm	_KEY_LEFT,4,2                   ## @KEY_LEFT
	.comm	_KEY_DOWN,4,2                   ## @KEY_DOWN
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.no_dead_strip	_h3600ts_process_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function h3600ts_process_packet
_h3600ts_process_packet:                ; @h3600ts_process_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0, #24]
	ldr	w8, [x0]
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.1:
	mov	x20, x0
	adrp	x21, _h3600ts_process_packet.touched@PAGE
	ldrb	w8, [x21, _h3600ts_process_packet.touched@PAGEOFF]
	tbnz	w8, #0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w22, #1
	mov	x0, x19
	mov	w2, #1
	bl	_input_report_key
	strb	w22, [x21, _h3600ts_process_packet.touched@PAGEOFF]
LBB0_3:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	ldp	w9, w10, [x8]
	add	w9, w10, w9, lsl #8
	ldp	w10, w8, [x8, #8]
	add	w20, w8, w10, lsl #8
Lloh3:
	adrp	x8, _ABS_X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	and	w2, w9, #0xffff
	mov	x0, x19
	bl	_input_report_abs
Lloh6:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	and	w2, w20, #0xffff
	mov	x0, x19
	bl	_input_report_abs
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_input_report_key
	strb	wzr, [x21, _h3600ts_process_packet.touched@PAGEOFF]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_h3600ts_process_packet.touched,1,2 ; @h3600ts_process_packet.touched
	.comm	_KEY_RECORD,4,2                 ; @KEY_RECORD
	.comm	_KEY_PROG1,4,2                  ; @KEY_PROG1
	.comm	_KEY_PROG2,4,2                  ; @KEY_PROG2
	.comm	_KEY_Q,4,2                      ; @KEY_Q
	.comm	_KEY_PROG3,4,2                  ; @KEY_PROG3
	.comm	_KEY_UP,4,2                     ; @KEY_UP
	.comm	_KEY_RIGHT,4,2                  ; @KEY_RIGHT
	.comm	_KEY_LEFT,4,2                   ; @KEY_LEFT
	.comm	_KEY_DOWN,4,2                   ; @KEY_DOWN
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.no_dead_strip	_h3600ts_process_packet
.subsections_via_symbols
