	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3646_init_device
_lm3646_init_device:                    ## @lm3646_init_device
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	movq	_REG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	$252, %eax
	andl	-28(%rbp), %eax
	movl	%eax, (%rbx)
	movq	_V4L2_FLASH_LED_MODE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lm3646_mode_ctrl
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movl	4(%rbx), %r14d
	movq	_REG_LED1_FLASH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_LM3646_LED1_FLASH_BRT_uA_TO_REG
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	$127, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	4(%rbx), %r14d
	movq	_REG_LED1_TORCH_BR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_LM3646_LED1_TORCH_BRT_uA_TO_REG
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	$127, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	movq	_REG_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ENABLE,4,2                 ## @REG_ENABLE
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ## @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_LED1_FLASH_BR,4,2          ## @REG_LED1_FLASH_BR
	.comm	_REG_LED1_TORCH_BR,4,2          ## @REG_LED1_TORCH_BR
	.comm	_REG_FLAG,4,2                   ## @REG_FLAG
	.no_dead_strip	_lm3646_init_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3646_init_device
_lm3646_init_device:                    ; @lm3646_init_device
	.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	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _REG_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfc
	str	w8, [x19]
Lloh3:
	adrp	x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_FLASH_LED_MODE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lm3646_mode_ctrl
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w20, [x19, #4]
Lloh6:
	adrp	x8, _REG_LED1_FLASH_BR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_LED1_FLASH_BR@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_LM3646_LED1_FLASH_BRT_uA_TO_REG
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #127
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_5
; %bb.3:
	ldr	w20, [x19, #4]
Lloh9:
	adrp	x8, _REG_LED1_TORCH_BR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_LED1_TORCH_BR@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_LM3646_LED1_TORCH_BRT_uA_TO_REG
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #127
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x8, _REG_FLAG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_FLAG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ENABLE,4,2                 ; @REG_ENABLE
	.comm	_V4L2_FLASH_LED_MODE_NONE,4,2   ; @V4L2_FLASH_LED_MODE_NONE
	.comm	_REG_LED1_FLASH_BR,4,2          ; @REG_LED1_FLASH_BR
	.comm	_REG_LED1_TORCH_BR,4,2          ; @REG_LED1_TORCH_BR
	.comm	_REG_FLAG,4,2                   ; @REG_FLAG
	.no_dead_strip	_lm3646_init_device
.subsections_via_symbols
