	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp5562_store_engine_mux
_lp5562_store_engine_mux:               ## @lp5562_store_engine_mux
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r15
	callq	_to_i2c_client
	movl	%eax, %edi
	callq	_i2c_get_clientdata
	movq	(%rax), %r12
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_streq
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_LP5562_ENG_FOR_RGB_M@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_LP5562_ENG_SEL_RGB@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %r13d
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_LP5562_REG_ENG_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	callq	_lp55xx_update_bits
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_streq
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movl	(%r12), %eax
	movq	_LP5562_ENG_FOR_W_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	$128, %eax
	je	LBB0_10
## %bb.4:
	cmpl	$130, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.7:
	movq	_LP5562_ENG2_FOR_W@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_12:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_LP5562_ENG3_FOR_W@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	_LP5562_ENG1_FOR_W@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RGB"

	.comm	_LP5562_ENG_FOR_RGB_M,4,2       ## @LP5562_ENG_FOR_RGB_M
	.comm	_LP5562_ENG_SEL_RGB,4,2         ## @LP5562_ENG_SEL_RGB
L_.str.1:                               ## @.str.1
	.asciz	"W"

	.comm	_LP5562_ENG_FOR_W_M,4,2         ## @LP5562_ENG_FOR_W_M
	.comm	_LP5562_ENG1_FOR_W,4,2          ## @LP5562_ENG1_FOR_W
	.comm	_LP5562_ENG2_FOR_W,4,2          ## @LP5562_ENG2_FOR_W
	.comm	_LP5562_ENG3_FOR_W,4,2          ## @LP5562_ENG3_FOR_W
	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"choose RGB or W\n"

	.comm	_LP5562_REG_ENG_SEL,4,2         ## @LP5562_REG_ENG_SEL
	.no_dead_strip	_lp5562_store_engine_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp5562_store_engine_mux
_lp5562_store_engine_mux:               ; @lp5562_store_engine_mux
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x22, x2
	mov	x21, x0
	bl	_to_i2c_client
	bl	_i2c_get_clientdata
	ldr	x20, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_sysfs_streq
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _LP5562_ENG_FOR_RGB_M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LP5562_ENG_FOR_RGB_M@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	adrp	x8, _LP5562_ENG_SEL_RGB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LP5562_ENG_SEL_RGB@GOTPAGEOFF]
LBB0_2:
	ldr	w22, [x8]
	add	x23, x20, #4
	mov	x0, x23
	bl	_mutex_lock
Lloh7:
	adrp	x8, _LP5562_REG_ENG_SEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LP5562_REG_ENG_SEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_lp55xx_update_bits
	mov	x0, x23
	bl	_mutex_unlock
	b	LBB0_10
LBB0_3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_sysfs_streq
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _LP5562_ENG_FOR_W_M@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LP5562_ENG_FOR_W_M@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x9]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.5:
	cmp	w8, #130
	b.eq	LBB0_12
; %bb.6:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.7:
Lloh15:
	adrp	x8, _LP5562_ENG2_FOR_W@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LP5562_ENG2_FOR_W@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_9:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh22:
	adrp	x8, _LP5562_ENG3_FOR_W@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LP5562_ENG3_FOR_W@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
Lloh24:
	adrp	x8, _LP5562_ENG1_FOR_W@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LP5562_ENG1_FOR_W@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RGB"

	.comm	_LP5562_ENG_FOR_RGB_M,4,2       ; @LP5562_ENG_FOR_RGB_M
	.comm	_LP5562_ENG_SEL_RGB,4,2         ; @LP5562_ENG_SEL_RGB
l_.str.1:                               ; @.str.1
	.asciz	"W"

	.comm	_LP5562_ENG_FOR_W_M,4,2         ; @LP5562_ENG_FOR_W_M
	.comm	_LP5562_ENG1_FOR_W,4,2          ; @LP5562_ENG1_FOR_W
	.comm	_LP5562_ENG2_FOR_W,4,2          ; @LP5562_ENG2_FOR_W
	.comm	_LP5562_ENG3_FOR_W,4,2          ; @LP5562_ENG3_FOR_W
	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"choose RGB or W\n"

	.comm	_LP5562_REG_ENG_SEL,4,2         ; @LP5562_REG_ENG_SEL
	.no_dead_strip	_lp5562_store_engine_mux
.subsections_via_symbols
