	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_monitor_mode_write_reg
_alps_monitor_mode_write_reg:           ## @alps_monitor_mode_write_reg
	.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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_PSMOUSE_CMD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_ps2_command
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	movl	$160, %esi
	callq	_alps_monitor_mode_send_word
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_alps_monitor_mode_send_word
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_alps_monitor_mode_send_word
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_PSMOUSE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	negq	%rax
	sbbl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ## @PSMOUSE_CMD_ENABLE
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ## @PSMOUSE_CMD_DISABLE
	.no_dead_strip	_alps_monitor_mode_write_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_monitor_mode_write_reg
_alps_monitor_mode_write_reg:           ; @alps_monitor_mode_write_reg
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PSMOUSE_CMD_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	w1, #160
	bl	_alps_monitor_mode_send_word
	cbnz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_alps_monitor_mode_send_word
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_alps_monitor_mode_send_word
	cbz	x0, LBB0_6
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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_6:
Lloh3:
	adrp	x8, _PSMOUSE_CMD_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSMOUSE_CMD_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ; @PSMOUSE_CMD_ENABLE
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ; @PSMOUSE_CMD_DISABLE
	.no_dead_strip	_alps_monitor_mode_write_reg
.subsections_via_symbols
