	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3533_set_lvled_config
_lm3533_set_lvled_config:               ## @lm3533_set_lvled_config
	.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
                                        ## kill: def $esi killed $esi def $rsi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_LM3533_LVLED_ID_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	_LM3533_LED_ID_MAX@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jge	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	%rdi, %r14
	leal	(%rsi,%rsi), %eax
	leal	-8(%rax), %ecx
	cmpl	$4, %esi
	movq	_LM3533_REG_OUTPUT_CONF2@GOTPCREL(%rip), %rsi
	cmovlq	_LM3533_REG_OUTPUT_CONF1@GOTPCREL(%rip), %rsi
	movq	_LM3533_LED_ID_MASK@GOTPCREL(%rip), %rdi
	movzbl	%cl, %ecx
	cmovll	%eax, %ecx
	movl	(%rdi), %eax
	shll	%cl, %eax
	movl	(%rsi), %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_lm3533_update
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_LM3533_LVLED_ID_MAX,4,2        ## @LM3533_LVLED_ID_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LM3533_LED_ID_MAX,4,2          ## @LM3533_LED_ID_MAX
	.comm	_LM3533_REG_OUTPUT_CONF1,4,2    ## @LM3533_REG_OUTPUT_CONF1
	.comm	_LM3533_REG_OUTPUT_CONF2,4,2    ## @LM3533_REG_OUTPUT_CONF2
	.comm	_LM3533_LED_ID_MASK,4,2         ## @LM3533_LED_ID_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set lvled config\n"

	.no_dead_strip	_lm3533_set_lvled_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3533_set_lvled_config
_lm3533_set_lvled_config:               ; @lm3533_set_lvled_config
	.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
	cbz	w1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _LM3533_LVLED_ID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM3533_LVLED_ID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _LM3533_LED_ID_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM3533_LED_ID_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x19, x0
	lsl	w8, w1, #1
	sub	w9, w8, #8
	cmp	w1, #4
	csel	w8, w8, w9, lt
Lloh9:
	adrp	x9, _LM3533_REG_OUTPUT_CONF1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LM3533_REG_OUTPUT_CONF1@GOTPAGEOFF]
Lloh11:
	adrp	x10, _LM3533_REG_OUTPUT_CONF2@GOTPAGE
Lloh12:
	ldr	x10, [x10, _LM3533_REG_OUTPUT_CONF2@GOTPAGEOFF]
	csel	x9, x9, x10, lt
	ldr	w1, [x9]
Lloh13:
	adrp	x9, _LM3533_LED_ID_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _LM3533_LED_ID_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w3, w9, w8
	lsl	w2, w2, w8
	bl	_lm3533_update
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.6:
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LM3533_LVLED_ID_MAX,4,2        ; @LM3533_LVLED_ID_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LM3533_LED_ID_MAX,4,2          ; @LM3533_LED_ID_MAX
	.comm	_LM3533_REG_OUTPUT_CONF1,4,2    ; @LM3533_REG_OUTPUT_CONF1
	.comm	_LM3533_REG_OUTPUT_CONF2,4,2    ; @LM3533_REG_OUTPUT_CONF2
	.comm	_LM3533_LED_ID_MASK,4,2         ; @LM3533_LED_ID_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set lvled config\n"

	.no_dead_strip	_lm3533_set_lvled_config
.subsections_via_symbols
