	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2pp_process_byte
_ps2pp_process_byte:                    ## @ps2pp_process_byte
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$3, 8(%rdi)
	jge	LBB0_2
## %bb.1:
	movq	_PSMOUSE_GOOD_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_2:
	movq	16(%rdi), %r14
	movq	(%rdi), %rbx
	movl	(%rbx), %edx
	movl	%edx, %eax
	notl	%eax
	testb	$72, %al
	jne	LBB0_19
## %bb.3:
	movl	4(%rbx), %eax
	testb	$2, %al
	jne	LBB0_4
LBB0_19:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_psmouse_report_standard_packet
	jmp	LBB0_20
LBB0_4:
	sarl	$4, %eax
	andl	$48, %edx
	orl	%eax, %edx
	cmpl	$15, %edx
	je	LBB0_13
## %bb.5:
	cmpl	$14, %edx
	je	LBB0_12
## %bb.6:
	cmpl	$13, %edx
	jne	LBB0_17
## %bb.7:
	movl	8(%rbx), %edi
	testb	$-128, %dil
	jne	LBB0_8
## %bb.9:
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movl	8(%rbx), %edi
	testb	$8, %dil
	jne	LBB0_14
## %bb.15:
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	movq	_BTN_SIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	xorl	%edi, %edi
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_EXTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$1, %edi
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_TASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$2, %edi
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_BACK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$3, %edi
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$4, %edi
	jmp	LBB0_11
LBB0_17:
	leaq	L_.str(%rip), %rsi
	callq	_psmouse_dbg
	jmp	LBB0_18
LBB0_14:
	movq	_REL_HWHEEL@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %r15d
	sarl	$4, %edi
	movl	$3, %esi
	callq	_sign_extend32
	negl	%eax
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_input_report_rel
	movl	8(%rbx), %r15d
	movl	$3, %edi
	callq	_BIT
	orl	%r15d, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_18
LBB0_8:
	movq	_REL_HWHEEL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r15d
	movl	$3, %esi
	callq	_sign_extend32
	negl	%eax
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_input_report_rel
	movq	_BTN_SIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$4, %edi
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_EXTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %r12d
	movl	$5, %edi
LBB0_11:
	callq	_BIT
	andl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_input_report_key
LBB0_18:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_psmouse_report_standard_buttons
LBB0_20:
	movq	%r14, %rdi
	callq	_input_sync
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_GOOD_DATA,4,2          ## @PSMOUSE_GOOD_DATA
	.comm	_REL_HWHEEL,4,2                 ## @REL_HWHEEL
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.comm	_BTN_SIDE,4,2                   ## @BTN_SIDE
	.comm	_BTN_EXTRA,4,2                  ## @BTN_EXTRA
	.comm	_BTN_TASK,4,2                   ## @BTN_TASK
	.comm	_BTN_BACK,4,2                   ## @BTN_BACK
	.comm	_BTN_FORWARD,4,2                ## @BTN_FORWARD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received PS2++ packet #%x, but don't know how to handle.\n"

	.comm	_PSMOUSE_FULL_PACKET,4,2        ## @PSMOUSE_FULL_PACKET
	.no_dead_strip	_ps2pp_process_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2pp_process_byte
_ps2pp_process_byte:                    ; @ps2pp_process_byte
	.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	w8, [x0, #8]
	cmp	w8, #3
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PSMOUSE_GOOD_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_GOOD_DATA@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	ldr	x19, [x0, #16]
	ldr	x20, [x0]
	ldr	w8, [x20]
	mov	w9, #72
	bics	wzr, w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w9, [x20, #4]
	tbnz	w9, #1, LBB0_5
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_psmouse_report_standard_packet
	b	LBB0_14
LBB0_5:
	and	w8, w8, #0x30
	orr	w2, w8, w9, asr #4
	cmp	w2, #15
	b.eq	LBB0_9
; %bb.6:
	cmp	w2, #14
	b.eq	LBB0_10
; %bb.7:
	cmp	w2, #13
	b.ne	LBB0_12
; %bb.8:
Lloh2:
	adrp	x8, _REL_HWHEEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REL_HWHEEL@GOTPAGEOFF]
	ldr	w0, [x20, #8]
Lloh4:
	adrp	x9, _REL_WHEEL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _REL_WHEEL@GOTPAGEOFF]
	tst	w0, #0x80
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
	mov	w1, #3
	bl	_sign_extend32
	neg	w2, w0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_rel
Lloh6:
	adrp	x8, _BTN_SIDE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BTN_SIDE@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #4
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
Lloh9:
	adrp	x8, _BTN_EXTRA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BTN_EXTRA@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #5
	b	LBB0_11
LBB0_9:
	ldr	w8, [x20, #8]
Lloh12:
	adrp	x9, _REL_HWHEEL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REL_HWHEEL@GOTPAGEOFF]
Lloh14:
	adrp	x10, _REL_WHEEL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _REL_WHEEL@GOTPAGEOFF]
	tst	w8, #0x8
	csel	x9, x10, x9, eq
	ldr	w21, [x9]
	asr	w0, w8, #4
	mov	w1, #3
	bl	_sign_extend32
	neg	w2, w0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_rel
	ldr	w21, [x20, #8]
	mov	w0, #3
	bl	_BIT
	orr	w8, w0, w21
	str	w8, [x20]
	b	LBB0_13
LBB0_10:
Lloh16:
	adrp	x8, _BTN_SIDE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BTN_SIDE@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #0
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
Lloh19:
	adrp	x8, _BTN_EXTRA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BTN_EXTRA@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #1
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
Lloh22:
	adrp	x8, _BTN_TASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BTN_TASK@GOTPAGEOFF]
Lloh24:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #2
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
Lloh25:
	adrp	x8, _BTN_BACK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BTN_BACK@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #3
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
Lloh28:
	adrp	x8, _BTN_FORWARD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BTN_FORWARD@GOTPAGEOFF]
Lloh30:
	ldr	w21, [x8]
	ldr	w22, [x20, #8]
	mov	w0, #4
LBB0_11:
	bl	_BIT
	and	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_key
	b	LBB0_13
LBB0_12:
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	bl	_psmouse_dbg
LBB0_13:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_psmouse_report_standard_buttons
LBB0_14:
	mov	x0, x19
	bl	_input_sync
Lloh33:
	adrp	x8, _PSMOUSE_FULL_PACKET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PSMOUSE_FULL_PACKET@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_GOOD_DATA,4,2          ; @PSMOUSE_GOOD_DATA
	.comm	_REL_HWHEEL,4,2                 ; @REL_HWHEEL
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.comm	_BTN_SIDE,4,2                   ; @BTN_SIDE
	.comm	_BTN_EXTRA,4,2                  ; @BTN_EXTRA
	.comm	_BTN_TASK,4,2                   ; @BTN_TASK
	.comm	_BTN_BACK,4,2                   ; @BTN_BACK
	.comm	_BTN_FORWARD,4,2                ; @BTN_FORWARD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received PS2++ packet #%x, but don't know how to handle.\n"

	.comm	_PSMOUSE_FULL_PACKET,4,2        ; @PSMOUSE_FULL_PACKET
	.no_dead_strip	_ps2pp_process_byte
.subsections_via_symbols
