	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2mouse_write                 ## -- Begin function ps2mouse_write
	.p2align	4, 0x90
_ps2mouse_write:                        ## @ps2mouse_write
	.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, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	%r12, %rdi
	callq	_fifo_reset
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$132, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$131, %eax
	jne	LBB0_8
## %bb.3:
	movl	%r15d, 4(%r12)
	jmp	LBB0_7
LBB0_4:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.5:
	movq	%r12, %rdi
	movl	%r15d, %esi
	jmp	LBB0_30
LBB0_6:
	movl	%r15d, 8(%r12)
LBB0_7:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movl	$0, (%r12)
	jmp	LBB0_31
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_fprintf
	movl	$0, (%r12)
	jmp	LBB0_31
LBB0_9:
	leal	-128(%r15), %eax
	cmpl	$12, %eax
	ja	LBB0_12
## %bb.10:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movq	_PS2M_STS_REMOTE_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_12:
	testl	%r15d, %r15d
	je	LBB0_27
## %bb.13:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_fprintf
	jmp	LBB0_31
LBB0_14:
	movl	$131, (%r12)
	jmp	LBB0_27
LBB0_15:
	movl	$132, (%r12)
	jmp	LBB0_27
LBB0_16:
	movq	_PS2M_STS_REMOTE_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_17:
	movq	%r12, %rdi
	callq	_ps2mouse_reset
	jmp	LBB0_27
LBB0_18:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movl	12(%r12), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movl	8(%r12), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movl	4(%r12), %esi
	jmp	LBB0_29
LBB0_19:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_20:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movq	%r12, %rdi
	callq	_movement_get
	jmp	LBB0_31
LBB0_21:
	movq	%r12, %rdi
	callq	_ps2mouse_reset
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movq	_PS2MC_BAT_SUCCESS@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_fifo_put
	movq	_PS2MOUSE_DEV_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_23:
	movq	%r12, %rdi
	callq	_fifo_reset
	movq	_PS2M_STS_ENABLE_DEV@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	orl	%eax, 12(%r12)
	jmp	LBB0_27
LBB0_25:
	movq	%r12, %rdi
	callq	_fifo_reset
	movq	_PS2M_STS_ENABLE_DEV@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%r12)
LBB0_27:
	movq	_PS2MC_ACK@GOTPCREL(%rip), %rax
LBB0_28:
	movl	(%rax), %esi
LBB0_29:
	movq	%r12, %rdi
LBB0_30:
	callq	_fifo_put
LBB0_31:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_21
	.long	L0_0_set_23
	.long	L0_0_set_25
	.end_data_region
                                        ## -- End function
	.comm	_PS2MC_ACK,4,2                  ## @PS2MC_ACK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled ps2 mouse current command byte 0x%02x\n"

	.comm	_PS2MC_BAT_SUCCESS,4,2          ## @PS2MC_BAT_SUCCESS
	.comm	_PS2MOUSE_DEV_ID,4,2            ## @PS2MOUSE_DEV_ID
	.comm	_PS2M_STS_ENABLE_DEV,4,2        ## @PS2M_STS_ENABLE_DEV
	.comm	_PS2M_STS_REMOTE_MODE,4,2       ## @PS2M_STS_REMOTE_MODE
L_.str.1:                               ## @.str.1
	.asciz	"Unhandled ps2 mouse command 0x%02x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2mouse_write                 ; -- Begin function ps2mouse_write
	.p2align	2
_ps2mouse_write:                        ; @ps2mouse_write
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_pthread_mutex_lock
	mov	x0, x20
	bl	_fifo_reset
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.1:
	cmp	w8, #132
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #131
	b.ne	LBB0_8
; %bb.3:
	str	w21, [x20, #4]
	b	LBB0_7
LBB0_4:
	cbz	w22, LBB0_9
; %bb.5:
	mov	x0, x20
	mov	x1, x21
	b	LBB0_31
LBB0_6:
	str	w21, [x20, #8]
LBB0_7:
Lloh0:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
	str	wzr, [x20]
	b	LBB0_32
LBB0_8:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	str	wzr, [x20]
	b	LBB0_32
LBB0_9:
	sub	w8, w21, #128
	cmp	w8, #12
	b.hi	LBB0_12
; %bb.10:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
Lloh10:
	adrp	x8, _PS2M_STS_REMOTE_MODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PS2M_STS_REMOTE_MODE@GOTPAGEOFF]
	b	LBB0_26
LBB0_12:
	cbz	w21, LBB0_28
; %bb.13:
Lloh12:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	b	LBB0_32
LBB0_14:
	mov	w8, #131
	str	w8, [x20]
	b	LBB0_28
LBB0_15:
	mov	w8, #132
	str	w8, [x20]
	b	LBB0_28
LBB0_16:
Lloh20:
	adrp	x8, _PS2M_STS_REMOTE_MODE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PS2M_STS_REMOTE_MODE@GOTPAGEOFF]
	b	LBB0_24
LBB0_17:
	mov	x0, x20
	bl	_ps2mouse_reset
	b	LBB0_28
LBB0_18:
Lloh22:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
	ldr	w1, [x20, #12]
	mov	x0, x20
	bl	_fifo_put
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_fifo_put
	ldr	w1, [x20, #4]
	b	LBB0_30
LBB0_19:
Lloh25:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
	b	LBB0_22
LBB0_20:
Lloh27:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
	mov	x0, x20
	bl	_movement_get
	b	LBB0_32
LBB0_21:
	mov	x0, x20
	bl	_ps2mouse_reset
Lloh30:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
Lloh33:
	adrp	x8, _PS2MC_BAT_SUCCESS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PS2MC_BAT_SUCCESS@GOTPAGEOFF]
LBB0_22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
Lloh35:
	adrp	x8, _PS2MOUSE_DEV_ID@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PS2MOUSE_DEV_ID@GOTPAGEOFF]
	b	LBB0_29
LBB0_23:
	mov	x0, x20
	bl	_fifo_reset
Lloh37:
	adrp	x8, _PS2M_STS_ENABLE_DEV@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PS2M_STS_ENABLE_DEV@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	orr	w8, w9, w8
	b	LBB0_27
LBB0_25:
	mov	x0, x20
	bl	_fifo_reset
Lloh39:
	adrp	x8, _PS2M_STS_ENABLE_DEV@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PS2M_STS_ENABLE_DEV@GOTPAGEOFF]
LBB0_26:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	bic	w8, w9, w8
LBB0_27:
	str	w8, [x20, #12]
LBB0_28:
Lloh41:
	adrp	x8, _PS2MC_ACK@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PS2MC_ACK@GOTPAGEOFF]
LBB0_29:
	ldr	w1, [x8]
LBB0_30:
	mov	x0, x20
LBB0_31:
	bl	_fifo_put
LBB0_32:
	mov	x0, x19
	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
	b	_pthread_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_28-LBB0_11)>>2
	.byte	(LBB0_28-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_15-LBB0_11)>>2
	.byte	(LBB0_16-LBB0_11)>>2
	.byte	(LBB0_17-LBB0_11)>>2
	.byte	(LBB0_18-LBB0_11)>>2
	.byte	(LBB0_19-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
	.byte	(LBB0_21-LBB0_11)>>2
	.byte	(LBB0_23-LBB0_11)>>2
	.byte	(LBB0_25-LBB0_11)>>2
                                        ; -- End function
	.comm	_PS2MC_ACK,4,2                  ; @PS2MC_ACK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled ps2 mouse current command byte 0x%02x\n"

	.comm	_PS2MC_BAT_SUCCESS,4,2          ; @PS2MC_BAT_SUCCESS
	.comm	_PS2MOUSE_DEV_ID,4,2            ; @PS2MOUSE_DEV_ID
	.comm	_PS2M_STS_ENABLE_DEV,4,2        ; @PS2M_STS_ENABLE_DEV
	.comm	_PS2M_STS_REMOTE_MODE,4,2       ; @PS2M_STS_REMOTE_MODE
l_.str.1:                               ; @.str.1
	.asciz	"Unhandled ps2 mouse command 0x%02x\n"

.subsections_via_symbols
