	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kbd_led_als_enabled_store
_kbd_led_als_enabled_store:             ## @kbd_led_als_enabled_store
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	%rdx, %rdi
	leaq	-36(%rbp), %rdx
	xorl	%esi, %esi
	callq	_kstrtoint
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movq	_kbd_led_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	leaq	-32(%rbp), %rdi
	callq	_kbd_get_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.2:
	movl	-36(%rbp), %ebx
	movl	-32(%rbp), %edi
	callq	_kbd_is_als_mode_bit
	cmpl	%eax, %ebx
	jne	LBB0_3
LBB0_17:
	movl	%r14d, %ebx
	jmp	LBB0_18
LBB0_3:
	movl	-32(%rbp), %edi
	movl	%edi, -24(%rbp)
	movq	_kbd_triggers_supported@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.4:
	callq	_kbd_is_trigger_mode_bit
	cmpl	$0, -36(%rbp)
	je	LBB0_8
## %bb.5:
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_KBD_MODE_BIT_TRIGGER_ALS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	cmpl	$0, -36(%rbp)
	je	LBB0_11
LBB0_7:
	movq	_KBD_MODE_BIT_ALS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movq	_KBD_MODE_BIT_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_kbd_previous_level@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdi
	callq	_kbd_set_level
	movl	-24(%rbp), %edi
	jmp	LBB0_13
LBB0_11:
	movq	_KBD_MODE_BIT_ON@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edi
	movl	%edi, -24(%rbp)
LBB0_13:
	movq	_kbd_info@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_14
## %bb.15:
	leaq	-24(%rbp), %rdi
	leaq	-32(%rbp), %rsi
	callq	_kbd_set_state_safe
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	movl	-24(%rbp), %eax
	movq	_kbd_previous_mode_bit@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_17
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movq	_kbd_led_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_19:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kbd_led_mutex,4,2              ## @kbd_led_mutex
	.comm	_kbd_triggers_supported,8,3     ## @kbd_triggers_supported
	.comm	_KBD_MODE_BIT_TRIGGER_ALS,4,2   ## @KBD_MODE_BIT_TRIGGER_ALS
	.comm	_KBD_MODE_BIT_ALS,4,2           ## @KBD_MODE_BIT_ALS
	.comm	_KBD_MODE_BIT_TRIGGER,4,2       ## @KBD_MODE_BIT_TRIGGER
	.comm	_kbd_previous_level,4,2         ## @kbd_previous_level
	.comm	_KBD_MODE_BIT_ON,4,2            ## @KBD_MODE_BIT_ON
	.comm	_kbd_info,4,2                   ## @kbd_info
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_kbd_previous_mode_bit,4,2      ## @kbd_previous_mode_bit
	.no_dead_strip	_kbd_led_als_enabled_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kbd_led_als_enabled_store
_kbd_led_als_enabled_store:             ; @kbd_led_als_enabled_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x3
	mov	x0, x2
	add	x2, sp, #12
	mov	w1, #0
	bl	_kstrtoint
	mov	x20, x0
	cbnz	w0, LBB0_19
; %bb.1:
Lloh0:
	adrp	x0, _kbd_led_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _kbd_led_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	add	x0, sp, #16
	bl	_kbd_get_state
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.2:
	ldp	w20, w0, [sp, #12]
	bl	_kbd_is_als_mode_bit
	cmp	w20, w0
	b.ne	LBB0_4
LBB0_3:
	mov	x20, x19
	b	LBB0_18
LBB0_4:
	ldr	w0, [sp, #16]
	str	w0, [sp, #24]
Lloh2:
	adrp	x8, _kbd_triggers_supported@GOTPAGE
Lloh3:
	ldr	x8, [x8, _kbd_triggers_supported@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.5:
	bl	_kbd_is_trigger_mode_bit
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_10
; %bb.6:
	cbz	w0, LBB0_9
; %bb.7:
Lloh5:
	adrp	x8, _KBD_MODE_BIT_TRIGGER_ALS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KBD_MODE_BIT_TRIGGER_ALS@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_12
LBB0_9:
Lloh7:
	adrp	x8, _KBD_MODE_BIT_ALS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KBD_MODE_BIT_ALS@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
	cbz	w0, LBB0_12
; %bb.11:
Lloh9:
	adrp	x8, _KBD_MODE_BIT_TRIGGER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KBD_MODE_BIT_TRIGGER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh12:
	adrp	x8, _kbd_previous_level@GOTPAGE
Lloh13:
	ldr	x8, [x8, _kbd_previous_level@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #24
	bl	_kbd_set_level
	ldr	w0, [sp, #24]
	b	LBB0_14
LBB0_12:
Lloh15:
	adrp	x8, _KBD_MODE_BIT_ON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KBD_MODE_BIT_ON@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	str	w0, [sp, #24]
LBB0_14:
Lloh17:
	adrp	x8, _kbd_info@GOTPAGE
Lloh18:
	ldr	x8, [x8, _kbd_info@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_17
; %bb.15:
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_kbd_set_state_safe
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.16:
	ldr	w8, [sp, #24]
Lloh20:
	adrp	x9, _kbd_previous_mode_bit@GOTPAGE
Lloh21:
	ldr	x9, [x9, _kbd_previous_mode_bit@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	b	LBB0_3
LBB0_17:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_18:
Lloh26:
	adrp	x0, _kbd_led_mutex@GOTPAGE
Lloh27:
	ldr	x0, [x0, _kbd_led_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_kbd_led_mutex,4,2              ; @kbd_led_mutex
	.comm	_kbd_triggers_supported,8,3     ; @kbd_triggers_supported
	.comm	_KBD_MODE_BIT_TRIGGER_ALS,4,2   ; @KBD_MODE_BIT_TRIGGER_ALS
	.comm	_KBD_MODE_BIT_ALS,4,2           ; @KBD_MODE_BIT_ALS
	.comm	_KBD_MODE_BIT_TRIGGER,4,2       ; @KBD_MODE_BIT_TRIGGER
	.comm	_kbd_previous_level,4,2         ; @kbd_previous_level
	.comm	_KBD_MODE_BIT_ON,4,2            ; @KBD_MODE_BIT_ON
	.comm	_kbd_info,4,2                   ; @kbd_info
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_kbd_previous_mode_bit,4,2      ; @kbd_previous_mode_bit
	.no_dead_strip	_kbd_led_als_enabled_store
.subsections_via_symbols
