	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3560_set_ctrl
_lm3560_set_ctrl:                       ## @lm3560_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	%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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_to_lm3560_flash
	movq	%rax, %r15
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_14
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_lm3560_torch_brt_ctrl
	jmp	LBB0_13
LBB0_6:
	movl	(%r15), %eax
	movq	_V4L2_FLASH_LED_MODE_FLASH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
	jmp	LBB0_3
LBB0_10:
	movl	4(%rbx), %edi
	callq	_LM3560_FLASH_TOUT_ms_TO_REG
	movl	8(%r15), %edi
	movq	_REG_FLASH_TOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$31, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_13
LBB0_8:
	movl	(%r15), %eax
	movq	_V4L2_FLASH_LED_MODE_FLASH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.9:
	movq	_V4L2_FLASH_LED_MODE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_3
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_14
LBB0_4:
	movl	8(%r15), %edi
	movq	_REG_CONFIG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %ecx
	shll	$2, %ecx
	movl	$4, %edx
	callq	_regmap_update_bits
	jmp	LBB0_13
LBB0_2:
	movl	4(%rbx), %eax
	movl	%eax, (%r15)
	movq	_V4L2_FLASH_LED_MODE_FLASH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_14
LBB0_3:
	movq	%r15, %rdi
	callq	_lm3560_mode_ctrl
	jmp	LBB0_13
LBB0_11:
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_lm3560_flash_brt_ctrl
LBB0_13:
	movl	%eax, %r13d
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FLASH_LED_MODE_FLASH,4,2  ## @V4L2_FLASH_LED_MODE_FLASH
	.comm	_REG_CONFIG1,4,2                ## @REG_CONFIG1
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ## @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_FLASH_TOUT,4,2             ## @REG_FLASH_TOUT
	.no_dead_strip	_lm3560_set_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3560_set_ctrl
_lm3560_set_ctrl:                       ; @lm3560_set_ctrl
	.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	x22, x1
	mov	x23, x0
	bl	_to_lm3560_flash
	mov	x21, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x23]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_13
; %bb.1:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w2, [x23, #4]
	mov	x0, x21
	mov	x1, x22
	bl	_lm3560_torch_brt_ctrl
	b	LBB0_12
LBB0_3:
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
	b	LBB0_10
LBB0_4:
	ldr	w0, [x23, #4]
	bl	_LM3560_FLASH_TOUT_ms_TO_REG
	mov	x3, x0
	ldr	w0, [x21, #8]
Lloh8:
	adrp	x8, _REG_FLASH_TOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_FLASH_TOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #31
	bl	_regmap_update_bits
	b	LBB0_12
LBB0_5:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x21]
	b	LBB0_10
LBB0_7:
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_8:
	ldr	w0, [x21, #8]
Lloh20:
	adrp	x8, _REG_CONFIG1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_CONFIG1@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w8, [x23, #4]
	lsl	w3, w8, #2
	mov	w2, #4
	bl	_regmap_update_bits
	b	LBB0_12
LBB0_9:
	ldr	w8, [x23, #4]
	str	w8, [x21]
Lloh23:
	adrp	x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_FLASH_LED_MODE_FLASH@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_13
LBB0_10:
	mov	x0, x21
	bl	_lm3560_mode_ctrl
	b	LBB0_12
LBB0_11:
	ldr	w2, [x23, #4]
	mov	x0, x21
	mov	x1, x22
	bl	_lm3560_flash_brt_ctrl
LBB0_12:
	mov	x20, x0
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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_3-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FLASH_LED_MODE_FLASH,4,2  ; @V4L2_FLASH_LED_MODE_FLASH
	.comm	_REG_CONFIG1,4,2                ; @REG_CONFIG1
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ; @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_FLASH_TOUT,4,2             ; @REG_FLASH_TOUT
	.no_dead_strip	_lm3560_set_ctrl
.subsections_via_symbols
