	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kbdlight_is_supported
_kbdlight_is_supported:                 ## @kbdlight_is_supported
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$0, -20(%rbp)
	movq	_hkey_handle@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rsi
	callq	_acpi_has_method
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	leaq	-20(%rbp), %rsi
	xorl	%ebx, %ebx
	xorl	%r8d, %r8d
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movl	-20(%rbp), %edx
	movq	_TPACPI_DBG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edx, %edx
	js	LBB0_8
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_vdbg_printk
	movl	-20(%rbp), %r14d
	movl	$9, %edi
	callq	_BIT
	movl	%eax, %ebx
	andl	%r14d, %ebx
	jmp	LBB0_10
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_3:
	movq	_TPACPI_DBG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_TPACPI_DBG_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_6:
	xorl	%eax, %eax
	callq	_vdbg_printk
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vdbg_printk
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hkey_handle,4,2                ## @hkey_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MLCG"

	.comm	_TPACPI_DBG_INIT,4,2            ## @TPACPI_DBG_INIT
L_.str.1:                               ## @.str.1
	.asciz	"kbdlight MLCG is unavailable\n"

L_.str.2:                               ## @.str.2
	.asciz	"qdd"

L_.str.3:                               ## @.str.3
	.asciz	"kbdlight MLCG failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"kbdlight MLCG err: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"kbdlight MLCG returned 0x%x\n"

	.no_dead_strip	_kbdlight_is_supported
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kbdlight_is_supported
_kbdlight_is_supported:                 ; @kbdlight_is_supported
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	wzr, [sp, #12]
Lloh0:
	adrp	x19, _hkey_handle@GOTPAGE
Lloh1:
	ldr	x19, [x19, _hkey_handle@GOTPAGEOFF]
	ldr	w0, [x19]
	cbz	w0, LBB0_9
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_acpi_has_method
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x19]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
Lloh6:
	adrp	x3, l_.str.2@PAGE
Lloh7:
	add	x3, x3, l_.str.2@PAGEOFF
	add	x1, sp, #12
	mov	w4, #0
	bl	_acpi_evalf
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _TPACPI_DBG_INIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TPACPI_DBG_INIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
	tbnz	w8, #31, LBB0_7
; %bb.4:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_vdbg_printk
	ldr	w19, [sp, #12]
	mov	w0, #9
	bl	_BIT
	and	w0, w0, w19
	b	LBB0_9
LBB0_5:
Lloh13:
	adrp	x8, _TPACPI_DBG_INIT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TPACPI_DBG_INIT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _TPACPI_DBG_INIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TPACPI_DBG_INIT@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_7:
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_8:
	bl	_vdbg_printk
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_hkey_handle,4,2                ; @hkey_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MLCG"

	.comm	_TPACPI_DBG_INIT,4,2            ; @TPACPI_DBG_INIT
l_.str.1:                               ; @.str.1
	.asciz	"kbdlight MLCG is unavailable\n"

l_.str.2:                               ; @.str.2
	.asciz	"qdd"

l_.str.3:                               ; @.str.3
	.asciz	"kbdlight MLCG failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"kbdlight MLCG err: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"kbdlight MLCG returned 0x%x\n"

	.no_dead_strip	_kbdlight_is_supported
.subsections_via_symbols
