	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applesmc_light_show
_applesmc_light_show:                   ## @applesmc_light_show
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	_applesmc_light_show.data_length(%rip), %edx
	testl	%edx, %edx
	je	LBB0_1
LBB0_7:
	movq	_LIGHT_SENSOR_LEFT_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-80(%rbp), %rsi
	callq	_applesmc_read_key
	movl	%eax, %ebx
	movl	_applesmc_light_show.data_length(%rip), %edx
	cmpl	$10, %edx
	jne	LBB0_9
## %bb.8:
	movl	-56(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, %r15d
	sarl	$2, %r15d
	xorl	%r8d, %r8d
	testl	%ebx, %ebx
	jne	LBB0_13
	jmp	LBB0_12
LBB0_1:
	movq	_LIGHT_SENSOR_LEFT_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_applesmc_get_entry_by_key
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.3:
	movq	%rbx, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.10:
	movl	-72(%rbp), %r15d
	movq	_LIGHT_SENSOR_RIGHT_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-80(%rbp), %rsi
	callq	_applesmc_read_key
	movl	%eax, %ebx
	movl	-72(%rbp), %r8d
	testl	%ebx, %ebx
	jne	LBB0_13
LBB0_12:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	callq	_snprintf
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_4:
	movl	(%rbx), %esi
	cmpl	$11, %esi
	jl	LBB0_6
## %bb.5:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%esi, _applesmc_light_show.data_length(%rip)
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movl	_applesmc_light_show.data_length(%rip), %edx
	jmp	LBB0_7
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_applesmc_light_show.data_length,4,2 ## @applesmc_light_show.data_length
	.comm	_LIGHT_SENSOR_LEFT_KEY,4,2      ## @LIGHT_SENSOR_LEFT_KEY
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"light sensor data length set to %d\n"

	.comm	_LIGHT_SENSOR_RIGHT_KEY,4,2     ## @LIGHT_SENSOR_RIGHT_KEY
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"(%d,%d)\n"

	.no_dead_strip	_applesmc_light_show
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applesmc_light_show
_applesmc_light_show:                   ; @applesmc_light_show
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	adrp	x21, _applesmc_light_show.data_length@PAGE
	ldr	w2, [x21, _applesmc_light_show.data_length@PAGEOFF]
Lloh3:
	adrp	x22, _LIGHT_SENSOR_LEFT_KEY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LIGHT_SENSOR_LEFT_KEY@GOTPAGEOFF]
	cbz	w2, LBB0_3
LBB0_1:
	ldr	w0, [x22]
	mov	x1, sp
	bl	_applesmc_read_key
	mov	x20, x0
	ldr	w2, [x21, _applesmc_light_show.data_length@PAGEOFF]
	cmp	w2, #10
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [sp, #24]
	bl	_be16_to_cpu
	mov	w4, #0
	asr	w21, w0, #2
	cbnz	w20, LBB0_11
	b	LBB0_8
LBB0_3:
	ldr	w0, [x22]
	bl	_applesmc_get_entry_by_key
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.4:
	ldr	x8, [sp, #40]
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_14
; %bb.5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_6:
	cbnz	w20, LBB0_11
; %bb.7:
	ldr	w21, [sp, #8]
Lloh8:
	adrp	x8, _LIGHT_SENSOR_RIGHT_KEY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LIGHT_SENSOR_RIGHT_KEY@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, sp
	bl	_applesmc_read_key
	mov	x20, x0
	ldr	w4, [sp, #8]
	cbnz	w20, LBB0_11
LBB0_8:
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_snprintf
	mov	x20, x0
	b	LBB0_11
LBB0_9:
	ldr	w1, [x20]
	cmp	w1, #11
	b.lt	LBB0_13
; %bb.10:
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	ldr	x8, [sp, #40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	str	w1, [x21, _applesmc_light_show.data_length@PAGEOFF]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldr	w2, [x21, _applesmc_light_show.data_length@PAGEOFF]
	b	LBB0_1
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_applesmc_light_show.data_length,4,2 ; @applesmc_light_show.data_length
	.comm	_LIGHT_SENSOR_LEFT_KEY,4,2      ; @LIGHT_SENSOR_LEFT_KEY
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"light sensor data length set to %d\n"

	.comm	_LIGHT_SENSOR_RIGHT_KEY,4,2     ; @LIGHT_SENSOR_RIGHT_KEY
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"(%d,%d)\n"

	.no_dead_strip	_applesmc_light_show
.subsections_via_symbols
