	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_hw_init_ss4_v2
_alps_hw_init_ss4_v2:                   ## @alps_hw_init_ss4_v2
	.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
	movw	$10340, -18(%rbp)               ## imm = 0x2864
	movq	_PSMOUSE_CMD_SETSTREAM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_ps2_command
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	(%rbx), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	_PSMOUSE_CMD_SETRATE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-18(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	leaq	-17(%rbp), %rsi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_ps2_command
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	%r14, %rdi
	callq	_alps_exit_command_mode
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	%r14, %rdi
	callq	_alps_enter_command_mode
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	movl	$29, %esi
	movl	$32, %edx
	callq	_alps_command_mode_write_reg
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_alps_exit_command_mode
	movl	$-1, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_alps_exit_command_mode
	movq	_PSMOUSE_CMD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_SETSTREAM,4,2      ## @PSMOUSE_CMD_SETSTREAM
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ## @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ## @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_ss4_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_hw_init_ss4_v2
_alps_hw_init_ss4_v2:                   ; @alps_hw_init_ss4_v2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	w8, #10340
	strh	w8, [sp, #14]
Lloh0:
	adrp	x20, _PSMOUSE_CMD_SETSTREAM@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PSMOUSE_CMD_SETSTREAM@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x1, #0
	bl	_ps2_command
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	w0, LBB0_7
; %bb.2:
Lloh2:
	adrp	x20, _PSMOUSE_CMD_SETRATE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PSMOUSE_CMD_SETRATE@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x21, sp, #14
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbnz	w0, LBB0_7
; %bb.3:
	orr	x1, x21, #0x1
	ldr	w2, [x20]
	mov	x0, x19
	bl	_ps2_command
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_alps_exit_command_mode
	cbnz	x0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_alps_enter_command_mode
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #29
	mov	w2, #32
	bl	_alps_command_mode_write_reg
	cbz	x0, LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_alps_exit_command_mode
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x19
	bl	_alps_exit_command_mode
Lloh4:
	adrp	x8, _PSMOUSE_CMD_ENABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSMOUSE_CMD_ENABLE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_SETSTREAM,4,2      ; @PSMOUSE_CMD_SETSTREAM
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ; @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ; @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_ss4_v2
.subsections_via_symbols
