	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m5mols_s_power
_m5mols_s_power:                        ## @m5mols_s_power
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_m5mols
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_m5mols_sensor_power
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	%r14, %rdi
	callq	_m5mols_fw_start
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_REG_SAMSUNG_TECHWIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_is_manufacturer
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	_REG_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_m5mols_set_mode
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	testl	%eax, %eax
	js	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_m5mols_sensor_power
	movl	%eax, %ebx
	movq	$0, 8(%r15)
LBB0_9:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_m5mols_auto_focus_stop
	testl	%eax, %eax
	jns	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_warn
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SAMSUNG_TECHWIN,4,2        ## @REG_SAMSUNG_TECHWIN
	.comm	_REG_MONITOR,4,2                ## @REG_MONITOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Soft landing lens failed\n"

	.no_dead_strip	_m5mols_s_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m5mols_s_power
_m5mols_s_power:                        ; @m5mols_s_power
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x20, x0
	bl	_to_m5mols
	mov	x19, x0
	bl	_mutex_lock
	cbz	w21, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_m5mols_sensor_power
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_m5mols_fw_start
	mov	x21, x0
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _REG_SAMSUNG_TECHWIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_SAMSUNG_TECHWIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_is_manufacturer
	cbz	x0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _REG_MONITOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_MONITOR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_m5mols_set_mode
	cbz	w0, LBB0_8
; %bb.5:
	tbnz	w0, #31, LBB0_9
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_m5mols_sensor_power
	mov	x21, x0
	str	xzr, [x19, #8]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	bl	_m5mols_auto_focus_stop
	tbz	w0, #31, LBB0_6
LBB0_9:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_v4l2_warn
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SAMSUNG_TECHWIN,4,2        ; @REG_SAMSUNG_TECHWIN
	.comm	_REG_MONITOR,4,2                ; @REG_MONITOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Soft landing lens failed\n"

	.no_dead_strip	_m5mols_s_power
.subsections_via_symbols
