	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adbhid_keyboard_input
_adbhid_keyboard_input:                 ## @adbhid_keyboard_input
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movzbl	(%rdi), %edx
	movq	%rdx, %rbx
	shrq	$4, %rbx
	movq	_adbhid@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	LBB0_7
## %bb.1:
	cmpl	$3, %esi
	jne	LBB0_6
## %bb.2:
	andl	$3, %edx
	movq	_KEYB_KEYREG@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmpl	%eax, %edx
	jne	LBB0_6
## %bb.3:
	movzbl	1(%r14), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_adbhid_input_keycode
	movb	2(%r14), %al
	cmpb	$-1, %al
	je	LBB0_6
## %bb.4:
	cmpb	$127, %al
	jne	LBB0_8
## %bb.5:
	cmpb	$127, 1(%r14)
	jne	LBB0_8
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movzbl	1(%r14), %ecx
	movzbl	2(%r14), %r8d
	movzbl	3(%r14), %r9d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_8:
	movzbl	%al, %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_adbhid_input_keycode           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_adbhid,8,3                     ## @adbhid
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADB HID on ID %d not yet registered, packet %#02x, %#02x, %#02x, %#02x\n"

	.comm	_KEYB_KEYREG,1,0                ## @KEYB_KEYREG
	.no_dead_strip	_adbhid_keyboard_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adbhid_keyboard_input
_adbhid_keyboard_input:                 ; @adbhid_keyboard_input
	.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	x20, x0
	ldrb	w2, [x0]
	lsr	x19, x2, #4
Lloh0:
	adrp	x8, _adbhid@GOTPAGE
Lloh1:
	ldr	x8, [x8, _adbhid@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, x19, lsl #2]
	cbz	w8, LBB0_7
; %bb.1:
	cmp	w1, #3
	b.ne	LBB0_6
; %bb.2:
	and	w8, w2, #0x3
Lloh3:
	adrp	x9, _KEYB_KEYREG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KEYB_KEYREG@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	ldrb	w1, [x20, #1]
	mov	x0, x19
	mov	w2, #0
	bl	_adbhid_input_keycode
	ldrb	w1, [x20, #2]
	cmp	w1, #255
	b.eq	LBB0_6
; %bb.4:
	cmp	w1, #127
	b.ne	LBB0_8
; %bb.5:
	ldrb	w8, [x20, #1]
	cmp	w8, #127
	b.ne	LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldrb	w3, [x20, #1]
	ldrb	w4, [x20, #2]
	ldrb	w5, [x20, #3]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pr_err
LBB0_8:
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_adbhid_input_keycode
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_adbhid,8,3                     ; @adbhid
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADB HID on ID %d not yet registered, packet %#02x, %#02x, %#02x, %#02x\n"

	.comm	_KEYB_KEYREG,1,0                ; @KEYB_KEYREG
	.no_dead_strip	_adbhid_keyboard_input
.subsections_via_symbols
