	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kbd_get_level
_kbd_get_level:                         ## @kbd_get_level
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_kbd_info@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	(%rdi), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_2:
	movq	_kbd_mode_levels_count@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	movq	_kbd_mode_levels@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	8(%rdi), %rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx,%rax,8)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_4
## %bb.6:
	xorl	%eax, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kbd_info,8,3                   ## @kbd_info
	.comm	_kbd_mode_levels_count,4,2      ## @kbd_mode_levels_count
	.comm	_kbd_mode_levels,8,3            ## @kbd_mode_levels
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_kbd_get_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kbd_get_level
_kbd_get_level:                         ; @kbd_get_level
	.cfi_startproc
; %bb.0:
	mov	x8, x0
Lloh0:
	adrp	x9, _kbd_info@GOTPAGE
Lloh1:
	ldr	x9, [x9, _kbd_info@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w0, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_2:
Lloh3:
	adrp	x9, _kbd_mode_levels_count@GOTPAGE
Lloh4:
	ldr	x9, [x9, _kbd_mode_levels_count@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x0, #0
Lloh6:
	adrp	x10, _kbd_mode_levels@GOTPAGE
Lloh7:
	ldr	x10, [x10, _kbd_mode_levels@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x8, [x8, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x0, lsl #3]
	cmp	x11, x8
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #1
	cmp	x9, x0
	b.ne	LBB0_4
; %bb.6:
	mov	w0, #0
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kbd_info,8,3                   ; @kbd_info
	.comm	_kbd_mode_levels_count,4,2      ; @kbd_mode_levels_count
	.comm	_kbd_mode_levels,8,3            ; @kbd_mode_levels
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_kbd_get_level
.subsections_via_symbols
