	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_hw_init_v1_v2
_alps_hw_init_v1_v2:                    ## @alps_hw_init_v1_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_ALPS_PASS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_alps_passthrough_mode_v2
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_12
LBB0_2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_alps_tap_mode
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_psmouse_warn
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %rdi
	callq	_alps_absolute_mode_v1_v2
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movq	%r14, %rdi
	callq	_psmouse_err
LBB0_11:
	movl	$-1, %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_alps_passthrough_mode_v2
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_12
LBB0_8:
	movq	_PSMOUSE_CMD_SETSTREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ALPS_PASS,4,2                  ## @ALPS_PASS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable hardware tapping\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable absolute mode\n"

	.comm	_PSMOUSE_CMD_SETSTREAM,4,2      ## @PSMOUSE_CMD_SETSTREAM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable stream mode\n"

	.no_dead_strip	_alps_hw_init_v1_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_v1_v2
_alps_hw_init_v1_v2:                    ; @alps_hw_init_v1_v2
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w8, [x20]
Lloh0:
	adrp	x21, _ALPS_PASS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ALPS_PASS@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_alps_passthrough_mode_v2
	cbnz	x0, LBB0_7
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	bl	_alps_tap_mode
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_warn
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_alps_absolute_mode_v1_v2
	cbz	x0, LBB0_9
; %bb.5:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_psmouse_err
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w8, [x20]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	mov	w1, #0
	bl	_alps_passthrough_mode_v2
	cbnz	x0, LBB0_7
LBB0_11:
Lloh6:
	adrp	x8, _PSMOUSE_CMD_SETSTREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSMOUSE_CMD_SETSTREAM@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbz	x0, LBB0_8
; %bb.12:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ALPS_PASS,4,2                  ; @ALPS_PASS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable hardware tapping\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable absolute mode\n"

	.comm	_PSMOUSE_CMD_SETSTREAM,4,2      ; @PSMOUSE_CMD_SETSTREAM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable stream mode\n"

	.no_dead_strip	_alps_hw_init_v1_v2
.subsections_via_symbols
