	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_send_keyboard                  ## -- Begin function send_keyboard
	.p2align	4, 0x90
_send_keyboard:                         ## @send_keyboard
	.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
	xorl	%eax, %eax
	callq	_osalSysLock
	movq	_USB_DRIVER@GOTPCREL(%rip), %rdi
	callq	_usbGetDriverStateI
	movq	%rax, %r14
	movq	_USB_ACTIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	xorl	%eax, %eax
	callq	_osalSysUnlock
	cmpq	%rbx, %r14
	jne	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	callq	_osalSysLock
	movq	_KEYBOARD_IN_EPNUM@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_USB_DRIVER@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_usbGetTransmitStatusI
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rdi
	callq	_osalThreadSuspendS
LBB0_3:
	movq	_keyboard_protocol@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	$8, %ecx
	je	LBB0_5
## %bb.4:
	movq	_KEYBOARD_REPORT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_5:
	movq	(%rbx), %rsi
	movq	_USB_DRIVER@GOTPCREL(%rip), %rdi
	movq	%r15, %rdx
	callq	_usbStartTransmitI
	xorl	%eax, %eax
	callq	_osalSysUnlock
	movl	(%r15), %eax
	movq	_keyboard_report_sent@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DRIVER,8,3                 ## @USB_DRIVER
	.comm	_USB_ACTIVE,8,3                 ## @USB_ACTIVE
	.comm	_KEYBOARD_IN_EPNUM,8,3          ## @KEYBOARD_IN_EPNUM
	.comm	_keyboard_protocol,8,3          ## @keyboard_protocol
	.comm	_KEYBOARD_REPORT_SIZE,4,2       ## @KEYBOARD_REPORT_SIZE
	.comm	_keyboard_report_sent,4,2       ## @keyboard_report_sent
	.comm	_SHARED_IN_EPNUM,8,3            ## @SHARED_IN_EPNUM
	.comm	_keymap_config,8,3              ## @keymap_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_send_keyboard                  ; -- Begin function send_keyboard
	.p2align	2
_send_keyboard:                         ; @send_keyboard
	.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	x19, x0
	bl	_osalSysLock
Lloh0:
	adrp	x0, _USB_DRIVER@GOTPAGE
Lloh1:
	ldr	x0, [x0, _USB_DRIVER@GOTPAGEOFF]
	bl	_usbGetDriverStateI
	mov	x20, x0
Lloh2:
	adrp	x8, _USB_ACTIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_ACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	x21, [x8]
	bl	_osalSysUnlock
	cmp	x20, x21
	b.ne	LBB0_4
; %bb.1:
	bl	_osalSysLock
Lloh5:
	adrp	x21, _KEYBOARD_IN_EPNUM@GOTPAGE
Lloh6:
	ldr	x21, [x21, _KEYBOARD_IN_EPNUM@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh7:
	adrp	x20, _USB_DRIVER@GOTPAGE
Lloh8:
	ldr	x20, [x20, _USB_DRIVER@GOTPAGEOFF]
	mov	x0, x20
	bl	_usbGetTransmitStatusI
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x0, [x8]
	bl	_osalThreadSuspendS
LBB0_3:
Lloh9:
	adrp	x8, _keyboard_protocol@GOTPAGE
Lloh10:
	ldr	x8, [x8, _keyboard_protocol@GOTPAGEOFF]
Lloh11:
	adrp	x9, _KEYBOARD_REPORT_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _KEYBOARD_REPORT_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	ldr	w9, [x9]
	cmp	x8, #0
	mov	w8, #8
	csel	w3, w8, w9, eq
	ldr	x1, [x21]
Lloh15:
	adrp	x0, _USB_DRIVER@GOTPAGE
Lloh16:
	ldr	x0, [x0, _USB_DRIVER@GOTPAGEOFF]
	mov	x2, x19
	bl	_usbStartTransmitI
	bl	_osalSysUnlock
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _keyboard_report_sent@GOTPAGE
Lloh18:
	ldr	x9, [x9, _keyboard_report_sent@GOTPAGEOFF]
Lloh19:
	str	w8, [x9]
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DRIVER,8,3                 ; @USB_DRIVER
	.comm	_USB_ACTIVE,8,3                 ; @USB_ACTIVE
	.comm	_KEYBOARD_IN_EPNUM,8,3          ; @KEYBOARD_IN_EPNUM
	.comm	_keyboard_protocol,8,3          ; @keyboard_protocol
	.comm	_KEYBOARD_REPORT_SIZE,4,2       ; @KEYBOARD_REPORT_SIZE
	.comm	_keyboard_report_sent,4,2       ; @keyboard_report_sent
	.comm	_SHARED_IN_EPNUM,8,3            ; @SHARED_IN_EPNUM
	.comm	_keymap_config,8,3              ; @keymap_config
.subsections_via_symbols
