	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_hw_init_v7
_alps_hw_init_v7:                       ## @alps_hw_init_v7
	.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
	callq	_alps_enter_command_mode
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movq	%rbx, %rdi
	callq	_alps_exit_command_mode
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	movl	$49881, %esi                    ## imm = 0xC2D9
	callq	_alps_command_mode_read_reg
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	movl	$50071, %esi                    ## imm = 0xC397
	callq	_alps_get_v3_v7_resolution
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	movl	$49865, %esi                    ## imm = 0xC2C9
	movl	$100, %edx
	callq	_alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	movl	$49860, %esi                    ## imm = 0xC2C4
	callq	_alps_command_mode_read_reg
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.5:
	orl	$2, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	___alps_command_mode_write_reg
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	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	_PSMOUSE_CMD_ENABLE,4,2         ## @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_v7
.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_v7
_alps_hw_init_v7:                       ; @alps_hw_init_v7
	.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
	bl	_alps_enter_command_mode
	cbz	x0, LBB0_2
LBB0_1:
	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_2:
	mov	x0, x19
	mov	w1, #49881
	bl	_alps_command_mode_read_reg
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.3:
	mov	x0, x19
	mov	w1, #50071
	bl	_alps_get_v3_v7_resolution
	cbnz	x0, LBB0_1
; %bb.4:
	mov	x0, x19
	mov	w1, #49865
	mov	w2, #100
	bl	_alps_command_mode_write_reg
	cbnz	x0, LBB0_1
; %bb.5:
	mov	x0, x19
	mov	w1, #49860
	bl	_alps_command_mode_read_reg
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.6:
	orr	w1, w0, #0x2
	mov	x0, x19
	bl	___alps_command_mode_write_reg
	cbnz	x0, LBB0_1
; %bb.7:
	mov	x0, x19
	bl	_alps_exit_command_mode
Lloh0:
	adrp	x8, _PSMOUSE_CMD_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_ENABLE@GOTPAGEOFF]
Lloh2:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ; @PSMOUSE_CMD_ENABLE
	.no_dead_strip	_alps_hw_init_v7
.subsections_via_symbols
