	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_passthrough_mode_v2
_alps_passthrough_mode_v2:              ## @alps_passthrough_mode_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_PSMOUSE_CMD_SETSCALE11@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PSMOUSE_CMD_SETSCALE21@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_ps2_command
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	_PSMOUSE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movl	$3, %esi
	movl	$100, %edx
	callq	_ps2_drain
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ## @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_SETSCALE11,4,2     ## @PSMOUSE_CMD_SETSCALE11
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ## @PSMOUSE_CMD_DISABLE
	.no_dead_strip	_alps_passthrough_mode_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_passthrough_mode_v2
_alps_passthrough_mode_v2:              ; @alps_passthrough_mode_v2
	.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
Lloh0:
	adrp	x8, _PSMOUSE_CMD_SETSCALE21@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_SETSCALE21@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PSMOUSE_CMD_SETSCALE11@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PSMOUSE_CMD_SETSCALE11@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w20, [x8]
	mov	x1, #0
	mov	x2, x20
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _PSMOUSE_CMD_DISABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSMOUSE_CMD_DISABLE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbz	x0, LBB0_6
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	mov	w1, #3
	mov	w2, #100
	bl	_ps2_drain
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ; @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_SETSCALE11,4,2     ; @PSMOUSE_CMD_SETSCALE11
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ; @PSMOUSE_CMD_DISABLE
	.no_dead_strip	_alps_passthrough_mode_v2
.subsections_via_symbols
