	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __psmouse_reconnect
___psmouse_reconnect:                   ## @__psmouse_reconnect
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_serio_get_drvdata
	movq	%rax, %r15
	movq	_psmouse_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	movq	(%r15), %r12
	testq	%r12, %r12
	jne	LBB0_4
## %bb.2:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_3:
	movq	8(%r15), %r12
LBB0_4:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.5:
	movq	8(%rbx), %rax
	movq	_SERIO_PS_PSTHRU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	callq	_serio_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_psmouse_deactivate
	jmp	LBB0_9
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movq	_PSMOUSE_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_psmouse_set_state
	movq	%r15, %rdi
	testq	%r12, %r12
	je	LBB0_12
## %bb.10:
	callq	*%r12
	movl	$-1, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.11:
	movq	16(%r15), %rcx
	jmp	LBB0_14
LBB0_12:
	callq	_psmouse_reset
	movq	%r15, %rdi
	callq	_psmouse_probe
	movl	$-1, %ebx
	testq	%rax, %rax
	js	LBB0_21
## %bb.13:
	movq	_psmouse_max_proto@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_psmouse_extensions
	movq	16(%r15), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_21
LBB0_14:
	cmpl	$0, 4(%rcx)
	jne	LBB0_16
## %bb.15:
	movq	_PSMOUSE_CMD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_psmouse_set_state
	movq	%r15, %rdi
	callq	_psmouse_initialize
LBB0_16:
	testq	%r14, %r14
	je	LBB0_19
## %bb.17:
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	*%rax
LBB0_19:
	movq	16(%r15), %rax
	xorl	%ebx, %ebx
	cmpl	$0, 4(%rax)
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	callq	_psmouse_activate
LBB0_21:
	testq	%r14, %r14
	je	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	callq	_psmouse_activate
LBB0_23:
	movq	_psmouse_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_psmouse_mutex,4,2              ## @psmouse_mutex
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SERIO_PS_PSTHRU,8,3            ## @SERIO_PS_PSTHRU
	.comm	_PSMOUSE_INITIALIZING,4,2       ## @PSMOUSE_INITIALIZING
	.comm	_psmouse_max_proto,4,2          ## @psmouse_max_proto
	.comm	_PSMOUSE_CMD_MODE,4,2           ## @PSMOUSE_CMD_MODE
	.no_dead_strip	___psmouse_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __psmouse_reconnect
___psmouse_reconnect:                   ; @__psmouse_reconnect
	.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	x21, x1
	mov	x20, x0
	bl	_serio_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x0, _psmouse_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _psmouse_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	w21, LBB0_3
; %bb.1:
	ldr	x21, [x19]
	cbz	x21, LBB0_22
; %bb.2:
	ldr	x0, [x20]
	cbnz	x0, LBB0_4
	b	LBB0_6
LBB0_3:
	ldr	x21, [x19, #8]
	ldr	x0, [x20]
	cbz	x0, LBB0_6
LBB0_4:
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _SERIO_PS_PSTHRU@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SERIO_PS_PSTHRU@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	bl	_serio_get_drvdata
	mov	x20, x0
	bl	_psmouse_deactivate
	b	LBB0_7
LBB0_6:
	mov	x20, #0
LBB0_7:
Lloh5:
	adrp	x8, _PSMOUSE_INITIALIZING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PSMOUSE_INITIALIZING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_psmouse_set_state
	mov	x0, x19
	cbz	x21, LBB0_10
; %bb.8:
	blr	x21
	cbnz	w0, LBB0_20
; %bb.9:
	ldr	x8, [x19, #16]
	b	LBB0_12
LBB0_10:
	bl	_psmouse_reset
	mov	x0, x19
	bl	_psmouse_probe
	tbnz	x0, #63, LBB0_20
; %bb.11:
Lloh8:
	adrp	x8, _psmouse_max_proto@GOTPAGE
Lloh9:
	ldr	x8, [x8, _psmouse_max_proto@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_psmouse_extensions
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	cmp	w9, w0
	b.ne	LBB0_20
LBB0_12:
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_14
; %bb.13:
Lloh11:
	adrp	x8, _PSMOUSE_CMD_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PSMOUSE_CMD_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_psmouse_set_state
	mov	x0, x19
	bl	_psmouse_initialize
LBB0_14:
	cbz	x20, LBB0_17
; %bb.15:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_17
; %bb.16:
	mov	x0, x20
	blr	x8
LBB0_17:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_psmouse_activate
LBB0_19:
	mov	w19, #0
	cbnz	x20, LBB0_21
	b	LBB0_23
LBB0_20:
	mov	w19, #-1
	cbz	x20, LBB0_23
LBB0_21:
	mov	x0, x20
	bl	_psmouse_activate
	b	LBB0_23
LBB0_22:
Lloh14:
	adrp	x8, _ENOENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_23:
Lloh17:
	adrp	x0, _psmouse_mutex@GOTPAGE
Lloh18:
	ldr	x0, [x0, _psmouse_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_psmouse_mutex,4,2              ; @psmouse_mutex
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SERIO_PS_PSTHRU,8,3            ; @SERIO_PS_PSTHRU
	.comm	_PSMOUSE_INITIALIZING,4,2       ; @PSMOUSE_INITIALIZING
	.comm	_psmouse_max_proto,4,2          ; @psmouse_max_proto
	.comm	_PSMOUSE_CMD_MODE,4,2           ; @PSMOUSE_CMD_MODE
	.no_dead_strip	___psmouse_reconnect
.subsections_via_symbols
