	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_USBKeyboard_Open               ## -- Begin function USBKeyboard_Open
	.p2align	4, 0x90
_USBKeyboard_Open:                      ## @USBKeyboard_Open
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	_hId@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_DEVLIST_MAXSIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	shll	$6, %esi
	callq	_iosAlloc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_47
## %bb.1:
	movq	%rax, %r13
	movl	(%rbx), %edx
	shll	$6, %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%rbx), %esi
	movq	_USB_CLASS_HID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	-88(%rbp), %rcx
	movq	%r13, %rdi
	callq	_USB_GetDeviceList
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	__kbd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:
	cmpl	$-1, (%rdi)
	je	LBB0_7
## %bb.5:
	callq	_USB_CloseDevice
	movq	(%rbx), %rdi
	jmp	LBB0_7
LBB0_2:
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_iosFree
	movl	$-2, %r14d
	jmp	LBB0_47
LBB0_6:
	movl	$64, %edi
	callq	_malloc
	movq	%rax, %rdi
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_47
LBB0_7:
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	(%rbx), %rax
	movl	$-1, (%rax)
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_33
## %bb.8:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_29:                                ##   in Loop: Header=BB0_9 Depth=1
	leaq	-104(%rbp), %rdi
	callq	_USB_FreeDescriptors
	movq	_hId@GOTPCREL(%rip), %r15
	leaq	-48(%rbp), %r14
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_30:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	callq	_USB_CloseDevice
LBB0_31:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-88(%rbp), %rax
LBB0_32:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	%rax, %rbx
	jae	LBB0_33
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_17 Depth 3
                                        ##         Child Loop BB0_22 Depth 4
	movq	%rbx, %rcx
	shlq	$6, %rcx
	movq	8(%r13,%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_32
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%r13,%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_32
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$0, -48(%rbp)
	movl	60(%r13,%rcx), %edi
	movq	%r14, %rcx
	callq	_USB_OpenDevice
	testq	%rax, %rax
	js	LBB0_31
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-48(%rbp), %edi
	leaq	-104(%rbp), %rsi
	callq	_USB_GetDescriptors
	testq	%rax, %rax
	js	LBB0_30
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-104(%rbp), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_29
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-96(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_USB_CLASS_HID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_USB_SUBCLASS_BOOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_USB_PROTOCOL_KEYBOARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	_USB_ENDPOINT_INTERRUPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_USB_ENDPOINT_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_15 Depth=2
	incq	%r13
	cmpq	-112(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_29
LBB0_15:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_17 Depth 3
                                        ##         Child Loop BB0_22 Depth 4
	movq	%rdi, %r8
	leaq	(,%r13,2), %rdi
	addq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	(%rsi,%rdi,8), %r14
	movq	%r8, %rdi
	testq	%r14, %r14
	je	LBB0_28
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rsi,%rdi,8), %r15
	movq	%r8, %rdi
	xorl	%r12d, %r12d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_17 Depth=3
	incq	%r12
	cmpq	%r14, %r12
	je	LBB0_28
LBB0_17:                                ##   Parent Loop BB0_9 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_22 Depth 4
	imulq	$56, %r12, %r8
	cmpq	%rdx, (%r15,%r8)
	jne	LBB0_27
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=3
	cmpq	%rdi, 8(%r15,%r8)
	jne	LBB0_27
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=3
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	cmpq	%rsi, 16(%r15,%r8)
	jne	LBB0_27
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=3
	movq	24(%r15,%r8), %r10
	testq	%r10, %r10
	je	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=3
	movq	48(%r15,%r8), %r9
	addq	$12, %r9
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_22 Depth=4
	addq	$16, %r9
	decq	%r10
	je	LBB0_27
LBB0_22:                                ##   Parent Loop BB0_9 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ##       Parent Loop BB0_17 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	cmpq	%rcx, -12(%r9)
	jne	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=4
	movl	-4(%r9), %r11d
	testl	%r11d, %eax
	je	LBB0_26
## %bb.24:
	movl	-48(%rbp), %eax
	movq	__kbd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 56(%rcx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rax,%rdx,8), %rax
	movq	%rax, 24(%rcx)
	movl	40(%r15,%r8), %eax
	movl	%eax, 48(%rcx)
	movq	32(%r15,%r8), %rax
	movq	%rax, 32(%rcx)
	movl	%r11d, 40(%rcx)
	movl	(%r9), %eax
	movl	%eax, 52(%rcx)
	leaq	-104(%rbp), %rdi
	callq	_USB_FreeDescriptors
	movq	_hId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_iosFree
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_USB_GetConfiguration
	testq	%rax, %rax
	js	LBB0_25
## %bb.34:
	movq	(%rbx), %rax
	movq	24(%rax), %rsi
	cmpq	%rsi, -48(%rbp)
	je	LBB0_37
## %bb.35:
	movl	(%rax), %edi
	callq	_USB_SetConfiguration
	testq	%rax, %rax
	js	LBB0_48
## %bb.36:
	movq	(%rbx), %rax
LBB0_37:
	movq	32(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_40
## %bb.38:
	movl	(%rax), %edi
	movl	48(%rax), %esi
	callq	_USB_SetAlternativeInterface
	testq	%rax, %rax
	js	LBB0_39
LBB0_40:
	xorl	%eax, %eax
	callq	__get_protocol
	testl	%eax, %eax
	je	LBB0_44
## %bb.41:
	xorl	%edi, %edi
	callq	__set_protocol
	testq	%rax, %rax
	js	LBB0_39
## %bb.42:
	xorl	%eax, %eax
	callq	__get_protocol
	cmpl	$1, %eax
	jne	LBB0_44
## %bb.43:
	xorl	%eax, %eax
	callq	_USBKeyboard_Close
	movl	$-7, %r14d
	jmp	LBB0_47
LBB0_33:
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_iosFree
	movl	$-3, %r14d
	jmp	LBB0_47
LBB0_25:
	xorl	%eax, %eax
	callq	_USBKeyboard_Close
	movl	$-4, %r14d
	jmp	LBB0_47
LBB0_44:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	__disconnect@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	callq	_USB_DeviceRemovalNotifyAsync
	testq	%rax, %rax
	js	LBB0_45
## %bb.46:
	movq	(%rbx), %rax
	movl	$1, 44(%rax)
	movl	$1, %r14d
	jmp	LBB0_47
LBB0_39:
	xorl	%eax, %eax
	callq	_USBKeyboard_Close
	movl	$-6, %r14d
	jmp	LBB0_47
LBB0_48:
	xorl	%eax, %eax
	callq	_USBKeyboard_Close
	movl	$-5, %r14d
	jmp	LBB0_47
LBB0_45:
	xorl	%eax, %eax
	callq	_USBKeyboard_Close
	movl	$-8, %r14d
LBB0_47:
	movl	%r14d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hId,4,2                        ## @hId
	.comm	_DEVLIST_MAXSIZE,4,2            ## @DEVLIST_MAXSIZE
	.comm	_USB_CLASS_HID,8,3              ## @USB_CLASS_HID
	.comm	__kbd,8,3                       ## @_kbd
	.comm	_USB_SUBCLASS_BOOT,8,3          ## @USB_SUBCLASS_BOOT
	.comm	_USB_PROTOCOL_KEYBOARD,8,3      ## @USB_PROTOCOL_KEYBOARD
	.comm	_USB_ENDPOINT_INTERRUPT,8,3     ## @USB_ENDPOINT_INTERRUPT
	.comm	_USB_ENDPOINT_IN,4,2            ## @USB_ENDPOINT_IN
	.comm	__disconnect,4,2                ## @_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_USBKeyboard_Open               ; -- Begin function USBKeyboard_Open
	.p2align	2
_USBKeyboard_Open:                      ; @USBKeyboard_Open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x22, _hId@GOTPAGE
Lloh1:
	ldr	x22, [x22, _hId@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x21, _DEVLIST_MAXSIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DEVLIST_MAXSIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w1, w8, #6
	bl	_iosAlloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w8, [x21]
	lsl	w2, w8, #6
	mov	w1, #0
	bl	_memset
	ldr	w1, [x21]
Lloh4:
	adrp	x23, _USB_CLASS_HID@GOTPAGE
Lloh5:
	ldr	x23, [x23, _USB_CLASS_HID@GOTPAGEOFF]
	ldr	x2, [x23]
	add	x3, sp, #24
	mov	x0, x19
	bl	_USB_GetDeviceList
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh6:
	adrp	x21, __kbd@GOTPAGE
Lloh7:
	ldr	x21, [x21, __kbd@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_7
; %bb.4:
	bl	_USB_CloseDevice
	ldr	x0, [x21]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_iosFree
	mov	w0, #-2
	b	LBB0_48
LBB0_6:
	mov	w0, #64
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_9
LBB0_7:
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldr	x8, [x21]
	mov	w9, #-1
	str	w9, [x8]
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_41
; %bb.8:
	mov	x24, #0
Lloh8:
	adrp	x27, _USB_ENDPOINT_INTERRUPT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _USB_ENDPOINT_INTERRUPT@GOTPAGEOFF]
	mov	w28, #24
	mov	w25, #56
Lloh10:
	adrp	x26, _USB_ENDPOINT_IN@GOTPAGE
Lloh11:
	ldr	x26, [x26, _USB_ENDPOINT_IN@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	mov	w0, #-1
	b	LBB0_48
LBB0_10:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, sp
	bl	_USB_FreeDescriptors
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x0, sp, #16
	bl	_USB_CloseDevice
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #24]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x24, x24, #1
	cmp	x24, x8
	b.hs	LBB0_41
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
                                        ;       Child Loop BB0_23 Depth 3
                                        ;         Child Loop BB0_29 Depth 4
	add	x9, x19, x24, lsl #6
	ldp	x1, x2, [x9, #8]
	cmp	x1, #0
	ccmp	x2, #0, #4, ne
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	str	wzr, [sp, #16]
	ldr	w0, [x9, #60]
	add	x3, sp, #16
	bl	_USB_OpenDevice
	tbnz	x0, #63, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [sp, #16]
	mov	x1, sp
	bl	_USB_GetDescriptors
	tbnz	x0, #63, LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x10, [sp]
	cbz	x10, LBB0_10
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x8, #0
	ldr	x9, [sp, #8]
	ldr	x11, [x23]
Lloh12:
	adrp	x12, _USB_SUBCLASS_BOOT@GOTPAGE
Lloh13:
	ldr	x12, [x12, _USB_SUBCLASS_BOOT@GOTPAGEOFF]
Lloh14:
	ldr	x12, [x12]
Lloh15:
	adrp	x13, _USB_PROTOCOL_KEYBOARD@GOTPAGE
Lloh16:
	ldr	x13, [x13, _USB_PROTOCOL_KEYBOARD@GOTPAGEOFF]
Lloh17:
	ldr	x13, [x13]
	ldr	x14, [x27]
	ldr	w15, [x26]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	x8, x8, #1
	cmp	x8, x10
	b.eq	LBB0_10
LBB0_20:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_23 Depth 3
                                        ;         Child Loop BB0_29 Depth 4
	mul	x16, x8, x28
	ldr	x0, [x9, x16]
	cbz	x0, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	x16, #0
	madd	x17, x8, x28, x9
	ldr	x17, [x17, #16]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=3
	add	x16, x16, #1
	cmp	x16, x0
	b.eq	LBB0_19
LBB0_23:                                ;   Parent Loop BB0_14 Depth=1
                                        ;     Parent Loop BB0_20 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_29 Depth 4
	mul	x1, x16, x25
	ldr	x1, [x17, x1]
	cmp	x1, x11
	b.ne	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=3
	madd	x1, x16, x25, x17
	ldr	x1, [x1, #8]
	cmp	x1, x12
	b.ne	LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=3
	madd	x1, x16, x25, x17
	ldr	x1, [x1, #16]
	cmp	x1, x13
	b.ne	LBB0_22
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=3
	madd	x1, x16, x25, x17
	ldr	x2, [x1, #24]
	cbz	x2, LBB0_22
; %bb.27:                               ;   in Loop: Header=BB0_23 Depth=3
	madd	x1, x16, x25, x17
	ldr	x1, [x1, #48]
	add	x1, x1, #12
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=4
	add	x1, x1, #16
	subs	x2, x2, #1
	b.eq	LBB0_22
LBB0_29:                                ;   Parent Loop BB0_14 Depth=1
                                        ;     Parent Loop BB0_20 Depth=2
                                        ;       Parent Loop BB0_23 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldur	x3, [x1, #-12]
	cmp	x3, x14
	b.ne	LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=4
	ldur	w3, [x1, #-4]
	tst	w15, w3
	b.eq	LBB0_28
; %bb.31:
	ldr	w10, [sp, #16]
	ldr	x11, [x21]
	str	w10, [x11]
	str	w20, [x11, #56]
	mov	w10, #24
	madd	x8, x8, x10, x9
	ldr	x8, [x8, #8]
	str	x8, [x11, #24]
	mov	w8, #56
	madd	x8, x16, x8, x17
	ldr	w9, [x8, #40]
	str	w9, [x11, #48]
	ldr	x8, [x8, #32]
	str	x8, [x11, #32]
	str	w3, [x11, #40]
	ldr	w8, [x1]
	str	w8, [x11, #52]
	mov	x0, sp
	bl	_USB_FreeDescriptors
	ldr	w0, [x22]
	mov	x1, x19
	bl	_iosFree
	ldr	x8, [x21]
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_USB_GetConfiguration
	tbnz	x0, #63, LBB0_42
; %bb.32:
	ldr	x9, [sp, #16]
	ldr	x8, [x21]
	ldr	x1, [x8, #24]
	cmp	x9, x1
	b.eq	LBB0_35
; %bb.33:
	ldr	w0, [x8]
	bl	_USB_SetConfiguration
	tbnz	x0, #63, LBB0_46
; %bb.34:
	ldr	x8, [x21]
LBB0_35:
	ldr	x2, [x8, #32]
	cbz	x2, LBB0_37
; %bb.36:
	ldr	w0, [x8]
	ldr	w1, [x8, #48]
	bl	_USB_SetAlternativeInterface
	tbnz	x0, #63, LBB0_45
LBB0_37:
	bl	__get_protocol
	cbz	w0, LBB0_43
; %bb.38:
	mov	w0, #0
	bl	__set_protocol
	tbnz	x0, #63, LBB0_45
; %bb.39:
	bl	__get_protocol
	cmp	w0, #1
	b.ne	LBB0_43
; %bb.40:
	bl	_USBKeyboard_Close
	mov	w0, #-7
	b	LBB0_48
LBB0_41:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_iosFree
	mov	w0, #-3
	b	LBB0_48
LBB0_42:
	bl	_USBKeyboard_Close
	mov	w0, #-4
	b	LBB0_48
LBB0_43:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh18:
	adrp	x1, __disconnect@GOTPAGE
Lloh19:
	ldr	x1, [x1, __disconnect@GOTPAGEOFF]
	mov	x2, #0
	bl	_USB_DeviceRemovalNotifyAsync
	tbnz	x0, #63, LBB0_47
; %bb.44:
	ldr	x8, [x21]
	mov	w0, #1
	str	w0, [x8, #44]
	b	LBB0_48
LBB0_45:
	bl	_USBKeyboard_Close
	mov	w0, #-6
	b	LBB0_48
LBB0_46:
	bl	_USBKeyboard_Close
	mov	w0, #-5
	b	LBB0_48
LBB0_47:
	bl	_USBKeyboard_Close
	mov	w0, #-8
LBB0_48:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_hId,4,2                        ; @hId
	.comm	_DEVLIST_MAXSIZE,4,2            ; @DEVLIST_MAXSIZE
	.comm	_USB_CLASS_HID,8,3              ; @USB_CLASS_HID
	.comm	__kbd,8,3                       ; @_kbd
	.comm	_USB_SUBCLASS_BOOT,8,3          ; @USB_SUBCLASS_BOOT
	.comm	_USB_PROTOCOL_KEYBOARD,8,3      ; @USB_PROTOCOL_KEYBOARD
	.comm	_USB_ENDPOINT_INTERRUPT,8,3     ; @USB_ENDPOINT_INTERRUPT
	.comm	_USB_ENDPOINT_IN,4,2            ; @USB_ENDPOINT_IN
	.comm	__disconnect,4,2                ; @_disconnect
.subsections_via_symbols
