	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_enter_command_mode
_alps_enter_command_mode:               ## @alps_enter_command_mode
	.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	_PSMOUSE_CMD_RESET_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	leaq	-20(%rbp), %rcx
	xorl	%esi, %esi
	callq	_alps_rpt_cmd
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_psmouse_err
LBB0_4:
	movl	$-1, %ebx
	jmp	LBB0_5
LBB0_2:
	leaq	-20(%rbp), %rdi
	callq	_alps_check_valid_firmware_id
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_psmouse_dbg
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ## @PSMOUSE_CMD_RESET_WRAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enter command mode\n"

L_.str.1:                               ## @.str.1
	.asciz	"unknown response while entering command mode\n"

	.no_dead_strip	_alps_enter_command_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_enter_command_mode
_alps_enter_command_mode:               ; @alps_enter_command_mode
	.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, _PSMOUSE_CMD_RESET_WRAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_RESET_WRAP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w1, #0
	bl	_alps_rpt_cmd
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_err
LBB0_2:
	mov	w0, #-1
	b	LBB0_5
LBB0_3:
	add	x0, sp, #12
	bl	_alps_check_valid_firmware_id
	cbz	w0, LBB0_6
; %bb.4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ; @PSMOUSE_CMD_RESET_WRAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enter command mode\n"

l_.str.1:                               ; @.str.1
	.asciz	"unknown response while entering command mode\n"

	.no_dead_strip	_alps_enter_command_mode
.subsections_via_symbols
