	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kbdlight_set_level
_kbdlight_set_level:                    ## @kbdlight_set_level
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_hkey_handle@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movl	%edi, %r14d
	movq	_kbdlight_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.1(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	%r14d, %r8d
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_kbdlight_brightness@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	jmp	LBB0_5
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	_kbdlight_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hkey_handle,4,2                ## @hkey_handle
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_kbdlight_mutex,4,2             ## @kbdlight_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MLCS"

L_.str.1:                               ## @.str.1
	.asciz	"dd"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_kbdlight_brightness,4,2        ## @kbdlight_brightness
	.no_dead_strip	_kbdlight_set_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kbdlight_set_level
_kbdlight_set_level:                    ; @kbdlight_set_level
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _hkey_handle@GOTPAGE
Lloh1:
	ldr	x20, [x20, _hkey_handle@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x0, _kbdlight_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _kbdlight_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w0, [x20]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
Lloh6:
	adrp	x3, l_.str.1@PAGE
Lloh7:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x1, #0
	mov	x4, x19
	bl	_acpi_evalf
	cbz	w0, LBB0_4
; %bb.2:
	mov	w20, #0
Lloh8:
	adrp	x8, _kbdlight_brightness@GOTPAGE
Lloh9:
	ldr	x8, [x8, _kbdlight_brightness@GOTPAGEOFF]
Lloh10:
	str	w19, [x8]
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
Lloh17:
	adrp	x0, _kbdlight_mutex@GOTPAGE
Lloh18:
	ldr	x0, [x0, _kbdlight_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_hkey_handle,4,2                ; @hkey_handle
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_kbdlight_mutex,4,2             ; @kbdlight_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MLCS"

l_.str.1:                               ; @.str.1
	.asciz	"dd"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_kbdlight_brightness,4,2        ; @kbdlight_brightness
	.no_dead_strip	_kbdlight_set_level
.subsections_via_symbols
