	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psmouse_probe
_psmouse_probe:                         ## @psmouse_probe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	$165, -32(%rbp)
	movq	_PSMOUSE_CMD_GETID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	callq	_ps2_command
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	-32(%rbp), %eax
	cmpl	$4, %eax
	ja	LBB0_2
## %bb.4:
	movl	$25, %ecx
	btl	%eax, %ecx
	jb	LBB0_5
LBB0_2:
	cmpl	$255, %eax
	jne	LBB0_3
LBB0_5:
	movq	_PSMOUSE_CMD_RESET_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rcx
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_psmouse_warn
	jmp	LBB0_7
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_GETID,4,2          ## @PSMOUSE_CMD_GETID
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PSMOUSE_CMD_RESET_DIS,4,2      ## @PSMOUSE_CMD_RESET_DIS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to reset mouse on %s: %d\n"

	.no_dead_strip	_psmouse_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psmouse_probe
_psmouse_probe:                         ; @psmouse_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	w8, #165
	str	w8, [sp]
Lloh3:
	adrp	x8, _PSMOUSE_CMD_GETID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSMOUSE_CMD_GETID@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, sp
	bl	_ps2_command
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w8, [sp]
	cmp	w8, #4
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #25
	and	w9, w9, w10
	ccmp	w9, #0, #4, ls
	b.ne	LBB0_3
; %bb.2:
	cmp	w8, #255
	b.ne	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _PSMOUSE_CMD_RESET_DIS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSMOUSE_CMD_RESET_DIS@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbz	w0, LBB0_6
; %bb.4:
	mov	x3, x0
	ldr	x8, [x19]
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldr	x8, [sp, #8]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_GETID,4,2          ; @PSMOUSE_CMD_GETID
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PSMOUSE_CMD_RESET_DIS,4,2      ; @PSMOUSE_CMD_RESET_DIS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to reset mouse on %s: %d\n"

	.no_dead_strip	_psmouse_probe
.subsections_via_symbols
