	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_als_switch
_asus_als_switch:                       ## @asus_als_switch
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_3
## %bb.1:
	movq	_PEGA_ALS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_asus_pega_lucid_set
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_PEGA_ALS_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_asus_pega_lucid_set
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movl	4(%rbx), %edi
	movq	_METHOD_ALS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_write_acpi_int
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warning
LBB0_6:
	movl	%r14d, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PEGA_ALS,4,2                   ## @PEGA_ALS
	.comm	_PEGA_ALS_POWER,4,2             ## @PEGA_ALS_POWER
	.comm	_METHOD_ALS_CONTROL,4,2         ## @METHOD_ALS_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error setting light sensor switch\n"

	.no_dead_strip	_asus_als_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asus_als_switch
_asus_als_switch:                       ; @asus_als_switch
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _PEGA_ALS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PEGA_ALS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_asus_pega_lucid_set
	cbnz	w0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _PEGA_ALS_POWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PEGA_ALS_POWER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_asus_pega_lucid_set
	cbnz	w0, LBB0_4
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20, #4]
Lloh6:
	adrp	x8, _METHOD_ALS_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _METHOD_ALS_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_write_acpi_int
	cbz	w0, LBB0_5
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warning
LBB0_5:
	str	w19, [x20]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PEGA_ALS,4,2                   ; @PEGA_ALS
	.comm	_PEGA_ALS_POWER,4,2             ; @PEGA_ALS_POWER
	.comm	_METHOD_ALS_CONTROL,4,2         ; @METHOD_ALS_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error setting light sensor switch\n"

	.no_dead_strip	_asus_als_switch
.subsections_via_symbols
