	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2_mouse_convert_report_to_hid
_ps2_mouse_convert_report_to_hid:       ## @ps2_mouse_convert_report_to_hid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_X_IS_NEG@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_X_IS_OVF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	je	LBB0_3
## %bb.1:
	movl	$-127, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.2:
	movl	(%rdi), %ecx
	cmpl	$-126, %ecx
	movl	$-127, %eax
	cmovael	%ecx, %eax
	jmp	LBB0_5
LBB0_3:
	movl	$127, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.4:
	movl	(%rdi), %ecx
	cmpl	$127, %ecx
	movl	$127, %eax
	cmovbl	%ecx, %eax
LBB0_5:
	movl	%eax, (%rdi)
	movq	_Y_IS_NEG@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_Y_IS_OVF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	je	LBB0_8
## %bb.6:
	movl	$-127, %eax
	testl	%ecx, %ecx
	jne	LBB0_10
## %bb.7:
	movl	4(%rdi), %ecx
	cmpl	$-126, %ecx
	movl	$-127, %eax
	cmovael	%ecx, %eax
	jmp	LBB0_10
LBB0_8:
	movl	$127, %eax
	testl	%ecx, %ecx
	jne	LBB0_10
## %bb.9:
	movl	4(%rdi), %ecx
	cmpl	$127, %ecx
	movl	$127, %eax
	cmovbl	%ecx, %eax
LBB0_10:
	movq	_PS2_MOUSE_BTN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ecx, 8(%rdi)
	negl	%eax
	movl	%eax, 4(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X_IS_NEG,8,3                   ## @X_IS_NEG
	.comm	_X_IS_OVF,4,2                   ## @X_IS_OVF
	.comm	_Y_IS_NEG,8,3                   ## @Y_IS_NEG
	.comm	_Y_IS_OVF,4,2                   ## @Y_IS_OVF
	.comm	_PS2_MOUSE_BTN_MASK,4,2         ## @PS2_MOUSE_BTN_MASK
	.no_dead_strip	_ps2_mouse_convert_report_to_hid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2_mouse_convert_report_to_hid
_ps2_mouse_convert_report_to_hid:       ; @ps2_mouse_convert_report_to_hid
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _X_IS_NEG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X_IS_NEG@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _X_IS_OVF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _X_IS_OVF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	x8, LBB0_3
; %bb.1:
	mov	w8, #-127
	cbnz	w9, LBB0_5
; %bb.2:
	ldr	w9, [x0]
	cmn	w9, #127
	csel	w8, w9, w8, hi
	b	LBB0_5
LBB0_3:
	mov	w8, #127
	cbnz	w9, LBB0_5
; %bb.4:
	ldr	w9, [x0]
	cmp	w9, #127
	csel	w8, w9, w8, lo
LBB0_5:
	str	w8, [x0]
Lloh6:
	adrp	x8, _Y_IS_NEG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Y_IS_NEG@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _Y_IS_OVF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _Y_IS_OVF@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cbz	x8, LBB0_8
; %bb.6:
	mov	w8, #-127
	cbnz	w9, LBB0_10
; %bb.7:
	ldr	w9, [x0, #4]
	cmn	w9, #127
	csel	w8, w9, w8, hi
	b	LBB0_10
LBB0_8:
	mov	w8, #127
	cbnz	w9, LBB0_10
; %bb.9:
	ldr	w9, [x0, #4]
	cmp	w9, #127
	csel	w8, w9, w8, lo
LBB0_10:
Lloh12:
	adrp	x9, _PS2_MOUSE_BTN_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PS2_MOUSE_BTN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	w10, [x0, #8]
	and	w9, w10, w9
	neg	w8, w8
	stp	w8, w9, [x0, #4]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_X_IS_NEG,8,3                   ; @X_IS_NEG
	.comm	_X_IS_OVF,4,2                   ; @X_IS_OVF
	.comm	_Y_IS_NEG,8,3                   ; @Y_IS_NEG
	.comm	_Y_IS_OVF,4,2                   ; @Y_IS_OVF
	.comm	_PS2_MOUSE_BTN_MASK,4,2         ; @PS2_MOUSE_BTN_MASK
	.no_dead_strip	_ps2_mouse_convert_report_to_hid
.subsections_via_symbols
