	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2kbd_write                   ## -- Begin function ps2kbd_write
	.p2align	4, 0x90
_ps2kbd_write:                          ## @ps2kbd_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movl	(%rbx), %eax
	cmpl	$128, %eax
	jg	LBB0_3
## %bb.1:
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$128, %eax
	je	LBB0_5
	jmp	LBB0_9
LBB0_3:
	cmpl	$129, %eax
	je	LBB0_5
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_9
LBB0_5:
	movq	_PS2KC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fifo_put
	movl	$0, (%rbx)
	jmp	LBB0_22
LBB0_6:
	leal	-128(%r15), %eax
	cmpl	$7, %eax
	ja	LBB0_10
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movl	$128, (%rbx)
	jmp	LBB0_19
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_fprintf
	movl	$0, (%rbx)
	jmp	LBB0_22
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_fprintf
	jmp	LBB0_22
LBB0_12:
	movl	$129, (%rbx)
	jmp	LBB0_19
LBB0_13:
	movl	$130, (%rbx)
	jmp	LBB0_19
LBB0_14:
	movq	_PS2KC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fifo_put
	movq	%rbx, %rdi
	movl	$171, %esi
	callq	_fifo_put
	movq	%rbx, %rdi
	movl	$131, %esi
	jmp	LBB0_21
LBB0_15:
	movq	%rbx, %rdi
	callq	_fifo_reset
	movq	_PS2KC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fifo_put
	movq	_PS2KC_BAT_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_16:
	movl	$1, 4(%rbx)
	movq	%rbx, %rdi
	callq	_fifo_reset
	jmp	LBB0_19
LBB0_17:
	movq	%rbx, %rdi
	movl	$134, %esi
	jmp	LBB0_21
LBB0_18:
	movl	$0, 4(%rbx)
LBB0_19:
	movq	_PS2KC_ACK@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %esi
	movq	%rbx, %rdi
LBB0_21:
	callq	_fifo_put
LBB0_22:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-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
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_13
	.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
	.end_data_region
                                        ## -- End function
	.comm	_PS2KC_ACK,4,2                  ## @PS2KC_ACK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled ps2 keyboard current command byte 0x%02x\n"

	.comm	_PS2KC_BAT_SUCCESS,4,2          ## @PS2KC_BAT_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"Unhandled ps2 keyboard command 0x%02x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2kbd_write                   ; -- Begin function ps2kbd_write
	.p2align	2
_ps2kbd_write:                          ; @ps2kbd_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	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	w8, [x20]
	cmp	w8, #128
	b.gt	LBB0_3
; %bb.1:
	cbz	w8, LBB0_6
; %bb.2:
	cmp	w8, #128
	b.eq	LBB0_5
	b	LBB0_9
LBB0_3:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _PS2KC_ACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS2KC_ACK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
	str	wzr, [x20]
	b	LBB0_22
LBB0_6:
	sub	w8, w21, #128
	cmp	w8, #7
	b.hi	LBB0_10
; %bb.7:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	mov	w8, #128
	str	w8, [x20]
	b	LBB0_19
LBB0_9:
Lloh5:
	adrp	x8, _stderr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	str	wzr, [x20]
	b	LBB0_22
LBB0_10:
	cbz	w21, LBB0_19
; %bb.11:
Lloh10:
	adrp	x8, _stderr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	b	LBB0_22
LBB0_12:
	mov	w8, #129
	str	w8, [x20]
	b	LBB0_19
LBB0_13:
	mov	w8, #130
	str	w8, [x20]
	b	LBB0_19
LBB0_14:
Lloh15:
	adrp	x8, _PS2KC_ACK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PS2KC_ACK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
	mov	x0, x20
	mov	w1, #171
	bl	_fifo_put
	mov	x0, x20
	mov	w1, #131
	b	LBB0_21
LBB0_15:
	mov	x0, x20
	bl	_fifo_reset
Lloh18:
	adrp	x8, _PS2KC_ACK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PS2KC_ACK@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fifo_put
Lloh21:
	adrp	x8, _PS2KC_BAT_SUCCESS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PS2KC_BAT_SUCCESS@GOTPAGEOFF]
	b	LBB0_20
LBB0_16:
	mov	w8, #1
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_fifo_reset
	b	LBB0_19
LBB0_17:
	mov	x0, x20
	mov	w1, #134
	b	LBB0_21
LBB0_18:
	str	wzr, [x20, #4]
LBB0_19:
Lloh23:
	adrp	x8, _PS2KC_ACK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PS2KC_ACK@GOTPAGEOFF]
LBB0_20:
	ldr	w1, [x8]
	mov	x0, x20
LBB0_21:
	bl	_fifo_put
LBB0_22:
	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	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_16-LBB0_8)>>2
	.byte	(LBB0_17-LBB0_8)>>2
	.byte	(LBB0_18-LBB0_8)>>2
                                        ; -- End function
	.comm	_PS2KC_ACK,4,2                  ; @PS2KC_ACK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled ps2 keyboard current command byte 0x%02x\n"

	.comm	_PS2KC_BAT_SUCCESS,4,2          ; @PS2KC_BAT_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"Unhandled ps2 keyboard command 0x%02x\n"

.subsections_via_symbols
