	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_reconnect
_cypress_reconnect:                     ## @cypress_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_CYTP_PS2_CMD_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_cypress_reset
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_cypress_detect
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	-1(%rbx), %ecx
	cmpl	$1, %ebx
	movl	%ecx, %ebx
	jg	LBB0_1
LBB0_3:
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_cypress_set_absolute_mode
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	%r14, %rdi
	callq	_psmouse_err
	movl	$-1, %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CYTP_PS2_CMD_TRIES,4,2         ## @CYTP_PS2_CMD_TRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reconnect: unable to detect trackpad.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Reconnect: Unable to initialize Cypress absolute mode.\n"

	.no_dead_strip	_cypress_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_reconnect
_cypress_reconnect:                     ; @cypress_reconnect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _CYTP_PS2_CMD_TRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CYTP_PS2_CMD_TRIES@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_cypress_reset
	mov	x0, x19
	mov	w1, #0
	bl	_cypress_detect
	subs	w20, w20, #1
	cbz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	b.gt	LBB0_1
LBB0_3:
	cbz	w0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_cypress_set_absolute_mode
	cbz	x0, LBB0_8
; %bb.6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_psmouse_err
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CYTP_PS2_CMD_TRIES,4,2         ; @CYTP_PS2_CMD_TRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reconnect: unable to detect trackpad.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Reconnect: Unable to initialize Cypress absolute mode.\n"

	.no_dead_strip	_cypress_reconnect
.subsections_via_symbols
