	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function byd_reconnect
_byd_reconnect:                         ## @byd_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, %rbx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_psmouse_dbg
	movq	%rbx, %rdi
	callq	_psmouse_reset
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_byd_detect
	movl	$0, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_psmouse_reset
	movl	$1, %r14d
	movl	$1, %edi
	callq	_ssleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_byd_detect
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_psmouse_reset
	movl	$1, %edi
	callq	_ssleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_byd_detect
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	$2, %r14d
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_psmouse_dbg
	movq	%rbx, %rdi
	callq	_byd_reset_touchpad
	movl	%eax, %r14d
	movl	$0, %eax
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_psmouse_err
	movl	%r14d, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reconnect\n"

L_.str.1:                               ## @.str.1
	.asciz	"Reconnected after %d attempts\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to initialize device\n"

	.no_dead_strip	_byd_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function byd_reconnect
_byd_reconnect:                         ; @byd_reconnect
	.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	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_psmouse_dbg
	mov	x0, x19
	bl	_psmouse_reset
	mov	x0, x19
	mov	w1, #0
	bl	_byd_detect
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_psmouse_reset
	mov	w20, #1
	mov	w0, #1
	bl	_ssleep
	mov	x0, x19
	mov	w1, #0
	bl	_byd_detect
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_psmouse_reset
	mov	w0, #1
	bl	_ssleep
	mov	x0, x19
	mov	w1, #0
	bl	_byd_detect
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	w20, #2
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	mov	x0, x19
	bl	_byd_reset_touchpad
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_psmouse_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reconnect\n"

l_.str.1:                               ; @.str.1
	.asciz	"Reconnected after %d attempts\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to initialize device\n"

	.no_dead_strip	_byd_reconnect
.subsections_via_symbols
