	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3646_set_ctrl
_lm3646_set_ctrl:                       ## @lm3646_set_ctrl
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_lm3646_flash
	movq	%rax, %r14
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_18
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_17:
	movl	(%r14), %r14d
	movq	_REG_TORCH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MASK_TORCH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rbx), %edi
	callq	_LM3646_TOTAL_TORCH_BRT_uA_TO_REG
	shll	$4, %eax
	jmp	LBB0_14
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_13:
	movl	(%r14), %r14d
	movq	_REG_FLASH_TOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MASK_FLASH_TOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rbx), %edi
	callq	_LM3646_FLASH_TOUT_ms_TO_REG
	jmp	LBB0_14
LBB0_10:
	movl	(%r14), %edi
	movq	_REG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_19
## %bb.11:
	movq	_MASK_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-36(%rbp), %ecx
	movq	_MODE_FLASH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_19
## %bb.12:
	movq	_V4L2_FLASH_LED_MODE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movl	(%r14), %edi
	movq	_REG_STROBE_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_STROBE_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %ecx
	shll	$7, %ecx
	jmp	LBB0_15
LBB0_6:
	movl	(%r14), %edi
	movq	_REG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_19
## %bb.7:
	movq	_MASK_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-36(%rbp), %ecx
	movq	_MODE_SHDN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_19
## %bb.8:
	movq	_V4L2_FLASH_LED_MODE_FLASH@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_lm3646_mode_ctrl
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	4(%rbx), %esi
	movq	_V4L2_FLASH_LED_MODE_FLASH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_4
## %bb.3:
	movq	_V4L2_FLASH_LED_MODE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_4:
	movq	%r14, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lm3646_mode_ctrl               ## TAILCALL
LBB0_16:
	movl	(%r14), %r14d
	movq	_REG_FLASH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MASK_FLASH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rbx), %edi
	callq	_LM3646_TOTAL_FLASH_BRT_uA_TO_REG
LBB0_14:
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_13
	.long	L0_0_set_10
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FLASH_LED_MODE_FLASH,4,2  ## @V4L2_FLASH_LED_MODE_FLASH
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ## @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_STROBE_SRC,4,2             ## @REG_STROBE_SRC
	.comm	_MASK_STROBE_SRC,4,2            ## @MASK_STROBE_SRC
	.comm	_REG_ENABLE,4,2                 ## @REG_ENABLE
	.comm	_MASK_ENABLE,4,2                ## @MASK_ENABLE
	.comm	_MODE_SHDN,4,2                  ## @MODE_SHDN
	.comm	_MODE_FLASH,4,2                 ## @MODE_FLASH
	.comm	_REG_FLASH_TOUT,4,2             ## @REG_FLASH_TOUT
	.comm	_MASK_FLASH_TOUT,4,2            ## @MASK_FLASH_TOUT
	.comm	_REG_FLASH_BR,4,2               ## @REG_FLASH_BR
	.comm	_MASK_FLASH_BR,4,2              ## @MASK_FLASH_BR
	.comm	_REG_TORCH_BR,4,2               ## @REG_TORCH_BR
	.comm	_MASK_TORCH_BR,4,2              ## @MASK_TORCH_BR
	.no_dead_strip	_lm3646_set_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3646_set_ctrl
_lm3646_set_ctrl:                       ; @lm3646_set_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_to_lm3646_flash
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _REG_TORCH_BR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_TORCH_BR@GOTPAGEOFF]
	ldr	w19, [x19]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	adrp	x8, _MASK_TORCH_BR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MASK_TORCH_BR@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	ldr	w0, [x20, #4]
	bl	_LM3646_TOTAL_TORCH_BRT_uA_TO_REG
	lsl	w3, w0, #4
	b	LBB0_19
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_4:
Lloh11:
	adrp	x8, _REG_FLASH_TOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_FLASH_TOUT@GOTPAGEOFF]
	ldr	w19, [x19]
Lloh13:
	ldr	w21, [x8]
Lloh14:
	adrp	x8, _MASK_FLASH_TOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MASK_FLASH_TOUT@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
	ldr	w0, [x20, #4]
	bl	_LM3646_FLASH_TOUT_ms_TO_REG
	b	LBB0_18
LBB0_5:
	ldr	w0, [x19]
Lloh17:
	adrp	x8, _REG_ENABLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w8, [sp, #12]
Lloh20:
	adrp	x9, _MASK_ENABLE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MASK_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh23:
	adrp	x9, _MODE_FLASH@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MODE_FLASH@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.7:
Lloh26:
	adrp	x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	ldr	w0, [x19]
Lloh28:
	adrp	x8, _REG_STROBE_SRC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REG_STROBE_SRC@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _MASK_STROBE_SRC@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MASK_STROBE_SRC@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	w8, [x20, #4]
	lsl	w3, w8, #7
	b	LBB0_20
LBB0_9:
	ldr	w0, [x19]
Lloh34:
	adrp	x8, _REG_ENABLE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _REG_ENABLE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_13
; %bb.10:
	ldr	w8, [sp, #12]
Lloh37:
	adrp	x9, _MASK_ENABLE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _MASK_ENABLE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh40:
	adrp	x9, _MODE_SHDN@GOTPAGE
Lloh41:
	ldr	x9, [x9, _MODE_SHDN@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.11:
Lloh43:
	adrp	x8, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGE
Lloh44:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lm3646_mode_ctrl
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
	ldr	w1, [x20, #4]
Lloh45:
	adrp	x8, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGE
Lloh46:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_16
; %bb.15:
Lloh48:
	adrp	x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
LBB0_16:
	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
	add	sp, sp, #64
	b	_lm3646_mode_ctrl
LBB0_17:
Lloh51:
	adrp	x8, _REG_FLASH_BR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _REG_FLASH_BR@GOTPAGEOFF]
	ldr	w19, [x19]
Lloh53:
	ldr	w21, [x8]
Lloh54:
	adrp	x8, _MASK_FLASH_BR@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MASK_FLASH_BR@GOTPAGEOFF]
Lloh56:
	ldr	w22, [x8]
	ldr	w0, [x20, #4]
	bl	_LM3646_TOTAL_FLASH_BRT_uA_TO_REG
LBB0_18:
	mov	x3, x0
LBB0_19:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
LBB0_20:
	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
	add	sp, sp, #64
	b	_regmap_update_bits
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FLASH_LED_MODE_FLASH,4,2  ; @V4L2_FLASH_LED_MODE_FLASH
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ; @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_STROBE_SRC,4,2             ; @REG_STROBE_SRC
	.comm	_MASK_STROBE_SRC,4,2            ; @MASK_STROBE_SRC
	.comm	_REG_ENABLE,4,2                 ; @REG_ENABLE
	.comm	_MASK_ENABLE,4,2                ; @MASK_ENABLE
	.comm	_MODE_SHDN,4,2                  ; @MODE_SHDN
	.comm	_MODE_FLASH,4,2                 ; @MODE_FLASH
	.comm	_REG_FLASH_TOUT,4,2             ; @REG_FLASH_TOUT
	.comm	_MASK_FLASH_TOUT,4,2            ; @MASK_FLASH_TOUT
	.comm	_REG_FLASH_BR,4,2               ; @REG_FLASH_BR
	.comm	_MASK_FLASH_BR,4,2              ; @MASK_FLASH_BR
	.comm	_REG_TORCH_BR,4,2               ; @REG_TORCH_BR
	.comm	_MASK_TORCH_BR,4,2              ; @MASK_TORCH_BR
	.no_dead_strip	_lm3646_set_ctrl
.subsections_via_symbols
