	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atkbd_set_leds
_atkbd_set_leds:                        ## @atkbd_set_leds
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movq	_LED_SCROLLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%r14b
	movq	_LED_NUML@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%bl
	addb	%bl, %bl
	orb	%r14b, %bl
	movq	_LED_CAPSL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%al
	shlb	$2, %al
	orb	%bl, %al
	movb	%al, -42(%rbp)
	movq	_ATKBD_CMD_SETLEDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-42(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ps2_command
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.2:
	movb	$0, -42(%rbp)
	movq	_LED_COMPOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%r13b
	movq	_LED_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%bl
	addb	%bl, %bl
	orb	%r13b, %bl
	movq	_LED_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%r13b
	shlb	$2, %r13b
	orb	%bl, %r13b
	movq	_LED_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%bl
	shlb	$4, %bl
	orb	%r13b, %bl
	movq	_LED_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	setne	%al
	shlb	$5, %al
	orb	%bl, %al
	movb	%al, -41(%rbp)
	movq	_ATKBD_CMD_EX_SETLEDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-42(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_4
LBB0_3:
	xorl	%r14d, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LED_SCROLLL,4,2                ## @LED_SCROLLL
	.comm	_LED_NUML,4,2                   ## @LED_NUML
	.comm	_LED_CAPSL,4,2                  ## @LED_CAPSL
	.comm	_ATKBD_CMD_SETLEDS,4,2          ## @ATKBD_CMD_SETLEDS
	.comm	_LED_COMPOSE,4,2                ## @LED_COMPOSE
	.comm	_LED_SLEEP,4,2                  ## @LED_SLEEP
	.comm	_LED_SUSPEND,4,2                ## @LED_SUSPEND
	.comm	_LED_MISC,4,2                   ## @LED_MISC
	.comm	_LED_MUTE,4,2                   ## @LED_MUTE
	.comm	_ATKBD_CMD_EX_SETLEDS,4,2       ## @ATKBD_CMD_EX_SETLEDS
	.no_dead_strip	_atkbd_set_leds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atkbd_set_leds
_atkbd_set_leds:                        ; @atkbd_set_leds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _LED_SCROLLL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LED_SCROLLL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w21, ne
Lloh3:
	adrp	x8, _LED_NUML@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LED_NUML@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #1, #1
Lloh6:
	adrp	x8, _LED_CAPSL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LED_CAPSL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #2, #1
	strb	w21, [sp, #14]
Lloh9:
	adrp	x8, _ATKBD_CMD_SETLEDS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATKBD_CMD_SETLEDS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #-1
	b	LBB0_5
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	strb	wzr, [sp, #14]
Lloh12:
	adrp	x8, _LED_COMPOSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LED_COMPOSE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w21, ne
Lloh15:
	adrp	x8, _LED_SLEEP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LED_SLEEP@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #1, #1
Lloh18:
	adrp	x8, _LED_SUSPEND@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LED_SUSPEND@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #2, #1
Lloh21:
	adrp	x8, _LED_MISC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LED_MISC@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #4, #1
Lloh24:
	adrp	x8, _LED_MUTE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LED_MUTE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cmp	x0, #0
	cset	w8, ne
	bfi	w21, w8, #5, #1
	strb	w21, [sp, #15]
Lloh27:
	adrp	x8, _ATKBD_CMD_EX_SETLEDS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATKBD_CMD_EX_SETLEDS@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_1
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_SCROLLL,4,2                ; @LED_SCROLLL
	.comm	_LED_NUML,4,2                   ; @LED_NUML
	.comm	_LED_CAPSL,4,2                  ; @LED_CAPSL
	.comm	_ATKBD_CMD_SETLEDS,4,2          ; @ATKBD_CMD_SETLEDS
	.comm	_LED_COMPOSE,4,2                ; @LED_COMPOSE
	.comm	_LED_SLEEP,4,2                  ; @LED_SLEEP
	.comm	_LED_SUSPEND,4,2                ; @LED_SUSPEND
	.comm	_LED_MISC,4,2                   ; @LED_MISC
	.comm	_LED_MUTE,4,2                   ; @LED_MUTE
	.comm	_ATKBD_CMD_EX_SETLEDS,4,2       ; @ATKBD_CMD_EX_SETLEDS
	.no_dead_strip	_atkbd_set_leds
.subsections_via_symbols
