	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3533_set_hvled_config
_lm3533_set_hvled_config:               ## @lm3533_set_hvled_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
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_LM3533_HVLED_ID_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	_LM3533_BL_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
	movq	_LM3533_BL_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decb	%sil
	movl	%esi, %ecx
	shll	%cl, %eax
	shll	%cl, %edx
	movq	_LM3533_REG_OUTPUT_CONF1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	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_HVLED_ID_MAX,4,2        ## @LM3533_HVLED_ID_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LM3533_BL_ID_MAX,4,2           ## @LM3533_BL_ID_MAX
	.comm	_LM3533_BL_ID_MASK,4,2          ## @LM3533_BL_ID_MASK
	.comm	_LM3533_REG_OUTPUT_CONF1,4,2    ## @LM3533_REG_OUTPUT_CONF1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set hvled config\n"

	.no_dead_strip	_lm3533_set_hvled_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_hvled_config
_lm3533_set_hvled_config:               ; @lm3533_set_hvled_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_HVLED_ID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM3533_HVLED_ID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _LM3533_BL_ID_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM3533_BL_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
	sub	w8, w1, #1
Lloh9:
	adrp	x9, _LM3533_BL_ID_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LM3533_BL_ID_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w3, w9, w8
	lsl	w2, w2, w8
Lloh12:
	adrp	x8, _LM3533_REG_OUTPUT_CONF1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LM3533_REG_OUTPUT_CONF1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_lm3533_update
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.6:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_LM3533_HVLED_ID_MAX,4,2        ; @LM3533_HVLED_ID_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LM3533_BL_ID_MAX,4,2           ; @LM3533_BL_ID_MAX
	.comm	_LM3533_BL_ID_MASK,4,2          ; @LM3533_BL_ID_MASK
	.comm	_LM3533_REG_OUTPUT_CONF1,4,2    ; @LM3533_REG_OUTPUT_CONF1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set hvled config\n"

	.no_dead_strip	_lm3533_set_hvled_config
.subsections_via_symbols
