	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function has_keyboard
_has_keyboard:                          ## @has_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -52(%rbp)
	movq	_BS@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_ByProtocol@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_inputid@GOTPCREL(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-52(%rbp), %rcx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	*(%rax)
	movq	%rax, %rbx
	movq	_EFI_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	$0, %r13d
	cmpq	(%rax), %rbx
	jne	LBB0_3
## %bb.1:
	movl	-52(%rbp), %edi
	callq	_malloc
	movq	%rax, %r13
	movq	(%r14), %rax
	movl	(%r15), %edi
	movq	_inputid@GOTPCREL(%rip), %rsi
	leaq	-52(%rbp), %rcx
	xorl	%edx, %edx
	movq	%r13, %r8
	callq	*(%rax)
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_EFI_ERROR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	_free
LBB0_3:
	movq	%rbx, %rdi
	callq	_EFI_ERROR
	testq	%rax, %rax
	jne	LBB0_25
## %bb.4:
	movslq	-52(%rbp), %rbx
	xorl	%r12d, %r12d
	cmpq	$4, %rbx
	jb	LBB0_24
## %bb.5:
	andq	$-4, %rbx
	addq	%r13, %rbx
	movq	_ACPI_DEVICE_PATH@GOTPCREL(%rip), %r14
	movq	_MESSAGING_DEVICE_PATH@GOTPCREL(%rip), %r12
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %r13
	cmpq	%rbx, %r13
	jae	LBB0_22
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	(%r13), %edi
	movq	_devid@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	callq	_OpenProtocolByHandle
	movq	%rax, %rdi
	callq	_EFI_ERROR
	testq	%rax, %rax
	jne	LBB0_21
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rdi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_NextDevicePathNode
	movq	%rax, -48(%rbp)
	movq	%rax, %rdi
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_IsDevicePathEnd
	testl	%eax, %eax
	jne	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_DevicePathType
	cmpq	(%r14), %rax
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_DevicePathSubType
	movq	_ACPI_DP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_DevicePathSubType
	movq	_ACPI_EXTENDED_DP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %r15
	movl	(%r15), %edi
	callq	_EISA_ID_TO_NUM
	andl	$65280, %eax                    ## imm = 0xFF00
	cmpl	$768, %eax                      ## imm = 0x300
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=2
	movzwl	(%r15), %eax
	movq	_PNP_EISA_ID_CONST@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_DevicePathType
	cmpq	(%r12), %rax
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi
	callq	_DevicePathSubType
	movq	_MSG_USB_CLASS_DP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rax
	cmpl	$3, (%rax)
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=2
	cmpl	$1, 4(%rax)
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=2
	cmpl	$1, 8(%rax)
	jne	LBB0_20
LBB0_14:
	movl	$1, %r12d
	jmp	LBB0_23
LBB0_22:
	xorl	%r12d, %r12d
LBB0_23:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_24:
	movq	%r13, %rdi
	callq	_free
LBB0_25:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BS,8,3                         ## @BS
	.comm	_ByProtocol,4,2                 ## @ByProtocol
	.comm	_inputid,4,2                    ## @inputid
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ## @EFI_BUFFER_TOO_SMALL
	.comm	_devid,4,2                      ## @devid
	.comm	_ACPI_DEVICE_PATH,8,3           ## @ACPI_DEVICE_PATH
	.comm	_ACPI_DP,8,3                    ## @ACPI_DP
	.comm	_ACPI_EXTENDED_DP,8,3           ## @ACPI_EXTENDED_DP
	.comm	_PNP_EISA_ID_CONST,4,2          ## @PNP_EISA_ID_CONST
	.comm	_MESSAGING_DEVICE_PATH,8,3      ## @MESSAGING_DEVICE_PATH
	.comm	_MSG_USB_CLASS_DP,8,3           ## @MSG_USB_CLASS_DP
	.no_dead_strip	_has_keyboard
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function has_keyboard
_has_keyboard:                          ; @has_keyboard
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x21, _BS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BS@GOTPAGEOFF]
	str	wzr, [sp, #4]
	ldr	x8, [x21]
	ldr	x8, [x8]
Lloh2:
	adrp	x22, _ByProtocol@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ByProtocol@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh4:
	adrp	x1, _inputid@GOTPAGE
Lloh5:
	ldr	x1, [x1, _inputid@GOTPAGEOFF]
	add	x3, sp, #4
	mov	w2, #0
	mov	x4, #0
	blr	x8
Lloh6:
	adrp	x8, _EFI_BUFFER_TOO_SMALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFI_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [sp, #4]
	bl	_malloc
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x22]
Lloh9:
	adrp	x1, _inputid@GOTPAGE
Lloh10:
	ldr	x1, [x1, _inputid@GOTPAGEOFF]
	add	x3, sp, #4
	mov	w2, #0
	mov	x4, x19
	blr	x8
	mov	x20, x0
	bl	_EFI_ERROR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_free
	b	LBB0_4
LBB0_3:
	mov	x20, x0
	mov	x19, #0
LBB0_4:
	mov	x0, x20
	bl	_EFI_ERROR
	cbz	x0, LBB0_6
; %bb.5:
	mov	w20, #0
	b	LBB0_26
LBB0_6:
	ldrsw	x8, [sp, #4]
	cmp	w8, #4
	b.hs	LBB0_8
LBB0_7:
	mov	w20, #0
	b	LBB0_25
LBB0_8:
	and	x8, x8, #0xfffffffffffffffc
Lloh11:
	adrp	x20, _devid@GOTPAGE
Lloh12:
	ldr	x20, [x20, _devid@GOTPAGEOFF]
Lloh13:
	adrp	x21, _ACPI_DEVICE_PATH@GOTPAGE
Lloh14:
	ldr	x21, [x21, _ACPI_DEVICE_PATH@GOTPAGEOFF]
Lloh15:
	adrp	x22, _ACPI_DP@GOTPAGE
Lloh16:
	ldr	x22, [x22, _ACPI_DP@GOTPAGEOFF]
Lloh17:
	adrp	x24, _ACPI_EXTENDED_DP@GOTPAGE
Lloh18:
	ldr	x24, [x24, _ACPI_EXTENDED_DP@GOTPAGEOFF]
	add	x25, x19, x8
Lloh19:
	adrp	x26, _MESSAGING_DEVICE_PATH@GOTPAGE
Lloh20:
	ldr	x26, [x26, _MESSAGING_DEVICE_PATH@GOTPAGEOFF]
	mov	x27, x19
Lloh21:
	adrp	x28, _MSG_USB_CLASS_DP@GOTPAGE
Lloh22:
	ldr	x28, [x28, _MSG_USB_CLASS_DP@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x27, x27, #4
	cmp	x27, x25
	b.hs	LBB0_7
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w0, [x27]
	add	x2, sp, #8
	mov	x1, x20
	bl	_OpenProtocolByHandle
	bl	_EFI_ERROR
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [sp, #8]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_NextDevicePathNode
	str	x0, [sp, #8]
LBB0_13:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_IsDevicePathEnd
	cbnz	w0, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_DevicePathType
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_DevicePathSubType
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_DevicePathSubType
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x23, [sp, #8]
	ldr	w0, [x23]
	bl	_EISA_ID_TO_NUM
	and	w8, w0, #0xff00
	cmp	w8, #768
	b.ne	LBB0_12
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=2
	ldrh	w8, [x23]
Lloh23:
	adrp	x9, _PNP_EISA_ID_CONST@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PNP_EISA_ID_CONST@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
	b	LBB0_24
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_DevicePathType
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x0, [sp, #8]
	bl	_DevicePathSubType
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
	cmp	w9, #3
	b.ne	LBB0_12
; %bb.22:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w9, [x8, #4]
	cmp	w9, #1
	b.ne	LBB0_12
; %bb.23:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w8, [x8, #8]
	cmp	w8, #1
	b.ne	LBB0_12
LBB0_24:
	mov	w20, #1
LBB0_25:
	mov	x0, x19
	bl	_free
LBB0_26:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_BS,8,3                         ; @BS
	.comm	_ByProtocol,4,2                 ; @ByProtocol
	.comm	_inputid,4,2                    ; @inputid
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ; @EFI_BUFFER_TOO_SMALL
	.comm	_devid,4,2                      ; @devid
	.comm	_ACPI_DEVICE_PATH,8,3           ; @ACPI_DEVICE_PATH
	.comm	_ACPI_DP,8,3                    ; @ACPI_DP
	.comm	_ACPI_EXTENDED_DP,8,3           ; @ACPI_EXTENDED_DP
	.comm	_PNP_EISA_ID_CONST,4,2          ; @PNP_EISA_ID_CONST
	.comm	_MESSAGING_DEVICE_PATH,8,3      ; @MESSAGING_DEVICE_PATH
	.comm	_MSG_USB_CLASS_DP,8,3           ; @MSG_USB_CLASS_DP
	.no_dead_strip	_has_keyboard
.subsections_via_symbols
