	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getleds
_getleds:                               ## @getleds
	.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_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_fg_console@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdx
	movq	_LED_SHOW_IOCTL@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_2
## %bb.1:
	movq	_ledioctl@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	jmp	LBB0_15
LBB0_2:
	movb	8(%rax,%rcx), %al
	movq	_LED_SHOW_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_15
## %bb.3:
	movq	_ledptrs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, 16(%rcx)
	je	LBB0_7
## %bb.4:
	movq	(%rcx), %rdx
	movl	8(%rcx), %esi
	testl	%esi, (%rdx)
	je	LBB0_6
## %bb.5:
	orb	$1, %al
LBB0_7:
	cmpq	$0, 40(%rcx)
	je	LBB0_11
LBB0_8:
	movq	24(%rcx), %rdx
	movl	32(%rcx), %esi
	testl	%esi, (%rdx)
	je	LBB0_10
## %bb.9:
	orb	$2, %al
	jmp	LBB0_11
LBB0_6:
	andb	$-2, %al
	cmpq	$0, 40(%rcx)
	jne	LBB0_8
	jmp	LBB0_11
LBB0_10:
	andb	$-3, %al
LBB0_11:
	cmpq	$0, 64(%rcx)
	je	LBB0_15
## %bb.12:
	movq	48(%rcx), %rdx
	movl	56(%rcx), %ecx
	testl	%ecx, (%rdx)
	je	LBB0_14
## %bb.13:
	orb	$4, %al
	jmp	LBB0_15
LBB0_14:
	andb	$-5, %al
LBB0_15:
	movzbl	%al, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kbd_table,8,3                  ## @kbd_table
	.comm	_fg_console,4,2                 ## @fg_console
	.comm	_LED_SHOW_IOCTL,8,3             ## @LED_SHOW_IOCTL
	.comm	_ledioctl,1,0                   ## @ledioctl
	.comm	_LED_SHOW_MEM,8,3               ## @LED_SHOW_MEM
	.comm	_ledptrs,8,3                    ## @ledptrs
	.no_dead_strip	_getleds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getleds
_getleds:                               ; @getleds
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _kbd_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kbd_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _fg_console@GOTPAGE
Lloh4:
	ldr	x9, [x9, _fg_console@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x9]
	lsl	x9, x10, #4
	ldr	x9, [x8, x9]
Lloh6:
	adrp	x11, _LED_SHOW_IOCTL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _LED_SHOW_IOCTL@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _ledioctl@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ledioctl@GOTPAGEOFF]
	ldrb	w8, [x8]
	and	w0, w8, #0xff
	ret
LBB0_2:
	add	x8, x8, x10, lsl #4
	ldrb	w8, [x8, #8]
Lloh11:
	adrp	x10, _LED_SHOW_MEM@GOTPAGE
Lloh12:
	ldr	x10, [x10, _LED_SHOW_MEM@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.3:
Lloh14:
	adrp	x9, _ledptrs@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ledptrs@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x10, [x9, #16]
	cbz	x10, LBB0_5
; %bb.4:
	ldr	x10, [x9]
	ldr	w10, [x10]
	ldr	w11, [x9, #8]
	tst	w11, w10
	and	w10, w8, #0xfe
	orr	w8, w8, #0x1
	csel	w8, w10, w8, eq
LBB0_5:
	ldr	x10, [x9, #40]
	cbz	x10, LBB0_7
; %bb.6:
	ldr	x10, [x9, #24]
	ldr	w10, [x10]
	ldr	w11, [x9, #32]
	tst	w11, w10
	and	w10, w8, #0xfffffffd
	orr	w8, w8, #0x2
	csel	w8, w10, w8, eq
LBB0_7:
	ldr	x10, [x9, #64]
	cbz	x10, LBB0_9
; %bb.8:
	ldr	x10, [x9, #48]
	ldr	w10, [x10]
	ldr	w9, [x9, #56]
	tst	w9, w10
	and	w9, w8, #0xfffffffb
	orr	w8, w8, #0x4
	csel	w8, w9, w8, eq
LBB0_9:
	and	w0, w8, #0xff
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_kbd_table,8,3                  ; @kbd_table
	.comm	_fg_console,4,2                 ; @fg_console
	.comm	_LED_SHOW_IOCTL,8,3             ; @LED_SHOW_IOCTL
	.comm	_ledioctl,1,0                   ; @ledioctl
	.comm	_LED_SHOW_MEM,8,3               ; @LED_SHOW_MEM
	.comm	_ledptrs,8,3                    ; @ledptrs
	.no_dead_strip	_getleds
.subsections_via_symbols
