	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ideapad_backlight_update_status
_ideapad_backlight_update_status:       ## @ideapad_backlight_update_status
	.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	%rdi, %r14
	callq	_bl_get_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_VPCCMD_W_BL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	callq	_write_ec_cmd
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_VPCCMD_W_BL_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movq	_FB_BLANK_POWERDOWN@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setne	%dl
	callq	_write_ec_cmd
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VPCCMD_W_BL,4,2                ## @VPCCMD_W_BL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_VPCCMD_W_BL_POWER,4,2          ## @VPCCMD_W_BL_POWER
	.comm	_FB_BLANK_POWERDOWN,8,3         ## @FB_BLANK_POWERDOWN
	.no_dead_strip	_ideapad_backlight_update_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ideapad_backlight_update_status
_ideapad_backlight_update_status:       ; @ideapad_backlight_update_status
	.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
	mov	x19, x0
	bl	_bl_get_data
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _VPCCMD_W_BL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPCCMD_W_BL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_write_ec_cmd
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _VPCCMD_W_BL_POWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VPCCMD_W_BL_POWER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _FB_BLANK_POWERDOWN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FB_BLANK_POWERDOWN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w2, ne
	bl	_write_ec_cmd
	cbz	x0, LBB0_6
LBB0_3:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VPCCMD_W_BL,4,2                ; @VPCCMD_W_BL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_VPCCMD_W_BL_POWER,4,2          ; @VPCCMD_W_BL_POWER
	.comm	_FB_BLANK_POWERDOWN,8,3         ; @FB_BLANK_POWERDOWN
	.no_dead_strip	_ideapad_backlight_update_status
.subsections_via_symbols
