	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_hw_init_rushmore_v3
_alps_hw_init_rushmore_v3:              ## @alps_hw_init_rushmore_v3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_ALPS_DUALPOINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ALPS_REG_BASE_RUSHMORE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_alps_setup_trackstick_v3
	movq	_EIO@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_11
LBB0_2:
	movq	%rbx, %rdi
	callq	_alps_enter_command_mode
	testq	%rax, %rax
	je	LBB0_3
LBB0_11:
	movq	%rbx, %rdi
	callq	_alps_exit_command_mode
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	movl	$49881, %esi                    ## imm = 0xC2D9
	callq	_alps_command_mode_read_reg
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.4:
	movq	%rbx, %rdi
	movl	$49867, %esi                    ## imm = 0xC2CB
	xorl	%edx, %edx
	callq	_alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	movq	%rbx, %rdi
	movl	$49882, %esi                    ## imm = 0xC2DA
	callq	_alps_get_v3_v7_resolution
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	movl	$49862, %esi                    ## imm = 0xC2C6
	callq	_alps_command_mode_read_reg
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.7:
	andl	$253, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	___alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	movl	$49865, %esi                    ## imm = 0xC2C9
	movl	$100, %edx
	callq	_alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	movl	$49860, %esi                    ## imm = 0xC2C4
	callq	_alps_command_mode_read_reg
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.10:
	orl	$2, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	___alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	callq	_alps_exit_command_mode
	movq	_PSMOUSE_CMD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ps2_command                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ALPS_DUALPOINT,4,2             ## @ALPS_DUALPOINT
	.comm	_ALPS_REG_BASE_RUSHMORE,4,2     ## @ALPS_REG_BASE_RUSHMORE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ## @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_rushmore_v3
.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_rushmore_v3
_alps_hw_init_rushmore_v3:              ; @alps_hw_init_rushmore_v3
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _ALPS_DUALPOINT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ALPS_DUALPOINT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ALPS_REG_BASE_RUSHMORE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALPS_REG_BASE_RUSHMORE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_alps_setup_trackstick_v3
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_alps_enter_command_mode
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_alps_exit_command_mode
	mov	w0, #-1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	mov	w1, #49881
	bl	_alps_command_mode_read_reg
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.5:
	mov	x0, x19
	mov	w1, #49867
	mov	w2, #0
	bl	_alps_command_mode_write_reg
	cbnz	x0, LBB0_3
; %bb.6:
	mov	x0, x19
	mov	w1, #49882
	bl	_alps_get_v3_v7_resolution
	cbnz	x0, LBB0_3
; %bb.7:
	mov	x0, x19
	mov	w1, #49862
	bl	_alps_command_mode_read_reg
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.8:
	mov	w8, #253
	and	w1, w0, w8
	mov	x0, x19
	bl	___alps_command_mode_write_reg
	cbnz	x0, LBB0_3
; %bb.9:
	mov	x0, x19
	mov	w1, #49865
	mov	w2, #100
	bl	_alps_command_mode_write_reg
	cbnz	x0, LBB0_3
; %bb.10:
	mov	x0, x19
	mov	w1, #49860
	bl	_alps_command_mode_read_reg
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.11:
	orr	w1, w0, #0x2
	mov	x0, x19
	bl	___alps_command_mode_write_reg
	cbnz	x0, LBB0_3
; %bb.12:
	mov	x0, x19
	bl	_alps_exit_command_mode
Lloh9:
	adrp	x8, _PSMOUSE_CMD_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PSMOUSE_CMD_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ps2_command
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ALPS_DUALPOINT,4,2             ; @ALPS_DUALPOINT
	.comm	_ALPS_REG_BASE_RUSHMORE,4,2     ; @ALPS_REG_BASE_RUSHMORE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ; @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_rushmore_v3
.subsections_via_symbols
