	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_auto_brightness
_set_auto_brightness:                   ## @set_auto_brightness
	.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
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	$4, -32(%rbp)
	movq	_MSI_EC_COMMAND_LCD_LEVEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	-32(%rbp), %rsi
	leaq	-36(%rbp), %rcx
	movl	$1, %edx
	movl	$1, %r8d
	callq	_ec_transaction
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movl	$132, -32(%rbp)
	movl	$247, %eax
	andl	-36(%rbp), %eax
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	setne	%cl
	leal	(%rax,%rcx,8), %eax
	movl	%eax, -28(%rbp)
	movl	(%r14), %edi
	leaq	-32(%rbp), %rsi
	movl	$2, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ec_transaction
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSI_EC_COMMAND_LCD_LEVEL,4,2   ## @MSI_EC_COMMAND_LCD_LEVEL
	.no_dead_strip	_set_auto_brightness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_auto_brightness
_set_auto_brightness:                   ; @set_auto_brightness
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	w8, #4
	str	w8, [sp, #16]
Lloh3:
	adrp	x20, _MSI_EC_COMMAND_LCD_LEVEL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _MSI_EC_COMMAND_LCD_LEVEL@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x1, sp, #16
	add	x3, sp, #12
	mov	w2, #1
	mov	w4, #1
	bl	_ec_transaction
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w8, #132
	ldr	w9, [sp, #12]
	mov	w10, #247
	and	w9, w9, w10
	cmp	w19, #0
	cset	w10, ne
	bfi	w9, w10, #3, #1
	stp	w8, w9, [sp, #16]
	ldr	w0, [x20]
	add	x1, sp, #16
	mov	w2, #2
	mov	x3, #0
	mov	w4, #0
	bl	_ec_transaction
LBB0_2:
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MSI_EC_COMMAND_LCD_LEVEL,4,2   ; @MSI_EC_COMMAND_LCD_LEVEL
	.no_dead_strip	_set_auto_brightness
.subsections_via_symbols
