	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_setup_input_device
_hgpk_setup_input_device:               ## @hgpk_setup_input_device
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movups	12(%rsi), %xmm0
	movups	%xmm0, 12(%rbx)
LBB0_2:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	___set_bit
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	cmpl	$128, %r14d
	je	LBB0_7
## %bb.3:
	cmpl	$130, %r14d
	je	LBB0_6
## %bb.4:
	cmpl	$129, %r14d
	jne	LBB0_9
## %bb.5:
	movq	_EV_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	___set_bit
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	___set_bit
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___set_bit                      ## TAILCALL
LBB0_7:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	movq	_BTN_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	___set_bit
	movq	_ABS_X@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$999, %ecx                      ## imm = 0x3E7
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_Y@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$5, %edx
	movl	$239, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$6, %edx
	jmp	LBB0_8
LBB0_6:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	movq	_BTN_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	___set_bit
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	___set_bit
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$15, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_X@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$399, %ecx                      ## imm = 0x18F
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_Y@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$290, %ecx                      ## imm = 0x122
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$8, %edx
LBB0_8:
	callq	_input_abs_set_res
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$8, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_abs_set_res              ## TAILCALL
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BUG                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_EV_REL,4,2                     ## @EV_REL
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_BTN_TOOL_FINGER,4,2            ## @BTN_TOOL_FINGER
	.comm	_EV_ABS,4,2                     ## @EV_ABS
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.no_dead_strip	_hgpk_setup_input_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_setup_input_device
_hgpk_setup_input_device:               ; @hgpk_setup_input_device
	.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
	mov	x20, x2
	mov	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	ldur	q0, [x1, #12]
	stur	q0, [x19, #12]
LBB0_2:
	ldr	w0, [x19]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x19, #8]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x19, #4]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	___set_bit
Lloh3:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
Lloh6:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
	cmp	w20, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w20, #130
	b.eq	LBB0_7
; %bb.4:
	cmp	w20, #129
	b.ne	LBB0_9
; %bb.5:
Lloh9:
	adrp	x8, _EV_REL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EV_REL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	___set_bit
Lloh12:
	adrp	x8, _REL_X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	___set_bit
Lloh15:
	adrp	x8, _REL_Y@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	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	___set_bit
LBB0_6:
Lloh18:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
Lloh21:
	adrp	x8, _BTN_TOOL_FINGER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BTN_TOOL_FINGER@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
Lloh24:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	___set_bit
Lloh27:
	adrp	x20, _ABS_X@GOTPAGE
Lloh28:
	ldr	x20, [x20, _ABS_X@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #999
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh29:
	adrp	x21, _ABS_Y@GOTPAGE
Lloh30:
	ldr	x21, [x21, _ABS_Y@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #5
	mov	w3, #239
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #6
	b	LBB0_8
LBB0_7:
Lloh31:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
Lloh34:
	adrp	x8, _BTN_TOOL_FINGER@GOTPAGE
Lloh35:
	ldr	x8, [x8, _BTN_TOOL_FINGER@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
Lloh37:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	___set_bit
Lloh40:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #15
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh43:
	adrp	x20, _ABS_X@GOTPAGE
Lloh44:
	ldr	x20, [x20, _ABS_X@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #399
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh45:
	adrp	x21, _ABS_Y@GOTPAGE
Lloh46:
	ldr	x21, [x21, _ABS_Y@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #290
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #8
LBB0_8:
	bl	_input_abs_set_res
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #8
	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_abs_set_res
LBB0_9:
	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	_BUG
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_EV_REL,4,2                     ; @EV_REL
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_BTN_TOOL_FINGER,4,2            ; @BTN_TOOL_FINGER
	.comm	_EV_ABS,4,2                     ; @EV_ABS
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.no_dead_strip	_hgpk_setup_input_device
.subsections_via_symbols
