	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_engine_leds
_store_engine_leds:                     ## @store_engine_leds
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rdx, %rbx
	callq	_to_i2c_client
	movl	%eax, %edi
	callq	_i2c_get_clientdata
	movq	(%rax), %r12
	movq	8(%r12), %r13
	movl	$0, -44(%rbp)
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_lp5523_mux_parse
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_5
LBB0_2:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movslq	%r14d, %r14
	leaq	4(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	%r14d, (%r12)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	movq	-8(%r13,%r14,8), %rax
	movq	_LP55XX_ENGINE_LOAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_lp5523_load_mux
	testq	%rax, %rax
	cmoveq	%r15, %rbx
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_LP55XX_ENGINE_LOAD,8,3         ## @LP55XX_ENGINE_LOAD
	.no_dead_strip	_store_engine_leds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_engine_leds
_store_engine_leds:                     ; @store_engine_leds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x4
	mov	x19, x3
	mov	x22, x2
	bl	_to_i2c_client
	bl	_i2c_get_clientdata
	ldr	x21, [x0]
	ldr	x24, [x21, #8]
	str	wzr, [sp, #12]
	add	x1, sp, #12
	mov	x0, x22
	mov	x2, x19
	bl	_lp5523_mux_parse
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x23, x8
	b	LBB0_5
LBB0_2:
	add	x22, x21, #4
	mov	x0, x22
	bl	_mutex_lock
	str	w20, [x21]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x23, x8
	add	x8, x24, w20, sxtw #3
	ldur	x8, [x8, #-8]
Lloh6:
	adrp	x9, _LP55XX_ENGINE_LOAD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LP55XX_ENGINE_LOAD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [sp, #12]
	mov	x0, x21
	mov	x2, x20
	bl	_lp5523_load_mux
	cmp	x0, #0
	csel	x23, x19, x23, eq
LBB0_4:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_LP55XX_ENGINE_LOAD,8,3         ; @LP55XX_ENGINE_LOAD
	.no_dead_strip	_store_engine_leds
.subsections_via_symbols
