	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wtp_raw_event
_wtp_raw_event:                         ## @wtp_raw_event
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hid_get_drvdata
	movq	%rax, %r13
	movq	8(%rax), %rax
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movl	4(%r13), %edi
	testl	%edi, %edi
	je	LBB0_14
## %bb.2:
	movl	(%r14), %ecx
	cmpl	$128, %ecx
	je	LBB0_10
## %bb.3:
	cmpl	$2, %ecx
	jne	LBB0_13
## %bb.4:
	cmpl	$1, %r12d
	jg	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_hid_err
	jmp	LBB0_14
LBB0_10:
	movl	4(%r14), %ecx
	cmpl	(%rax), %ecx
	jne	LBB0_14
## %bb.11:
	movq	_EVENT_TOUCHPAD_RAW_XY@GOTPCREL(%rip), %rax
	cmpl	$128, (%rax)
	jne	LBB0_14
## %bb.12:
	addq	$16, %r14
	leaq	-48(%rbp), %rbx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_hidpp_touchpad_raw_xy_event
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_wtp_send_raw_xy_event
	jmp	LBB0_13
LBB0_6:
	movq	_HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_8
## %bb.7:
	movq	_EV_KEY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r14), %ecx
	andl	$1, %ecx
	callq	_input_event
	movl	4(%r13), %edi
	movl	(%rbx), %esi
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r14), %ecx
	shrl	%ecx
	andl	$1, %ecx
	callq	_input_event
	movl	4(%r13), %edi
	callq	_input_sync
LBB0_13:
	xorl	%r15d, %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$21, %r12d
	jb	LBB0_14
## %bb.9:
	addq	$28, %r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wtp_mouse_raw_xy_event         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received HID report of bad size (%d)"

	.comm	_HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS,4,2 ## @HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_EVENT_TOUCHPAD_RAW_XY,4,2      ## @EVENT_TOUCHPAD_RAW_XY
	.no_dead_strip	_wtp_raw_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wtp_raw_event
_wtp_raw_event:                         ; @wtp_raw_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	bl	_hid_get_drvdata
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w9, [x20]
	cmp	w9, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w9, #2
	b.ne	LBB0_12
; %bb.4:
	cmp	w21, #1
	b.gt	LBB0_10
; %bb.5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_hid_err
LBB0_6:
	mov	w0, #1
	b	LBB0_13
LBB0_7:
	ldr	w9, [x20, #4]
	ldr	w8, [x8]
	mov	w0, #1
	cmp	w9, w8
	b.ne	LBB0_13
; %bb.8:
Lloh2:
	adrp	x8, _EVENT_TOUCHPAD_RAW_XY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EVENT_TOUCHPAD_RAW_XY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.9:
	add	x1, x20, #16
	add	x2, sp, #8
	mov	x0, x19
	bl	_hidpp_touchpad_raw_xy_event
	add	x1, sp, #8
	mov	x0, x19
	bl	_wtp_send_raw_xy_event
	b	LBB0_12
LBB0_10:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.11:
Lloh8:
	adrp	x21, _EV_KEY@GOTPAGE
Lloh9:
	ldr	x21, [x21, _EV_KEY@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	ldr	w8, [x20, #4]
	and	w3, w8, #0x1
	bl	_input_event
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
Lloh13:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	ldr	w8, [x20, #4]
	ubfx	w3, w8, #1, #1
	bl	_input_event
	ldr	w0, [x19, #4]
	bl	_input_sync
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
	cmp	w21, #21
	b.lo	LBB0_6
; %bb.15:
	add	x1, x20, #28
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_wtp_mouse_raw_xy_event
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received HID report of bad size (%d)"

	.comm	_HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS,4,2 ; @HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_EVENT_TOUCHPAD_RAW_XY,4,2      ; @EVENT_TOUCHPAD_RAW_XY
	.no_dead_strip	_wtp_raw_event
.subsections_via_symbols
